summaryrefslogtreecommitdiffstats
path: root/example_float.cc
diff options
context:
space:
mode:
Diffstat (limited to 'example_float.cc')
-rw-r--r--example_float.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/example_float.cc b/example_float.cc
index 6cdf1a6..fed91c7 100644
--- a/example_float.cc
+++ b/example_float.cc
@@ -13,22 +13,22 @@ int main(int argc, char** argv)
{
// Declare a float precision vector with an architecture-dependent
// number of elements
- float_vec x;
+ float32_vec x;
// Set each element separately. This is inefficient and should be
// avoided if possible, but we want to demonstrate it here anyway.
- for (int i=0; i<float_vec::size; ++i) x.set_elt(i, float(i));
- float_vec y = x + float_vec(1.0);
+ for (int i=0; i<float32_vec::size; ++i) x.set_elt(i, float(i));
+ float32_vec y = x + float32_vec(1.0);
y = sqrt(y);
- float_vec z = log(y);
+ float32_vec z = log(y);
// Boolean vectors are closely related to either float or float
// vectors, thus we need to make a distinction
- bool_float_vec b = x < y;
+ bool32_vec b = x < y;
// Integer vectors are closely related to either float or float,
// thus we need to make a distinction -- there is "int_vec"
- // corresponding to "float_vec", and there is "int_vec"
- // correpsonding to "float_vec".
- int_vec i = convert_int(y);
+ // corresponding to "float32_vec", and there is "int_vec"
+ // correpsonding to "float32_vec".
+ int32_vec i = convert_int(y);
cout << "x=" << x << "\n";
cout << "y=" << y << "\n";
OpenPOWER on IntegriCloud