Skip to content

Commit c27dfae

Browse files
committedJan 14, 2018
doc: Explain the difference between make_int, make_uint and make_float
1 parent 3445b39 commit c27dfae

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed
 

‎doc/wiki/misc/make_float.mwiki

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ The first set of overloads loads to given non-mask vector type.
5050

5151
The second set of overloads returns a value of unspecified type with which any non-mask vector can be initialized. E.g. {{c|1=uint32<4> x = make_float(1, 2, 3, 4);}}
5252

53+
The difference between {{ltf|misc/make_int}}, {{ltf|misc/make_uint}} and {{ltf|misc/make_float}} functions is only in the types of the parameters. The reason for existence of separate functions is to make coercion of literals of different types easier. Assigning e.g. {{c|make_int(2)}}, {{c|make_uint(2)}} or {{c|make_float(2)}} to a vector of any type will result in the same behavior: all elements within the vector will be set to 2. The bitwise representation of the resulting vectors will be different depending on the type of the vector.
54+
5355
===Parameters===
5456
{{par begin}}
5557
{{par | v0, ..., v15 | the values to initialize the vector to}}

‎doc/wiki/misc/make_int.mwiki

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ The first set of overloads loads to given non-mask vector type.
5050

5151
The second set of overloads returns a value of unspecified type with which any non-mask vector can be initialized. E.g. {{c|1=int32<4> x = make_int(1, 2, 3, 4);}}
5252

53+
The difference between {{ltf|misc/make_int}}, {{ltf|misc/make_uint}} and {{ltf|misc/make_float}} functions is only in the types of the parameters. The reason for existence of separate functions is to make coercion of literals of different types easier. Assigning e.g. {{c|make_int(2)}}, {{c|make_uint(2)}} or {{c|make_float(2)}} to a vector of any type will result in the same behavior: all elements within the vector will be set to 2. The bitwise representation of the resulting vectors will be different depending on the type of the vector.
54+
5355
===Parameters===
5456
{{par begin}}
5557
{{par | v0, ..., v15 | the values to initialize the vector to}}

‎doc/wiki/misc/make_uint.mwiki

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ The first set of overloads loads to given non-mask vector type.
5050

5151
The second set of overloads returns a value of unspecified type with which any non-mask vector can be initialized. E.g. {{c|1=uint32<4> x = make_uint(1, 2, 3, 4);}}
5252

53+
The difference between {{ltf|misc/make_int}}, {{ltf|misc/make_uint}} and {{ltf|misc/make_float}} functions is only in the types of the parameters. The reason for existence of separate functions is to make coercion of literals of different types easier. Assigning e.g. {{c|make_int(2)}}, {{c|make_uint(2)}} or {{c|make_float(2)}} to a vector of any type will result in the same behavior: all elements within the vector will be set to 2. The bitwise representation of the resulting vectors will be different depending on the type of the vector.
54+
5355
===Parameters===
5456
{{par begin}}
5557
{{par | v0, ..., v15 | the values to initialize the vector to}}

0 commit comments

Comments
 (0)
Please sign in to comment.