diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/.idea/Fancier.iml b/.idea/Fancier.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/Fancier.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..ded5f22
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..d69df26
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1641803929596
+
+
+ 1641803929596
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
index faaf2c1..fefaa74
--- a/README.md
+++ b/README.md
@@ -130,6 +130,8 @@ the _Fancier_ API. The `copy_libs.sh` script copies the already-compiled `.jar`
their build directories into the paths where these test applications expect them to be placed in
order to be able to link and run their code.
+For using the Linux test application it is necessary to have “at” installed and enabled. Moreover, the program must be executed as sudo.
+
## License
See [COPYING](COPYING.txt) and [COPYING.LESSER](COPYING.LESSER.txt).
diff --git a/gen/.gitignore b/gen/.gitignore
old mode 100755
new mode 100644
diff --git a/gen/generate.sh b/gen/generate.sh
index ed3502b..3177ddb 100755
--- a/gen/generate.sh
+++ b/gen/generate.sh
@@ -85,7 +85,11 @@ if word_in_list "$ACTION" all java math; then
fi
if word_in_list "$ACTION" all opencl math; then
- python "$FILL" "$OCL_TEMPLATES/math_lib.mako" "$OCL_DIR/math_lib.cl"
+ python "$FILL" "$OCL_TEMPLATES/fc_math.mako" "$OCL_DIR/fc_math.cl"
+fi
+
+if word_in_list "$ACTION" all opencl image; then
+ python "$FILL" "$OCL_TEMPLATES/fc_image.mako" "$OCL_DIR/fc_image.cl"
fi
for cls in Byte Double Float Int Long Short; do
diff --git a/gen/template/include/array.mako b/gen/template/include/array.mako
old mode 100755
new mode 100644
index e40a5d2..cb9f77c
--- a/gen/template/include/array.mako
+++ b/gen/template/include/array.mako
@@ -87,8 +87,8 @@ FANCIER_API fcError fc${type|c}Array_setArray(fc${type|c}Array* self, fcInt len,
FANCIER_API fcError fc${type|c}Array_setCopy(fc${type|c}Array* self, const fc${type|c}Array* array);
FANCIER_API fcError fc${type|c}Array_setBuffer(fc${type|c}Array* self, fcLong len, const void* v);
-FANCIER_API fcError fc${type|c}Array_syncToNative(fc${type|c}Array* self);
-FANCIER_API fcError fc${type|c}Array_syncToOCL(fc${type|c}Array* self);
+FANCIER_API fcError fc${type|c}Array_syncToHost(fc${type|c}Array* self);
+FANCIER_API fcError fc${type|c}Array_syncToDevice(fc${type|c}Array* self);
FANCIER_API fcBool fc${type|c}Array_valid(const fc${type|c}Array* self);
% endfor
diff --git a/gen/template/include/vector.mako b/gen/template/include/vector.mako
old mode 100755
new mode 100644
index 891ff1b..0152db7
--- a/gen/template/include/vector.mako
+++ b/gen/template/include/vector.mako
@@ -93,7 +93,6 @@ FANCIER_API void fcVector_releaseJNI(JNIEnv* env);
% for type in types:
% for vlen in vlens:
-FANCIER_API fc${type|c}${vlen}* fc${type|c}${vlen}_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fc${type|c}${vlen}_wrap(JNIEnv* env, fc${type|c}${vlen} vec);
FANCIER_API fc${type|c}${vlen} fc${type|c}${vlen}_unwrap(JNIEnv* env, jobject vec, fcError* err);
diff --git a/gen/template/include/vector_array.mako b/gen/template/include/vector_array.mako
old mode 100755
new mode 100644
index 1862c9c..0816579
--- a/gen/template/include/vector_array.mako
+++ b/gen/template/include/vector_array.mako
@@ -86,8 +86,8 @@ FANCIER_API fcError fc${type|c}${vlen}Array_setArray(fc${type|c}${vlen}Array* se
FANCIER_API fcError fc${type|c}${vlen}Array_setCopy(fc${type|c}${vlen}Array* self, const fc${type|c}${vlen}Array* array);
FANCIER_API fcError fc${type|c}${vlen}Array_setBuffer(fc${type|c}${vlen}Array* self, fcLong len, const void* v);
-FANCIER_API fcError fc${type|c}${vlen}Array_syncToNative(fc${type|c}${vlen}Array* self);
-FANCIER_API fcError fc${type|c}${vlen}Array_syncToOCL(fc${type|c}${vlen}Array* self);
+FANCIER_API fcError fc${type|c}${vlen}Array_syncToHost(fc${type|c}${vlen}Array* self);
+FANCIER_API fcError fc${type|c}${vlen}Array_syncToDevice(fc${type|c}${vlen}Array* self);
FANCIER_API fcBool fc${type|c}${vlen}Array_valid(const fc${type|c}${vlen}Array* self);
% endfor
diff --git a/gen/template/java/Array.mako b/gen/template/java/Array.mako
old mode 100755
new mode 100644
index f3127cc..1ab575f
--- a/gen/template/java/Array.mako
+++ b/gen/template/java/Array.mako
@@ -20,6 +20,8 @@ package es.ull.pcg.hpc.fancier.array;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
public class ${type|c}Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -87,8 +89,11 @@ public class ${type|c}Array implements AutoCloseable {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native ${type|l} get(int i);
+ @Translatable
public native void set(int i, ${type|l} x);
+ @Translatable
public native long length();
public native ${type|l}[] getArray();
@@ -97,6 +102,6 @@ public class ${type|c}Array implements AutoCloseable {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer buffer);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/gen/template/java/Math.mako b/gen/template/java/Math.mako
old mode 100755
new mode 100644
index e01e2b9..02d471a
--- a/gen/template/java/Math.mako
+++ b/gen/template/java/Math.mako
@@ -18,106 +18,177 @@
<%include file="/auto-gen.txt"/>
package es.ull.pcg.hpc.fancier;
+
public class Math {
+ @Translatable
public static final int CHAR_BIT = Byte.SIZE;
+ @Translatable
public static final byte SCHAR_MAX = Byte.MAX_VALUE;
+ @Translatable
public static final byte SCHAR_MIN = Byte.MIN_VALUE;
+ @Translatable
public static final byte CHAR_MAX = SCHAR_MAX;
+ @Translatable
public static final byte CHAR_MIN = SCHAR_MIN;
+ @Translatable
public static final short SHRT_MAX = Short.MAX_VALUE;
+ @Translatable
public static final short SHRT_MIN = Short.MIN_VALUE;
+ @Translatable
public static final int INT_MAX = Integer.MAX_VALUE;
+ @Translatable
public static final int INT_MIN = Integer.MIN_VALUE;
+ @Translatable
public static final long LONG_MAX = Long.MAX_VALUE;
+ @Translatable
public static final long LONG_MIN = Long.MIN_VALUE;
+ @Translatable
public static final int FLT_DIG = 6;
+ @Translatable
public static final int FLT_MANT_DIG = 24;
+ @Translatable
public static final int FLT_MAX_10_EXP = +38;
+ @Translatable
public static final int FLT_MAX_EXP = +128;
+ @Translatable
public static final int FLT_MIN_10_EXP = -37;
+ @Translatable
public static final int FLT_MIN_EXP = -125;
+ @Translatable
public static final int FLT_RADIX = 2;
+ @Translatable
public static final float FLT_MAX = Float.MAX_VALUE;
+ @Translatable
public static final float FLT_MIN = Float.MIN_NORMAL;
+ @Translatable
public static final float FLT_EPSILON = 0x1.0p-23f;
+ @Translatable
public static final int DBL_DIG = 15;
+ @Translatable
public static final int DBL_MANT_DIG = 53;
+ @Translatable
public static final int DBL_MAX_10_EXP = +308;
+ @Translatable
public static final int DBL_MAX_EXP = +1024;
+ @Translatable
public static final int DBL_MIN_10_EXP = -307;
+ @Translatable
public static final int DBL_MIN_EXP = -1021;
+ @Translatable
public static final int DBL_RADIX = 2;
+ @Translatable
public static final double DBL_MAX = Double.MAX_VALUE;
+ @Translatable
public static final double DBL_MIN = Double.MIN_NORMAL;
+ @Translatable
public static final double DBL_EPSILON = 0x1.0p-52;
+ @Translatable
public static final float M_E_F = 2.71828174591064f;
+ @Translatable
public static final float M_LOG2E_F = 1.44269502162933f;
+ @Translatable
public static final float M_LOG10E_F = 0.43429449200630f;
+ @Translatable
public static final float M_LN2_F = 0.69314718246460f;
+ @Translatable
public static final float M_LN10_F = 2.30258512496948f;
+ @Translatable
public static final float M_PI_F = 3.14159274101257f;
+ @Translatable
public static final float M_PI_2_F = 1.57079637050629f;
+ @Translatable
public static final float M_PI_4_F = 0.78539818525314f;
+ @Translatable
public static final float M_1_PI_F = 0.31830987334251f;
+ @Translatable
public static final float M_2_PI_F = 0.63661974668503f;
+ @Translatable
public static final float M_2_SQRTPI_F = 1.12837922573090f;
+ @Translatable
public static final float M_SQRT2_F = 1.41421353816986f;
+ @Translatable
public static final float M_SQRT1_2_F = 0.70710676908493f;
+ @Translatable
public static final double M_E = 2.718281828459045090796;
+ @Translatable
public static final double M_LOG2E = 1.442695040888963387005;
+ @Translatable
public static final double M_LOG10E = 0.434294481903251816668;
+ @Translatable
public static final double M_LN2 = 0.693147180559945286227;
+ @Translatable
public static final double M_LN10 = 2.302585092994045901094;
+ @Translatable
public static final double M_PI = 3.141592653589793115998;
+ @Translatable
public static final double M_PI_2 = 1.570796326794896557999;
+ @Translatable
public static final double M_PI_4 = 0.785398163397448278999;
+ @Translatable
public static final double M_1_PI = 0.318309886183790691216;
+ @Translatable
public static final double M_2_PI = 0.636619772367581382433;
+ @Translatable
public static final double M_2_SQRTPI = 1.128379167095512558561;
+ @Translatable
public static final double M_SQRT2 = 1.414213562373095145475;
+ @Translatable
public static final double M_SQRT1_2 = 0.707106781186547572737;
+ @Translatable
public static final float MAXFLOAT = Float.MAX_VALUE;
+ @Translatable
public static final float HUGE_VALF = Float.POSITIVE_INFINITY;
+ @Translatable
public static final double HUGE_VAL = Double.POSITIVE_INFINITY;
+ @Translatable
public static final float INFINITY = Float.POSITIVE_INFINITY;
+ @Translatable
public static final float NAN = Float.NaN;
// All types
% for type in types:
+ @Translatable
public static ${type|l} abs(${type|l} a) {
return a < ${defaults[type.lower()]}? (${type|l}) -a : a;
}
+ @Translatable
public static ${type|l} max(${type|l} a, ${type|l} b) {
return a > b? a : b;
}
+ @Translatable
public static ${type|l} min(${type|l} a, ${type|l} b) {
return a < b? a : b;
}
+ @Translatable
public static ${type|l} clamp(${type|l} a, ${type|l} b, ${type|l} c) {
return a < b? b : (a > c? c : a);
}
+ @Translatable
public static ${type|l} mix(${type|l} a, ${type|l} b, ${type|l} c) {
return (${type|l}) (a + (b - a) * c);
}
+ @Translatable
public static ${type|l} maxMag(${type|l} a, ${type|l} b) {
return abs(a) > abs(b)? a : b;
}
+ @Translatable
public static ${type|l} minMag(${type|l} a, ${type|l} b) {
return abs(a) < abs(b)? a : b;
}
+ @Translatable
public static ${type|l} select(${type|l} a, ${type|l} b, int c) {
return c == 0? a : b;
}
@@ -127,31 +198,38 @@ public class Math {
% for fname, num_params in math_int_functions.items():
% for type in inttypes:
+ @Translatable
public static native ${type|l} ${fname}(${', '.join([f'{type.lower()} {chr(i + ord("a"))}' for i in range(num_params)])});
% endfor
% endfor
+ @Translatable
public static native int mad24 (int a, int b, int c);
+ @Translatable
public static native int mul24 (int a, int b);
// Float types
% for fname, num_params in math_float_functions.items():
% for type in floattypes:
+ @Translatable
public static native ${type|l} ${fname}(${', '.join([f'{type.lower()} {chr(i + ord("a"))}' for i in range(num_params)])});
% endfor
% endfor
% for fname in ('scalb', 'ldexp', 'pown', 'rootn'):
% for type in floattypes:
+ @Translatable
public static native ${type|l} ${fname}(${type|l} a, int n);
% endfor
% endfor
% for fname in ('isFinite', 'isInf', 'isNaN', 'isNormal'):
% for type in floattypes:
+ @Translatable
public static native int ${fname}(${type|l} x);
% endfor
% endfor
% for fname in ('isOrdered', 'isUnordered'):
% for type in floattypes:
+ @Translatable
public static native int ${fname}(${type|l} x, ${type|l} y);
% endfor
% endfor
diff --git a/gen/template/java/RGBAImage.mako b/gen/template/java/RGBAImage.mako
index 3424f0b..33a56c7 100644
--- a/gen/template/java/RGBAImage.mako
+++ b/gen/template/java/RGBAImage.mako
@@ -19,13 +19,20 @@
package es.ull.pcg.hpc.fancier.image;
import java.nio.ByteBuffer;
+% if not android:
+import java.awt.image.BufferedImage;
+import java.awt.image.DataBufferInt;
+% endif
import es.ull.pcg.hpc.fancier.vector.Byte4;
import es.ull.pcg.hpc.fancier.vector.Int2;
import es.ull.pcg.hpc.fancier.vector.array.Byte4Array;
+import es.ull.pcg.hpc.fancier.Translatable;
+
% if android:
import android.graphics.Bitmap;
+
% endif
public class RGBAImage implements AutoCloseable {
@@ -44,13 +51,19 @@ public class RGBAImage implements AutoCloseable {
}
public RGBAImage(int[] pixels, int width) {
- initNative(pixels, width);
+ initNative(pixels, width, false);
}
public RGBAImage(RGBAImage image) {
initNative(image);
}
+% if not android:
+ public RGBAImage(BufferedImage image) {
+ initNative(((DataBufferInt) image.getRaster().getDataBuffer()).getData(), image.getWidth(), true);
+ }
+% endif
+
% if android:
public RGBAImage(Bitmap bmp) {
initNative(bmp);
@@ -77,18 +90,20 @@ public class RGBAImage implements AutoCloseable {
private native void initNative(long nativePtr);
private native void initNative(int width, int height);
- private native void initNative(int[] pixels, int width);
private native void initNative(RGBAImage image);
+ private native void initNative(int[] pixels, int width, boolean changeFromBGRA);
% if android:
private native void initNative(Bitmap bmp);
% endif
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public Byte4 get(Int2 coords) {
return get(coords.x, coords.y);
}
+ @Translatable
public void set(Int2 coords, Byte4 rgba) {
set(coords.x, coords.y, rgba);
}
@@ -109,21 +124,43 @@ public class RGBAImage implements AutoCloseable {
Byte4Array.setBuffer(buffer, y * getWidth() + x, rgba);
}
+ public void setPixels (int[] pixels, int width) {
+ setPixels(pixels, width, false);
+ }
+
+% if not android:
+ public void setPixels(BufferedImage image) {
+ setPixels(((DataBufferInt) image.getRaster().getDataBuffer()).getData(), image.getWidth(), true);
+ }
+
+ public void updateImage(BufferedImage image) {
+ updateArray(((DataBufferInt) image.getRaster().getDataBuffer()).getData(), true);
+ }
+% endif
+
+ @Translatable
public native Byte4 get(int x, int y);
+ @Translatable
public native void set(int x, int y, Byte4 rgba);
public native Byte4Array getPixels();
- public native void setPixels(int[] pixels, int width);
+ private native void setPixels(int[] pixels, int width, boolean changeFromBGRA);
public native void setPixels(RGBAImage image);
% if android:
public native void setPixels(Bitmap bmp);
public native void updateBitmap(Bitmap bmp);
% endif
+% if not android:
+ private native void updateArray(int[] array, boolean changeFromBGRA);
+% endif
+ @Translatable
public native Int2 getDims();
+ @Translatable
public native int getWidth();
+ @Translatable
public native int getHeight();
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/gen/template/java/Vector.mako b/gen/template/java/Vector.mako
old mode 100755
new mode 100644
index cca6fa2..0e690ad
--- a/gen/template/java/Vector.mako
+++ b/gen/template/java/Vector.mako
@@ -43,6 +43,7 @@
native_calls = [f'Math.{fname}(' + (', '.join([f'{param_name(i)}.{field}' for i in range(fnum_params)])) + ')' for field in vfields[:vlen]]
%>\
% if fnum_params > 0:
+ @Translatable
public static ${type|c}${vlen} ${fname}(${', '.join(param_list)}) {
return new ${type|c}${vlen}(${', '.join(native_calls)});
}
@@ -58,32 +59,42 @@ package es.ull.pcg.hpc.fancier.vector;
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class ${type|c}${vlen} {
## List of fields
% for field in vfields[:min(vlen, 4)]:
+ @Translatable
public ${type|l} ${field};
% endfor
% if vlen > 4:
+ @Translatable
public ${type|l}[] s = new ${type|l}[${vlen - 4}];
% endif
## Constructors
+ @Translatable
public ${type|c}${vlen}() {}
+ @Translatable
public ${type|c}${vlen}(${', '.join([f'{type.lower()} {field_to_varname(field)}' for field in vfields[:vlen]])}) {
set(${', '.join([f'{field_to_varname(field)}' for field in vfields[:vlen]])});
}
+ @Translatable
public void set(${', '.join([f'{type.lower()} {field_to_varname(field)}' for field in vfields[:vlen]])}) {
% for field in vfields[:vlen]:
this.${field} = ${field_to_varname(field)};
% endfor
}
+ @Translatable
public ${type|c}${vlen}(${type|l} v) {
this(${', '.join(['v'] * vlen)});
}
+ @Translatable
public void set(${type|l} v) {
set(${', '.join(['v'] * vlen)});
}
@@ -91,10 +102,12 @@ public class ${type|c}${vlen} {
% for param_set in sorted(set(fill_params(vlen))):
% if len(param_set) != vlen:
<% params, args = make_delegate_constructor(param_set, type, vfields) %>\
+ @Translatable
public ${type|c}${vlen}(${', '.join(params)}) {
this(${', '.join(args)});
}
+ @Translatable
public void set(${', '.join(params)}) {
set(${', '.join(args)});
}
@@ -102,12 +115,14 @@ public class ${type|c}${vlen} {
% endif
% endfor
## Passing as value parameter
+ @Translatable
public ${type|c}${vlen} value() {
return new ${type|c}${vlen}(this);
}
## Indexing
% if vlen > 2 and vlen % 2 == 0:
+ @Translatable
public ${type|c}${vlen//2} lo() {
return new ${type|c}${vlen//2}(${', '.join([field for field in vfields[:vlen//2]])});
}
@@ -118,6 +133,7 @@ public class ${type|c}${vlen} {
% endfor
}
+ @Translatable
public ${type|c}${vlen//2} hi() {
return new ${type|c}${vlen//2}(${', '.join([field for field in vfields[vlen//2:vlen]])});
}
@@ -128,6 +144,7 @@ public class ${type|c}${vlen} {
% endfor
}
+ @Translatable
public ${type|c}${vlen//2} odd() {
return new ${type|c}${vlen//2}(${', '.join([f'{vfields[i]}' for i in range(1, vlen, 2)])});
}
@@ -138,6 +155,7 @@ public class ${type|c}${vlen} {
% endfor
}
+ @Translatable
public ${type|c}${vlen//2} even() {
return new ${type|c}${vlen//2}(${', '.join([f'{vfields[i]}' for i in range(0, vlen, 2)])});
}
@@ -153,6 +171,7 @@ public class ${type|c}${vlen} {
<% cast_mask = ' & 0xff' if type.lower() == 'byte' else '' %>\
% for newtype in types:
% if newtype.lower() != type.lower():
+ @Translatable
public ${newtype|c}${vlen} convert${newtype|c}${vlen}() {
return new ${newtype|c}${vlen}(${', '.join([f'({newtype.lower()})({field}{cast_mask})' for field in vfields[:vlen]])});
}
@@ -166,6 +185,7 @@ public class ${type|c}${vlen} {
% endif
% endfor
% for newlen in vlens[:vlens.index(vlen)]:
+ @Translatable
public ${type|c}${newlen} as${type|c}${newlen}() {
return new ${type|c}${newlen}(${', '.join([field for field in vfields[:newlen]])});
}
@@ -179,6 +199,7 @@ public class ${type|c}${vlen} {
% endfor
## Comparison operators
% for fname, op in zip(['isEqual', 'isNotEqual', 'isGreater', 'isGreaterEqual', 'isLess', 'isLessEqual'], ['==', '!=', '>', '>=', '<', '<=']):
+ @Translatable
public static Int${vlen} ${fname}(${type|c}${vlen} a, ${type|c}${vlen} b) {
return new Int${vlen}(${', '.join([f'a.{field} {op} b.{field}? 1 : 0' for field in vfields[:vlen]])});
}
@@ -190,6 +211,7 @@ public class ${type|c}${vlen} {
}
% endfor
+ @Translatable
public static ${type|c}${vlen} select(${type|c}${vlen} a, ${type|c}${vlen} b, Int${vlen} c) {
return new ${type|c}${vlen}(${', '.join(f'Math.select(a.{field}, b.{field}, c.{field})' for field in vfields[:vlen])});
}
@@ -202,6 +224,7 @@ public class ${type|c}${vlen} {
% if type.lower() in floattypes:
% for fname in ('isFinite', 'isInf', 'isNaN', 'isNormal'):
+ @Translatable
public static Int${vlen} ${fname}(${type|c}${vlen} a) {
return new Int${vlen}(${', '.join(f'Math.{fname}(a.{field})' for field in vfields[:vlen])});
}
@@ -214,6 +237,7 @@ public class ${type|c}${vlen} {
% endfor
% for fname in ('isOrdered', 'isUnordered'):
+ @Translatable
public static Int${vlen} ${fname}(${type|c}${vlen} a, ${type|c}${vlen} b) {
return new Int${vlen}(${', '.join(f'Math.{fname}(a.{field}, b.{field})' for field in vfields[:vlen])});
}
@@ -227,15 +251,18 @@ public class ${type|c}${vlen} {
% endfor
% endif
## Any/All vector evaluation
+ @Translatable
public static int any(${type|c}${vlen} a) {
return (${' || '.join([f'a.{field} != {defaults[type.lower()]}' for field in vfields[:vlen]])})? 1 : 0;
}
+ @Translatable
public static int all(${type|c}${vlen} a) {
return (${' || '.join([f'a.{field} == {defaults[type.lower()]}' for field in vfields[:vlen]])})? 0 : 1;
}
## Basic element-wise arithmetic operations
+ @Translatable
public static ${type|c}${vlen} neg(${type|c}${vlen} a) {
return new ${type|c}${vlen}(${', '.join([f'({type.lower()})(-a.{field})' for field in vfields[:vlen]])});
}
@@ -247,6 +274,7 @@ public class ${type|c}${vlen} {
}
% for fname, op in zip(['add', 'sub'], ['+', '-']):
+ @Translatable
public static ${type|c}${vlen} ${fname}(${type|c}${vlen} a, ${type|c}${vlen} b) {
return new ${type|c}${vlen}(${', '.join([f'({type.lower()})(a.{field} {op} b.{field})' for field in vfields[:vlen]])});
}
@@ -261,6 +289,7 @@ public class ${type|c}${vlen} {
## Element-wise multiplication and division
% for fname, op in zip(['mul', 'div'], ['*', '/']):
% for param_type in sorted(set(floattypes + [type.lower()])):
+ @Translatable
public static ${param_type|c}${vlen} ${fname}(${type|c}${vlen} a, ${param_type|c}${vlen} b) {
return new ${param_type|c}${vlen}(${', '.join([f'({param_type.lower()})(a.{field} {op} b.{field})' for field in vfields[:vlen]])});
}
@@ -271,6 +300,7 @@ public class ${type|c}${vlen} {
% endfor
}
+ @Translatable
public static ${param_type|c}${vlen} ${fname}(${type|c}${vlen} a, ${param_type|l} k) {
return new ${param_type|c}${vlen}(${', '.join([f'({param_type.lower()})(a.{field} {op} k)' for field in vfields[:vlen]])});
}
@@ -286,6 +316,7 @@ public class ${type|c}${vlen} {
% if type.lower() in floattypes:
## Vector cross product for vectors of length 3 and 4
% if vlen in (3, 4):
+ @Translatable
public static ${type|c}${vlen} cross(${type|c}${vlen} a, ${type|c}${vlen} b) {
${type|c}${vlen} result = new ${type|c}${vlen}();
cross(a, b, result);
@@ -302,23 +333,28 @@ public class ${type|c}${vlen} {
}
% endif
+ @Translatable
public static ${type|l} dot(${type|c}${vlen} a, ${type|c}${vlen} b) {
return (${type|l})(${' + '.join([f'a.{field} * b.{field}' for field in vfields[:vlen]])});
}
+ @Translatable
public static double distance(${type|c}${vlen} a, ${type|c}${vlen} b) {
return distance(a, b, new ${type|c}${vlen}());
}
+ @Translatable
public static double distance(${type|c}${vlen} a, ${type|c}${vlen} b, ${type|c}${vlen} tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(${type|c}${vlen} a) {
return Math.sqrt(${' + '.join([f'a.{field} * a.{field}' for field in vfields[:vlen]])});
}
+ @Translatable
public static ${type|c}${vlen} normalize(${type|c}${vlen} a) {
${type|c}${vlen} result = new ${type|c}${vlen}();
normalize(a, result);
@@ -333,6 +369,7 @@ public class ${type|c}${vlen} {
}
% elif type.lower() in inttypes:
## Module (%) operator
+ @Translatable
public static ${type|c}${vlen} mod(${type|c}${vlen} a, ${type|c}${vlen} b) {
return new ${type|c}${vlen}(${', '.join([f'({type.lower()})(a.{field} % b.{field})' for field in vfields[:vlen]])});
}
@@ -343,6 +380,7 @@ public class ${type|c}${vlen} {
% endfor
}
+ @Translatable
public static ${type|c}${vlen} mod(${type|c}${vlen} a, ${type|l} k) {
return new ${type|c}${vlen}(${', '.join([f'({type.lower()})(a.{field} % k)' for field in vfields[:vlen]])});
}
@@ -355,6 +393,7 @@ public class ${type|c}${vlen} {
## Bitwise operators
% for fname, op in zip(['bitAnd', 'bitOr', 'bitXor'], ['&', '|', '^']):
+ @Translatable
public static ${type|c}${vlen} ${fname}(${type|c}${vlen} a, ${type|c}${vlen} b) {
return new ${type|c}${vlen}(${', '.join([f'({type.lower()})(a.{field} {op} b.{field})' for field in vfields[:vlen]])});
}
@@ -366,6 +405,7 @@ public class ${type|c}${vlen} {
}
% endfor
+ @Translatable
public static ${type|c}${vlen} bitNot(${type|c}${vlen} a) {
return new ${type|c}${vlen}(${', '.join([f'({type.lower()})(~a.{field})' for field in vfields[:vlen]])});
}
@@ -380,6 +420,7 @@ public class ${type|c}${vlen} {
${simple_elementwise(fname)}\
% endfor
+ @Translatable
public static ${type|c}${vlen} clamp(${type|c}${vlen} v, ${type|l} min, ${type|l} max) {
return new ${type|c}${vlen}(${', '.join([f'Math.clamp(v.{field}, min, max)' for field in vfields[:vlen]])});
}
@@ -390,6 +431,7 @@ ${simple_elementwise(fname)}\
% endfor
}
+ @Translatable
public static ${type|c}${vlen} max(${type|c}${vlen} x, ${type|l} y) {
return new ${type|c}${vlen}(${', '.join([f'Math.max(x.{field}, y)' for field in vfields[:vlen]])});
}
@@ -400,6 +442,7 @@ ${simple_elementwise(fname)}\
% endfor
}
+ @Translatable
public static ${type|c}${vlen} min(${type|c}${vlen} x, ${type|l} y) {
return new ${type|c}${vlen}(${', '.join([f'Math.min(x.{field}, y)' for field in vfields[:vlen]])});
}
@@ -410,6 +453,7 @@ ${simple_elementwise(fname)}\
% endfor
}
+ @Translatable
public static ${type|c}${vlen} mix(${type|c}${vlen} x, ${type|c}${vlen} y, ${type|l} a) {
return new ${type|c}${vlen}(${', '.join([f'Math.mix(x.{field}, y.{field}, a)' for field in vfields[:vlen]])});
}
@@ -424,6 +468,7 @@ ${simple_elementwise(fname)}\
${simple_elementwise(fname)}\
% endfor
+ @Translatable
public static ${type|c}${vlen} scalb(${type|c}${vlen} a, Int${vlen} n) {
return new ${type|c}${vlen}(${', '.join([f'Math.scalb(a.{field}, n.{field})' for field in vfields[:vlen]])});
}
@@ -434,6 +479,7 @@ ${simple_elementwise(fname)}\
% endfor
}
+ @Translatable
public static ${type|c}${vlen} ldexp(${type|c}${vlen} a, Int${vlen} n) {
return new ${type|c}${vlen}(${', '.join([f'Math.ldexp(a.{field}, n.{field})' for field in vfields[:vlen]])});
}
@@ -444,6 +490,7 @@ ${simple_elementwise(fname)}\
% endfor
}
+ @Translatable
public static ${type|c}${vlen} pown(${type|c}${vlen} a, Int${vlen} b) {
return new ${type|c}${vlen}(${', '.join([f'Math.pown(a.{field}, b.{field})' for field in vfields[:vlen]])});
}
@@ -454,6 +501,7 @@ ${simple_elementwise(fname)}\
% endfor
}
+ @Translatable
public static ${type|c}${vlen} rootn(${type|c}${vlen} a, Int${vlen} b) {
return new ${type|c}${vlen}(${', '.join([f'Math.pown(a.{field}, b.{field})' for field in vfields[:vlen]])});
}
@@ -464,6 +512,7 @@ ${simple_elementwise(fname)}\
% endfor
}
+ @Translatable
public static ${type|c}${vlen} smoothStep(${type|c}${vlen} a, ${type|c}${vlen} b, ${type|l} c) {
return new ${type|c}${vlen}(${', '.join([f'Math.smoothStep(a.{field}, b.{field}, c)' for field in vfields[:vlen]])});
}
@@ -479,6 +528,7 @@ ${simple_elementwise(fname)}\
% endfor
% if type.lower() == 'int':
+ @Translatable
public static ${type|c}${vlen} mad24(${type|c}${vlen} a, ${type|c}${vlen} b, ${type|c}${vlen} c) {
return new ${type|c}${vlen}(${', '.join([f'Math.mad24(a.{field}, b.{field}, c.{field})' for field in vfields[:vlen]])});
}
@@ -489,6 +539,7 @@ ${simple_elementwise(fname)}\
% endfor
}
+ @Translatable
public static ${type|c}${vlen} mul24(${type|c}${vlen} a, ${type|c}${vlen} b) {
return new ${type|c}${vlen}(${', '.join([f'Math.mul24(a.{field}, b.{field})' for field in vfields[:vlen]])});
}
diff --git a/gen/template/java/VectorArray.mako b/gen/template/java/VectorArray.mako
old mode 100755
new mode 100644
index 28d0586..a359731
--- a/gen/template/java/VectorArray.mako
+++ b/gen/template/java/VectorArray.mako
@@ -23,6 +23,9 @@ import es.ull.pcg.hpc.fancier.vector.${type|c}${vlen};
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class ${type|c}${vlen}Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -101,8 +104,11 @@ public class ${type|c}${vlen}Array implements AutoCloseable {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native ${type|c}${vlen} get(int i);
+ @Translatable
public native void set(int i, ${type|c}${vlen} x);
+ @Translatable
public native long length();
public native ${type|l}[] getArray();
@@ -111,6 +117,6 @@ public class ${type|c}${vlen}Array implements AutoCloseable {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/gen/template/opencl/fc_image.mako b/gen/template/opencl/fc_image.mako
new file mode 100644
index 0000000..01388c6
--- /dev/null
+++ b/gen/template/opencl/fc_image.mako
@@ -0,0 +1,38 @@
+## Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+## Copyright (C) 2021 Universidad de La Laguna.
+##
+## Fancier is free software: you can redistribute it and/or modify
+## it under the terms of the GNU Lesser General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## Fancier is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with Fancier. If not, see .
+##
+
+<%include file="/license.txt"/>
+<%include file="/auto-gen.txt"/>
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#endif // cl_khr_fp64
+
+#if defined(__EMBEDDED_PROFILE__) && defined(cles_khr_int64)
+#pragma OPENCL EXTENSION cles_khr_int64 : enable
+#endif // __EMBEDDED_PROFILE__ && cles_khr_int64
+
+uint index_img (uint2 dims, uint x, uint y) {
+ return y * dims.x + x;
+}
+
+int toRgba (uchar4 color) {
+ return ((color.x & 0xff) << 24) | ((color.y & 0xff) << 16) | ((color.z & 0xff) << 8) | ((color.w & 0xff) << 0);
+}
+
+uchar4 fromRgba (int rgba) {
+ return (uchar4)((uchar)((rgba >> 24) & 0xff), (uchar)((rgba >> 16) & 0xff), (uchar)((rgba >> 8) & 0xff), (uchar)((rgba >> 0) & 0xff));
+}
diff --git a/gen/template/opencl/math_lib.mako b/gen/template/opencl/fc_math.mako
old mode 100755
new mode 100644
similarity index 75%
rename from gen/template/opencl/math_lib.mako
rename to gen/template/opencl/fc_math.mako
index d71393c..2d956c9
--- a/gen/template/opencl/math_lib.mako
+++ b/gen/template/opencl/fc_math.mako
@@ -47,8 +47,14 @@ ${type|l} ${typed_float_fname('scalb', type)}(${type|l} a, int scaleFactor) {
${type|l}${vlen} ${type|l}${vlen}_scalb(${type|l}${vlen} a, int${vlen} scaleFactor) {
return (${type|l}${vlen})(${', '.join([f'{typed_float_fname("scalb", type)}(a.{field}, scaleFactor.{field})' for field in vfields[:vlen]])});
}
+% endfor
+% for vlen in vlens:
+${type|l}${vlen} ${type|l}${vlen}_smoothstep(${type|l}${vlen} a, ${type|l}${vlen} b, ${type|l} c) {
+ return (${type|l}${vlen})(${', '.join([f'smoothstep(a.{field}, b.{field}, c)' for field in vfields[:vlen]])});
+}
% endfor
+
% if type.lower() == 'double':
#endif // cl_khr_fp64
% endif
@@ -66,6 +72,14 @@ ${type|l} ${typed_int_builtin_fname('mix', type)}(${type|l} x, ${type|l} y, ${ty
return x + (y - x) * a;
}
+${type|l} ${typed_int_builtin_fname('maxmag', type)}(${type|l} a, ${type|l} b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+${type|l} ${typed_int_builtin_fname('minmag', type)}(${type|l} a, ${type|l} b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
% for vlen in vlens:
${type|l}${vlen} ${type|l}${vlen}_clamp(${type|l}${vlen} a, ${type|l}${vlen} min, ${type|l}${vlen} max) {
return (${type|l}${vlen})(${', '.join([f'{typed_int_builtin_fname("clamp", type)}(a.{field}, min.{field}, max.{field})' for field in vfields[:vlen]])});
@@ -75,6 +89,14 @@ ${type|l}${vlen} ${type|l}${vlen}_mix(${type|l}${vlen} x, ${type|l}${vlen} y, ${
return (${type|l}${vlen})(${', '.join([f'{typed_int_builtin_fname("mix", type)}(x.{field}, y.{field}, a.{field})' for field in vfields[:vlen]])});
}
+${type|l}${vlen} ${type|l}${vlen}_maxmag(${type|l}${vlen} a, ${type|l}${vlen} b) {
+ return (${type|l}${vlen})(${', '.join([f'{typed_int_builtin_fname("maxmag", type)}(a.{field}, b.{field})' for field in vfields[:vlen]])});
+}
+
+${type|l}${vlen} ${type|l}${vlen}_minmag(${type|l}${vlen} a, ${type|l}${vlen} b) {
+ return (${type|l}${vlen})(${', '.join([f'{typed_int_builtin_fname("minmag", type)}(a.{field}, b.{field})' for field in vfields[:vlen]])});
+}
+
% endfor
% if type.lower() == 'long':
#endif // !__EMBEDDED_PROFILE__ || cles_khr_int64
diff --git a/gen/template/src/array.mako b/gen/template/src/array.mako
old mode 100755
new mode 100644
index 7805264..54f303a
--- a/gen/template/src/array.mako
+++ b/gen/template/src/array.mako
@@ -192,8 +192,8 @@ Java_es_ull_pcg_hpc_fancier_array_${type|c}Array_getArray(JNIEnv* env, jobject o
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fc${type|c}Array_getJava", NULL);
// Ensure native array is synced
- jint err = fc${type|c}Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}Array_syncToNative", NULL);
+ jint err = fc${type|c}Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}Array_syncToHost", NULL);
// Create Java array and populate it
j${type|l}Array __tmp_ret = FC_JNI_CALL(env, New${type|c}Array, self->len);
@@ -245,8 +245,8 @@ Java_es_ull_pcg_hpc_fancier_array_${type|c}Array_getBufferImpl(JNIEnv* env, jobj
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fc${type|c}Array_getJava", NULL);
// Ensure native array is synced
- jint err = fc${type|c}Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}Array_syncToNative", NULL);
+ jint err = fc${type|c}Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fc${type|c}));
@@ -269,21 +269,21 @@ Java_es_ull_pcg_hpc_fancier_array_${type|c}Array_setBuffer(JNIEnv* env, jobject
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_${type|c}Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_${type|c}Array_syncToHost(JNIEnv* env, jobject obj) {
fc${type|c}Array* self = fc${type|c}Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fc${type|c}Array_getJava", FC_VOID_EXPR);
- jint err = fc${type|c}Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}Array_syncToNative", FC_VOID_EXPR);
+ jint err = fc${type|c}Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_${type|c}Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_${type|c}Array_syncToDevice(JNIEnv* env, jobject obj) {
fc${type|c}Array* self = fc${type|c}Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fc${type|c}Array_getJava", FC_VOID_EXPR);
- jint err = fc${type|c}Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fc${type|c}Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -462,7 +462,7 @@ fc${type|c} fc${type|c}Array_get(fc${type|c}Array* self, fcInt i, fcError* err)
}
// Set location to native in order to access the array data
- *err = fc${type|c}Array_syncToNative(self);
+ *err = fc${type|c}Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -473,7 +473,7 @@ fcError fc${type|c}Array_set(fc${type|c}Array* self, fcInt i, fc${type|c} x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fc${type|c}Array_syncToNative(self);
+ fcError err = fc${type|c}Array_syncToHost(self);
if (err)
return err;
@@ -538,7 +538,7 @@ fcError fc${type|c}Array_setBuffer(fc${type|c}Array* self, fcLong len, const voi
return FC_EXCEPTION_SUCCESS;
}
-fcError fc${type|c}Array_syncToNative(fc${type|c}Array* self) {
+fcError fc${type|c}Array_syncToHost(fc${type|c}Array* self) {
if (!fc${type|c}Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -553,7 +553,7 @@ fcError fc${type|c}Array_syncToNative(fc${type|c}Array* self) {
return err;
}
-fcError fc${type|c}Array_syncToOCL(fc${type|c}Array* self) {
+fcError fc${type|c}Array_syncToDevice(fc${type|c}Array* self) {
if (!fc${type|c}Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
diff --git a/gen/template/src/math.mako b/gen/template/src/math.mako
old mode 100755
new mode 100644
diff --git a/gen/template/src/vector.mako b/gen/template/src/vector.mako
old mode 100755
new mode 100644
diff --git a/gen/template/src/vector_array.mako b/gen/template/src/vector_array.mako
old mode 100755
new mode 100644
index 788da43..4ce6c7d
--- a/gen/template/src/vector_array.mako
+++ b/gen/template/src/vector_array.mako
@@ -206,8 +206,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_${type|c}${vlen}Array_getArray(JNIEnv*
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fc${type|c}${vlen}Array_getJava", NULL);
// Ensure native array is synced
- jint err = fc${type|c}${vlen}Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}${vlen}Array_syncToNative", NULL);
+ jint err = fc${type|c}${vlen}Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}${vlen}Array_syncToHost", NULL);
// Create Java array and populate it
j${type|l}Array __tmp_ret = FC_JNI_CALL(env, New${type|c}Array, self->len * ${vlen});
@@ -270,8 +270,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_${type|c}${vlen}Array_getBufferImpl(JNI
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fc${type|c}${vlen}Array_getJava", NULL);
// Ensure native array is synced
- jint err = fc${type|c}${vlen}Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}${vlen}Array_syncToNative", NULL);
+ jint err = fc${type|c}${vlen}Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}${vlen}Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fc${type|c}${vlen}));
@@ -294,21 +294,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_${type|c}${vlen}Array_setBuffer(JNIEnv*
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_${type|c}${vlen}Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_${type|c}${vlen}Array_syncToHost(JNIEnv* env, jobject obj) {
fc${type|c}${vlen}Array* self = fc${type|c}${vlen}Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fc${type|c}${vlen}Array_getJava", FC_VOID_EXPR);
- jint err = fc${type|c}${vlen}Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}${vlen}Array_syncToNative", FC_VOID_EXPR);
+ jint err = fc${type|c}${vlen}Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}${vlen}Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_${type|c}${vlen}Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_${type|c}${vlen}Array_syncToDevice(JNIEnv* env, jobject obj) {
fc${type|c}${vlen}Array* self = fc${type|c}${vlen}Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fc${type|c}${vlen}Array_getJava", FC_VOID_EXPR);
- jint err = fc${type|c}${vlen}Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}${vlen}Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fc${type|c}${vlen}Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fc${type|c}${vlen}Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -487,7 +487,7 @@ fc${type|c}${vlen} fc${type|c}${vlen}Array_get(fc${type|c}${vlen}Array* self, fc
}
// Set location to native in order to access the array data
- *err = fc${type|c}${vlen}Array_syncToNative(self);
+ *err = fc${type|c}${vlen}Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -498,7 +498,7 @@ fcError fc${type|c}${vlen}Array_set(fc${type|c}${vlen}Array* self, fcInt i, fc${
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fc${type|c}${vlen}Array_syncToNative(self);
+ fcError err = fc${type|c}${vlen}Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -518,7 +518,7 @@ fcError fc${type|c}${vlen}Array_setArray(fc${type|c}${vlen}Array* self, fcInt le
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fc${type|c}${vlen}Array_syncToNative(self);
+ err = fc${type|c}${vlen}Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -567,13 +567,13 @@ fcError fc${type|c}${vlen}Array_setBuffer(fc${type|c}${vlen}Array* self, fcLong
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fc${type|c}${vlen}Array_syncToNative(self);
+ fcError err = fc${type|c}${vlen}Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fc${type|c}${vlen}Array_syncToNative(fc${type|c}${vlen}Array* self) {
+fcError fc${type|c}${vlen}Array_syncToHost(fc${type|c}${vlen}Array* self) {
if (!fc${type|c}${vlen}Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -588,7 +588,7 @@ fcError fc${type|c}${vlen}Array_syncToNative(fc${type|c}${vlen}Array* self) {
return err;
}
-fcError fc${type|c}${vlen}Array_syncToOCL(fc${type|c}${vlen}Array* self) {
+fcError fc${type|c}${vlen}Array_syncToDevice(fc${type|c}${vlen}Array* self) {
if (!fc${type|c}${vlen}Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
diff --git a/java/.gitignore b/java/.gitignore
index 549ed76..217f027 100644
--- a/java/.gitignore
+++ b/java/.gitignore
@@ -1,2 +1,3 @@
.gradle
**/build
+local.properties
diff --git a/java/.idea/.gitignore b/java/.idea/.gitignore
old mode 100755
new mode 100644
diff --git a/java/.idea/.name b/java/.idea/.name
old mode 100755
new mode 100644
diff --git a/java/.idea/compiler.xml b/java/.idea/compiler.xml
old mode 100755
new mode 100644
diff --git a/java/.idea/encodings.xml b/java/.idea/encodings.xml
old mode 100755
new mode 100644
diff --git a/java/.idea/gradle.xml b/java/.idea/gradle.xml
old mode 100755
new mode 100644
diff --git a/java/.idea/jarRepositories.xml b/java/.idea/jarRepositories.xml
old mode 100755
new mode 100644
index efa4625..b8b7f1c
--- a/java/.idea/jarRepositories.xml
+++ b/java/.idea/jarRepositories.xml
@@ -16,5 +16,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/java/.idea/java.iml b/java/.idea/java.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/java/.idea/java.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/java/.idea/misc.xml b/java/.idea/misc.xml
old mode 100755
new mode 100644
index 0897f38..b0051c8
--- a/java/.idea/misc.xml
+++ b/java/.idea/misc.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/java/.idea/modules.xml b/java/.idea/modules.xml
new file mode 100644
index 0000000..a127731
--- /dev/null
+++ b/java/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/java/.idea/vcs.xml b/java/.idea/vcs.xml
old mode 100755
new mode 100644
diff --git a/java/buildSrc/build.gradle b/java/buildSrc/build.gradle
old mode 100755
new mode 100644
index 62c81e6..03d11ae
--- a/java/buildSrc/build.gradle
+++ b/java/buildSrc/build.gradle
@@ -18,4 +18,4 @@
plugins {
id 'groovy-gradle-plugin'
-}
+}
\ No newline at end of file
diff --git a/java/buildSrc/src/main/groovy/fancier.library-conventions.gradle b/java/buildSrc/src/main/groovy/fancier.library-conventions.gradle
old mode 100755
new mode 100644
diff --git a/java/gradlew b/java/gradlew
old mode 100755
new mode 100644
diff --git a/java/gradlew.bat b/java/gradlew.bat
old mode 100644
new mode 100755
diff --git a/java/project/android/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAImage.java b/java/project/android/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAImage.java
index de562cf..8f29661 100644
--- a/java/project/android/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAImage.java
+++ b/java/project/android/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAImage.java
@@ -31,8 +31,11 @@
import es.ull.pcg.hpc.fancier.vector.Int2;
import es.ull.pcg.hpc.fancier.vector.array.Byte4Array;
+import es.ull.pcg.hpc.fancier.Translatable;
+
import android.graphics.Bitmap;
+
public class RGBAImage implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -49,13 +52,14 @@ public RGBAImage(int width, int height) {
}
public RGBAImage(int[] pixels, int width) {
- initNative(pixels, width);
+ initNative(pixels, width, false);
}
public RGBAImage(RGBAImage image) {
initNative(image);
}
+
public RGBAImage(Bitmap bmp) {
initNative(bmp);
}
@@ -80,16 +84,18 @@ public void finalize() throws Throwable {
private native void initNative(long nativePtr);
private native void initNative(int width, int height);
- private native void initNative(int[] pixels, int width);
private native void initNative(RGBAImage image);
+ private native void initNative(int[] pixels, int width, boolean changeFromBGRA);
private native void initNative(Bitmap bmp);
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public Byte4 get(Int2 coords) {
return get(coords.x, coords.y);
}
+ @Translatable
public void set(Int2 coords, Byte4 rgba) {
set(coords.x, coords.y, rgba);
}
@@ -110,19 +116,29 @@ public void setBuffer(ByteBuffer buffer, int x, int y, Byte4 rgba) {
Byte4Array.setBuffer(buffer, y * getWidth() + x, rgba);
}
+ public void setPixels (int[] pixels, int width) {
+ setPixels(pixels, width, false);
+ }
+
+
+ @Translatable
public native Byte4 get(int x, int y);
+ @Translatable
public native void set(int x, int y, Byte4 rgba);
public native Byte4Array getPixels();
- public native void setPixels(int[] pixels, int width);
+ private native void setPixels(int[] pixels, int width, boolean changeFromBGRA);
public native void setPixels(RGBAImage image);
public native void setPixels(Bitmap bmp);
public native void updateBitmap(Bitmap bmp);
+ @Translatable
public native Int2 getDims();
+ @Translatable
public native int getWidth();
+ @Translatable
public native int getHeight();
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Fancier.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Fancier.java
old mode 100755
new mode 100644
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Math.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Math.java
old mode 100755
new mode 100644
index 85abc1c..224daa0
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Math.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Math.java
@@ -25,433 +25,710 @@
package es.ull.pcg.hpc.fancier;
+
public class Math {
+ @Translatable
public static final int CHAR_BIT = Byte.SIZE;
+ @Translatable
public static final byte SCHAR_MAX = Byte.MAX_VALUE;
+ @Translatable
public static final byte SCHAR_MIN = Byte.MIN_VALUE;
+ @Translatable
public static final byte CHAR_MAX = SCHAR_MAX;
+ @Translatable
public static final byte CHAR_MIN = SCHAR_MIN;
+ @Translatable
public static final short SHRT_MAX = Short.MAX_VALUE;
+ @Translatable
public static final short SHRT_MIN = Short.MIN_VALUE;
+ @Translatable
public static final int INT_MAX = Integer.MAX_VALUE;
+ @Translatable
public static final int INT_MIN = Integer.MIN_VALUE;
+ @Translatable
public static final long LONG_MAX = Long.MAX_VALUE;
+ @Translatable
public static final long LONG_MIN = Long.MIN_VALUE;
+ @Translatable
public static final int FLT_DIG = 6;
+ @Translatable
public static final int FLT_MANT_DIG = 24;
+ @Translatable
public static final int FLT_MAX_10_EXP = +38;
+ @Translatable
public static final int FLT_MAX_EXP = +128;
+ @Translatable
public static final int FLT_MIN_10_EXP = -37;
+ @Translatable
public static final int FLT_MIN_EXP = -125;
+ @Translatable
public static final int FLT_RADIX = 2;
+ @Translatable
public static final float FLT_MAX = Float.MAX_VALUE;
+ @Translatable
public static final float FLT_MIN = Float.MIN_NORMAL;
+ @Translatable
public static final float FLT_EPSILON = 0x1.0p-23f;
+ @Translatable
public static final int DBL_DIG = 15;
+ @Translatable
public static final int DBL_MANT_DIG = 53;
+ @Translatable
public static final int DBL_MAX_10_EXP = +308;
+ @Translatable
public static final int DBL_MAX_EXP = +1024;
+ @Translatable
public static final int DBL_MIN_10_EXP = -307;
+ @Translatable
public static final int DBL_MIN_EXP = -1021;
+ @Translatable
public static final int DBL_RADIX = 2;
+ @Translatable
public static final double DBL_MAX = Double.MAX_VALUE;
+ @Translatable
public static final double DBL_MIN = Double.MIN_NORMAL;
+ @Translatable
public static final double DBL_EPSILON = 0x1.0p-52;
+ @Translatable
public static final float M_E_F = 2.71828174591064f;
+ @Translatable
public static final float M_LOG2E_F = 1.44269502162933f;
+ @Translatable
public static final float M_LOG10E_F = 0.43429449200630f;
+ @Translatable
public static final float M_LN2_F = 0.69314718246460f;
+ @Translatable
public static final float M_LN10_F = 2.30258512496948f;
+ @Translatable
public static final float M_PI_F = 3.14159274101257f;
+ @Translatable
public static final float M_PI_2_F = 1.57079637050629f;
+ @Translatable
public static final float M_PI_4_F = 0.78539818525314f;
+ @Translatable
public static final float M_1_PI_F = 0.31830987334251f;
+ @Translatable
public static final float M_2_PI_F = 0.63661974668503f;
+ @Translatable
public static final float M_2_SQRTPI_F = 1.12837922573090f;
+ @Translatable
public static final float M_SQRT2_F = 1.41421353816986f;
+ @Translatable
public static final float M_SQRT1_2_F = 0.70710676908493f;
+ @Translatable
public static final double M_E = 2.718281828459045090796;
+ @Translatable
public static final double M_LOG2E = 1.442695040888963387005;
+ @Translatable
public static final double M_LOG10E = 0.434294481903251816668;
+ @Translatable
public static final double M_LN2 = 0.693147180559945286227;
+ @Translatable
public static final double M_LN10 = 2.302585092994045901094;
+ @Translatable
public static final double M_PI = 3.141592653589793115998;
+ @Translatable
public static final double M_PI_2 = 1.570796326794896557999;
+ @Translatable
public static final double M_PI_4 = 0.785398163397448278999;
+ @Translatable
public static final double M_1_PI = 0.318309886183790691216;
+ @Translatable
public static final double M_2_PI = 0.636619772367581382433;
+ @Translatable
public static final double M_2_SQRTPI = 1.128379167095512558561;
+ @Translatable
public static final double M_SQRT2 = 1.414213562373095145475;
+ @Translatable
public static final double M_SQRT1_2 = 0.707106781186547572737;
+ @Translatable
public static final float MAXFLOAT = Float.MAX_VALUE;
+ @Translatable
public static final float HUGE_VALF = Float.POSITIVE_INFINITY;
+ @Translatable
public static final double HUGE_VAL = Double.POSITIVE_INFINITY;
+ @Translatable
public static final float INFINITY = Float.POSITIVE_INFINITY;
+ @Translatable
public static final float NAN = Float.NaN;
// All types
+ @Translatable
public static byte abs(byte a) {
return a < '\0'? (byte) -a : a;
}
+ @Translatable
public static byte max(byte a, byte b) {
return a > b? a : b;
}
+ @Translatable
public static byte min(byte a, byte b) {
return a < b? a : b;
}
+ @Translatable
public static byte clamp(byte a, byte b, byte c) {
return a < b? b : (a > c? c : a);
}
+ @Translatable
public static byte mix(byte a, byte b, byte c) {
return (byte) (a + (b - a) * c);
}
+ @Translatable
public static byte maxMag(byte a, byte b) {
return abs(a) > abs(b)? a : b;
}
+ @Translatable
public static byte minMag(byte a, byte b) {
return abs(a) < abs(b)? a : b;
}
+ @Translatable
public static byte select(byte a, byte b, int c) {
return c == 0? a : b;
}
+ @Translatable
public static short abs(short a) {
return a < 0? (short) -a : a;
}
+ @Translatable
public static short max(short a, short b) {
return a > b? a : b;
}
+ @Translatable
public static short min(short a, short b) {
return a < b? a : b;
}
+ @Translatable
public static short clamp(short a, short b, short c) {
return a < b? b : (a > c? c : a);
}
+ @Translatable
public static short mix(short a, short b, short c) {
return (short) (a + (b - a) * c);
}
+ @Translatable
public static short maxMag(short a, short b) {
return abs(a) > abs(b)? a : b;
}
+ @Translatable
public static short minMag(short a, short b) {
return abs(a) < abs(b)? a : b;
}
+ @Translatable
public static short select(short a, short b, int c) {
return c == 0? a : b;
}
+ @Translatable
public static int abs(int a) {
return a < 0? (int) -a : a;
}
+ @Translatable
public static int max(int a, int b) {
return a > b? a : b;
}
+ @Translatable
public static int min(int a, int b) {
return a < b? a : b;
}
+ @Translatable
public static int clamp(int a, int b, int c) {
return a < b? b : (a > c? c : a);
}
+ @Translatable
public static int mix(int a, int b, int c) {
return (int) (a + (b - a) * c);
}
+ @Translatable
public static int maxMag(int a, int b) {
return abs(a) > abs(b)? a : b;
}
+ @Translatable
public static int minMag(int a, int b) {
return abs(a) < abs(b)? a : b;
}
+ @Translatable
public static int select(int a, int b, int c) {
return c == 0? a : b;
}
+ @Translatable
public static long abs(long a) {
return a < 0L? (long) -a : a;
}
+ @Translatable
public static long max(long a, long b) {
return a > b? a : b;
}
+ @Translatable
public static long min(long a, long b) {
return a < b? a : b;
}
+ @Translatable
public static long clamp(long a, long b, long c) {
return a < b? b : (a > c? c : a);
}
+ @Translatable
public static long mix(long a, long b, long c) {
return (long) (a + (b - a) * c);
}
+ @Translatable
public static long maxMag(long a, long b) {
return abs(a) > abs(b)? a : b;
}
+ @Translatable
public static long minMag(long a, long b) {
return abs(a) < abs(b)? a : b;
}
+ @Translatable
public static long select(long a, long b, int c) {
return c == 0? a : b;
}
+ @Translatable
public static float abs(float a) {
return a < 0.0f? (float) -a : a;
}
+ @Translatable
public static float max(float a, float b) {
return a > b? a : b;
}
+ @Translatable
public static float min(float a, float b) {
return a < b? a : b;
}
+ @Translatable
public static float clamp(float a, float b, float c) {
return a < b? b : (a > c? c : a);
}
+ @Translatable
public static float mix(float a, float b, float c) {
return (float) (a + (b - a) * c);
}
+ @Translatable
public static float maxMag(float a, float b) {
return abs(a) > abs(b)? a : b;
}
+ @Translatable
public static float minMag(float a, float b) {
return abs(a) < abs(b)? a : b;
}
+ @Translatable
public static float select(float a, float b, int c) {
return c == 0? a : b;
}
+ @Translatable
public static double abs(double a) {
return a < 0.0? (double) -a : a;
}
+ @Translatable
public static double max(double a, double b) {
return a > b? a : b;
}
+ @Translatable
public static double min(double a, double b) {
return a < b? a : b;
}
+ @Translatable
public static double clamp(double a, double b, double c) {
return a < b? b : (a > c? c : a);
}
+ @Translatable
public static double mix(double a, double b, double c) {
return (double) (a + (b - a) * c);
}
+ @Translatable
public static double maxMag(double a, double b) {
return abs(a) > abs(b)? a : b;
}
+ @Translatable
public static double minMag(double a, double b) {
return abs(a) < abs(b)? a : b;
}
+ @Translatable
public static double select(double a, double b, int c) {
return c == 0? a : b;
}
// Int types
+ @Translatable
public static native byte absDiff(byte a, byte b);
+ @Translatable
public static native short absDiff(short a, short b);
+ @Translatable
public static native int absDiff(int a, int b);
+ @Translatable
public static native long absDiff(long a, long b);
+ @Translatable
public static native byte addSat(byte a, byte b);
+ @Translatable
public static native short addSat(short a, short b);
+ @Translatable
public static native int addSat(int a, int b);
+ @Translatable
public static native long addSat(long a, long b);
+ @Translatable
public static native byte clz(byte a);
+ @Translatable
public static native short clz(short a);
+ @Translatable
public static native int clz(int a);
+ @Translatable
public static native long clz(long a);
+ @Translatable
public static native byte hadd(byte a, byte b);
+ @Translatable
public static native short hadd(short a, short b);
+ @Translatable
public static native int hadd(int a, int b);
+ @Translatable
public static native long hadd(long a, long b);
+ @Translatable
public static native byte madHi(byte a, byte b, byte c);
+ @Translatable
public static native short madHi(short a, short b, short c);
+ @Translatable
public static native int madHi(int a, int b, int c);
+ @Translatable
public static native long madHi(long a, long b, long c);
+ @Translatable
public static native byte madSat(byte a, byte b, byte c);
+ @Translatable
public static native short madSat(short a, short b, short c);
+ @Translatable
public static native int madSat(int a, int b, int c);
+ @Translatable
public static native long madSat(long a, long b, long c);
+ @Translatable
public static native byte mulHi(byte a, byte b);
+ @Translatable
public static native short mulHi(short a, short b);
+ @Translatable
public static native int mulHi(int a, int b);
+ @Translatable
public static native long mulHi(long a, long b);
+ @Translatable
public static native byte rhadd(byte a, byte b);
+ @Translatable
public static native short rhadd(short a, short b);
+ @Translatable
public static native int rhadd(int a, int b);
+ @Translatable
public static native long rhadd(long a, long b);
+ @Translatable
public static native byte rotate(byte a, byte b);
+ @Translatable
public static native short rotate(short a, short b);
+ @Translatable
public static native int rotate(int a, int b);
+ @Translatable
public static native long rotate(long a, long b);
+ @Translatable
public static native byte subSat(byte a, byte b);
+ @Translatable
public static native short subSat(short a, short b);
+ @Translatable
public static native int subSat(int a, int b);
+ @Translatable
public static native long subSat(long a, long b);
+ @Translatable
public static native int mad24 (int a, int b, int c);
+ @Translatable
public static native int mul24 (int a, int b);
// Float types
+ @Translatable
public static native float acos(float a);
+ @Translatable
public static native double acos(double a);
+ @Translatable
public static native float asin(float a);
+ @Translatable
public static native double asin(double a);
+ @Translatable
public static native float atan(float a);
+ @Translatable
public static native double atan(double a);
+ @Translatable
public static native float atan2(float a, float b);
+ @Translatable
public static native double atan2(double a, double b);
+ @Translatable
public static native float cbrt(float a);
+ @Translatable
public static native double cbrt(double a);
+ @Translatable
public static native float ceil(float a);
+ @Translatable
public static native double ceil(double a);
+ @Translatable
public static native float copySign(float a, float b);
+ @Translatable
public static native double copySign(double a, double b);
+ @Translatable
public static native float cos(float a);
+ @Translatable
public static native double cos(double a);
+ @Translatable
public static native float cosh(float a);
+ @Translatable
public static native double cosh(double a);
+ @Translatable
public static native float exp(float a);
+ @Translatable
public static native double exp(double a);
+ @Translatable
public static native float expm1(float a);
+ @Translatable
public static native double expm1(double a);
+ @Translatable
public static native float floor(float a);
+ @Translatable
public static native double floor(double a);
+ @Translatable
public static native float getExponent(float a);
+ @Translatable
public static native double getExponent(double a);
+ @Translatable
public static native float hypot(float a, float b);
+ @Translatable
public static native double hypot(double a, double b);
+ @Translatable
public static native float remainder(float a, float b);
+ @Translatable
public static native double remainder(double a, double b);
+ @Translatable
public static native float log(float a);
+ @Translatable
public static native double log(double a);
+ @Translatable
public static native float log10(float a);
+ @Translatable
public static native double log10(double a);
+ @Translatable
public static native float log1p(float a);
+ @Translatable
public static native double log1p(double a);
+ @Translatable
public static native float nextAfter(float a, float b);
+ @Translatable
public static native double nextAfter(double a, double b);
+ @Translatable
public static native float pow(float a, float b);
+ @Translatable
public static native double pow(double a, double b);
+ @Translatable
public static native float rint(float a);
+ @Translatable
public static native double rint(double a);
+ @Translatable
public static native float round(float a);
+ @Translatable
public static native double round(double a);
+ @Translatable
public static native float signum(float a);
+ @Translatable
public static native double signum(double a);
+ @Translatable
public static native float sin(float a);
+ @Translatable
public static native double sin(double a);
+ @Translatable
public static native float sinh(float a);
+ @Translatable
public static native double sinh(double a);
+ @Translatable
public static native float sqrt(float a);
+ @Translatable
public static native double sqrt(double a);
+ @Translatable
public static native float tan(float a);
+ @Translatable
public static native double tan(double a);
+ @Translatable
public static native float tanh(float a);
+ @Translatable
public static native double tanh(double a);
+ @Translatable
public static native float toDegrees(float a);
+ @Translatable
public static native double toDegrees(double a);
+ @Translatable
public static native float toRadians(float a);
+ @Translatable
public static native double toRadians(double a);
+ @Translatable
public static native float smoothStep(float a, float b, float c);
+ @Translatable
public static native double smoothStep(double a, double b, double c);
+ @Translatable
public static native float step(float a, float b);
+ @Translatable
public static native double step(double a, double b);
+ @Translatable
public static native float acosh(float a);
+ @Translatable
public static native double acosh(double a);
+ @Translatable
public static native float asinh(float a);
+ @Translatable
public static native double asinh(double a);
+ @Translatable
public static native float atanh(float a);
+ @Translatable
public static native double atanh(double a);
+ @Translatable
public static native float erf(float a);
+ @Translatable
public static native double erf(double a);
+ @Translatable
public static native float erfc(float a);
+ @Translatable
public static native double erfc(double a);
+ @Translatable
public static native float exp2(float a);
+ @Translatable
public static native double exp2(double a);
+ @Translatable
public static native float exp10(float a);
+ @Translatable
public static native double exp10(double a);
+ @Translatable
public static native float fdim(float a, float b);
+ @Translatable
public static native double fdim(double a, double b);
+ @Translatable
public static native float fma(float a, float b, float c);
+ @Translatable
public static native double fma(double a, double b, double c);
+ @Translatable
public static native float fmod(float a, float b);
+ @Translatable
public static native double fmod(double a, double b);
+ @Translatable
public static native float fract(float a);
+ @Translatable
public static native double fract(double a);
+ @Translatable
public static native float frexp(float a);
+ @Translatable
public static native double frexp(double a);
+ @Translatable
public static native float lgamma(float a);
+ @Translatable
public static native double lgamma(double a);
+ @Translatable
public static native float log2(float a);
+ @Translatable
public static native double log2(double a);
+ @Translatable
public static native float logb(float a);
+ @Translatable
public static native double logb(double a);
+ @Translatable
public static native float mad(float a, float b, float c);
+ @Translatable
public static native double mad(double a, double b, double c);
+ @Translatable
public static native float powr(float a, float b);
+ @Translatable
public static native double powr(double a, double b);
+ @Translatable
public static native float rsqrt(float a);
+ @Translatable
public static native double rsqrt(double a);
+ @Translatable
public static native float tgamma(float a);
+ @Translatable
public static native double tgamma(double a);
+ @Translatable
public static native float trunc(float a);
+ @Translatable
public static native double trunc(double a);
+ @Translatable
public static native float scalb(float a, int n);
+ @Translatable
public static native double scalb(double a, int n);
+ @Translatable
public static native float ldexp(float a, int n);
+ @Translatable
public static native double ldexp(double a, int n);
+ @Translatable
public static native float pown(float a, int n);
+ @Translatable
public static native double pown(double a, int n);
+ @Translatable
public static native float rootn(float a, int n);
+ @Translatable
public static native double rootn(double a, int n);
+ @Translatable
public static native int isFinite(float x);
+ @Translatable
public static native int isFinite(double x);
+ @Translatable
public static native int isInf(float x);
+ @Translatable
public static native int isInf(double x);
+ @Translatable
public static native int isNaN(float x);
+ @Translatable
public static native int isNaN(double x);
+ @Translatable
public static native int isNormal(float x);
+ @Translatable
public static native int isNormal(double x);
+ @Translatable
public static native int isOrdered(float x, float y);
+ @Translatable
public static native int isOrdered(double x, double y);
+ @Translatable
public static native int isUnordered(float x, float y);
+ @Translatable
public static native int isUnordered(double x, double y);
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/NativeException.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/NativeException.java
old mode 100755
new mode 100644
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/OpenCLException.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/OpenCLException.java
old mode 100755
new mode 100644
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Parallel.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Parallel.java
deleted file mode 100755
index 0669849..0000000
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Parallel.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
- * Copyright (C) 2021 Universidad de La Laguna.
- *
- * Fancier is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Fancier is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Fancier. If not, see .
- */
-
-package es.ull.pcg.hpc.fancier;
-
-public class Parallel {
- public static long getGlobalID(int dimensionID) {
- return 0L;
- }
-
- public static long getGlobalSize(int dimensionID) {
- return 1L;
- }
-
- public static long getGlobalOffset(int dimensionID) {
- return 0L;
- }
-
- public static long getGroupID(int dimensionID) {
- return 0L;
- }
-
- public static long getLocalID(int dimensionID) {
- return 0L;
- }
-
- public static long getLocalSize(int dimensionID) {
- return 1L;
- }
-
- public static long getNumGroups(int dimensionID) {
- return 1L;
- }
-
- public static int getWorkDim() {
- return 1;
- }
-}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Translatable.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Translatable.java
new file mode 100644
index 0000000..f16a6e4
--- /dev/null
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/Translatable.java
@@ -0,0 +1,15 @@
+package es.ull.pcg.hpc.fancier;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * This annotation indicates which elements can be translated in an OpenCL target translation tool
+ */
+@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.FIELD })
+@Retention(RetentionPolicy.CLASS)
+public @interface Translatable {
+}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/ByteArray.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/ByteArray.java
index 085d624..63dacaa 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/ByteArray.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/ByteArray.java
@@ -27,6 +27,8 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
public class ByteArray implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -89,8 +91,11 @@ public static void setBuffer(ByteBuffer buffer, int index, byte x) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native byte get(int i);
+ @Translatable
public native void set(int i, byte x);
+ @Translatable
public native long length();
public native byte[] getArray();
@@ -99,6 +104,6 @@ public static void setBuffer(ByteBuffer buffer, int index, byte x) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer buffer);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/DoubleArray.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/DoubleArray.java
index a50cd4a..c2ce902 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/DoubleArray.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/DoubleArray.java
@@ -27,6 +27,8 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
public class DoubleArray implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -89,8 +91,11 @@ public static void setBuffer(ByteBuffer buffer, int index, double x) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native double get(int i);
+ @Translatable
public native void set(int i, double x);
+ @Translatable
public native long length();
public native double[] getArray();
@@ -99,6 +104,6 @@ public static void setBuffer(ByteBuffer buffer, int index, double x) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer buffer);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/FloatArray.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/FloatArray.java
index 039743c..00d6847 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/FloatArray.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/FloatArray.java
@@ -27,6 +27,8 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
public class FloatArray implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -89,8 +91,11 @@ public static void setBuffer(ByteBuffer buffer, int index, float x) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native float get(int i);
+ @Translatable
public native void set(int i, float x);
+ @Translatable
public native long length();
public native float[] getArray();
@@ -99,6 +104,6 @@ public static void setBuffer(ByteBuffer buffer, int index, float x) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer buffer);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/IntArray.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/IntArray.java
index 7492005..263b681 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/IntArray.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/IntArray.java
@@ -27,6 +27,8 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
public class IntArray implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -89,8 +91,11 @@ public static void setBuffer(ByteBuffer buffer, int index, int x) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native int get(int i);
+ @Translatable
public native void set(int i, int x);
+ @Translatable
public native long length();
public native int[] getArray();
@@ -99,6 +104,6 @@ public static void setBuffer(ByteBuffer buffer, int index, int x) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer buffer);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/LongArray.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/LongArray.java
index 5724201..076fda4 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/LongArray.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/LongArray.java
@@ -27,6 +27,8 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
public class LongArray implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -89,8 +91,11 @@ public static void setBuffer(ByteBuffer buffer, int index, long x) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native long get(int i);
+ @Translatable
public native void set(int i, long x);
+ @Translatable
public native long length();
public native long[] getArray();
@@ -99,6 +104,6 @@ public static void setBuffer(ByteBuffer buffer, int index, long x) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer buffer);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/ShortArray.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/ShortArray.java
index e123d96..305b30e 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/ShortArray.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/array/ShortArray.java
@@ -27,6 +27,8 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
public class ShortArray implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -89,8 +91,11 @@ public static void setBuffer(ByteBuffer buffer, int index, short x) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native short get(int i);
+ @Translatable
public native void set(int i, short x);
+ @Translatable
public native long length();
public native short[] getArray();
@@ -99,6 +104,6 @@ public static void setBuffer(ByteBuffer buffer, int index, short x) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer buffer);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAColor.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAColor.java
index 6409c62..ec59c2b 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAColor.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAColor.java
@@ -20,91 +20,123 @@
import es.ull.pcg.hpc.fancier.vector.Byte4;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class RGBAColor {
private RGBAColor() {}
+ @Translatable
public static final int Red = 0xff0000ff;
+ @Translatable
public static final int Green = 0x00ff00ff;
+ @Translatable
public static final int Blue = 0x0000ffff;
+ @Translatable
public static final int Yellow = 0xffff00ff;
+ @Translatable
public static final int Magenta = 0xff00ffff;
+ @Translatable
public static final int Cyan = 0x00ffffff;
+ @Translatable
public static final int White = 0xffffffff;
+ @Translatable
public static final int LtGray = 0xccccccff;
+ @Translatable
public static final int Gray = 0x888888ff;
+ @Translatable
public static final int DkGray = 0x444444ff;
+ @Translatable
public static final int Black = 0x000000ff;
+ @Translatable
public static final int Transparent = 0x00000000;
+ @Translatable
public static int toRgba(Byte4 color) {
return ((color.x & 0xff) << 24) | ((color.y & 0xff) << 16) | ((color.z & 0xff) << 8)
| ((color.w & 0xff) << 0);
}
+ @Translatable
public static Byte4 fromRgba(int rgba) {
return new Byte4((byte) ((rgba >> 24) & 0xff), (byte) ((rgba >> 16) & 0xff),
(byte) ((rgba >> 8) & 0xff), (byte) ((rgba >> 0) & 0xff));
}
+ @Translatable
public static byte alpha(Byte4 color) {
return color.x;
}
+ @Translatable
public static byte red(Byte4 color) {
return color.y;
}
+ @Translatable
public static byte green(Byte4 color) {
return color.z;
}
+ @Translatable
public static byte blue(Byte4 color) {
return color.w;
}
+ @Translatable
public static Byte4 RED() {
return fromRgba(Red);
}
+ @Translatable
public static Byte4 GREEN() {
return fromRgba(Green);
}
+ @Translatable
public static Byte4 BLUE() {
return fromRgba(Blue);
}
+ @Translatable
public static Byte4 YELLOW() {
return fromRgba(Yellow);
}
+ @Translatable
public static Byte4 MAGENTA() {
return fromRgba(Magenta);
}
+ @Translatable
public static Byte4 CYAN() {
return fromRgba(Cyan);
}
+ @Translatable
public static Byte4 WHITE() {
return fromRgba(White);
}
+ @Translatable
public static Byte4 LTGRAY() {
return fromRgba(LtGray);
}
+ @Translatable
public static Byte4 GRAY() {
return fromRgba(Gray);
}
+ @Translatable
public static Byte4 DKGRAY() {
return fromRgba(DkGray);
}
+ @Translatable
public static Byte4 BLACK() {
return fromRgba(Black);
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte2.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte2.java
index 9e73d49..80a09dd 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte2.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte2.java
@@ -27,41 +27,55 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Byte2 {
+ @Translatable
public byte x;
+ @Translatable
public byte y;
+ @Translatable
public Byte2() {}
+ @Translatable
public Byte2(byte x, byte y) {
set(x, y);
}
+ @Translatable
public void set(byte x, byte y) {
this.x = x;
this.y = y;
}
+ @Translatable
public Byte2(byte v) {
this(v, v);
}
+ @Translatable
public void set(byte v) {
set(v, v);
}
+ @Translatable
public Byte2(Byte2 vec1) {
this(vec1.x, vec1.y);
}
+ @Translatable
public void set(Byte2 vec1) {
set(vec1.x, vec1.y);
}
+ @Translatable
public Byte2 value() {
return new Byte2(this);
}
+ @Translatable
public Short2 convertShort2() {
return new Short2((short)(x & 0xff), (short)(y & 0xff));
}
@@ -71,6 +85,7 @@ public void convertShort2(Short2 result) {
result.y = (short)(y & 0xff);
}
+ @Translatable
public Int2 convertInt2() {
return new Int2((int)(x & 0xff), (int)(y & 0xff));
}
@@ -80,6 +95,7 @@ public void convertInt2(Int2 result) {
result.y = (int)(y & 0xff);
}
+ @Translatable
public Long2 convertLong2() {
return new Long2((long)(x & 0xff), (long)(y & 0xff));
}
@@ -89,6 +105,7 @@ public void convertLong2(Long2 result) {
result.y = (long)(y & 0xff);
}
+ @Translatable
public Float2 convertFloat2() {
return new Float2((float)(x & 0xff), (float)(y & 0xff));
}
@@ -98,6 +115,7 @@ public void convertFloat2(Float2 result) {
result.y = (float)(y & 0xff);
}
+ @Translatable
public Double2 convertDouble2() {
return new Double2((double)(x & 0xff), (double)(y & 0xff));
}
@@ -107,6 +125,7 @@ public void convertDouble2(Double2 result) {
result.y = (double)(y & 0xff);
}
+ @Translatable
public static Int2 isEqual(Byte2 a, Byte2 b) {
return new Int2(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0);
}
@@ -116,6 +135,7 @@ public static void isEqual(Byte2 a, Byte2 b, Int2 result) {
result.y = a.y == b.y? 1 : 0;
}
+ @Translatable
public static Int2 isNotEqual(Byte2 a, Byte2 b) {
return new Int2(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0);
}
@@ -125,6 +145,7 @@ public static void isNotEqual(Byte2 a, Byte2 b, Int2 result) {
result.y = a.y != b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreater(Byte2 a, Byte2 b) {
return new Int2(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0);
}
@@ -134,6 +155,7 @@ public static void isGreater(Byte2 a, Byte2 b, Int2 result) {
result.y = a.y > b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreaterEqual(Byte2 a, Byte2 b) {
return new Int2(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0);
}
@@ -143,6 +165,7 @@ public static void isGreaterEqual(Byte2 a, Byte2 b, Int2 result) {
result.y = a.y >= b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLess(Byte2 a, Byte2 b) {
return new Int2(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0);
}
@@ -152,6 +175,7 @@ public static void isLess(Byte2 a, Byte2 b, Int2 result) {
result.y = a.y < b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLessEqual(Byte2 a, Byte2 b) {
return new Int2(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0);
}
@@ -161,6 +185,7 @@ public static void isLessEqual(Byte2 a, Byte2 b, Int2 result) {
result.y = a.y <= b.y? 1 : 0;
}
+ @Translatable
public static Byte2 select(Byte2 a, Byte2 b, Int2 c) {
return new Byte2(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y));
}
@@ -170,14 +195,17 @@ public static void select(Byte2 a, Byte2 b, Int2 c, Byte2 result) {
result.y = Math.select(a.y, b.y, c.y);
}
+ @Translatable
public static int any(Byte2 a) {
return (a.x != (byte) 0 || a.y != (byte) 0)? 1 : 0;
}
+ @Translatable
public static int all(Byte2 a) {
return (a.x == (byte) 0 || a.y == (byte) 0)? 0 : 1;
}
+ @Translatable
public static Byte2 neg(Byte2 a) {
return new Byte2((byte)(-a.x), (byte)(-a.y));
}
@@ -187,6 +215,7 @@ public static void neg(Byte2 a, Byte2 result) {
result.y = (byte)(-a.y);
}
+ @Translatable
public static Byte2 add(Byte2 a, Byte2 b) {
return new Byte2((byte)(a.x + b.x), (byte)(a.y + b.y));
}
@@ -196,6 +225,7 @@ public static void add(Byte2 a, Byte2 b, Byte2 result) {
result.y = (byte)(a.y + b.y);
}
+ @Translatable
public static Byte2 sub(Byte2 a, Byte2 b) {
return new Byte2((byte)(a.x - b.x), (byte)(a.y - b.y));
}
@@ -205,6 +235,7 @@ public static void sub(Byte2 a, Byte2 b, Byte2 result) {
result.y = (byte)(a.y - b.y);
}
+ @Translatable
public static Byte2 mul(Byte2 a, Byte2 b) {
return new Byte2((byte)(a.x * b.x), (byte)(a.y * b.y));
}
@@ -214,6 +245,7 @@ public static void mul(Byte2 a, Byte2 b, Byte2 result) {
result.y = (byte)(a.y * b.y);
}
+ @Translatable
public static Byte2 mul(Byte2 a, byte k) {
return new Byte2((byte)(a.x * k), (byte)(a.y * k));
}
@@ -223,6 +255,7 @@ public static void mul(Byte2 a, byte k, Byte2 result) {
result.y = (byte)(a.y * k);
}
+ @Translatable
public static Double2 mul(Byte2 a, Double2 b) {
return new Double2((double)(a.x * b.x), (double)(a.y * b.y));
}
@@ -232,6 +265,7 @@ public static void mul(Byte2 a, Double2 b, Double2 result) {
result.y = (double)(a.y * b.y);
}
+ @Translatable
public static Double2 mul(Byte2 a, double k) {
return new Double2((double)(a.x * k), (double)(a.y * k));
}
@@ -241,6 +275,7 @@ public static void mul(Byte2 a, double k, Double2 result) {
result.y = (double)(a.y * k);
}
+ @Translatable
public static Float2 mul(Byte2 a, Float2 b) {
return new Float2((float)(a.x * b.x), (float)(a.y * b.y));
}
@@ -250,6 +285,7 @@ public static void mul(Byte2 a, Float2 b, Float2 result) {
result.y = (float)(a.y * b.y);
}
+ @Translatable
public static Float2 mul(Byte2 a, float k) {
return new Float2((float)(a.x * k), (float)(a.y * k));
}
@@ -259,6 +295,7 @@ public static void mul(Byte2 a, float k, Float2 result) {
result.y = (float)(a.y * k);
}
+ @Translatable
public static Byte2 div(Byte2 a, Byte2 b) {
return new Byte2((byte)(a.x / b.x), (byte)(a.y / b.y));
}
@@ -268,6 +305,7 @@ public static void div(Byte2 a, Byte2 b, Byte2 result) {
result.y = (byte)(a.y / b.y);
}
+ @Translatable
public static Byte2 div(Byte2 a, byte k) {
return new Byte2((byte)(a.x / k), (byte)(a.y / k));
}
@@ -277,6 +315,7 @@ public static void div(Byte2 a, byte k, Byte2 result) {
result.y = (byte)(a.y / k);
}
+ @Translatable
public static Double2 div(Byte2 a, Double2 b) {
return new Double2((double)(a.x / b.x), (double)(a.y / b.y));
}
@@ -286,6 +325,7 @@ public static void div(Byte2 a, Double2 b, Double2 result) {
result.y = (double)(a.y / b.y);
}
+ @Translatable
public static Double2 div(Byte2 a, double k) {
return new Double2((double)(a.x / k), (double)(a.y / k));
}
@@ -295,6 +335,7 @@ public static void div(Byte2 a, double k, Double2 result) {
result.y = (double)(a.y / k);
}
+ @Translatable
public static Float2 div(Byte2 a, Float2 b) {
return new Float2((float)(a.x / b.x), (float)(a.y / b.y));
}
@@ -304,6 +345,7 @@ public static void div(Byte2 a, Float2 b, Float2 result) {
result.y = (float)(a.y / b.y);
}
+ @Translatable
public static Float2 div(Byte2 a, float k) {
return new Float2((float)(a.x / k), (float)(a.y / k));
}
@@ -313,6 +355,7 @@ public static void div(Byte2 a, float k, Float2 result) {
result.y = (float)(a.y / k);
}
+ @Translatable
public static Byte2 mod(Byte2 a, Byte2 b) {
return new Byte2((byte)(a.x % b.x), (byte)(a.y % b.y));
}
@@ -322,6 +365,7 @@ public static void mod(Byte2 a, Byte2 b, Byte2 result) {
result.y = (byte)(a.y % b.y);
}
+ @Translatable
public static Byte2 mod(Byte2 a, byte k) {
return new Byte2((byte)(a.x % k), (byte)(a.y % k));
}
@@ -331,6 +375,7 @@ public static void mod(Byte2 a, byte k, Byte2 result) {
result.y = (byte)(a.y % k);
}
+ @Translatable
public static Byte2 bitAnd(Byte2 a, Byte2 b) {
return new Byte2((byte)(a.x & b.x), (byte)(a.y & b.y));
}
@@ -340,6 +385,7 @@ public static void bitAnd(Byte2 a, Byte2 b, Byte2 result) {
result.y = (byte)(a.y & b.y);
}
+ @Translatable
public static Byte2 bitOr(Byte2 a, Byte2 b) {
return new Byte2((byte)(a.x | b.x), (byte)(a.y | b.y));
}
@@ -349,6 +395,7 @@ public static void bitOr(Byte2 a, Byte2 b, Byte2 result) {
result.y = (byte)(a.y | b.y);
}
+ @Translatable
public static Byte2 bitXor(Byte2 a, Byte2 b) {
return new Byte2((byte)(a.x ^ b.x), (byte)(a.y ^ b.y));
}
@@ -358,6 +405,7 @@ public static void bitXor(Byte2 a, Byte2 b, Byte2 result) {
result.y = (byte)(a.y ^ b.y);
}
+ @Translatable
public static Byte2 bitNot(Byte2 a) {
return new Byte2((byte)(~a.x), (byte)(~a.y));
}
@@ -367,6 +415,7 @@ public static void bitNot(Byte2 a, Byte2 result) {
result.y = (byte)(~a.y);
}
+ @Translatable
public static Byte2 abs(Byte2 a) {
return new Byte2(Math.abs(a.x), Math.abs(a.y));
}
@@ -376,6 +425,7 @@ public static void abs(Byte2 a, Byte2 result) {
result.y = Math.abs(a.y);
}
+ @Translatable
public static Byte2 clamp(Byte2 a, Byte2 b, Byte2 c) {
return new Byte2(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y));
}
@@ -385,6 +435,7 @@ public static void clamp(Byte2 a, Byte2 b, Byte2 c, Byte2 result) {
result.y = Math.clamp(a.y, b.y, c.y);
}
+ @Translatable
public static Byte2 max(Byte2 a, Byte2 b) {
return new Byte2(Math.max(a.x, b.x), Math.max(a.y, b.y));
}
@@ -394,6 +445,7 @@ public static void max(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.max(a.y, b.y);
}
+ @Translatable
public static Byte2 maxMag(Byte2 a, Byte2 b) {
return new Byte2(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y));
}
@@ -403,6 +455,7 @@ public static void maxMag(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.maxMag(a.y, b.y);
}
+ @Translatable
public static Byte2 min(Byte2 a, Byte2 b) {
return new Byte2(Math.min(a.x, b.x), Math.min(a.y, b.y));
}
@@ -412,6 +465,7 @@ public static void min(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.min(a.y, b.y);
}
+ @Translatable
public static Byte2 minMag(Byte2 a, Byte2 b) {
return new Byte2(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y));
}
@@ -421,6 +475,7 @@ public static void minMag(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.minMag(a.y, b.y);
}
+ @Translatable
public static Byte2 mix(Byte2 a, Byte2 b, Byte2 c) {
return new Byte2(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y));
}
@@ -430,6 +485,7 @@ public static void mix(Byte2 a, Byte2 b, Byte2 c, Byte2 result) {
result.y = Math.mix(a.y, b.y, c.y);
}
+ @Translatable
public static Byte2 clamp(Byte2 v, byte min, byte max) {
return new Byte2(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max));
}
@@ -439,6 +495,7 @@ public static void clamp(Byte2 v, byte min, byte max, Byte2 result) {
result.y = Math.clamp(v.y, min, max);
}
+ @Translatable
public static Byte2 max(Byte2 x, byte y) {
return new Byte2(Math.max(x.x, y), Math.max(x.y, y));
}
@@ -448,6 +505,7 @@ public static void max(Byte2 x, byte y, Byte2 result) {
result.y = Math.max(x.y, y);
}
+ @Translatable
public static Byte2 min(Byte2 x, byte y) {
return new Byte2(Math.min(x.x, y), Math.min(x.y, y));
}
@@ -457,6 +515,7 @@ public static void min(Byte2 x, byte y, Byte2 result) {
result.y = Math.min(x.y, y);
}
+ @Translatable
public static Byte2 mix(Byte2 x, Byte2 y, byte a) {
return new Byte2(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a));
}
@@ -466,6 +525,7 @@ public static void mix(Byte2 x, Byte2 y, byte a, Byte2 result) {
result.y = Math.mix(x.y, y.y, a);
}
+ @Translatable
public static Byte2 absDiff(Byte2 a, Byte2 b) {
return new Byte2(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y));
}
@@ -475,6 +535,7 @@ public static void absDiff(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.absDiff(a.y, b.y);
}
+ @Translatable
public static Byte2 addSat(Byte2 a, Byte2 b) {
return new Byte2(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y));
}
@@ -484,6 +545,7 @@ public static void addSat(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.addSat(a.y, b.y);
}
+ @Translatable
public static Byte2 clz(Byte2 a) {
return new Byte2(Math.clz(a.x), Math.clz(a.y));
}
@@ -493,6 +555,7 @@ public static void clz(Byte2 a, Byte2 result) {
result.y = Math.clz(a.y);
}
+ @Translatable
public static Byte2 hadd(Byte2 a, Byte2 b) {
return new Byte2(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y));
}
@@ -502,6 +565,7 @@ public static void hadd(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.hadd(a.y, b.y);
}
+ @Translatable
public static Byte2 madHi(Byte2 a, Byte2 b, Byte2 c) {
return new Byte2(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y));
}
@@ -511,6 +575,7 @@ public static void madHi(Byte2 a, Byte2 b, Byte2 c, Byte2 result) {
result.y = Math.madHi(a.y, b.y, c.y);
}
+ @Translatable
public static Byte2 madSat(Byte2 a, Byte2 b, Byte2 c) {
return new Byte2(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y));
}
@@ -520,6 +585,7 @@ public static void madSat(Byte2 a, Byte2 b, Byte2 c, Byte2 result) {
result.y = Math.madSat(a.y, b.y, c.y);
}
+ @Translatable
public static Byte2 mulHi(Byte2 a, Byte2 b) {
return new Byte2(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y));
}
@@ -529,6 +595,7 @@ public static void mulHi(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.mulHi(a.y, b.y);
}
+ @Translatable
public static Byte2 rhadd(Byte2 a, Byte2 b) {
return new Byte2(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y));
}
@@ -538,6 +605,7 @@ public static void rhadd(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.rhadd(a.y, b.y);
}
+ @Translatable
public static Byte2 rotate(Byte2 a, Byte2 b) {
return new Byte2(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y));
}
@@ -547,6 +615,7 @@ public static void rotate(Byte2 a, Byte2 b, Byte2 result) {
result.y = Math.rotate(a.y, b.y);
}
+ @Translatable
public static Byte2 subSat(Byte2 a, Byte2 b) {
return new Byte2(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte3.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte3.java
index 340ec9a..aee29ac 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte3.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte3.java
@@ -27,59 +27,78 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Byte3 {
+ @Translatable
public byte x;
+ @Translatable
public byte y;
+ @Translatable
public byte z;
+ @Translatable
public Byte3() {}
+ @Translatable
public Byte3(byte x, byte y, byte z) {
set(x, y, z);
}
+ @Translatable
public void set(byte x, byte y, byte z) {
this.x = x;
this.y = y;
this.z = z;
}
+ @Translatable
public Byte3(byte v) {
this(v, v, v);
}
+ @Translatable
public void set(byte v) {
set(v, v, v);
}
+ @Translatable
public Byte3(byte x, Byte2 vec1) {
this(x, vec1.x, vec1.y);
}
+ @Translatable
public void set(byte x, Byte2 vec1) {
set(x, vec1.x, vec1.y);
}
+ @Translatable
public Byte3(Byte2 vec1, byte z) {
this(vec1.x, vec1.y, z);
}
+ @Translatable
public void set(Byte2 vec1, byte z) {
set(vec1.x, vec1.y, z);
}
+ @Translatable
public Byte3(Byte3 vec1) {
this(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(Byte3 vec1) {
set(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Byte3 value() {
return new Byte3(this);
}
+ @Translatable
public Short3 convertShort3() {
return new Short3((short)(x & 0xff), (short)(y & 0xff), (short)(z & 0xff));
}
@@ -90,6 +109,7 @@ public void convertShort3(Short3 result) {
result.z = (short)(z & 0xff);
}
+ @Translatable
public Int3 convertInt3() {
return new Int3((int)(x & 0xff), (int)(y & 0xff), (int)(z & 0xff));
}
@@ -100,6 +120,7 @@ public void convertInt3(Int3 result) {
result.z = (int)(z & 0xff);
}
+ @Translatable
public Long3 convertLong3() {
return new Long3((long)(x & 0xff), (long)(y & 0xff), (long)(z & 0xff));
}
@@ -110,6 +131,7 @@ public void convertLong3(Long3 result) {
result.z = (long)(z & 0xff);
}
+ @Translatable
public Float3 convertFloat3() {
return new Float3((float)(x & 0xff), (float)(y & 0xff), (float)(z & 0xff));
}
@@ -120,6 +142,7 @@ public void convertFloat3(Float3 result) {
result.z = (float)(z & 0xff);
}
+ @Translatable
public Double3 convertDouble3() {
return new Double3((double)(x & 0xff), (double)(y & 0xff), (double)(z & 0xff));
}
@@ -130,6 +153,7 @@ public void convertDouble3(Double3 result) {
result.z = (double)(z & 0xff);
}
+ @Translatable
public Byte2 asByte2() {
return new Byte2(x, y);
}
@@ -139,6 +163,7 @@ public void asByte2(Byte2 result) {
result.y = y;
}
+ @Translatable
public static Int3 isEqual(Byte3 a, Byte3 b) {
return new Int3(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0);
}
@@ -149,6 +174,7 @@ public static void isEqual(Byte3 a, Byte3 b, Int3 result) {
result.z = a.z == b.z? 1 : 0;
}
+ @Translatable
public static Int3 isNotEqual(Byte3 a, Byte3 b) {
return new Int3(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0);
}
@@ -159,6 +185,7 @@ public static void isNotEqual(Byte3 a, Byte3 b, Int3 result) {
result.z = a.z != b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreater(Byte3 a, Byte3 b) {
return new Int3(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0);
}
@@ -169,6 +196,7 @@ public static void isGreater(Byte3 a, Byte3 b, Int3 result) {
result.z = a.z > b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreaterEqual(Byte3 a, Byte3 b) {
return new Int3(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0);
}
@@ -179,6 +207,7 @@ public static void isGreaterEqual(Byte3 a, Byte3 b, Int3 result) {
result.z = a.z >= b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLess(Byte3 a, Byte3 b) {
return new Int3(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0);
}
@@ -189,6 +218,7 @@ public static void isLess(Byte3 a, Byte3 b, Int3 result) {
result.z = a.z < b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLessEqual(Byte3 a, Byte3 b) {
return new Int3(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0);
}
@@ -199,6 +229,7 @@ public static void isLessEqual(Byte3 a, Byte3 b, Int3 result) {
result.z = a.z <= b.z? 1 : 0;
}
+ @Translatable
public static Byte3 select(Byte3 a, Byte3 b, Int3 c) {
return new Byte3(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z));
}
@@ -209,14 +240,17 @@ public static void select(Byte3 a, Byte3 b, Int3 c, Byte3 result) {
result.z = Math.select(a.z, b.z, c.z);
}
+ @Translatable
public static int any(Byte3 a) {
return (a.x != (byte) 0 || a.y != (byte) 0 || a.z != (byte) 0)? 1 : 0;
}
+ @Translatable
public static int all(Byte3 a) {
return (a.x == (byte) 0 || a.y == (byte) 0 || a.z == (byte) 0)? 0 : 1;
}
+ @Translatable
public static Byte3 neg(Byte3 a) {
return new Byte3((byte)(-a.x), (byte)(-a.y), (byte)(-a.z));
}
@@ -227,6 +261,7 @@ public static void neg(Byte3 a, Byte3 result) {
result.z = (byte)(-a.z);
}
+ @Translatable
public static Byte3 add(Byte3 a, Byte3 b) {
return new Byte3((byte)(a.x + b.x), (byte)(a.y + b.y), (byte)(a.z + b.z));
}
@@ -237,6 +272,7 @@ public static void add(Byte3 a, Byte3 b, Byte3 result) {
result.z = (byte)(a.z + b.z);
}
+ @Translatable
public static Byte3 sub(Byte3 a, Byte3 b) {
return new Byte3((byte)(a.x - b.x), (byte)(a.y - b.y), (byte)(a.z - b.z));
}
@@ -247,6 +283,7 @@ public static void sub(Byte3 a, Byte3 b, Byte3 result) {
result.z = (byte)(a.z - b.z);
}
+ @Translatable
public static Byte3 mul(Byte3 a, Byte3 b) {
return new Byte3((byte)(a.x * b.x), (byte)(a.y * b.y), (byte)(a.z * b.z));
}
@@ -257,6 +294,7 @@ public static void mul(Byte3 a, Byte3 b, Byte3 result) {
result.z = (byte)(a.z * b.z);
}
+ @Translatable
public static Byte3 mul(Byte3 a, byte k) {
return new Byte3((byte)(a.x * k), (byte)(a.y * k), (byte)(a.z * k));
}
@@ -267,6 +305,7 @@ public static void mul(Byte3 a, byte k, Byte3 result) {
result.z = (byte)(a.z * k);
}
+ @Translatable
public static Double3 mul(Byte3 a, Double3 b) {
return new Double3((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z));
}
@@ -277,6 +316,7 @@ public static void mul(Byte3 a, Double3 b, Double3 result) {
result.z = (double)(a.z * b.z);
}
+ @Translatable
public static Double3 mul(Byte3 a, double k) {
return new Double3((double)(a.x * k), (double)(a.y * k), (double)(a.z * k));
}
@@ -287,6 +327,7 @@ public static void mul(Byte3 a, double k, Double3 result) {
result.z = (double)(a.z * k);
}
+ @Translatable
public static Float3 mul(Byte3 a, Float3 b) {
return new Float3((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z));
}
@@ -297,6 +338,7 @@ public static void mul(Byte3 a, Float3 b, Float3 result) {
result.z = (float)(a.z * b.z);
}
+ @Translatable
public static Float3 mul(Byte3 a, float k) {
return new Float3((float)(a.x * k), (float)(a.y * k), (float)(a.z * k));
}
@@ -307,6 +349,7 @@ public static void mul(Byte3 a, float k, Float3 result) {
result.z = (float)(a.z * k);
}
+ @Translatable
public static Byte3 div(Byte3 a, Byte3 b) {
return new Byte3((byte)(a.x / b.x), (byte)(a.y / b.y), (byte)(a.z / b.z));
}
@@ -317,6 +360,7 @@ public static void div(Byte3 a, Byte3 b, Byte3 result) {
result.z = (byte)(a.z / b.z);
}
+ @Translatable
public static Byte3 div(Byte3 a, byte k) {
return new Byte3((byte)(a.x / k), (byte)(a.y / k), (byte)(a.z / k));
}
@@ -327,6 +371,7 @@ public static void div(Byte3 a, byte k, Byte3 result) {
result.z = (byte)(a.z / k);
}
+ @Translatable
public static Double3 div(Byte3 a, Double3 b) {
return new Double3((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z));
}
@@ -337,6 +382,7 @@ public static void div(Byte3 a, Double3 b, Double3 result) {
result.z = (double)(a.z / b.z);
}
+ @Translatable
public static Double3 div(Byte3 a, double k) {
return new Double3((double)(a.x / k), (double)(a.y / k), (double)(a.z / k));
}
@@ -347,6 +393,7 @@ public static void div(Byte3 a, double k, Double3 result) {
result.z = (double)(a.z / k);
}
+ @Translatable
public static Float3 div(Byte3 a, Float3 b) {
return new Float3((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z));
}
@@ -357,6 +404,7 @@ public static void div(Byte3 a, Float3 b, Float3 result) {
result.z = (float)(a.z / b.z);
}
+ @Translatable
public static Float3 div(Byte3 a, float k) {
return new Float3((float)(a.x / k), (float)(a.y / k), (float)(a.z / k));
}
@@ -367,6 +415,7 @@ public static void div(Byte3 a, float k, Float3 result) {
result.z = (float)(a.z / k);
}
+ @Translatable
public static Byte3 mod(Byte3 a, Byte3 b) {
return new Byte3((byte)(a.x % b.x), (byte)(a.y % b.y), (byte)(a.z % b.z));
}
@@ -377,6 +426,7 @@ public static void mod(Byte3 a, Byte3 b, Byte3 result) {
result.z = (byte)(a.z % b.z);
}
+ @Translatable
public static Byte3 mod(Byte3 a, byte k) {
return new Byte3((byte)(a.x % k), (byte)(a.y % k), (byte)(a.z % k));
}
@@ -387,6 +437,7 @@ public static void mod(Byte3 a, byte k, Byte3 result) {
result.z = (byte)(a.z % k);
}
+ @Translatable
public static Byte3 bitAnd(Byte3 a, Byte3 b) {
return new Byte3((byte)(a.x & b.x), (byte)(a.y & b.y), (byte)(a.z & b.z));
}
@@ -397,6 +448,7 @@ public static void bitAnd(Byte3 a, Byte3 b, Byte3 result) {
result.z = (byte)(a.z & b.z);
}
+ @Translatable
public static Byte3 bitOr(Byte3 a, Byte3 b) {
return new Byte3((byte)(a.x | b.x), (byte)(a.y | b.y), (byte)(a.z | b.z));
}
@@ -407,6 +459,7 @@ public static void bitOr(Byte3 a, Byte3 b, Byte3 result) {
result.z = (byte)(a.z | b.z);
}
+ @Translatable
public static Byte3 bitXor(Byte3 a, Byte3 b) {
return new Byte3((byte)(a.x ^ b.x), (byte)(a.y ^ b.y), (byte)(a.z ^ b.z));
}
@@ -417,6 +470,7 @@ public static void bitXor(Byte3 a, Byte3 b, Byte3 result) {
result.z = (byte)(a.z ^ b.z);
}
+ @Translatable
public static Byte3 bitNot(Byte3 a) {
return new Byte3((byte)(~a.x), (byte)(~a.y), (byte)(~a.z));
}
@@ -427,6 +481,7 @@ public static void bitNot(Byte3 a, Byte3 result) {
result.z = (byte)(~a.z);
}
+ @Translatable
public static Byte3 abs(Byte3 a) {
return new Byte3(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z));
}
@@ -437,6 +492,7 @@ public static void abs(Byte3 a, Byte3 result) {
result.z = Math.abs(a.z);
}
+ @Translatable
public static Byte3 clamp(Byte3 a, Byte3 b, Byte3 c) {
return new Byte3(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z));
}
@@ -447,6 +503,7 @@ public static void clamp(Byte3 a, Byte3 b, Byte3 c, Byte3 result) {
result.z = Math.clamp(a.z, b.z, c.z);
}
+ @Translatable
public static Byte3 max(Byte3 a, Byte3 b) {
return new Byte3(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z));
}
@@ -457,6 +514,7 @@ public static void max(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.max(a.z, b.z);
}
+ @Translatable
public static Byte3 maxMag(Byte3 a, Byte3 b) {
return new Byte3(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z));
}
@@ -467,6 +525,7 @@ public static void maxMag(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.maxMag(a.z, b.z);
}
+ @Translatable
public static Byte3 min(Byte3 a, Byte3 b) {
return new Byte3(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z));
}
@@ -477,6 +536,7 @@ public static void min(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.min(a.z, b.z);
}
+ @Translatable
public static Byte3 minMag(Byte3 a, Byte3 b) {
return new Byte3(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z));
}
@@ -487,6 +547,7 @@ public static void minMag(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.minMag(a.z, b.z);
}
+ @Translatable
public static Byte3 mix(Byte3 a, Byte3 b, Byte3 c) {
return new Byte3(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z));
}
@@ -497,6 +558,7 @@ public static void mix(Byte3 a, Byte3 b, Byte3 c, Byte3 result) {
result.z = Math.mix(a.z, b.z, c.z);
}
+ @Translatable
public static Byte3 clamp(Byte3 v, byte min, byte max) {
return new Byte3(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max));
}
@@ -507,6 +569,7 @@ public static void clamp(Byte3 v, byte min, byte max, Byte3 result) {
result.z = Math.clamp(v.z, min, max);
}
+ @Translatable
public static Byte3 max(Byte3 x, byte y) {
return new Byte3(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y));
}
@@ -517,6 +580,7 @@ public static void max(Byte3 x, byte y, Byte3 result) {
result.z = Math.max(x.z, y);
}
+ @Translatable
public static Byte3 min(Byte3 x, byte y) {
return new Byte3(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y));
}
@@ -527,6 +591,7 @@ public static void min(Byte3 x, byte y, Byte3 result) {
result.z = Math.min(x.z, y);
}
+ @Translatable
public static Byte3 mix(Byte3 x, Byte3 y, byte a) {
return new Byte3(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a));
}
@@ -537,6 +602,7 @@ public static void mix(Byte3 x, Byte3 y, byte a, Byte3 result) {
result.z = Math.mix(x.z, y.z, a);
}
+ @Translatable
public static Byte3 absDiff(Byte3 a, Byte3 b) {
return new Byte3(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z));
}
@@ -547,6 +613,7 @@ public static void absDiff(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.absDiff(a.z, b.z);
}
+ @Translatable
public static Byte3 addSat(Byte3 a, Byte3 b) {
return new Byte3(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z));
}
@@ -557,6 +624,7 @@ public static void addSat(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.addSat(a.z, b.z);
}
+ @Translatable
public static Byte3 clz(Byte3 a) {
return new Byte3(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z));
}
@@ -567,6 +635,7 @@ public static void clz(Byte3 a, Byte3 result) {
result.z = Math.clz(a.z);
}
+ @Translatable
public static Byte3 hadd(Byte3 a, Byte3 b) {
return new Byte3(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z));
}
@@ -577,6 +646,7 @@ public static void hadd(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.hadd(a.z, b.z);
}
+ @Translatable
public static Byte3 madHi(Byte3 a, Byte3 b, Byte3 c) {
return new Byte3(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z));
}
@@ -587,6 +657,7 @@ public static void madHi(Byte3 a, Byte3 b, Byte3 c, Byte3 result) {
result.z = Math.madHi(a.z, b.z, c.z);
}
+ @Translatable
public static Byte3 madSat(Byte3 a, Byte3 b, Byte3 c) {
return new Byte3(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z));
}
@@ -597,6 +668,7 @@ public static void madSat(Byte3 a, Byte3 b, Byte3 c, Byte3 result) {
result.z = Math.madSat(a.z, b.z, c.z);
}
+ @Translatable
public static Byte3 mulHi(Byte3 a, Byte3 b) {
return new Byte3(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z));
}
@@ -607,6 +679,7 @@ public static void mulHi(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.mulHi(a.z, b.z);
}
+ @Translatable
public static Byte3 rhadd(Byte3 a, Byte3 b) {
return new Byte3(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z));
}
@@ -617,6 +690,7 @@ public static void rhadd(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.rhadd(a.z, b.z);
}
+ @Translatable
public static Byte3 rotate(Byte3 a, Byte3 b) {
return new Byte3(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z));
}
@@ -627,6 +701,7 @@ public static void rotate(Byte3 a, Byte3 b, Byte3 result) {
result.z = Math.rotate(a.z, b.z);
}
+ @Translatable
public static Byte3 subSat(Byte3 a, Byte3 b) {
return new Byte3(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte4.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte4.java
index 7b5e8a5..c344123 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte4.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte4.java
@@ -27,18 +27,28 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Byte4 {
+ @Translatable
public byte x;
+ @Translatable
public byte y;
+ @Translatable
public byte z;
+ @Translatable
public byte w;
+ @Translatable
public Byte4() {}
+ @Translatable
public Byte4(byte x, byte y, byte z, byte w) {
set(x, y, z, w);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w) {
this.x = x;
this.y = y;
@@ -46,74 +56,92 @@ public void set(byte x, byte y, byte z, byte w) {
this.w = w;
}
+ @Translatable
public Byte4(byte v) {
this(v, v, v, v);
}
+ @Translatable
public void set(byte v) {
set(v, v, v, v);
}
+ @Translatable
public Byte4(byte x, byte y, Byte2 vec1) {
this(x, y, vec1.x, vec1.y);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1) {
set(x, y, vec1.x, vec1.y);
}
+ @Translatable
public Byte4(byte x, Byte2 vec1, byte w) {
this(x, vec1.x, vec1.y, w);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w) {
set(x, vec1.x, vec1.y, w);
}
+ @Translatable
public Byte4(byte x, Byte3 vec1) {
this(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(byte x, Byte3 vec1) {
set(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Byte4(Byte2 vec1, byte z, byte w) {
this(vec1.x, vec1.y, z, w);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w) {
set(vec1.x, vec1.y, z, w);
}
+ @Translatable
public Byte4(Byte2 vec1, Byte2 vec2) {
this(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2) {
set(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Byte4(Byte3 vec1, byte w) {
this(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public void set(Byte3 vec1, byte w) {
set(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public Byte4(Byte4 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(Byte4 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Byte4 value() {
return new Byte4(this);
}
+ @Translatable
public Byte2 lo() {
return new Byte2(x, y);
}
@@ -123,6 +151,7 @@ public void lo(Byte2 result) {
result.y = y;
}
+ @Translatable
public Byte2 hi() {
return new Byte2(z, w);
}
@@ -132,6 +161,7 @@ public void hi(Byte2 result) {
result.y = w;
}
+ @Translatable
public Byte2 odd() {
return new Byte2(y, w);
}
@@ -141,6 +171,7 @@ public void odd(Byte2 result) {
result.y = w;
}
+ @Translatable
public Byte2 even() {
return new Byte2(x, z);
}
@@ -150,6 +181,7 @@ public void even(Byte2 result) {
result.y = z;
}
+ @Translatable
public Short4 convertShort4() {
return new Short4((short)(x & 0xff), (short)(y & 0xff), (short)(z & 0xff), (short)(w & 0xff));
}
@@ -161,6 +193,7 @@ public void convertShort4(Short4 result) {
result.w = (short)(w & 0xff);
}
+ @Translatable
public Int4 convertInt4() {
return new Int4((int)(x & 0xff), (int)(y & 0xff), (int)(z & 0xff), (int)(w & 0xff));
}
@@ -172,6 +205,7 @@ public void convertInt4(Int4 result) {
result.w = (int)(w & 0xff);
}
+ @Translatable
public Long4 convertLong4() {
return new Long4((long)(x & 0xff), (long)(y & 0xff), (long)(z & 0xff), (long)(w & 0xff));
}
@@ -183,6 +217,7 @@ public void convertLong4(Long4 result) {
result.w = (long)(w & 0xff);
}
+ @Translatable
public Float4 convertFloat4() {
return new Float4((float)(x & 0xff), (float)(y & 0xff), (float)(z & 0xff), (float)(w & 0xff));
}
@@ -194,6 +229,7 @@ public void convertFloat4(Float4 result) {
result.w = (float)(w & 0xff);
}
+ @Translatable
public Double4 convertDouble4() {
return new Double4((double)(x & 0xff), (double)(y & 0xff), (double)(z & 0xff), (double)(w & 0xff));
}
@@ -205,6 +241,7 @@ public void convertDouble4(Double4 result) {
result.w = (double)(w & 0xff);
}
+ @Translatable
public Byte2 asByte2() {
return new Byte2(x, y);
}
@@ -214,6 +251,7 @@ public void asByte2(Byte2 result) {
result.y = y;
}
+ @Translatable
public Byte3 asByte3() {
return new Byte3(x, y, z);
}
@@ -224,6 +262,7 @@ public void asByte3(Byte3 result) {
result.z = z;
}
+ @Translatable
public static Int4 isEqual(Byte4 a, Byte4 b) {
return new Int4(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0);
}
@@ -235,6 +274,7 @@ public static void isEqual(Byte4 a, Byte4 b, Int4 result) {
result.w = a.w == b.w? 1 : 0;
}
+ @Translatable
public static Int4 isNotEqual(Byte4 a, Byte4 b) {
return new Int4(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0);
}
@@ -246,6 +286,7 @@ public static void isNotEqual(Byte4 a, Byte4 b, Int4 result) {
result.w = a.w != b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreater(Byte4 a, Byte4 b) {
return new Int4(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0);
}
@@ -257,6 +298,7 @@ public static void isGreater(Byte4 a, Byte4 b, Int4 result) {
result.w = a.w > b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreaterEqual(Byte4 a, Byte4 b) {
return new Int4(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0);
}
@@ -268,6 +310,7 @@ public static void isGreaterEqual(Byte4 a, Byte4 b, Int4 result) {
result.w = a.w >= b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLess(Byte4 a, Byte4 b) {
return new Int4(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0);
}
@@ -279,6 +322,7 @@ public static void isLess(Byte4 a, Byte4 b, Int4 result) {
result.w = a.w < b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLessEqual(Byte4 a, Byte4 b) {
return new Int4(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0);
}
@@ -290,6 +334,7 @@ public static void isLessEqual(Byte4 a, Byte4 b, Int4 result) {
result.w = a.w <= b.w? 1 : 0;
}
+ @Translatable
public static Byte4 select(Byte4 a, Byte4 b, Int4 c) {
return new Byte4(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w));
}
@@ -301,14 +346,17 @@ public static void select(Byte4 a, Byte4 b, Int4 c, Byte4 result) {
result.w = Math.select(a.w, b.w, c.w);
}
+ @Translatable
public static int any(Byte4 a) {
return (a.x != (byte) 0 || a.y != (byte) 0 || a.z != (byte) 0 || a.w != (byte) 0)? 1 : 0;
}
+ @Translatable
public static int all(Byte4 a) {
return (a.x == (byte) 0 || a.y == (byte) 0 || a.z == (byte) 0 || a.w == (byte) 0)? 0 : 1;
}
+ @Translatable
public static Byte4 neg(Byte4 a) {
return new Byte4((byte)(-a.x), (byte)(-a.y), (byte)(-a.z), (byte)(-a.w));
}
@@ -320,6 +368,7 @@ public static void neg(Byte4 a, Byte4 result) {
result.w = (byte)(-a.w);
}
+ @Translatable
public static Byte4 add(Byte4 a, Byte4 b) {
return new Byte4((byte)(a.x + b.x), (byte)(a.y + b.y), (byte)(a.z + b.z), (byte)(a.w + b.w));
}
@@ -331,6 +380,7 @@ public static void add(Byte4 a, Byte4 b, Byte4 result) {
result.w = (byte)(a.w + b.w);
}
+ @Translatable
public static Byte4 sub(Byte4 a, Byte4 b) {
return new Byte4((byte)(a.x - b.x), (byte)(a.y - b.y), (byte)(a.z - b.z), (byte)(a.w - b.w));
}
@@ -342,6 +392,7 @@ public static void sub(Byte4 a, Byte4 b, Byte4 result) {
result.w = (byte)(a.w - b.w);
}
+ @Translatable
public static Byte4 mul(Byte4 a, Byte4 b) {
return new Byte4((byte)(a.x * b.x), (byte)(a.y * b.y), (byte)(a.z * b.z), (byte)(a.w * b.w));
}
@@ -353,6 +404,7 @@ public static void mul(Byte4 a, Byte4 b, Byte4 result) {
result.w = (byte)(a.w * b.w);
}
+ @Translatable
public static Byte4 mul(Byte4 a, byte k) {
return new Byte4((byte)(a.x * k), (byte)(a.y * k), (byte)(a.z * k), (byte)(a.w * k));
}
@@ -364,6 +416,7 @@ public static void mul(Byte4 a, byte k, Byte4 result) {
result.w = (byte)(a.w * k);
}
+ @Translatable
public static Double4 mul(Byte4 a, Double4 b) {
return new Double4((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w));
}
@@ -375,6 +428,7 @@ public static void mul(Byte4 a, Double4 b, Double4 result) {
result.w = (double)(a.w * b.w);
}
+ @Translatable
public static Double4 mul(Byte4 a, double k) {
return new Double4((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k));
}
@@ -386,6 +440,7 @@ public static void mul(Byte4 a, double k, Double4 result) {
result.w = (double)(a.w * k);
}
+ @Translatable
public static Float4 mul(Byte4 a, Float4 b) {
return new Float4((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w));
}
@@ -397,6 +452,7 @@ public static void mul(Byte4 a, Float4 b, Float4 result) {
result.w = (float)(a.w * b.w);
}
+ @Translatable
public static Float4 mul(Byte4 a, float k) {
return new Float4((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k));
}
@@ -408,6 +464,7 @@ public static void mul(Byte4 a, float k, Float4 result) {
result.w = (float)(a.w * k);
}
+ @Translatable
public static Byte4 div(Byte4 a, Byte4 b) {
return new Byte4((byte)(a.x / b.x), (byte)(a.y / b.y), (byte)(a.z / b.z), (byte)(a.w / b.w));
}
@@ -419,6 +476,7 @@ public static void div(Byte4 a, Byte4 b, Byte4 result) {
result.w = (byte)(a.w / b.w);
}
+ @Translatable
public static Byte4 div(Byte4 a, byte k) {
return new Byte4((byte)(a.x / k), (byte)(a.y / k), (byte)(a.z / k), (byte)(a.w / k));
}
@@ -430,6 +488,7 @@ public static void div(Byte4 a, byte k, Byte4 result) {
result.w = (byte)(a.w / k);
}
+ @Translatable
public static Double4 div(Byte4 a, Double4 b) {
return new Double4((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w));
}
@@ -441,6 +500,7 @@ public static void div(Byte4 a, Double4 b, Double4 result) {
result.w = (double)(a.w / b.w);
}
+ @Translatable
public static Double4 div(Byte4 a, double k) {
return new Double4((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k));
}
@@ -452,6 +512,7 @@ public static void div(Byte4 a, double k, Double4 result) {
result.w = (double)(a.w / k);
}
+ @Translatable
public static Float4 div(Byte4 a, Float4 b) {
return new Float4((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w));
}
@@ -463,6 +524,7 @@ public static void div(Byte4 a, Float4 b, Float4 result) {
result.w = (float)(a.w / b.w);
}
+ @Translatable
public static Float4 div(Byte4 a, float k) {
return new Float4((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k));
}
@@ -474,6 +536,7 @@ public static void div(Byte4 a, float k, Float4 result) {
result.w = (float)(a.w / k);
}
+ @Translatable
public static Byte4 mod(Byte4 a, Byte4 b) {
return new Byte4((byte)(a.x % b.x), (byte)(a.y % b.y), (byte)(a.z % b.z), (byte)(a.w % b.w));
}
@@ -485,6 +548,7 @@ public static void mod(Byte4 a, Byte4 b, Byte4 result) {
result.w = (byte)(a.w % b.w);
}
+ @Translatable
public static Byte4 mod(Byte4 a, byte k) {
return new Byte4((byte)(a.x % k), (byte)(a.y % k), (byte)(a.z % k), (byte)(a.w % k));
}
@@ -496,6 +560,7 @@ public static void mod(Byte4 a, byte k, Byte4 result) {
result.w = (byte)(a.w % k);
}
+ @Translatable
public static Byte4 bitAnd(Byte4 a, Byte4 b) {
return new Byte4((byte)(a.x & b.x), (byte)(a.y & b.y), (byte)(a.z & b.z), (byte)(a.w & b.w));
}
@@ -507,6 +572,7 @@ public static void bitAnd(Byte4 a, Byte4 b, Byte4 result) {
result.w = (byte)(a.w & b.w);
}
+ @Translatable
public static Byte4 bitOr(Byte4 a, Byte4 b) {
return new Byte4((byte)(a.x | b.x), (byte)(a.y | b.y), (byte)(a.z | b.z), (byte)(a.w | b.w));
}
@@ -518,6 +584,7 @@ public static void bitOr(Byte4 a, Byte4 b, Byte4 result) {
result.w = (byte)(a.w | b.w);
}
+ @Translatable
public static Byte4 bitXor(Byte4 a, Byte4 b) {
return new Byte4((byte)(a.x ^ b.x), (byte)(a.y ^ b.y), (byte)(a.z ^ b.z), (byte)(a.w ^ b.w));
}
@@ -529,6 +596,7 @@ public static void bitXor(Byte4 a, Byte4 b, Byte4 result) {
result.w = (byte)(a.w ^ b.w);
}
+ @Translatable
public static Byte4 bitNot(Byte4 a) {
return new Byte4((byte)(~a.x), (byte)(~a.y), (byte)(~a.z), (byte)(~a.w));
}
@@ -540,6 +608,7 @@ public static void bitNot(Byte4 a, Byte4 result) {
result.w = (byte)(~a.w);
}
+ @Translatable
public static Byte4 abs(Byte4 a) {
return new Byte4(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w));
}
@@ -551,6 +620,7 @@ public static void abs(Byte4 a, Byte4 result) {
result.w = Math.abs(a.w);
}
+ @Translatable
public static Byte4 clamp(Byte4 a, Byte4 b, Byte4 c) {
return new Byte4(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w));
}
@@ -562,6 +632,7 @@ public static void clamp(Byte4 a, Byte4 b, Byte4 c, Byte4 result) {
result.w = Math.clamp(a.w, b.w, c.w);
}
+ @Translatable
public static Byte4 max(Byte4 a, Byte4 b) {
return new Byte4(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w));
}
@@ -573,6 +644,7 @@ public static void max(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.max(a.w, b.w);
}
+ @Translatable
public static Byte4 maxMag(Byte4 a, Byte4 b) {
return new Byte4(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w));
}
@@ -584,6 +656,7 @@ public static void maxMag(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.maxMag(a.w, b.w);
}
+ @Translatable
public static Byte4 min(Byte4 a, Byte4 b) {
return new Byte4(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w));
}
@@ -595,6 +668,7 @@ public static void min(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.min(a.w, b.w);
}
+ @Translatable
public static Byte4 minMag(Byte4 a, Byte4 b) {
return new Byte4(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w));
}
@@ -606,6 +680,7 @@ public static void minMag(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.minMag(a.w, b.w);
}
+ @Translatable
public static Byte4 mix(Byte4 a, Byte4 b, Byte4 c) {
return new Byte4(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w));
}
@@ -617,6 +692,7 @@ public static void mix(Byte4 a, Byte4 b, Byte4 c, Byte4 result) {
result.w = Math.mix(a.w, b.w, c.w);
}
+ @Translatable
public static Byte4 clamp(Byte4 v, byte min, byte max) {
return new Byte4(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max));
}
@@ -628,6 +704,7 @@ public static void clamp(Byte4 v, byte min, byte max, Byte4 result) {
result.w = Math.clamp(v.w, min, max);
}
+ @Translatable
public static Byte4 max(Byte4 x, byte y) {
return new Byte4(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y));
}
@@ -639,6 +716,7 @@ public static void max(Byte4 x, byte y, Byte4 result) {
result.w = Math.max(x.w, y);
}
+ @Translatable
public static Byte4 min(Byte4 x, byte y) {
return new Byte4(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y));
}
@@ -650,6 +728,7 @@ public static void min(Byte4 x, byte y, Byte4 result) {
result.w = Math.min(x.w, y);
}
+ @Translatable
public static Byte4 mix(Byte4 x, Byte4 y, byte a) {
return new Byte4(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a));
}
@@ -661,6 +740,7 @@ public static void mix(Byte4 x, Byte4 y, byte a, Byte4 result) {
result.w = Math.mix(x.w, y.w, a);
}
+ @Translatable
public static Byte4 absDiff(Byte4 a, Byte4 b) {
return new Byte4(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z), Math.absDiff(a.w, b.w));
}
@@ -672,6 +752,7 @@ public static void absDiff(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.absDiff(a.w, b.w);
}
+ @Translatable
public static Byte4 addSat(Byte4 a, Byte4 b) {
return new Byte4(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z), Math.addSat(a.w, b.w));
}
@@ -683,6 +764,7 @@ public static void addSat(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.addSat(a.w, b.w);
}
+ @Translatable
public static Byte4 clz(Byte4 a) {
return new Byte4(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z), Math.clz(a.w));
}
@@ -694,6 +776,7 @@ public static void clz(Byte4 a, Byte4 result) {
result.w = Math.clz(a.w);
}
+ @Translatable
public static Byte4 hadd(Byte4 a, Byte4 b) {
return new Byte4(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z), Math.hadd(a.w, b.w));
}
@@ -705,6 +788,7 @@ public static void hadd(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.hadd(a.w, b.w);
}
+ @Translatable
public static Byte4 madHi(Byte4 a, Byte4 b, Byte4 c) {
return new Byte4(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z), Math.madHi(a.w, b.w, c.w));
}
@@ -716,6 +800,7 @@ public static void madHi(Byte4 a, Byte4 b, Byte4 c, Byte4 result) {
result.w = Math.madHi(a.w, b.w, c.w);
}
+ @Translatable
public static Byte4 madSat(Byte4 a, Byte4 b, Byte4 c) {
return new Byte4(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z), Math.madSat(a.w, b.w, c.w));
}
@@ -727,6 +812,7 @@ public static void madSat(Byte4 a, Byte4 b, Byte4 c, Byte4 result) {
result.w = Math.madSat(a.w, b.w, c.w);
}
+ @Translatable
public static Byte4 mulHi(Byte4 a, Byte4 b) {
return new Byte4(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z), Math.mulHi(a.w, b.w));
}
@@ -738,6 +824,7 @@ public static void mulHi(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.mulHi(a.w, b.w);
}
+ @Translatable
public static Byte4 rhadd(Byte4 a, Byte4 b) {
return new Byte4(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z), Math.rhadd(a.w, b.w));
}
@@ -749,6 +836,7 @@ public static void rhadd(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.rhadd(a.w, b.w);
}
+ @Translatable
public static Byte4 rotate(Byte4 a, Byte4 b) {
return new Byte4(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z), Math.rotate(a.w, b.w));
}
@@ -760,6 +848,7 @@ public static void rotate(Byte4 a, Byte4 b, Byte4 result) {
result.w = Math.rotate(a.w, b.w);
}
+ @Translatable
public static Byte4 subSat(Byte4 a, Byte4 b) {
return new Byte4(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z), Math.subSat(a.w, b.w));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte8.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte8.java
index b430ecb..377f021 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte8.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Byte8.java
@@ -27,19 +27,30 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Byte8 {
+ @Translatable
public byte x;
+ @Translatable
public byte y;
+ @Translatable
public byte z;
+ @Translatable
public byte w;
+ @Translatable
public byte[] s = new byte[4];
+ @Translatable
public Byte8() {}
+ @Translatable
public Byte8(byte x, byte y, byte z, byte w, byte s0, byte s1, byte s2, byte s3) {
set(x, y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w, byte s0, byte s1, byte s2, byte s3) {
this.x = x;
this.y = y;
@@ -51,882 +62,1102 @@ public void set(byte x, byte y, byte z, byte w, byte s0, byte s1, byte s2, byte
this.s[3] = s3;
}
+ @Translatable
public Byte8(byte v) {
this(v, v, v, v, v, v, v, v);
}
+ @Translatable
public void set(byte v) {
set(v, v, v, v, v, v, v, v);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, byte w, byte s0, byte s1, Byte2 vec1) {
this(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w, byte s0, byte s1, Byte2 vec1) {
set(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, byte w, byte s0, Byte2 vec1, byte s3) {
this(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w, byte s0, Byte2 vec1, byte s3) {
set(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, byte w, byte s0, Byte3 vec1) {
this(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w, byte s0, Byte3 vec1) {
set(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, byte w, Byte2 vec1, byte s2, byte s3) {
this(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w, Byte2 vec1, byte s2, byte s3) {
set(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, byte w, Byte2 vec1, Byte2 vec2) {
this(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w, Byte2 vec1, Byte2 vec2) {
set(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, byte w, Byte3 vec1, byte s3) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w, Byte3 vec1, byte s3) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, byte w, Byte4 vec1) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(byte x, byte y, byte z, byte w, Byte4 vec1) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, Byte2 vec1, byte s1, byte s2, byte s3) {
this(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public void set(byte x, byte y, byte z, Byte2 vec1, byte s1, byte s2, byte s3) {
set(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, Byte2 vec1, byte s1, Byte2 vec2) {
this(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, byte y, byte z, Byte2 vec1, byte s1, Byte2 vec2) {
set(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, Byte2 vec1, Byte2 vec2, byte s3) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(byte x, byte y, byte z, Byte2 vec1, Byte2 vec2, byte s3) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, Byte2 vec1, Byte3 vec2) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(byte x, byte y, byte z, Byte2 vec1, Byte3 vec2) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, Byte3 vec1, byte s2, byte s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public void set(byte x, byte y, byte z, Byte3 vec1, byte s2, byte s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, Byte3 vec1, Byte2 vec2) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, byte y, byte z, Byte3 vec1, Byte2 vec2) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, byte y, byte z, Byte4 vec1, byte s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public void set(byte x, byte y, byte z, Byte4 vec1, byte s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public Byte8(byte x, byte y, Byte2 vec1, byte s0, byte s1, byte s2, byte s3) {
this(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1, byte s0, byte s1, byte s2, byte s3) {
set(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public Byte8(byte x, byte y, Byte2 vec1, byte s0, byte s1, Byte2 vec2) {
this(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1, byte s0, byte s1, Byte2 vec2) {
set(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, byte y, Byte2 vec1, byte s0, Byte2 vec2, byte s3) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1, byte s0, Byte2 vec2, byte s3) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(byte x, byte y, Byte2 vec1, byte s0, Byte3 vec2) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1, byte s0, Byte3 vec2) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(byte x, byte y, Byte2 vec1, Byte2 vec2, byte s2, byte s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1, Byte2 vec2, byte s2, byte s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Byte8(byte x, byte y, Byte2 vec1, Byte2 vec2, Byte2 vec3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1, Byte2 vec2, Byte2 vec3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(byte x, byte y, Byte2 vec1, Byte3 vec2, byte s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1, Byte3 vec2, byte s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Byte8(byte x, byte y, Byte2 vec1, Byte4 vec2) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(byte x, byte y, Byte2 vec1, Byte4 vec2) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Byte8(byte x, byte y, Byte3 vec1, byte s1, byte s2, byte s3) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public void set(byte x, byte y, Byte3 vec1, byte s1, byte s2, byte s3) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public Byte8(byte x, byte y, Byte3 vec1, byte s1, Byte2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, byte y, Byte3 vec1, byte s1, Byte2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, byte y, Byte3 vec1, Byte2 vec2, byte s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(byte x, byte y, Byte3 vec1, Byte2 vec2, byte s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(byte x, byte y, Byte3 vec1, Byte3 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(byte x, byte y, Byte3 vec1, Byte3 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(byte x, byte y, Byte4 vec1, byte s2, byte s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public void set(byte x, byte y, Byte4 vec1, byte s2, byte s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public Byte8(byte x, byte y, Byte4 vec1, Byte2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, byte y, Byte4 vec1, Byte2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, byte w, byte s0, byte s1, byte s2, byte s3) {
this(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w, byte s0, byte s1, byte s2, byte s3) {
set(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, byte w, byte s0, byte s1, Byte2 vec2) {
this(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w, byte s0, byte s1, Byte2 vec2) {
set(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, byte w, byte s0, Byte2 vec2, byte s3) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w, byte s0, Byte2 vec2, byte s3) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, byte w, byte s0, Byte3 vec2) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w, byte s0, Byte3 vec2) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, byte w, Byte2 vec2, byte s2, byte s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w, Byte2 vec2, byte s2, byte s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, byte w, Byte2 vec2, Byte2 vec3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w, Byte2 vec2, Byte2 vec3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, byte w, Byte3 vec2, byte s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w, Byte3 vec2, byte s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, byte w, Byte4 vec2) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(byte x, Byte2 vec1, byte w, Byte4 vec2) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, Byte2 vec2, byte s1, byte s2, byte s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(byte x, Byte2 vec1, Byte2 vec2, byte s1, byte s2, byte s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, Byte2 vec2, byte s1, Byte2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(byte x, Byte2 vec1, Byte2 vec2, byte s1, Byte2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, Byte2 vec2, Byte2 vec3, byte s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(byte x, Byte2 vec1, Byte2 vec2, Byte2 vec3, byte s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, Byte2 vec2, Byte3 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(byte x, Byte2 vec1, Byte2 vec2, Byte3 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, Byte3 vec2, byte s2, byte s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(byte x, Byte2 vec1, Byte3 vec2, byte s2, byte s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, Byte3 vec2, Byte2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(byte x, Byte2 vec1, Byte3 vec2, Byte2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(byte x, Byte2 vec1, Byte4 vec2, byte s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(byte x, Byte2 vec1, Byte4 vec2, byte s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Byte8(byte x, Byte3 vec1, byte s0, byte s1, byte s2, byte s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public void set(byte x, Byte3 vec1, byte s0, byte s1, byte s2, byte s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public Byte8(byte x, Byte3 vec1, byte s0, byte s1, Byte2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, Byte3 vec1, byte s0, byte s1, Byte2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, Byte3 vec1, byte s0, Byte2 vec2, byte s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(byte x, Byte3 vec1, byte s0, Byte2 vec2, byte s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(byte x, Byte3 vec1, byte s0, Byte3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(byte x, Byte3 vec1, byte s0, Byte3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(byte x, Byte3 vec1, Byte2 vec2, byte s2, byte s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(byte x, Byte3 vec1, Byte2 vec2, byte s2, byte s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Byte8(byte x, Byte3 vec1, Byte2 vec2, Byte2 vec3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(byte x, Byte3 vec1, Byte2 vec2, Byte2 vec3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(byte x, Byte3 vec1, Byte3 vec2, byte s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(byte x, Byte3 vec1, Byte3 vec2, byte s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Byte8(byte x, Byte3 vec1, Byte4 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(byte x, Byte3 vec1, Byte4 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Byte8(byte x, Byte4 vec1, byte s1, byte s2, byte s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public void set(byte x, Byte4 vec1, byte s1, byte s2, byte s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public Byte8(byte x, Byte4 vec1, byte s1, Byte2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(byte x, Byte4 vec1, byte s1, Byte2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(byte x, Byte4 vec1, Byte2 vec2, byte s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(byte x, Byte4 vec1, Byte2 vec2, byte s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(byte x, Byte4 vec1, Byte3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(byte x, Byte4 vec1, Byte3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, byte w, byte s0, byte s1, byte s2, byte s3) {
this(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w, byte s0, byte s1, byte s2, byte s3) {
set(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, byte w, byte s0, byte s1, Byte2 vec2) {
this(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w, byte s0, byte s1, Byte2 vec2) {
set(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, byte w, byte s0, Byte2 vec2, byte s3) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w, byte s0, Byte2 vec2, byte s3) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, byte w, byte s0, Byte3 vec2) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w, byte s0, Byte3 vec2) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, byte w, Byte2 vec2, byte s2, byte s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w, Byte2 vec2, byte s2, byte s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, byte w, Byte2 vec2, Byte2 vec3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w, Byte2 vec2, Byte2 vec3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, byte w, Byte3 vec2, byte s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w, Byte3 vec2, byte s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, byte w, Byte4 vec2) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Byte2 vec1, byte z, byte w, Byte4 vec2) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, Byte2 vec2, byte s1, byte s2, byte s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Byte2 vec1, byte z, Byte2 vec2, byte s1, byte s2, byte s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, Byte2 vec2, byte s1, Byte2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte2 vec1, byte z, Byte2 vec2, byte s1, Byte2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, Byte2 vec2, Byte2 vec3, byte s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Byte2 vec1, byte z, Byte2 vec2, Byte2 vec3, byte s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, Byte2 vec2, Byte3 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Byte2 vec1, byte z, Byte2 vec2, Byte3 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, Byte3 vec2, byte s2, byte s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Byte2 vec1, byte z, Byte3 vec2, byte s2, byte s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, Byte3 vec2, Byte2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte2 vec1, byte z, Byte3 vec2, Byte2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte2 vec1, byte z, Byte4 vec2, byte s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Byte2 vec1, byte z, Byte4 vec2, byte s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte2 vec2, byte s0, byte s1, byte s2, byte s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2, byte s0, byte s1, byte s2, byte s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte2 vec2, byte s0, byte s1, Byte2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2, byte s0, byte s1, Byte2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte2 vec2, byte s0, Byte2 vec3, byte s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2, byte s0, Byte2 vec3, byte s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte2 vec2, byte s0, Byte3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2, byte s0, Byte3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte2 vec2, Byte2 vec3, byte s2, byte s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2, Byte2 vec3, byte s2, byte s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte2 vec2, Byte2 vec3, Byte2 vec4) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2, Byte2 vec3, Byte2 vec4) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte2 vec2, Byte3 vec3, byte s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2, Byte3 vec3, byte s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte2 vec2, Byte4 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public void set(Byte2 vec1, Byte2 vec2, Byte4 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte3 vec2, byte s1, byte s2, byte s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public void set(Byte2 vec1, Byte3 vec2, byte s1, byte s2, byte s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte3 vec2, byte s1, Byte2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte2 vec1, Byte3 vec2, byte s1, Byte2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte3 vec2, Byte2 vec3, byte s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Byte2 vec1, Byte3 vec2, Byte2 vec3, byte s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte3 vec2, Byte3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Byte2 vec1, Byte3 vec2, Byte3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte4 vec2, byte s2, byte s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public void set(Byte2 vec1, Byte4 vec2, byte s2, byte s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public Byte8(Byte2 vec1, Byte4 vec2, Byte2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte2 vec1, Byte4 vec2, Byte2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte3 vec1, byte w, byte s0, byte s1, byte s2, byte s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Byte3 vec1, byte w, byte s0, byte s1, byte s2, byte s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public Byte8(Byte3 vec1, byte w, byte s0, byte s1, Byte2 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Byte3 vec1, byte w, byte s0, byte s1, Byte2 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(Byte3 vec1, byte w, byte s0, Byte2 vec2, byte s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Byte3 vec1, byte w, byte s0, Byte2 vec2, byte s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(Byte3 vec1, byte w, byte s0, Byte3 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Byte3 vec1, byte w, byte s0, Byte3 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(Byte3 vec1, byte w, Byte2 vec2, byte s2, byte s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Byte3 vec1, byte w, Byte2 vec2, byte s2, byte s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Byte8(Byte3 vec1, byte w, Byte2 vec2, Byte2 vec3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte3 vec1, byte w, Byte2 vec2, Byte2 vec3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte3 vec1, byte w, Byte3 vec2, byte s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Byte3 vec1, byte w, Byte3 vec2, byte s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Byte8(Byte3 vec1, byte w, Byte4 vec2) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Byte3 vec1, byte w, Byte4 vec2) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Byte8(Byte3 vec1, Byte2 vec2, byte s1, byte s2, byte s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Byte3 vec1, Byte2 vec2, byte s1, byte s2, byte s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Byte8(Byte3 vec1, Byte2 vec2, byte s1, Byte2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte3 vec1, Byte2 vec2, byte s1, Byte2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte3 vec1, Byte2 vec2, Byte2 vec3, byte s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Byte3 vec1, Byte2 vec2, Byte2 vec3, byte s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Byte8(Byte3 vec1, Byte2 vec2, Byte3 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Byte3 vec1, Byte2 vec2, Byte3 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Byte8(Byte3 vec1, Byte3 vec2, byte s2, byte s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Byte3 vec1, Byte3 vec2, byte s2, byte s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Byte8(Byte3 vec1, Byte3 vec2, Byte2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte3 vec1, Byte3 vec2, Byte2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte3 vec1, Byte4 vec2, byte s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Byte3 vec1, Byte4 vec2, byte s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Byte8(Byte4 vec1, byte s0, byte s1, byte s2, byte s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Byte4 vec1, byte s0, byte s1, byte s2, byte s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public Byte8(Byte4 vec1, byte s0, byte s1, Byte2 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Byte4 vec1, byte s0, byte s1, Byte2 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Byte8(Byte4 vec1, byte s0, Byte2 vec2, byte s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Byte4 vec1, byte s0, Byte2 vec2, byte s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Byte8(Byte4 vec1, byte s0, Byte3 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Byte4 vec1, byte s0, Byte3 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Byte8(Byte4 vec1, Byte2 vec2, byte s2, byte s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Byte4 vec1, Byte2 vec2, byte s2, byte s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Byte8(Byte4 vec1, Byte2 vec2, Byte2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Byte4 vec1, Byte2 vec2, Byte2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Byte8(Byte4 vec1, Byte3 vec2, byte s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Byte4 vec1, Byte3 vec2, byte s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Byte8(Byte4 vec1, Byte4 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Byte4 vec1, Byte4 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Byte8(Byte8 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public void set(Byte8 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public Byte8 value() {
return new Byte8(this);
}
+ @Translatable
public Byte4 lo() {
return new Byte4(x, y, z, w);
}
@@ -938,6 +1169,7 @@ public void lo(Byte4 result) {
result.w = w;
}
+ @Translatable
public Byte4 hi() {
return new Byte4(s[0], s[1], s[2], s[3]);
}
@@ -949,6 +1181,7 @@ public void hi(Byte4 result) {
result.w = s[3];
}
+ @Translatable
public Byte4 odd() {
return new Byte4(y, w, s[1], s[3]);
}
@@ -960,6 +1193,7 @@ public void odd(Byte4 result) {
result.w = s[3];
}
+ @Translatable
public Byte4 even() {
return new Byte4(x, z, s[0], s[2]);
}
@@ -971,6 +1205,7 @@ public void even(Byte4 result) {
result.w = s[2];
}
+ @Translatable
public Short8 convertShort8() {
return new Short8((short)(x & 0xff), (short)(y & 0xff), (short)(z & 0xff), (short)(w & 0xff), (short)(s[0] & 0xff), (short)(s[1] & 0xff), (short)(s[2] & 0xff), (short)(s[3] & 0xff));
}
@@ -986,6 +1221,7 @@ public void convertShort8(Short8 result) {
result.s[3] = (short)(s[3] & 0xff);
}
+ @Translatable
public Int8 convertInt8() {
return new Int8((int)(x & 0xff), (int)(y & 0xff), (int)(z & 0xff), (int)(w & 0xff), (int)(s[0] & 0xff), (int)(s[1] & 0xff), (int)(s[2] & 0xff), (int)(s[3] & 0xff));
}
@@ -1001,6 +1237,7 @@ public void convertInt8(Int8 result) {
result.s[3] = (int)(s[3] & 0xff);
}
+ @Translatable
public Long8 convertLong8() {
return new Long8((long)(x & 0xff), (long)(y & 0xff), (long)(z & 0xff), (long)(w & 0xff), (long)(s[0] & 0xff), (long)(s[1] & 0xff), (long)(s[2] & 0xff), (long)(s[3] & 0xff));
}
@@ -1016,6 +1253,7 @@ public void convertLong8(Long8 result) {
result.s[3] = (long)(s[3] & 0xff);
}
+ @Translatable
public Float8 convertFloat8() {
return new Float8((float)(x & 0xff), (float)(y & 0xff), (float)(z & 0xff), (float)(w & 0xff), (float)(s[0] & 0xff), (float)(s[1] & 0xff), (float)(s[2] & 0xff), (float)(s[3] & 0xff));
}
@@ -1031,6 +1269,7 @@ public void convertFloat8(Float8 result) {
result.s[3] = (float)(s[3] & 0xff);
}
+ @Translatable
public Double8 convertDouble8() {
return new Double8((double)(x & 0xff), (double)(y & 0xff), (double)(z & 0xff), (double)(w & 0xff), (double)(s[0] & 0xff), (double)(s[1] & 0xff), (double)(s[2] & 0xff), (double)(s[3] & 0xff));
}
@@ -1046,6 +1285,7 @@ public void convertDouble8(Double8 result) {
result.s[3] = (double)(s[3] & 0xff);
}
+ @Translatable
public Byte2 asByte2() {
return new Byte2(x, y);
}
@@ -1055,6 +1295,7 @@ public void asByte2(Byte2 result) {
result.y = y;
}
+ @Translatable
public Byte3 asByte3() {
return new Byte3(x, y, z);
}
@@ -1065,6 +1306,7 @@ public void asByte3(Byte3 result) {
result.z = z;
}
+ @Translatable
public Byte4 asByte4() {
return new Byte4(x, y, z, w);
}
@@ -1076,6 +1318,7 @@ public void asByte4(Byte4 result) {
result.w = w;
}
+ @Translatable
public static Int8 isEqual(Byte8 a, Byte8 b) {
return new Int8(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0, a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
}
@@ -1091,6 +1334,7 @@ public static void isEqual(Byte8 a, Byte8 b, Int8 result) {
result.s[3] = a.s[3] == b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isNotEqual(Byte8 a, Byte8 b) {
return new Int8(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0, a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
}
@@ -1106,6 +1350,7 @@ public static void isNotEqual(Byte8 a, Byte8 b, Int8 result) {
result.s[3] = a.s[3] != b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreater(Byte8 a, Byte8 b) {
return new Int8(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0, a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
}
@@ -1121,6 +1366,7 @@ public static void isGreater(Byte8 a, Byte8 b, Int8 result) {
result.s[3] = a.s[3] > b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreaterEqual(Byte8 a, Byte8 b) {
return new Int8(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0, a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
}
@@ -1136,6 +1382,7 @@ public static void isGreaterEqual(Byte8 a, Byte8 b, Int8 result) {
result.s[3] = a.s[3] >= b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLess(Byte8 a, Byte8 b) {
return new Int8(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0, a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
}
@@ -1151,6 +1398,7 @@ public static void isLess(Byte8 a, Byte8 b, Int8 result) {
result.s[3] = a.s[3] < b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLessEqual(Byte8 a, Byte8 b) {
return new Int8(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0, a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
}
@@ -1166,6 +1414,7 @@ public static void isLessEqual(Byte8 a, Byte8 b, Int8 result) {
result.s[3] = a.s[3] <= b.s[3]? 1 : 0;
}
+ @Translatable
public static Byte8 select(Byte8 a, Byte8 b, Int8 c) {
return new Byte8(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w), Math.select(a.s[0], b.s[0], c.s[0]), Math.select(a.s[1], b.s[1], c.s[1]), Math.select(a.s[2], b.s[2], c.s[2]), Math.select(a.s[3], b.s[3], c.s[3]));
}
@@ -1181,14 +1430,17 @@ public static void select(Byte8 a, Byte8 b, Int8 c, Byte8 result) {
result.s[3] = Math.select(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static int any(Byte8 a) {
return (a.x != (byte) 0 || a.y != (byte) 0 || a.z != (byte) 0 || a.w != (byte) 0 || a.s[0] != (byte) 0 || a.s[1] != (byte) 0 || a.s[2] != (byte) 0 || a.s[3] != (byte) 0)? 1 : 0;
}
+ @Translatable
public static int all(Byte8 a) {
return (a.x == (byte) 0 || a.y == (byte) 0 || a.z == (byte) 0 || a.w == (byte) 0 || a.s[0] == (byte) 0 || a.s[1] == (byte) 0 || a.s[2] == (byte) 0 || a.s[3] == (byte) 0)? 0 : 1;
}
+ @Translatable
public static Byte8 neg(Byte8 a) {
return new Byte8((byte)(-a.x), (byte)(-a.y), (byte)(-a.z), (byte)(-a.w), (byte)(-a.s[0]), (byte)(-a.s[1]), (byte)(-a.s[2]), (byte)(-a.s[3]));
}
@@ -1204,6 +1456,7 @@ public static void neg(Byte8 a, Byte8 result) {
result.s[3] = (byte)(-a.s[3]);
}
+ @Translatable
public static Byte8 add(Byte8 a, Byte8 b) {
return new Byte8((byte)(a.x + b.x), (byte)(a.y + b.y), (byte)(a.z + b.z), (byte)(a.w + b.w), (byte)(a.s[0] + b.s[0]), (byte)(a.s[1] + b.s[1]), (byte)(a.s[2] + b.s[2]), (byte)(a.s[3] + b.s[3]));
}
@@ -1219,6 +1472,7 @@ public static void add(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = (byte)(a.s[3] + b.s[3]);
}
+ @Translatable
public static Byte8 sub(Byte8 a, Byte8 b) {
return new Byte8((byte)(a.x - b.x), (byte)(a.y - b.y), (byte)(a.z - b.z), (byte)(a.w - b.w), (byte)(a.s[0] - b.s[0]), (byte)(a.s[1] - b.s[1]), (byte)(a.s[2] - b.s[2]), (byte)(a.s[3] - b.s[3]));
}
@@ -1234,6 +1488,7 @@ public static void sub(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = (byte)(a.s[3] - b.s[3]);
}
+ @Translatable
public static Byte8 mul(Byte8 a, Byte8 b) {
return new Byte8((byte)(a.x * b.x), (byte)(a.y * b.y), (byte)(a.z * b.z), (byte)(a.w * b.w), (byte)(a.s[0] * b.s[0]), (byte)(a.s[1] * b.s[1]), (byte)(a.s[2] * b.s[2]), (byte)(a.s[3] * b.s[3]));
}
@@ -1249,6 +1504,7 @@ public static void mul(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = (byte)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Byte8 mul(Byte8 a, byte k) {
return new Byte8((byte)(a.x * k), (byte)(a.y * k), (byte)(a.z * k), (byte)(a.w * k), (byte)(a.s[0] * k), (byte)(a.s[1] * k), (byte)(a.s[2] * k), (byte)(a.s[3] * k));
}
@@ -1264,6 +1520,7 @@ public static void mul(Byte8 a, byte k, Byte8 result) {
result.s[3] = (byte)(a.s[3] * k);
}
+ @Translatable
public static Double8 mul(Byte8 a, Double8 b) {
return new Double8((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w), (double)(a.s[0] * b.s[0]), (double)(a.s[1] * b.s[1]), (double)(a.s[2] * b.s[2]), (double)(a.s[3] * b.s[3]));
}
@@ -1279,6 +1536,7 @@ public static void mul(Byte8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Double8 mul(Byte8 a, double k) {
return new Double8((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k), (double)(a.s[0] * k), (double)(a.s[1] * k), (double)(a.s[2] * k), (double)(a.s[3] * k));
}
@@ -1294,6 +1552,7 @@ public static void mul(Byte8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] * k);
}
+ @Translatable
public static Float8 mul(Byte8 a, Float8 b) {
return new Float8((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w), (float)(a.s[0] * b.s[0]), (float)(a.s[1] * b.s[1]), (float)(a.s[2] * b.s[2]), (float)(a.s[3] * b.s[3]));
}
@@ -1309,6 +1568,7 @@ public static void mul(Byte8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Float8 mul(Byte8 a, float k) {
return new Float8((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k), (float)(a.s[0] * k), (float)(a.s[1] * k), (float)(a.s[2] * k), (float)(a.s[3] * k));
}
@@ -1324,6 +1584,7 @@ public static void mul(Byte8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] * k);
}
+ @Translatable
public static Byte8 div(Byte8 a, Byte8 b) {
return new Byte8((byte)(a.x / b.x), (byte)(a.y / b.y), (byte)(a.z / b.z), (byte)(a.w / b.w), (byte)(a.s[0] / b.s[0]), (byte)(a.s[1] / b.s[1]), (byte)(a.s[2] / b.s[2]), (byte)(a.s[3] / b.s[3]));
}
@@ -1339,6 +1600,7 @@ public static void div(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = (byte)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Byte8 div(Byte8 a, byte k) {
return new Byte8((byte)(a.x / k), (byte)(a.y / k), (byte)(a.z / k), (byte)(a.w / k), (byte)(a.s[0] / k), (byte)(a.s[1] / k), (byte)(a.s[2] / k), (byte)(a.s[3] / k));
}
@@ -1354,6 +1616,7 @@ public static void div(Byte8 a, byte k, Byte8 result) {
result.s[3] = (byte)(a.s[3] / k);
}
+ @Translatable
public static Double8 div(Byte8 a, Double8 b) {
return new Double8((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w), (double)(a.s[0] / b.s[0]), (double)(a.s[1] / b.s[1]), (double)(a.s[2] / b.s[2]), (double)(a.s[3] / b.s[3]));
}
@@ -1369,6 +1632,7 @@ public static void div(Byte8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Double8 div(Byte8 a, double k) {
return new Double8((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k), (double)(a.s[0] / k), (double)(a.s[1] / k), (double)(a.s[2] / k), (double)(a.s[3] / k));
}
@@ -1384,6 +1648,7 @@ public static void div(Byte8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] / k);
}
+ @Translatable
public static Float8 div(Byte8 a, Float8 b) {
return new Float8((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w), (float)(a.s[0] / b.s[0]), (float)(a.s[1] / b.s[1]), (float)(a.s[2] / b.s[2]), (float)(a.s[3] / b.s[3]));
}
@@ -1399,6 +1664,7 @@ public static void div(Byte8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Float8 div(Byte8 a, float k) {
return new Float8((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k), (float)(a.s[0] / k), (float)(a.s[1] / k), (float)(a.s[2] / k), (float)(a.s[3] / k));
}
@@ -1414,6 +1680,7 @@ public static void div(Byte8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] / k);
}
+ @Translatable
public static Byte8 mod(Byte8 a, Byte8 b) {
return new Byte8((byte)(a.x % b.x), (byte)(a.y % b.y), (byte)(a.z % b.z), (byte)(a.w % b.w), (byte)(a.s[0] % b.s[0]), (byte)(a.s[1] % b.s[1]), (byte)(a.s[2] % b.s[2]), (byte)(a.s[3] % b.s[3]));
}
@@ -1429,6 +1696,7 @@ public static void mod(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = (byte)(a.s[3] % b.s[3]);
}
+ @Translatable
public static Byte8 mod(Byte8 a, byte k) {
return new Byte8((byte)(a.x % k), (byte)(a.y % k), (byte)(a.z % k), (byte)(a.w % k), (byte)(a.s[0] % k), (byte)(a.s[1] % k), (byte)(a.s[2] % k), (byte)(a.s[3] % k));
}
@@ -1444,6 +1712,7 @@ public static void mod(Byte8 a, byte k, Byte8 result) {
result.s[3] = (byte)(a.s[3] % k);
}
+ @Translatable
public static Byte8 bitAnd(Byte8 a, Byte8 b) {
return new Byte8((byte)(a.x & b.x), (byte)(a.y & b.y), (byte)(a.z & b.z), (byte)(a.w & b.w), (byte)(a.s[0] & b.s[0]), (byte)(a.s[1] & b.s[1]), (byte)(a.s[2] & b.s[2]), (byte)(a.s[3] & b.s[3]));
}
@@ -1459,6 +1728,7 @@ public static void bitAnd(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = (byte)(a.s[3] & b.s[3]);
}
+ @Translatable
public static Byte8 bitOr(Byte8 a, Byte8 b) {
return new Byte8((byte)(a.x | b.x), (byte)(a.y | b.y), (byte)(a.z | b.z), (byte)(a.w | b.w), (byte)(a.s[0] | b.s[0]), (byte)(a.s[1] | b.s[1]), (byte)(a.s[2] | b.s[2]), (byte)(a.s[3] | b.s[3]));
}
@@ -1474,6 +1744,7 @@ public static void bitOr(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = (byte)(a.s[3] | b.s[3]);
}
+ @Translatable
public static Byte8 bitXor(Byte8 a, Byte8 b) {
return new Byte8((byte)(a.x ^ b.x), (byte)(a.y ^ b.y), (byte)(a.z ^ b.z), (byte)(a.w ^ b.w), (byte)(a.s[0] ^ b.s[0]), (byte)(a.s[1] ^ b.s[1]), (byte)(a.s[2] ^ b.s[2]), (byte)(a.s[3] ^ b.s[3]));
}
@@ -1489,6 +1760,7 @@ public static void bitXor(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = (byte)(a.s[3] ^ b.s[3]);
}
+ @Translatable
public static Byte8 bitNot(Byte8 a) {
return new Byte8((byte)(~a.x), (byte)(~a.y), (byte)(~a.z), (byte)(~a.w), (byte)(~a.s[0]), (byte)(~a.s[1]), (byte)(~a.s[2]), (byte)(~a.s[3]));
}
@@ -1504,6 +1776,7 @@ public static void bitNot(Byte8 a, Byte8 result) {
result.s[3] = (byte)(~a.s[3]);
}
+ @Translatable
public static Byte8 abs(Byte8 a) {
return new Byte8(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w), Math.abs(a.s[0]), Math.abs(a.s[1]), Math.abs(a.s[2]), Math.abs(a.s[3]));
}
@@ -1519,6 +1792,7 @@ public static void abs(Byte8 a, Byte8 result) {
result.s[3] = Math.abs(a.s[3]);
}
+ @Translatable
public static Byte8 clamp(Byte8 a, Byte8 b, Byte8 c) {
return new Byte8(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w), Math.clamp(a.s[0], b.s[0], c.s[0]), Math.clamp(a.s[1], b.s[1], c.s[1]), Math.clamp(a.s[2], b.s[2], c.s[2]), Math.clamp(a.s[3], b.s[3], c.s[3]));
}
@@ -1534,6 +1808,7 @@ public static void clamp(Byte8 a, Byte8 b, Byte8 c, Byte8 result) {
result.s[3] = Math.clamp(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Byte8 max(Byte8 a, Byte8 b) {
return new Byte8(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w), Math.max(a.s[0], b.s[0]), Math.max(a.s[1], b.s[1]), Math.max(a.s[2], b.s[2]), Math.max(a.s[3], b.s[3]));
}
@@ -1549,6 +1824,7 @@ public static void max(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.max(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 maxMag(Byte8 a, Byte8 b) {
return new Byte8(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w), Math.maxMag(a.s[0], b.s[0]), Math.maxMag(a.s[1], b.s[1]), Math.maxMag(a.s[2], b.s[2]), Math.maxMag(a.s[3], b.s[3]));
}
@@ -1564,6 +1840,7 @@ public static void maxMag(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.maxMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 min(Byte8 a, Byte8 b) {
return new Byte8(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w), Math.min(a.s[0], b.s[0]), Math.min(a.s[1], b.s[1]), Math.min(a.s[2], b.s[2]), Math.min(a.s[3], b.s[3]));
}
@@ -1579,6 +1856,7 @@ public static void min(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.min(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 minMag(Byte8 a, Byte8 b) {
return new Byte8(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w), Math.minMag(a.s[0], b.s[0]), Math.minMag(a.s[1], b.s[1]), Math.minMag(a.s[2], b.s[2]), Math.minMag(a.s[3], b.s[3]));
}
@@ -1594,6 +1872,7 @@ public static void minMag(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.minMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 mix(Byte8 a, Byte8 b, Byte8 c) {
return new Byte8(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w), Math.mix(a.s[0], b.s[0], c.s[0]), Math.mix(a.s[1], b.s[1], c.s[1]), Math.mix(a.s[2], b.s[2], c.s[2]), Math.mix(a.s[3], b.s[3], c.s[3]));
}
@@ -1609,6 +1888,7 @@ public static void mix(Byte8 a, Byte8 b, Byte8 c, Byte8 result) {
result.s[3] = Math.mix(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Byte8 clamp(Byte8 v, byte min, byte max) {
return new Byte8(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max), Math.clamp(v.s[0], min, max), Math.clamp(v.s[1], min, max), Math.clamp(v.s[2], min, max), Math.clamp(v.s[3], min, max));
}
@@ -1624,6 +1904,7 @@ public static void clamp(Byte8 v, byte min, byte max, Byte8 result) {
result.s[3] = Math.clamp(v.s[3], min, max);
}
+ @Translatable
public static Byte8 max(Byte8 x, byte y) {
return new Byte8(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y), Math.max(x.s[0], y), Math.max(x.s[1], y), Math.max(x.s[2], y), Math.max(x.s[3], y));
}
@@ -1639,6 +1920,7 @@ public static void max(Byte8 x, byte y, Byte8 result) {
result.s[3] = Math.max(x.s[3], y);
}
+ @Translatable
public static Byte8 min(Byte8 x, byte y) {
return new Byte8(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y), Math.min(x.s[0], y), Math.min(x.s[1], y), Math.min(x.s[2], y), Math.min(x.s[3], y));
}
@@ -1654,6 +1936,7 @@ public static void min(Byte8 x, byte y, Byte8 result) {
result.s[3] = Math.min(x.s[3], y);
}
+ @Translatable
public static Byte8 mix(Byte8 x, Byte8 y, byte a) {
return new Byte8(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a), Math.mix(x.s[0], y.s[0], a), Math.mix(x.s[1], y.s[1], a), Math.mix(x.s[2], y.s[2], a), Math.mix(x.s[3], y.s[3], a));
}
@@ -1669,6 +1952,7 @@ public static void mix(Byte8 x, Byte8 y, byte a, Byte8 result) {
result.s[3] = Math.mix(x.s[3], y.s[3], a);
}
+ @Translatable
public static Byte8 absDiff(Byte8 a, Byte8 b) {
return new Byte8(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z), Math.absDiff(a.w, b.w), Math.absDiff(a.s[0], b.s[0]), Math.absDiff(a.s[1], b.s[1]), Math.absDiff(a.s[2], b.s[2]), Math.absDiff(a.s[3], b.s[3]));
}
@@ -1684,6 +1968,7 @@ public static void absDiff(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.absDiff(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 addSat(Byte8 a, Byte8 b) {
return new Byte8(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z), Math.addSat(a.w, b.w), Math.addSat(a.s[0], b.s[0]), Math.addSat(a.s[1], b.s[1]), Math.addSat(a.s[2], b.s[2]), Math.addSat(a.s[3], b.s[3]));
}
@@ -1699,6 +1984,7 @@ public static void addSat(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.addSat(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 clz(Byte8 a) {
return new Byte8(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z), Math.clz(a.w), Math.clz(a.s[0]), Math.clz(a.s[1]), Math.clz(a.s[2]), Math.clz(a.s[3]));
}
@@ -1714,6 +2000,7 @@ public static void clz(Byte8 a, Byte8 result) {
result.s[3] = Math.clz(a.s[3]);
}
+ @Translatable
public static Byte8 hadd(Byte8 a, Byte8 b) {
return new Byte8(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z), Math.hadd(a.w, b.w), Math.hadd(a.s[0], b.s[0]), Math.hadd(a.s[1], b.s[1]), Math.hadd(a.s[2], b.s[2]), Math.hadd(a.s[3], b.s[3]));
}
@@ -1729,6 +2016,7 @@ public static void hadd(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.hadd(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 madHi(Byte8 a, Byte8 b, Byte8 c) {
return new Byte8(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z), Math.madHi(a.w, b.w, c.w), Math.madHi(a.s[0], b.s[0], c.s[0]), Math.madHi(a.s[1], b.s[1], c.s[1]), Math.madHi(a.s[2], b.s[2], c.s[2]), Math.madHi(a.s[3], b.s[3], c.s[3]));
}
@@ -1744,6 +2032,7 @@ public static void madHi(Byte8 a, Byte8 b, Byte8 c, Byte8 result) {
result.s[3] = Math.madHi(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Byte8 madSat(Byte8 a, Byte8 b, Byte8 c) {
return new Byte8(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z), Math.madSat(a.w, b.w, c.w), Math.madSat(a.s[0], b.s[0], c.s[0]), Math.madSat(a.s[1], b.s[1], c.s[1]), Math.madSat(a.s[2], b.s[2], c.s[2]), Math.madSat(a.s[3], b.s[3], c.s[3]));
}
@@ -1759,6 +2048,7 @@ public static void madSat(Byte8 a, Byte8 b, Byte8 c, Byte8 result) {
result.s[3] = Math.madSat(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Byte8 mulHi(Byte8 a, Byte8 b) {
return new Byte8(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z), Math.mulHi(a.w, b.w), Math.mulHi(a.s[0], b.s[0]), Math.mulHi(a.s[1], b.s[1]), Math.mulHi(a.s[2], b.s[2]), Math.mulHi(a.s[3], b.s[3]));
}
@@ -1774,6 +2064,7 @@ public static void mulHi(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.mulHi(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 rhadd(Byte8 a, Byte8 b) {
return new Byte8(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z), Math.rhadd(a.w, b.w), Math.rhadd(a.s[0], b.s[0]), Math.rhadd(a.s[1], b.s[1]), Math.rhadd(a.s[2], b.s[2]), Math.rhadd(a.s[3], b.s[3]));
}
@@ -1789,6 +2080,7 @@ public static void rhadd(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.rhadd(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 rotate(Byte8 a, Byte8 b) {
return new Byte8(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z), Math.rotate(a.w, b.w), Math.rotate(a.s[0], b.s[0]), Math.rotate(a.s[1], b.s[1]), Math.rotate(a.s[2], b.s[2]), Math.rotate(a.s[3], b.s[3]));
}
@@ -1804,6 +2096,7 @@ public static void rotate(Byte8 a, Byte8 b, Byte8 result) {
result.s[3] = Math.rotate(a.s[3], b.s[3]);
}
+ @Translatable
public static Byte8 subSat(Byte8 a, Byte8 b) {
return new Byte8(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z), Math.subSat(a.w, b.w), Math.subSat(a.s[0], b.s[0]), Math.subSat(a.s[1], b.s[1]), Math.subSat(a.s[2], b.s[2]), Math.subSat(a.s[3], b.s[3]));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double2.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double2.java
index 245e340..5bbaa5f 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double2.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double2.java
@@ -27,41 +27,55 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Double2 {
+ @Translatable
public double x;
+ @Translatable
public double y;
+ @Translatable
public Double2() {}
+ @Translatable
public Double2(double x, double y) {
set(x, y);
}
+ @Translatable
public void set(double x, double y) {
this.x = x;
this.y = y;
}
+ @Translatable
public Double2(double v) {
this(v, v);
}
+ @Translatable
public void set(double v) {
set(v, v);
}
+ @Translatable
public Double2(Double2 vec1) {
this(vec1.x, vec1.y);
}
+ @Translatable
public void set(Double2 vec1) {
set(vec1.x, vec1.y);
}
+ @Translatable
public Double2 value() {
return new Double2(this);
}
+ @Translatable
public Byte2 convertByte2() {
return new Byte2((byte)(x), (byte)(y));
}
@@ -71,6 +85,7 @@ public void convertByte2(Byte2 result) {
result.y = (byte)(y);
}
+ @Translatable
public Short2 convertShort2() {
return new Short2((short)(x), (short)(y));
}
@@ -80,6 +95,7 @@ public void convertShort2(Short2 result) {
result.y = (short)(y);
}
+ @Translatable
public Int2 convertInt2() {
return new Int2((int)(x), (int)(y));
}
@@ -89,6 +105,7 @@ public void convertInt2(Int2 result) {
result.y = (int)(y);
}
+ @Translatable
public Long2 convertLong2() {
return new Long2((long)(x), (long)(y));
}
@@ -98,6 +115,7 @@ public void convertLong2(Long2 result) {
result.y = (long)(y);
}
+ @Translatable
public Float2 convertFloat2() {
return new Float2((float)(x), (float)(y));
}
@@ -107,6 +125,7 @@ public void convertFloat2(Float2 result) {
result.y = (float)(y);
}
+ @Translatable
public static Int2 isEqual(Double2 a, Double2 b) {
return new Int2(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0);
}
@@ -116,6 +135,7 @@ public static void isEqual(Double2 a, Double2 b, Int2 result) {
result.y = a.y == b.y? 1 : 0;
}
+ @Translatable
public static Int2 isNotEqual(Double2 a, Double2 b) {
return new Int2(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0);
}
@@ -125,6 +145,7 @@ public static void isNotEqual(Double2 a, Double2 b, Int2 result) {
result.y = a.y != b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreater(Double2 a, Double2 b) {
return new Int2(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0);
}
@@ -134,6 +155,7 @@ public static void isGreater(Double2 a, Double2 b, Int2 result) {
result.y = a.y > b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreaterEqual(Double2 a, Double2 b) {
return new Int2(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0);
}
@@ -143,6 +165,7 @@ public static void isGreaterEqual(Double2 a, Double2 b, Int2 result) {
result.y = a.y >= b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLess(Double2 a, Double2 b) {
return new Int2(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0);
}
@@ -152,6 +175,7 @@ public static void isLess(Double2 a, Double2 b, Int2 result) {
result.y = a.y < b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLessEqual(Double2 a, Double2 b) {
return new Int2(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0);
}
@@ -161,6 +185,7 @@ public static void isLessEqual(Double2 a, Double2 b, Int2 result) {
result.y = a.y <= b.y? 1 : 0;
}
+ @Translatable
public static Double2 select(Double2 a, Double2 b, Int2 c) {
return new Double2(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y));
}
@@ -170,6 +195,7 @@ public static void select(Double2 a, Double2 b, Int2 c, Double2 result) {
result.y = Math.select(a.y, b.y, c.y);
}
+ @Translatable
public static Int2 isFinite(Double2 a) {
return new Int2(Math.isFinite(a.x), Math.isFinite(a.y));
}
@@ -179,6 +205,7 @@ public static void isFinite(Double2 a, Int2 result) {
result.y = Math.isFinite(a.y);
}
+ @Translatable
public static Int2 isInf(Double2 a) {
return new Int2(Math.isInf(a.x), Math.isInf(a.y));
}
@@ -188,6 +215,7 @@ public static void isInf(Double2 a, Int2 result) {
result.y = Math.isInf(a.y);
}
+ @Translatable
public static Int2 isNaN(Double2 a) {
return new Int2(Math.isNaN(a.x), Math.isNaN(a.y));
}
@@ -197,6 +225,7 @@ public static void isNaN(Double2 a, Int2 result) {
result.y = Math.isNaN(a.y);
}
+ @Translatable
public static Int2 isNormal(Double2 a) {
return new Int2(Math.isNormal(a.x), Math.isNormal(a.y));
}
@@ -206,6 +235,7 @@ public static void isNormal(Double2 a, Int2 result) {
result.y = Math.isNormal(a.y);
}
+ @Translatable
public static Int2 isOrdered(Double2 a, Double2 b) {
return new Int2(Math.isOrdered(a.x, b.x), Math.isOrdered(a.y, b.y));
}
@@ -215,6 +245,7 @@ public static void isOrdered(Double2 a, Double2 b, Int2 result) {
result.y = Math.isOrdered(a.y, b.y);
}
+ @Translatable
public static Int2 isUnordered(Double2 a, Double2 b) {
return new Int2(Math.isUnordered(a.x, b.x), Math.isUnordered(a.y, b.y));
}
@@ -224,14 +255,17 @@ public static void isUnordered(Double2 a, Double2 b, Int2 result) {
result.y = Math.isUnordered(a.y, b.y);
}
+ @Translatable
public static int any(Double2 a) {
return (a.x != 0.0 || a.y != 0.0)? 1 : 0;
}
+ @Translatable
public static int all(Double2 a) {
return (a.x == 0.0 || a.y == 0.0)? 0 : 1;
}
+ @Translatable
public static Double2 neg(Double2 a) {
return new Double2((double)(-a.x), (double)(-a.y));
}
@@ -241,6 +275,7 @@ public static void neg(Double2 a, Double2 result) {
result.y = (double)(-a.y);
}
+ @Translatable
public static Double2 add(Double2 a, Double2 b) {
return new Double2((double)(a.x + b.x), (double)(a.y + b.y));
}
@@ -250,6 +285,7 @@ public static void add(Double2 a, Double2 b, Double2 result) {
result.y = (double)(a.y + b.y);
}
+ @Translatable
public static Double2 sub(Double2 a, Double2 b) {
return new Double2((double)(a.x - b.x), (double)(a.y - b.y));
}
@@ -259,6 +295,7 @@ public static void sub(Double2 a, Double2 b, Double2 result) {
result.y = (double)(a.y - b.y);
}
+ @Translatable
public static Double2 mul(Double2 a, Double2 b) {
return new Double2((double)(a.x * b.x), (double)(a.y * b.y));
}
@@ -268,6 +305,7 @@ public static void mul(Double2 a, Double2 b, Double2 result) {
result.y = (double)(a.y * b.y);
}
+ @Translatable
public static Double2 mul(Double2 a, double k) {
return new Double2((double)(a.x * k), (double)(a.y * k));
}
@@ -277,6 +315,7 @@ public static void mul(Double2 a, double k, Double2 result) {
result.y = (double)(a.y * k);
}
+ @Translatable
public static Float2 mul(Double2 a, Float2 b) {
return new Float2((float)(a.x * b.x), (float)(a.y * b.y));
}
@@ -286,6 +325,7 @@ public static void mul(Double2 a, Float2 b, Float2 result) {
result.y = (float)(a.y * b.y);
}
+ @Translatable
public static Float2 mul(Double2 a, float k) {
return new Float2((float)(a.x * k), (float)(a.y * k));
}
@@ -295,6 +335,7 @@ public static void mul(Double2 a, float k, Float2 result) {
result.y = (float)(a.y * k);
}
+ @Translatable
public static Double2 div(Double2 a, Double2 b) {
return new Double2((double)(a.x / b.x), (double)(a.y / b.y));
}
@@ -304,6 +345,7 @@ public static void div(Double2 a, Double2 b, Double2 result) {
result.y = (double)(a.y / b.y);
}
+ @Translatable
public static Double2 div(Double2 a, double k) {
return new Double2((double)(a.x / k), (double)(a.y / k));
}
@@ -313,6 +355,7 @@ public static void div(Double2 a, double k, Double2 result) {
result.y = (double)(a.y / k);
}
+ @Translatable
public static Float2 div(Double2 a, Float2 b) {
return new Float2((float)(a.x / b.x), (float)(a.y / b.y));
}
@@ -322,6 +365,7 @@ public static void div(Double2 a, Float2 b, Float2 result) {
result.y = (float)(a.y / b.y);
}
+ @Translatable
public static Float2 div(Double2 a, float k) {
return new Float2((float)(a.x / k), (float)(a.y / k));
}
@@ -331,23 +375,28 @@ public static void div(Double2 a, float k, Float2 result) {
result.y = (float)(a.y / k);
}
+ @Translatable
public static double dot(Double2 a, Double2 b) {
return (double)(a.x * b.x + a.y * b.y);
}
+ @Translatable
public static double distance(Double2 a, Double2 b) {
return distance(a, b, new Double2());
}
+ @Translatable
public static double distance(Double2 a, Double2 b, Double2 tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(Double2 a) {
return Math.sqrt(a.x * a.x + a.y * a.y);
}
+ @Translatable
public static Double2 normalize(Double2 a) {
Double2 result = new Double2();
normalize(a, result);
@@ -360,6 +409,7 @@ public static void normalize(Double2 a, Double2 result) {
result.y = (double)(a.y / len);
}
+ @Translatable
public static Double2 abs(Double2 a) {
return new Double2(Math.abs(a.x), Math.abs(a.y));
}
@@ -369,6 +419,7 @@ public static void abs(Double2 a, Double2 result) {
result.y = Math.abs(a.y);
}
+ @Translatable
public static Double2 clamp(Double2 a, Double2 b, Double2 c) {
return new Double2(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y));
}
@@ -378,6 +429,7 @@ public static void clamp(Double2 a, Double2 b, Double2 c, Double2 result) {
result.y = Math.clamp(a.y, b.y, c.y);
}
+ @Translatable
public static Double2 max(Double2 a, Double2 b) {
return new Double2(Math.max(a.x, b.x), Math.max(a.y, b.y));
}
@@ -387,6 +439,7 @@ public static void max(Double2 a, Double2 b, Double2 result) {
result.y = Math.max(a.y, b.y);
}
+ @Translatable
public static Double2 maxMag(Double2 a, Double2 b) {
return new Double2(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y));
}
@@ -396,6 +449,7 @@ public static void maxMag(Double2 a, Double2 b, Double2 result) {
result.y = Math.maxMag(a.y, b.y);
}
+ @Translatable
public static Double2 min(Double2 a, Double2 b) {
return new Double2(Math.min(a.x, b.x), Math.min(a.y, b.y));
}
@@ -405,6 +459,7 @@ public static void min(Double2 a, Double2 b, Double2 result) {
result.y = Math.min(a.y, b.y);
}
+ @Translatable
public static Double2 minMag(Double2 a, Double2 b) {
return new Double2(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y));
}
@@ -414,6 +469,7 @@ public static void minMag(Double2 a, Double2 b, Double2 result) {
result.y = Math.minMag(a.y, b.y);
}
+ @Translatable
public static Double2 mix(Double2 a, Double2 b, Double2 c) {
return new Double2(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y));
}
@@ -423,6 +479,7 @@ public static void mix(Double2 a, Double2 b, Double2 c, Double2 result) {
result.y = Math.mix(a.y, b.y, c.y);
}
+ @Translatable
public static Double2 clamp(Double2 v, double min, double max) {
return new Double2(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max));
}
@@ -432,6 +489,7 @@ public static void clamp(Double2 v, double min, double max, Double2 result) {
result.y = Math.clamp(v.y, min, max);
}
+ @Translatable
public static Double2 max(Double2 x, double y) {
return new Double2(Math.max(x.x, y), Math.max(x.y, y));
}
@@ -441,6 +499,7 @@ public static void max(Double2 x, double y, Double2 result) {
result.y = Math.max(x.y, y);
}
+ @Translatable
public static Double2 min(Double2 x, double y) {
return new Double2(Math.min(x.x, y), Math.min(x.y, y));
}
@@ -450,6 +509,7 @@ public static void min(Double2 x, double y, Double2 result) {
result.y = Math.min(x.y, y);
}
+ @Translatable
public static Double2 mix(Double2 x, Double2 y, double a) {
return new Double2(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a));
}
@@ -459,6 +519,7 @@ public static void mix(Double2 x, Double2 y, double a, Double2 result) {
result.y = Math.mix(x.y, y.y, a);
}
+ @Translatable
public static Double2 acos(Double2 a) {
return new Double2(Math.acos(a.x), Math.acos(a.y));
}
@@ -468,6 +529,7 @@ public static void acos(Double2 a, Double2 result) {
result.y = Math.acos(a.y);
}
+ @Translatable
public static Double2 acosh(Double2 a) {
return new Double2(Math.acosh(a.x), Math.acosh(a.y));
}
@@ -477,6 +539,7 @@ public static void acosh(Double2 a, Double2 result) {
result.y = Math.acosh(a.y);
}
+ @Translatable
public static Double2 asin(Double2 a) {
return new Double2(Math.asin(a.x), Math.asin(a.y));
}
@@ -486,6 +549,7 @@ public static void asin(Double2 a, Double2 result) {
result.y = Math.asin(a.y);
}
+ @Translatable
public static Double2 asinh(Double2 a) {
return new Double2(Math.asinh(a.x), Math.asinh(a.y));
}
@@ -495,6 +559,7 @@ public static void asinh(Double2 a, Double2 result) {
result.y = Math.asinh(a.y);
}
+ @Translatable
public static Double2 atan(Double2 a) {
return new Double2(Math.atan(a.x), Math.atan(a.y));
}
@@ -504,6 +569,7 @@ public static void atan(Double2 a, Double2 result) {
result.y = Math.atan(a.y);
}
+ @Translatable
public static Double2 atan2(Double2 a, Double2 b) {
return new Double2(Math.atan2(a.x, b.x), Math.atan2(a.y, b.y));
}
@@ -513,6 +579,7 @@ public static void atan2(Double2 a, Double2 b, Double2 result) {
result.y = Math.atan2(a.y, b.y);
}
+ @Translatable
public static Double2 atanh(Double2 a) {
return new Double2(Math.atanh(a.x), Math.atanh(a.y));
}
@@ -522,6 +589,7 @@ public static void atanh(Double2 a, Double2 result) {
result.y = Math.atanh(a.y);
}
+ @Translatable
public static Double2 cbrt(Double2 a) {
return new Double2(Math.cbrt(a.x), Math.cbrt(a.y));
}
@@ -531,6 +599,7 @@ public static void cbrt(Double2 a, Double2 result) {
result.y = Math.cbrt(a.y);
}
+ @Translatable
public static Double2 ceil(Double2 a) {
return new Double2(Math.ceil(a.x), Math.ceil(a.y));
}
@@ -540,6 +609,7 @@ public static void ceil(Double2 a, Double2 result) {
result.y = Math.ceil(a.y);
}
+ @Translatable
public static Double2 copySign(Double2 a, Double2 b) {
return new Double2(Math.copySign(a.x, b.x), Math.copySign(a.y, b.y));
}
@@ -549,6 +619,7 @@ public static void copySign(Double2 a, Double2 b, Double2 result) {
result.y = Math.copySign(a.y, b.y);
}
+ @Translatable
public static Double2 cos(Double2 a) {
return new Double2(Math.cos(a.x), Math.cos(a.y));
}
@@ -558,6 +629,7 @@ public static void cos(Double2 a, Double2 result) {
result.y = Math.cos(a.y);
}
+ @Translatable
public static Double2 cosh(Double2 a) {
return new Double2(Math.cosh(a.x), Math.cosh(a.y));
}
@@ -567,6 +639,7 @@ public static void cosh(Double2 a, Double2 result) {
result.y = Math.cosh(a.y);
}
+ @Translatable
public static Double2 erf(Double2 a) {
return new Double2(Math.erf(a.x), Math.erf(a.y));
}
@@ -576,6 +649,7 @@ public static void erf(Double2 a, Double2 result) {
result.y = Math.erf(a.y);
}
+ @Translatable
public static Double2 erfc(Double2 a) {
return new Double2(Math.erfc(a.x), Math.erfc(a.y));
}
@@ -585,6 +659,7 @@ public static void erfc(Double2 a, Double2 result) {
result.y = Math.erfc(a.y);
}
+ @Translatable
public static Double2 exp(Double2 a) {
return new Double2(Math.exp(a.x), Math.exp(a.y));
}
@@ -594,6 +669,7 @@ public static void exp(Double2 a, Double2 result) {
result.y = Math.exp(a.y);
}
+ @Translatable
public static Double2 exp10(Double2 a) {
return new Double2(Math.exp10(a.x), Math.exp10(a.y));
}
@@ -603,6 +679,7 @@ public static void exp10(Double2 a, Double2 result) {
result.y = Math.exp10(a.y);
}
+ @Translatable
public static Double2 exp2(Double2 a) {
return new Double2(Math.exp2(a.x), Math.exp2(a.y));
}
@@ -612,6 +689,7 @@ public static void exp2(Double2 a, Double2 result) {
result.y = Math.exp2(a.y);
}
+ @Translatable
public static Double2 expm1(Double2 a) {
return new Double2(Math.expm1(a.x), Math.expm1(a.y));
}
@@ -621,6 +699,7 @@ public static void expm1(Double2 a, Double2 result) {
result.y = Math.expm1(a.y);
}
+ @Translatable
public static Double2 fdim(Double2 a, Double2 b) {
return new Double2(Math.fdim(a.x, b.x), Math.fdim(a.y, b.y));
}
@@ -630,6 +709,7 @@ public static void fdim(Double2 a, Double2 b, Double2 result) {
result.y = Math.fdim(a.y, b.y);
}
+ @Translatable
public static Double2 floor(Double2 a) {
return new Double2(Math.floor(a.x), Math.floor(a.y));
}
@@ -639,6 +719,7 @@ public static void floor(Double2 a, Double2 result) {
result.y = Math.floor(a.y);
}
+ @Translatable
public static Double2 fma(Double2 a, Double2 b, Double2 c) {
return new Double2(Math.fma(a.x, b.x, c.x), Math.fma(a.y, b.y, c.y));
}
@@ -648,6 +729,7 @@ public static void fma(Double2 a, Double2 b, Double2 c, Double2 result) {
result.y = Math.fma(a.y, b.y, c.y);
}
+ @Translatable
public static Double2 fmod(Double2 a, Double2 b) {
return new Double2(Math.fmod(a.x, b.x), Math.fmod(a.y, b.y));
}
@@ -657,6 +739,7 @@ public static void fmod(Double2 a, Double2 b, Double2 result) {
result.y = Math.fmod(a.y, b.y);
}
+ @Translatable
public static Double2 fract(Double2 a) {
return new Double2(Math.fract(a.x), Math.fract(a.y));
}
@@ -666,6 +749,7 @@ public static void fract(Double2 a, Double2 result) {
result.y = Math.fract(a.y);
}
+ @Translatable
public static Double2 frexp(Double2 a) {
return new Double2(Math.frexp(a.x), Math.frexp(a.y));
}
@@ -675,6 +759,7 @@ public static void frexp(Double2 a, Double2 result) {
result.y = Math.frexp(a.y);
}
+ @Translatable
public static Double2 getExponent(Double2 a) {
return new Double2(Math.getExponent(a.x), Math.getExponent(a.y));
}
@@ -684,6 +769,7 @@ public static void getExponent(Double2 a, Double2 result) {
result.y = Math.getExponent(a.y);
}
+ @Translatable
public static Double2 hypot(Double2 a, Double2 b) {
return new Double2(Math.hypot(a.x, b.x), Math.hypot(a.y, b.y));
}
@@ -693,6 +779,7 @@ public static void hypot(Double2 a, Double2 b, Double2 result) {
result.y = Math.hypot(a.y, b.y);
}
+ @Translatable
public static Double2 lgamma(Double2 a) {
return new Double2(Math.lgamma(a.x), Math.lgamma(a.y));
}
@@ -702,6 +789,7 @@ public static void lgamma(Double2 a, Double2 result) {
result.y = Math.lgamma(a.y);
}
+ @Translatable
public static Double2 log(Double2 a) {
return new Double2(Math.log(a.x), Math.log(a.y));
}
@@ -711,6 +799,7 @@ public static void log(Double2 a, Double2 result) {
result.y = Math.log(a.y);
}
+ @Translatable
public static Double2 log10(Double2 a) {
return new Double2(Math.log10(a.x), Math.log10(a.y));
}
@@ -720,6 +809,7 @@ public static void log10(Double2 a, Double2 result) {
result.y = Math.log10(a.y);
}
+ @Translatable
public static Double2 log1p(Double2 a) {
return new Double2(Math.log1p(a.x), Math.log1p(a.y));
}
@@ -729,6 +819,7 @@ public static void log1p(Double2 a, Double2 result) {
result.y = Math.log1p(a.y);
}
+ @Translatable
public static Double2 log2(Double2 a) {
return new Double2(Math.log2(a.x), Math.log2(a.y));
}
@@ -738,6 +829,7 @@ public static void log2(Double2 a, Double2 result) {
result.y = Math.log2(a.y);
}
+ @Translatable
public static Double2 logb(Double2 a) {
return new Double2(Math.logb(a.x), Math.logb(a.y));
}
@@ -747,6 +839,7 @@ public static void logb(Double2 a, Double2 result) {
result.y = Math.logb(a.y);
}
+ @Translatable
public static Double2 mad(Double2 a, Double2 b, Double2 c) {
return new Double2(Math.mad(a.x, b.x, c.x), Math.mad(a.y, b.y, c.y));
}
@@ -756,6 +849,7 @@ public static void mad(Double2 a, Double2 b, Double2 c, Double2 result) {
result.y = Math.mad(a.y, b.y, c.y);
}
+ @Translatable
public static Double2 nextAfter(Double2 a, Double2 b) {
return new Double2(Math.nextAfter(a.x, b.x), Math.nextAfter(a.y, b.y));
}
@@ -765,6 +859,7 @@ public static void nextAfter(Double2 a, Double2 b, Double2 result) {
result.y = Math.nextAfter(a.y, b.y);
}
+ @Translatable
public static Double2 pow(Double2 a, Double2 b) {
return new Double2(Math.pow(a.x, b.x), Math.pow(a.y, b.y));
}
@@ -774,6 +869,7 @@ public static void pow(Double2 a, Double2 b, Double2 result) {
result.y = Math.pow(a.y, b.y);
}
+ @Translatable
public static Double2 powr(Double2 a, Double2 b) {
return new Double2(Math.powr(a.x, b.x), Math.powr(a.y, b.y));
}
@@ -783,6 +879,7 @@ public static void powr(Double2 a, Double2 b, Double2 result) {
result.y = Math.powr(a.y, b.y);
}
+ @Translatable
public static Double2 remainder(Double2 a, Double2 b) {
return new Double2(Math.remainder(a.x, b.x), Math.remainder(a.y, b.y));
}
@@ -792,6 +889,7 @@ public static void remainder(Double2 a, Double2 b, Double2 result) {
result.y = Math.remainder(a.y, b.y);
}
+ @Translatable
public static Double2 rint(Double2 a) {
return new Double2(Math.rint(a.x), Math.rint(a.y));
}
@@ -801,6 +899,7 @@ public static void rint(Double2 a, Double2 result) {
result.y = Math.rint(a.y);
}
+ @Translatable
public static Double2 round(Double2 a) {
return new Double2(Math.round(a.x), Math.round(a.y));
}
@@ -810,6 +909,7 @@ public static void round(Double2 a, Double2 result) {
result.y = Math.round(a.y);
}
+ @Translatable
public static Double2 rsqrt(Double2 a) {
return new Double2(Math.rsqrt(a.x), Math.rsqrt(a.y));
}
@@ -819,6 +919,7 @@ public static void rsqrt(Double2 a, Double2 result) {
result.y = Math.rsqrt(a.y);
}
+ @Translatable
public static Double2 signum(Double2 a) {
return new Double2(Math.signum(a.x), Math.signum(a.y));
}
@@ -828,6 +929,7 @@ public static void signum(Double2 a, Double2 result) {
result.y = Math.signum(a.y);
}
+ @Translatable
public static Double2 sin(Double2 a) {
return new Double2(Math.sin(a.x), Math.sin(a.y));
}
@@ -837,6 +939,7 @@ public static void sin(Double2 a, Double2 result) {
result.y = Math.sin(a.y);
}
+ @Translatable
public static Double2 sinh(Double2 a) {
return new Double2(Math.sinh(a.x), Math.sinh(a.y));
}
@@ -846,6 +949,7 @@ public static void sinh(Double2 a, Double2 result) {
result.y = Math.sinh(a.y);
}
+ @Translatable
public static Double2 smoothStep(Double2 a, Double2 b, Double2 c) {
return new Double2(Math.smoothStep(a.x, b.x, c.x), Math.smoothStep(a.y, b.y, c.y));
}
@@ -855,6 +959,7 @@ public static void smoothStep(Double2 a, Double2 b, Double2 c, Double2 result) {
result.y = Math.smoothStep(a.y, b.y, c.y);
}
+ @Translatable
public static Double2 sqrt(Double2 a) {
return new Double2(Math.sqrt(a.x), Math.sqrt(a.y));
}
@@ -864,6 +969,7 @@ public static void sqrt(Double2 a, Double2 result) {
result.y = Math.sqrt(a.y);
}
+ @Translatable
public static Double2 step(Double2 a, Double2 b) {
return new Double2(Math.step(a.x, b.x), Math.step(a.y, b.y));
}
@@ -873,6 +979,7 @@ public static void step(Double2 a, Double2 b, Double2 result) {
result.y = Math.step(a.y, b.y);
}
+ @Translatable
public static Double2 tan(Double2 a) {
return new Double2(Math.tan(a.x), Math.tan(a.y));
}
@@ -882,6 +989,7 @@ public static void tan(Double2 a, Double2 result) {
result.y = Math.tan(a.y);
}
+ @Translatable
public static Double2 tanh(Double2 a) {
return new Double2(Math.tanh(a.x), Math.tanh(a.y));
}
@@ -891,6 +999,7 @@ public static void tanh(Double2 a, Double2 result) {
result.y = Math.tanh(a.y);
}
+ @Translatable
public static Double2 tgamma(Double2 a) {
return new Double2(Math.tgamma(a.x), Math.tgamma(a.y));
}
@@ -900,6 +1009,7 @@ public static void tgamma(Double2 a, Double2 result) {
result.y = Math.tgamma(a.y);
}
+ @Translatable
public static Double2 toDegrees(Double2 a) {
return new Double2(Math.toDegrees(a.x), Math.toDegrees(a.y));
}
@@ -909,6 +1019,7 @@ public static void toDegrees(Double2 a, Double2 result) {
result.y = Math.toDegrees(a.y);
}
+ @Translatable
public static Double2 toRadians(Double2 a) {
return new Double2(Math.toRadians(a.x), Math.toRadians(a.y));
}
@@ -918,6 +1029,7 @@ public static void toRadians(Double2 a, Double2 result) {
result.y = Math.toRadians(a.y);
}
+ @Translatable
public static Double2 trunc(Double2 a) {
return new Double2(Math.trunc(a.x), Math.trunc(a.y));
}
@@ -927,6 +1039,7 @@ public static void trunc(Double2 a, Double2 result) {
result.y = Math.trunc(a.y);
}
+ @Translatable
public static Double2 scalb(Double2 a, Int2 n) {
return new Double2(Math.scalb(a.x, n.x), Math.scalb(a.y, n.y));
}
@@ -936,6 +1049,7 @@ public static void scalb(Double2 a, Int2 n, Double2 result) {
result.y = Math.scalb(a.y, n.y);
}
+ @Translatable
public static Double2 ldexp(Double2 a, Int2 n) {
return new Double2(Math.ldexp(a.x, n.x), Math.ldexp(a.y, n.y));
}
@@ -945,6 +1059,7 @@ public static void ldexp(Double2 a, Int2 n, Double2 result) {
result.y = Math.ldexp(a.y, n.y);
}
+ @Translatable
public static Double2 pown(Double2 a, Int2 b) {
return new Double2(Math.pown(a.x, b.x), Math.pown(a.y, b.y));
}
@@ -954,6 +1069,7 @@ public static void pown(Double2 a, Int2 b, Double2 result) {
result.y = Math.pown(a.y, b.y);
}
+ @Translatable
public static Double2 rootn(Double2 a, Int2 b) {
return new Double2(Math.pown(a.x, b.x), Math.pown(a.y, b.y));
}
@@ -963,6 +1079,7 @@ public static void rootn(Double2 a, Int2 b, Double2 result) {
result.y = Math.pown(a.y, b.y);
}
+ @Translatable
public static Double2 smoothStep(Double2 a, Double2 b, double c) {
return new Double2(Math.smoothStep(a.x, b.x, c), Math.smoothStep(a.y, b.y, c));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double3.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double3.java
index 951ab1d..acd91bb 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double3.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double3.java
@@ -27,59 +27,78 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Double3 {
+ @Translatable
public double x;
+ @Translatable
public double y;
+ @Translatable
public double z;
+ @Translatable
public Double3() {}
+ @Translatable
public Double3(double x, double y, double z) {
set(x, y, z);
}
+ @Translatable
public void set(double x, double y, double z) {
this.x = x;
this.y = y;
this.z = z;
}
+ @Translatable
public Double3(double v) {
this(v, v, v);
}
+ @Translatable
public void set(double v) {
set(v, v, v);
}
+ @Translatable
public Double3(double x, Double2 vec1) {
this(x, vec1.x, vec1.y);
}
+ @Translatable
public void set(double x, Double2 vec1) {
set(x, vec1.x, vec1.y);
}
+ @Translatable
public Double3(Double2 vec1, double z) {
this(vec1.x, vec1.y, z);
}
+ @Translatable
public void set(Double2 vec1, double z) {
set(vec1.x, vec1.y, z);
}
+ @Translatable
public Double3(Double3 vec1) {
this(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(Double3 vec1) {
set(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Double3 value() {
return new Double3(this);
}
+ @Translatable
public Byte3 convertByte3() {
return new Byte3((byte)(x), (byte)(y), (byte)(z));
}
@@ -90,6 +109,7 @@ public void convertByte3(Byte3 result) {
result.z = (byte)(z);
}
+ @Translatable
public Short3 convertShort3() {
return new Short3((short)(x), (short)(y), (short)(z));
}
@@ -100,6 +120,7 @@ public void convertShort3(Short3 result) {
result.z = (short)(z);
}
+ @Translatable
public Int3 convertInt3() {
return new Int3((int)(x), (int)(y), (int)(z));
}
@@ -110,6 +131,7 @@ public void convertInt3(Int3 result) {
result.z = (int)(z);
}
+ @Translatable
public Long3 convertLong3() {
return new Long3((long)(x), (long)(y), (long)(z));
}
@@ -120,6 +142,7 @@ public void convertLong3(Long3 result) {
result.z = (long)(z);
}
+ @Translatable
public Float3 convertFloat3() {
return new Float3((float)(x), (float)(y), (float)(z));
}
@@ -130,6 +153,7 @@ public void convertFloat3(Float3 result) {
result.z = (float)(z);
}
+ @Translatable
public Double2 asDouble2() {
return new Double2(x, y);
}
@@ -139,6 +163,7 @@ public void asDouble2(Double2 result) {
result.y = y;
}
+ @Translatable
public static Int3 isEqual(Double3 a, Double3 b) {
return new Int3(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0);
}
@@ -149,6 +174,7 @@ public static void isEqual(Double3 a, Double3 b, Int3 result) {
result.z = a.z == b.z? 1 : 0;
}
+ @Translatable
public static Int3 isNotEqual(Double3 a, Double3 b) {
return new Int3(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0);
}
@@ -159,6 +185,7 @@ public static void isNotEqual(Double3 a, Double3 b, Int3 result) {
result.z = a.z != b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreater(Double3 a, Double3 b) {
return new Int3(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0);
}
@@ -169,6 +196,7 @@ public static void isGreater(Double3 a, Double3 b, Int3 result) {
result.z = a.z > b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreaterEqual(Double3 a, Double3 b) {
return new Int3(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0);
}
@@ -179,6 +207,7 @@ public static void isGreaterEqual(Double3 a, Double3 b, Int3 result) {
result.z = a.z >= b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLess(Double3 a, Double3 b) {
return new Int3(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0);
}
@@ -189,6 +218,7 @@ public static void isLess(Double3 a, Double3 b, Int3 result) {
result.z = a.z < b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLessEqual(Double3 a, Double3 b) {
return new Int3(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0);
}
@@ -199,6 +229,7 @@ public static void isLessEqual(Double3 a, Double3 b, Int3 result) {
result.z = a.z <= b.z? 1 : 0;
}
+ @Translatable
public static Double3 select(Double3 a, Double3 b, Int3 c) {
return new Double3(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z));
}
@@ -209,6 +240,7 @@ public static void select(Double3 a, Double3 b, Int3 c, Double3 result) {
result.z = Math.select(a.z, b.z, c.z);
}
+ @Translatable
public static Int3 isFinite(Double3 a) {
return new Int3(Math.isFinite(a.x), Math.isFinite(a.y), Math.isFinite(a.z));
}
@@ -219,6 +251,7 @@ public static void isFinite(Double3 a, Int3 result) {
result.z = Math.isFinite(a.z);
}
+ @Translatable
public static Int3 isInf(Double3 a) {
return new Int3(Math.isInf(a.x), Math.isInf(a.y), Math.isInf(a.z));
}
@@ -229,6 +262,7 @@ public static void isInf(Double3 a, Int3 result) {
result.z = Math.isInf(a.z);
}
+ @Translatable
public static Int3 isNaN(Double3 a) {
return new Int3(Math.isNaN(a.x), Math.isNaN(a.y), Math.isNaN(a.z));
}
@@ -239,6 +273,7 @@ public static void isNaN(Double3 a, Int3 result) {
result.z = Math.isNaN(a.z);
}
+ @Translatable
public static Int3 isNormal(Double3 a) {
return new Int3(Math.isNormal(a.x), Math.isNormal(a.y), Math.isNormal(a.z));
}
@@ -249,6 +284,7 @@ public static void isNormal(Double3 a, Int3 result) {
result.z = Math.isNormal(a.z);
}
+ @Translatable
public static Int3 isOrdered(Double3 a, Double3 b) {
return new Int3(Math.isOrdered(a.x, b.x), Math.isOrdered(a.y, b.y), Math.isOrdered(a.z, b.z));
}
@@ -259,6 +295,7 @@ public static void isOrdered(Double3 a, Double3 b, Int3 result) {
result.z = Math.isOrdered(a.z, b.z);
}
+ @Translatable
public static Int3 isUnordered(Double3 a, Double3 b) {
return new Int3(Math.isUnordered(a.x, b.x), Math.isUnordered(a.y, b.y), Math.isUnordered(a.z, b.z));
}
@@ -269,14 +306,17 @@ public static void isUnordered(Double3 a, Double3 b, Int3 result) {
result.z = Math.isUnordered(a.z, b.z);
}
+ @Translatable
public static int any(Double3 a) {
return (a.x != 0.0 || a.y != 0.0 || a.z != 0.0)? 1 : 0;
}
+ @Translatable
public static int all(Double3 a) {
return (a.x == 0.0 || a.y == 0.0 || a.z == 0.0)? 0 : 1;
}
+ @Translatable
public static Double3 neg(Double3 a) {
return new Double3((double)(-a.x), (double)(-a.y), (double)(-a.z));
}
@@ -287,6 +327,7 @@ public static void neg(Double3 a, Double3 result) {
result.z = (double)(-a.z);
}
+ @Translatable
public static Double3 add(Double3 a, Double3 b) {
return new Double3((double)(a.x + b.x), (double)(a.y + b.y), (double)(a.z + b.z));
}
@@ -297,6 +338,7 @@ public static void add(Double3 a, Double3 b, Double3 result) {
result.z = (double)(a.z + b.z);
}
+ @Translatable
public static Double3 sub(Double3 a, Double3 b) {
return new Double3((double)(a.x - b.x), (double)(a.y - b.y), (double)(a.z - b.z));
}
@@ -307,6 +349,7 @@ public static void sub(Double3 a, Double3 b, Double3 result) {
result.z = (double)(a.z - b.z);
}
+ @Translatable
public static Double3 mul(Double3 a, Double3 b) {
return new Double3((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z));
}
@@ -317,6 +360,7 @@ public static void mul(Double3 a, Double3 b, Double3 result) {
result.z = (double)(a.z * b.z);
}
+ @Translatable
public static Double3 mul(Double3 a, double k) {
return new Double3((double)(a.x * k), (double)(a.y * k), (double)(a.z * k));
}
@@ -327,6 +371,7 @@ public static void mul(Double3 a, double k, Double3 result) {
result.z = (double)(a.z * k);
}
+ @Translatable
public static Float3 mul(Double3 a, Float3 b) {
return new Float3((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z));
}
@@ -337,6 +382,7 @@ public static void mul(Double3 a, Float3 b, Float3 result) {
result.z = (float)(a.z * b.z);
}
+ @Translatable
public static Float3 mul(Double3 a, float k) {
return new Float3((float)(a.x * k), (float)(a.y * k), (float)(a.z * k));
}
@@ -347,6 +393,7 @@ public static void mul(Double3 a, float k, Float3 result) {
result.z = (float)(a.z * k);
}
+ @Translatable
public static Double3 div(Double3 a, Double3 b) {
return new Double3((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z));
}
@@ -357,6 +404,7 @@ public static void div(Double3 a, Double3 b, Double3 result) {
result.z = (double)(a.z / b.z);
}
+ @Translatable
public static Double3 div(Double3 a, double k) {
return new Double3((double)(a.x / k), (double)(a.y / k), (double)(a.z / k));
}
@@ -367,6 +415,7 @@ public static void div(Double3 a, double k, Double3 result) {
result.z = (double)(a.z / k);
}
+ @Translatable
public static Float3 div(Double3 a, Float3 b) {
return new Float3((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z));
}
@@ -377,6 +426,7 @@ public static void div(Double3 a, Float3 b, Float3 result) {
result.z = (float)(a.z / b.z);
}
+ @Translatable
public static Float3 div(Double3 a, float k) {
return new Float3((float)(a.x / k), (float)(a.y / k), (float)(a.z / k));
}
@@ -387,6 +437,7 @@ public static void div(Double3 a, float k, Float3 result) {
result.z = (float)(a.z / k);
}
+ @Translatable
public static Double3 cross(Double3 a, Double3 b) {
Double3 result = new Double3();
cross(a, b, result);
@@ -399,23 +450,28 @@ public static void cross(Double3 a, Double3 b, Double3 result) {
result.z = a.x * b.y - a.y * b.x;
}
+ @Translatable
public static double dot(Double3 a, Double3 b) {
return (double)(a.x * b.x + a.y * b.y + a.z * b.z);
}
+ @Translatable
public static double distance(Double3 a, Double3 b) {
return distance(a, b, new Double3());
}
+ @Translatable
public static double distance(Double3 a, Double3 b, Double3 tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(Double3 a) {
return Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z);
}
+ @Translatable
public static Double3 normalize(Double3 a) {
Double3 result = new Double3();
normalize(a, result);
@@ -429,6 +485,7 @@ public static void normalize(Double3 a, Double3 result) {
result.z = (double)(a.z / len);
}
+ @Translatable
public static Double3 abs(Double3 a) {
return new Double3(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z));
}
@@ -439,6 +496,7 @@ public static void abs(Double3 a, Double3 result) {
result.z = Math.abs(a.z);
}
+ @Translatable
public static Double3 clamp(Double3 a, Double3 b, Double3 c) {
return new Double3(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z));
}
@@ -449,6 +507,7 @@ public static void clamp(Double3 a, Double3 b, Double3 c, Double3 result) {
result.z = Math.clamp(a.z, b.z, c.z);
}
+ @Translatable
public static Double3 max(Double3 a, Double3 b) {
return new Double3(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z));
}
@@ -459,6 +518,7 @@ public static void max(Double3 a, Double3 b, Double3 result) {
result.z = Math.max(a.z, b.z);
}
+ @Translatable
public static Double3 maxMag(Double3 a, Double3 b) {
return new Double3(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z));
}
@@ -469,6 +529,7 @@ public static void maxMag(Double3 a, Double3 b, Double3 result) {
result.z = Math.maxMag(a.z, b.z);
}
+ @Translatable
public static Double3 min(Double3 a, Double3 b) {
return new Double3(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z));
}
@@ -479,6 +540,7 @@ public static void min(Double3 a, Double3 b, Double3 result) {
result.z = Math.min(a.z, b.z);
}
+ @Translatable
public static Double3 minMag(Double3 a, Double3 b) {
return new Double3(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z));
}
@@ -489,6 +551,7 @@ public static void minMag(Double3 a, Double3 b, Double3 result) {
result.z = Math.minMag(a.z, b.z);
}
+ @Translatable
public static Double3 mix(Double3 a, Double3 b, Double3 c) {
return new Double3(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z));
}
@@ -499,6 +562,7 @@ public static void mix(Double3 a, Double3 b, Double3 c, Double3 result) {
result.z = Math.mix(a.z, b.z, c.z);
}
+ @Translatable
public static Double3 clamp(Double3 v, double min, double max) {
return new Double3(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max));
}
@@ -509,6 +573,7 @@ public static void clamp(Double3 v, double min, double max, Double3 result) {
result.z = Math.clamp(v.z, min, max);
}
+ @Translatable
public static Double3 max(Double3 x, double y) {
return new Double3(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y));
}
@@ -519,6 +584,7 @@ public static void max(Double3 x, double y, Double3 result) {
result.z = Math.max(x.z, y);
}
+ @Translatable
public static Double3 min(Double3 x, double y) {
return new Double3(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y));
}
@@ -529,6 +595,7 @@ public static void min(Double3 x, double y, Double3 result) {
result.z = Math.min(x.z, y);
}
+ @Translatable
public static Double3 mix(Double3 x, Double3 y, double a) {
return new Double3(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a));
}
@@ -539,6 +606,7 @@ public static void mix(Double3 x, Double3 y, double a, Double3 result) {
result.z = Math.mix(x.z, y.z, a);
}
+ @Translatable
public static Double3 acos(Double3 a) {
return new Double3(Math.acos(a.x), Math.acos(a.y), Math.acos(a.z));
}
@@ -549,6 +617,7 @@ public static void acos(Double3 a, Double3 result) {
result.z = Math.acos(a.z);
}
+ @Translatable
public static Double3 acosh(Double3 a) {
return new Double3(Math.acosh(a.x), Math.acosh(a.y), Math.acosh(a.z));
}
@@ -559,6 +628,7 @@ public static void acosh(Double3 a, Double3 result) {
result.z = Math.acosh(a.z);
}
+ @Translatable
public static Double3 asin(Double3 a) {
return new Double3(Math.asin(a.x), Math.asin(a.y), Math.asin(a.z));
}
@@ -569,6 +639,7 @@ public static void asin(Double3 a, Double3 result) {
result.z = Math.asin(a.z);
}
+ @Translatable
public static Double3 asinh(Double3 a) {
return new Double3(Math.asinh(a.x), Math.asinh(a.y), Math.asinh(a.z));
}
@@ -579,6 +650,7 @@ public static void asinh(Double3 a, Double3 result) {
result.z = Math.asinh(a.z);
}
+ @Translatable
public static Double3 atan(Double3 a) {
return new Double3(Math.atan(a.x), Math.atan(a.y), Math.atan(a.z));
}
@@ -589,6 +661,7 @@ public static void atan(Double3 a, Double3 result) {
result.z = Math.atan(a.z);
}
+ @Translatable
public static Double3 atan2(Double3 a, Double3 b) {
return new Double3(Math.atan2(a.x, b.x), Math.atan2(a.y, b.y), Math.atan2(a.z, b.z));
}
@@ -599,6 +672,7 @@ public static void atan2(Double3 a, Double3 b, Double3 result) {
result.z = Math.atan2(a.z, b.z);
}
+ @Translatable
public static Double3 atanh(Double3 a) {
return new Double3(Math.atanh(a.x), Math.atanh(a.y), Math.atanh(a.z));
}
@@ -609,6 +683,7 @@ public static void atanh(Double3 a, Double3 result) {
result.z = Math.atanh(a.z);
}
+ @Translatable
public static Double3 cbrt(Double3 a) {
return new Double3(Math.cbrt(a.x), Math.cbrt(a.y), Math.cbrt(a.z));
}
@@ -619,6 +694,7 @@ public static void cbrt(Double3 a, Double3 result) {
result.z = Math.cbrt(a.z);
}
+ @Translatable
public static Double3 ceil(Double3 a) {
return new Double3(Math.ceil(a.x), Math.ceil(a.y), Math.ceil(a.z));
}
@@ -629,6 +705,7 @@ public static void ceil(Double3 a, Double3 result) {
result.z = Math.ceil(a.z);
}
+ @Translatable
public static Double3 copySign(Double3 a, Double3 b) {
return new Double3(Math.copySign(a.x, b.x), Math.copySign(a.y, b.y), Math.copySign(a.z, b.z));
}
@@ -639,6 +716,7 @@ public static void copySign(Double3 a, Double3 b, Double3 result) {
result.z = Math.copySign(a.z, b.z);
}
+ @Translatable
public static Double3 cos(Double3 a) {
return new Double3(Math.cos(a.x), Math.cos(a.y), Math.cos(a.z));
}
@@ -649,6 +727,7 @@ public static void cos(Double3 a, Double3 result) {
result.z = Math.cos(a.z);
}
+ @Translatable
public static Double3 cosh(Double3 a) {
return new Double3(Math.cosh(a.x), Math.cosh(a.y), Math.cosh(a.z));
}
@@ -659,6 +738,7 @@ public static void cosh(Double3 a, Double3 result) {
result.z = Math.cosh(a.z);
}
+ @Translatable
public static Double3 erf(Double3 a) {
return new Double3(Math.erf(a.x), Math.erf(a.y), Math.erf(a.z));
}
@@ -669,6 +749,7 @@ public static void erf(Double3 a, Double3 result) {
result.z = Math.erf(a.z);
}
+ @Translatable
public static Double3 erfc(Double3 a) {
return new Double3(Math.erfc(a.x), Math.erfc(a.y), Math.erfc(a.z));
}
@@ -679,6 +760,7 @@ public static void erfc(Double3 a, Double3 result) {
result.z = Math.erfc(a.z);
}
+ @Translatable
public static Double3 exp(Double3 a) {
return new Double3(Math.exp(a.x), Math.exp(a.y), Math.exp(a.z));
}
@@ -689,6 +771,7 @@ public static void exp(Double3 a, Double3 result) {
result.z = Math.exp(a.z);
}
+ @Translatable
public static Double3 exp10(Double3 a) {
return new Double3(Math.exp10(a.x), Math.exp10(a.y), Math.exp10(a.z));
}
@@ -699,6 +782,7 @@ public static void exp10(Double3 a, Double3 result) {
result.z = Math.exp10(a.z);
}
+ @Translatable
public static Double3 exp2(Double3 a) {
return new Double3(Math.exp2(a.x), Math.exp2(a.y), Math.exp2(a.z));
}
@@ -709,6 +793,7 @@ public static void exp2(Double3 a, Double3 result) {
result.z = Math.exp2(a.z);
}
+ @Translatable
public static Double3 expm1(Double3 a) {
return new Double3(Math.expm1(a.x), Math.expm1(a.y), Math.expm1(a.z));
}
@@ -719,6 +804,7 @@ public static void expm1(Double3 a, Double3 result) {
result.z = Math.expm1(a.z);
}
+ @Translatable
public static Double3 fdim(Double3 a, Double3 b) {
return new Double3(Math.fdim(a.x, b.x), Math.fdim(a.y, b.y), Math.fdim(a.z, b.z));
}
@@ -729,6 +815,7 @@ public static void fdim(Double3 a, Double3 b, Double3 result) {
result.z = Math.fdim(a.z, b.z);
}
+ @Translatable
public static Double3 floor(Double3 a) {
return new Double3(Math.floor(a.x), Math.floor(a.y), Math.floor(a.z));
}
@@ -739,6 +826,7 @@ public static void floor(Double3 a, Double3 result) {
result.z = Math.floor(a.z);
}
+ @Translatable
public static Double3 fma(Double3 a, Double3 b, Double3 c) {
return new Double3(Math.fma(a.x, b.x, c.x), Math.fma(a.y, b.y, c.y), Math.fma(a.z, b.z, c.z));
}
@@ -749,6 +837,7 @@ public static void fma(Double3 a, Double3 b, Double3 c, Double3 result) {
result.z = Math.fma(a.z, b.z, c.z);
}
+ @Translatable
public static Double3 fmod(Double3 a, Double3 b) {
return new Double3(Math.fmod(a.x, b.x), Math.fmod(a.y, b.y), Math.fmod(a.z, b.z));
}
@@ -759,6 +848,7 @@ public static void fmod(Double3 a, Double3 b, Double3 result) {
result.z = Math.fmod(a.z, b.z);
}
+ @Translatable
public static Double3 fract(Double3 a) {
return new Double3(Math.fract(a.x), Math.fract(a.y), Math.fract(a.z));
}
@@ -769,6 +859,7 @@ public static void fract(Double3 a, Double3 result) {
result.z = Math.fract(a.z);
}
+ @Translatable
public static Double3 frexp(Double3 a) {
return new Double3(Math.frexp(a.x), Math.frexp(a.y), Math.frexp(a.z));
}
@@ -779,6 +870,7 @@ public static void frexp(Double3 a, Double3 result) {
result.z = Math.frexp(a.z);
}
+ @Translatable
public static Double3 getExponent(Double3 a) {
return new Double3(Math.getExponent(a.x), Math.getExponent(a.y), Math.getExponent(a.z));
}
@@ -789,6 +881,7 @@ public static void getExponent(Double3 a, Double3 result) {
result.z = Math.getExponent(a.z);
}
+ @Translatable
public static Double3 hypot(Double3 a, Double3 b) {
return new Double3(Math.hypot(a.x, b.x), Math.hypot(a.y, b.y), Math.hypot(a.z, b.z));
}
@@ -799,6 +892,7 @@ public static void hypot(Double3 a, Double3 b, Double3 result) {
result.z = Math.hypot(a.z, b.z);
}
+ @Translatable
public static Double3 lgamma(Double3 a) {
return new Double3(Math.lgamma(a.x), Math.lgamma(a.y), Math.lgamma(a.z));
}
@@ -809,6 +903,7 @@ public static void lgamma(Double3 a, Double3 result) {
result.z = Math.lgamma(a.z);
}
+ @Translatable
public static Double3 log(Double3 a) {
return new Double3(Math.log(a.x), Math.log(a.y), Math.log(a.z));
}
@@ -819,6 +914,7 @@ public static void log(Double3 a, Double3 result) {
result.z = Math.log(a.z);
}
+ @Translatable
public static Double3 log10(Double3 a) {
return new Double3(Math.log10(a.x), Math.log10(a.y), Math.log10(a.z));
}
@@ -829,6 +925,7 @@ public static void log10(Double3 a, Double3 result) {
result.z = Math.log10(a.z);
}
+ @Translatable
public static Double3 log1p(Double3 a) {
return new Double3(Math.log1p(a.x), Math.log1p(a.y), Math.log1p(a.z));
}
@@ -839,6 +936,7 @@ public static void log1p(Double3 a, Double3 result) {
result.z = Math.log1p(a.z);
}
+ @Translatable
public static Double3 log2(Double3 a) {
return new Double3(Math.log2(a.x), Math.log2(a.y), Math.log2(a.z));
}
@@ -849,6 +947,7 @@ public static void log2(Double3 a, Double3 result) {
result.z = Math.log2(a.z);
}
+ @Translatable
public static Double3 logb(Double3 a) {
return new Double3(Math.logb(a.x), Math.logb(a.y), Math.logb(a.z));
}
@@ -859,6 +958,7 @@ public static void logb(Double3 a, Double3 result) {
result.z = Math.logb(a.z);
}
+ @Translatable
public static Double3 mad(Double3 a, Double3 b, Double3 c) {
return new Double3(Math.mad(a.x, b.x, c.x), Math.mad(a.y, b.y, c.y), Math.mad(a.z, b.z, c.z));
}
@@ -869,6 +969,7 @@ public static void mad(Double3 a, Double3 b, Double3 c, Double3 result) {
result.z = Math.mad(a.z, b.z, c.z);
}
+ @Translatable
public static Double3 nextAfter(Double3 a, Double3 b) {
return new Double3(Math.nextAfter(a.x, b.x), Math.nextAfter(a.y, b.y), Math.nextAfter(a.z, b.z));
}
@@ -879,6 +980,7 @@ public static void nextAfter(Double3 a, Double3 b, Double3 result) {
result.z = Math.nextAfter(a.z, b.z);
}
+ @Translatable
public static Double3 pow(Double3 a, Double3 b) {
return new Double3(Math.pow(a.x, b.x), Math.pow(a.y, b.y), Math.pow(a.z, b.z));
}
@@ -889,6 +991,7 @@ public static void pow(Double3 a, Double3 b, Double3 result) {
result.z = Math.pow(a.z, b.z);
}
+ @Translatable
public static Double3 powr(Double3 a, Double3 b) {
return new Double3(Math.powr(a.x, b.x), Math.powr(a.y, b.y), Math.powr(a.z, b.z));
}
@@ -899,6 +1002,7 @@ public static void powr(Double3 a, Double3 b, Double3 result) {
result.z = Math.powr(a.z, b.z);
}
+ @Translatable
public static Double3 remainder(Double3 a, Double3 b) {
return new Double3(Math.remainder(a.x, b.x), Math.remainder(a.y, b.y), Math.remainder(a.z, b.z));
}
@@ -909,6 +1013,7 @@ public static void remainder(Double3 a, Double3 b, Double3 result) {
result.z = Math.remainder(a.z, b.z);
}
+ @Translatable
public static Double3 rint(Double3 a) {
return new Double3(Math.rint(a.x), Math.rint(a.y), Math.rint(a.z));
}
@@ -919,6 +1024,7 @@ public static void rint(Double3 a, Double3 result) {
result.z = Math.rint(a.z);
}
+ @Translatable
public static Double3 round(Double3 a) {
return new Double3(Math.round(a.x), Math.round(a.y), Math.round(a.z));
}
@@ -929,6 +1035,7 @@ public static void round(Double3 a, Double3 result) {
result.z = Math.round(a.z);
}
+ @Translatable
public static Double3 rsqrt(Double3 a) {
return new Double3(Math.rsqrt(a.x), Math.rsqrt(a.y), Math.rsqrt(a.z));
}
@@ -939,6 +1046,7 @@ public static void rsqrt(Double3 a, Double3 result) {
result.z = Math.rsqrt(a.z);
}
+ @Translatable
public static Double3 signum(Double3 a) {
return new Double3(Math.signum(a.x), Math.signum(a.y), Math.signum(a.z));
}
@@ -949,6 +1057,7 @@ public static void signum(Double3 a, Double3 result) {
result.z = Math.signum(a.z);
}
+ @Translatable
public static Double3 sin(Double3 a) {
return new Double3(Math.sin(a.x), Math.sin(a.y), Math.sin(a.z));
}
@@ -959,6 +1068,7 @@ public static void sin(Double3 a, Double3 result) {
result.z = Math.sin(a.z);
}
+ @Translatable
public static Double3 sinh(Double3 a) {
return new Double3(Math.sinh(a.x), Math.sinh(a.y), Math.sinh(a.z));
}
@@ -969,6 +1079,7 @@ public static void sinh(Double3 a, Double3 result) {
result.z = Math.sinh(a.z);
}
+ @Translatable
public static Double3 smoothStep(Double3 a, Double3 b, Double3 c) {
return new Double3(Math.smoothStep(a.x, b.x, c.x), Math.smoothStep(a.y, b.y, c.y), Math.smoothStep(a.z, b.z, c.z));
}
@@ -979,6 +1090,7 @@ public static void smoothStep(Double3 a, Double3 b, Double3 c, Double3 result) {
result.z = Math.smoothStep(a.z, b.z, c.z);
}
+ @Translatable
public static Double3 sqrt(Double3 a) {
return new Double3(Math.sqrt(a.x), Math.sqrt(a.y), Math.sqrt(a.z));
}
@@ -989,6 +1101,7 @@ public static void sqrt(Double3 a, Double3 result) {
result.z = Math.sqrt(a.z);
}
+ @Translatable
public static Double3 step(Double3 a, Double3 b) {
return new Double3(Math.step(a.x, b.x), Math.step(a.y, b.y), Math.step(a.z, b.z));
}
@@ -999,6 +1112,7 @@ public static void step(Double3 a, Double3 b, Double3 result) {
result.z = Math.step(a.z, b.z);
}
+ @Translatable
public static Double3 tan(Double3 a) {
return new Double3(Math.tan(a.x), Math.tan(a.y), Math.tan(a.z));
}
@@ -1009,6 +1123,7 @@ public static void tan(Double3 a, Double3 result) {
result.z = Math.tan(a.z);
}
+ @Translatable
public static Double3 tanh(Double3 a) {
return new Double3(Math.tanh(a.x), Math.tanh(a.y), Math.tanh(a.z));
}
@@ -1019,6 +1134,7 @@ public static void tanh(Double3 a, Double3 result) {
result.z = Math.tanh(a.z);
}
+ @Translatable
public static Double3 tgamma(Double3 a) {
return new Double3(Math.tgamma(a.x), Math.tgamma(a.y), Math.tgamma(a.z));
}
@@ -1029,6 +1145,7 @@ public static void tgamma(Double3 a, Double3 result) {
result.z = Math.tgamma(a.z);
}
+ @Translatable
public static Double3 toDegrees(Double3 a) {
return new Double3(Math.toDegrees(a.x), Math.toDegrees(a.y), Math.toDegrees(a.z));
}
@@ -1039,6 +1156,7 @@ public static void toDegrees(Double3 a, Double3 result) {
result.z = Math.toDegrees(a.z);
}
+ @Translatable
public static Double3 toRadians(Double3 a) {
return new Double3(Math.toRadians(a.x), Math.toRadians(a.y), Math.toRadians(a.z));
}
@@ -1049,6 +1167,7 @@ public static void toRadians(Double3 a, Double3 result) {
result.z = Math.toRadians(a.z);
}
+ @Translatable
public static Double3 trunc(Double3 a) {
return new Double3(Math.trunc(a.x), Math.trunc(a.y), Math.trunc(a.z));
}
@@ -1059,6 +1178,7 @@ public static void trunc(Double3 a, Double3 result) {
result.z = Math.trunc(a.z);
}
+ @Translatable
public static Double3 scalb(Double3 a, Int3 n) {
return new Double3(Math.scalb(a.x, n.x), Math.scalb(a.y, n.y), Math.scalb(a.z, n.z));
}
@@ -1069,6 +1189,7 @@ public static void scalb(Double3 a, Int3 n, Double3 result) {
result.z = Math.scalb(a.z, n.z);
}
+ @Translatable
public static Double3 ldexp(Double3 a, Int3 n) {
return new Double3(Math.ldexp(a.x, n.x), Math.ldexp(a.y, n.y), Math.ldexp(a.z, n.z));
}
@@ -1079,6 +1200,7 @@ public static void ldexp(Double3 a, Int3 n, Double3 result) {
result.z = Math.ldexp(a.z, n.z);
}
+ @Translatable
public static Double3 pown(Double3 a, Int3 b) {
return new Double3(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z));
}
@@ -1089,6 +1211,7 @@ public static void pown(Double3 a, Int3 b, Double3 result) {
result.z = Math.pown(a.z, b.z);
}
+ @Translatable
public static Double3 rootn(Double3 a, Int3 b) {
return new Double3(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z));
}
@@ -1099,6 +1222,7 @@ public static void rootn(Double3 a, Int3 b, Double3 result) {
result.z = Math.pown(a.z, b.z);
}
+ @Translatable
public static Double3 smoothStep(Double3 a, Double3 b, double c) {
return new Double3(Math.smoothStep(a.x, b.x, c), Math.smoothStep(a.y, b.y, c), Math.smoothStep(a.z, b.z, c));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double4.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double4.java
index 9481b58..6b1f3b9 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double4.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double4.java
@@ -27,18 +27,28 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Double4 {
+ @Translatable
public double x;
+ @Translatable
public double y;
+ @Translatable
public double z;
+ @Translatable
public double w;
+ @Translatable
public Double4() {}
+ @Translatable
public Double4(double x, double y, double z, double w) {
set(x, y, z, w);
}
+ @Translatable
public void set(double x, double y, double z, double w) {
this.x = x;
this.y = y;
@@ -46,74 +56,92 @@ public void set(double x, double y, double z, double w) {
this.w = w;
}
+ @Translatable
public Double4(double v) {
this(v, v, v, v);
}
+ @Translatable
public void set(double v) {
set(v, v, v, v);
}
+ @Translatable
public Double4(double x, double y, Double2 vec1) {
this(x, y, vec1.x, vec1.y);
}
+ @Translatable
public void set(double x, double y, Double2 vec1) {
set(x, y, vec1.x, vec1.y);
}
+ @Translatable
public Double4(double x, Double2 vec1, double w) {
this(x, vec1.x, vec1.y, w);
}
+ @Translatable
public void set(double x, Double2 vec1, double w) {
set(x, vec1.x, vec1.y, w);
}
+ @Translatable
public Double4(double x, Double3 vec1) {
this(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(double x, Double3 vec1) {
set(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Double4(Double2 vec1, double z, double w) {
this(vec1.x, vec1.y, z, w);
}
+ @Translatable
public void set(Double2 vec1, double z, double w) {
set(vec1.x, vec1.y, z, w);
}
+ @Translatable
public Double4(Double2 vec1, Double2 vec2) {
this(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2) {
set(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Double4(Double3 vec1, double w) {
this(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public void set(Double3 vec1, double w) {
set(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public Double4(Double4 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(Double4 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Double4 value() {
return new Double4(this);
}
+ @Translatable
public Double2 lo() {
return new Double2(x, y);
}
@@ -123,6 +151,7 @@ public void lo(Double2 result) {
result.y = y;
}
+ @Translatable
public Double2 hi() {
return new Double2(z, w);
}
@@ -132,6 +161,7 @@ public void hi(Double2 result) {
result.y = w;
}
+ @Translatable
public Double2 odd() {
return new Double2(y, w);
}
@@ -141,6 +171,7 @@ public void odd(Double2 result) {
result.y = w;
}
+ @Translatable
public Double2 even() {
return new Double2(x, z);
}
@@ -150,6 +181,7 @@ public void even(Double2 result) {
result.y = z;
}
+ @Translatable
public Byte4 convertByte4() {
return new Byte4((byte)(x), (byte)(y), (byte)(z), (byte)(w));
}
@@ -161,6 +193,7 @@ public void convertByte4(Byte4 result) {
result.w = (byte)(w);
}
+ @Translatable
public Short4 convertShort4() {
return new Short4((short)(x), (short)(y), (short)(z), (short)(w));
}
@@ -172,6 +205,7 @@ public void convertShort4(Short4 result) {
result.w = (short)(w);
}
+ @Translatable
public Int4 convertInt4() {
return new Int4((int)(x), (int)(y), (int)(z), (int)(w));
}
@@ -183,6 +217,7 @@ public void convertInt4(Int4 result) {
result.w = (int)(w);
}
+ @Translatable
public Long4 convertLong4() {
return new Long4((long)(x), (long)(y), (long)(z), (long)(w));
}
@@ -194,6 +229,7 @@ public void convertLong4(Long4 result) {
result.w = (long)(w);
}
+ @Translatable
public Float4 convertFloat4() {
return new Float4((float)(x), (float)(y), (float)(z), (float)(w));
}
@@ -205,6 +241,7 @@ public void convertFloat4(Float4 result) {
result.w = (float)(w);
}
+ @Translatable
public Double2 asDouble2() {
return new Double2(x, y);
}
@@ -214,6 +251,7 @@ public void asDouble2(Double2 result) {
result.y = y;
}
+ @Translatable
public Double3 asDouble3() {
return new Double3(x, y, z);
}
@@ -224,6 +262,7 @@ public void asDouble3(Double3 result) {
result.z = z;
}
+ @Translatable
public static Int4 isEqual(Double4 a, Double4 b) {
return new Int4(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0);
}
@@ -235,6 +274,7 @@ public static void isEqual(Double4 a, Double4 b, Int4 result) {
result.w = a.w == b.w? 1 : 0;
}
+ @Translatable
public static Int4 isNotEqual(Double4 a, Double4 b) {
return new Int4(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0);
}
@@ -246,6 +286,7 @@ public static void isNotEqual(Double4 a, Double4 b, Int4 result) {
result.w = a.w != b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreater(Double4 a, Double4 b) {
return new Int4(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0);
}
@@ -257,6 +298,7 @@ public static void isGreater(Double4 a, Double4 b, Int4 result) {
result.w = a.w > b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreaterEqual(Double4 a, Double4 b) {
return new Int4(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0);
}
@@ -268,6 +310,7 @@ public static void isGreaterEqual(Double4 a, Double4 b, Int4 result) {
result.w = a.w >= b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLess(Double4 a, Double4 b) {
return new Int4(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0);
}
@@ -279,6 +322,7 @@ public static void isLess(Double4 a, Double4 b, Int4 result) {
result.w = a.w < b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLessEqual(Double4 a, Double4 b) {
return new Int4(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0);
}
@@ -290,6 +334,7 @@ public static void isLessEqual(Double4 a, Double4 b, Int4 result) {
result.w = a.w <= b.w? 1 : 0;
}
+ @Translatable
public static Double4 select(Double4 a, Double4 b, Int4 c) {
return new Double4(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w));
}
@@ -301,6 +346,7 @@ public static void select(Double4 a, Double4 b, Int4 c, Double4 result) {
result.w = Math.select(a.w, b.w, c.w);
}
+ @Translatable
public static Int4 isFinite(Double4 a) {
return new Int4(Math.isFinite(a.x), Math.isFinite(a.y), Math.isFinite(a.z), Math.isFinite(a.w));
}
@@ -312,6 +358,7 @@ public static void isFinite(Double4 a, Int4 result) {
result.w = Math.isFinite(a.w);
}
+ @Translatable
public static Int4 isInf(Double4 a) {
return new Int4(Math.isInf(a.x), Math.isInf(a.y), Math.isInf(a.z), Math.isInf(a.w));
}
@@ -323,6 +370,7 @@ public static void isInf(Double4 a, Int4 result) {
result.w = Math.isInf(a.w);
}
+ @Translatable
public static Int4 isNaN(Double4 a) {
return new Int4(Math.isNaN(a.x), Math.isNaN(a.y), Math.isNaN(a.z), Math.isNaN(a.w));
}
@@ -334,6 +382,7 @@ public static void isNaN(Double4 a, Int4 result) {
result.w = Math.isNaN(a.w);
}
+ @Translatable
public static Int4 isNormal(Double4 a) {
return new Int4(Math.isNormal(a.x), Math.isNormal(a.y), Math.isNormal(a.z), Math.isNormal(a.w));
}
@@ -345,6 +394,7 @@ public static void isNormal(Double4 a, Int4 result) {
result.w = Math.isNormal(a.w);
}
+ @Translatable
public static Int4 isOrdered(Double4 a, Double4 b) {
return new Int4(Math.isOrdered(a.x, b.x), Math.isOrdered(a.y, b.y), Math.isOrdered(a.z, b.z), Math.isOrdered(a.w, b.w));
}
@@ -356,6 +406,7 @@ public static void isOrdered(Double4 a, Double4 b, Int4 result) {
result.w = Math.isOrdered(a.w, b.w);
}
+ @Translatable
public static Int4 isUnordered(Double4 a, Double4 b) {
return new Int4(Math.isUnordered(a.x, b.x), Math.isUnordered(a.y, b.y), Math.isUnordered(a.z, b.z), Math.isUnordered(a.w, b.w));
}
@@ -367,14 +418,17 @@ public static void isUnordered(Double4 a, Double4 b, Int4 result) {
result.w = Math.isUnordered(a.w, b.w);
}
+ @Translatable
public static int any(Double4 a) {
return (a.x != 0.0 || a.y != 0.0 || a.z != 0.0 || a.w != 0.0)? 1 : 0;
}
+ @Translatable
public static int all(Double4 a) {
return (a.x == 0.0 || a.y == 0.0 || a.z == 0.0 || a.w == 0.0)? 0 : 1;
}
+ @Translatable
public static Double4 neg(Double4 a) {
return new Double4((double)(-a.x), (double)(-a.y), (double)(-a.z), (double)(-a.w));
}
@@ -386,6 +440,7 @@ public static void neg(Double4 a, Double4 result) {
result.w = (double)(-a.w);
}
+ @Translatable
public static Double4 add(Double4 a, Double4 b) {
return new Double4((double)(a.x + b.x), (double)(a.y + b.y), (double)(a.z + b.z), (double)(a.w + b.w));
}
@@ -397,6 +452,7 @@ public static void add(Double4 a, Double4 b, Double4 result) {
result.w = (double)(a.w + b.w);
}
+ @Translatable
public static Double4 sub(Double4 a, Double4 b) {
return new Double4((double)(a.x - b.x), (double)(a.y - b.y), (double)(a.z - b.z), (double)(a.w - b.w));
}
@@ -408,6 +464,7 @@ public static void sub(Double4 a, Double4 b, Double4 result) {
result.w = (double)(a.w - b.w);
}
+ @Translatable
public static Double4 mul(Double4 a, Double4 b) {
return new Double4((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w));
}
@@ -419,6 +476,7 @@ public static void mul(Double4 a, Double4 b, Double4 result) {
result.w = (double)(a.w * b.w);
}
+ @Translatable
public static Double4 mul(Double4 a, double k) {
return new Double4((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k));
}
@@ -430,6 +488,7 @@ public static void mul(Double4 a, double k, Double4 result) {
result.w = (double)(a.w * k);
}
+ @Translatable
public static Float4 mul(Double4 a, Float4 b) {
return new Float4((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w));
}
@@ -441,6 +500,7 @@ public static void mul(Double4 a, Float4 b, Float4 result) {
result.w = (float)(a.w * b.w);
}
+ @Translatable
public static Float4 mul(Double4 a, float k) {
return new Float4((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k));
}
@@ -452,6 +512,7 @@ public static void mul(Double4 a, float k, Float4 result) {
result.w = (float)(a.w * k);
}
+ @Translatable
public static Double4 div(Double4 a, Double4 b) {
return new Double4((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w));
}
@@ -463,6 +524,7 @@ public static void div(Double4 a, Double4 b, Double4 result) {
result.w = (double)(a.w / b.w);
}
+ @Translatable
public static Double4 div(Double4 a, double k) {
return new Double4((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k));
}
@@ -474,6 +536,7 @@ public static void div(Double4 a, double k, Double4 result) {
result.w = (double)(a.w / k);
}
+ @Translatable
public static Float4 div(Double4 a, Float4 b) {
return new Float4((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w));
}
@@ -485,6 +548,7 @@ public static void div(Double4 a, Float4 b, Float4 result) {
result.w = (float)(a.w / b.w);
}
+ @Translatable
public static Float4 div(Double4 a, float k) {
return new Float4((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k));
}
@@ -496,6 +560,7 @@ public static void div(Double4 a, float k, Float4 result) {
result.w = (float)(a.w / k);
}
+ @Translatable
public static Double4 cross(Double4 a, Double4 b) {
Double4 result = new Double4();
cross(a, b, result);
@@ -509,23 +574,28 @@ public static void cross(Double4 a, Double4 b, Double4 result) {
result.w = 0.0;
}
+ @Translatable
public static double dot(Double4 a, Double4 b) {
return (double)(a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w);
}
+ @Translatable
public static double distance(Double4 a, Double4 b) {
return distance(a, b, new Double4());
}
+ @Translatable
public static double distance(Double4 a, Double4 b, Double4 tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(Double4 a) {
return Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w);
}
+ @Translatable
public static Double4 normalize(Double4 a) {
Double4 result = new Double4();
normalize(a, result);
@@ -540,6 +610,7 @@ public static void normalize(Double4 a, Double4 result) {
result.w = (double)(a.w / len);
}
+ @Translatable
public static Double4 abs(Double4 a) {
return new Double4(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w));
}
@@ -551,6 +622,7 @@ public static void abs(Double4 a, Double4 result) {
result.w = Math.abs(a.w);
}
+ @Translatable
public static Double4 clamp(Double4 a, Double4 b, Double4 c) {
return new Double4(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w));
}
@@ -562,6 +634,7 @@ public static void clamp(Double4 a, Double4 b, Double4 c, Double4 result) {
result.w = Math.clamp(a.w, b.w, c.w);
}
+ @Translatable
public static Double4 max(Double4 a, Double4 b) {
return new Double4(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w));
}
@@ -573,6 +646,7 @@ public static void max(Double4 a, Double4 b, Double4 result) {
result.w = Math.max(a.w, b.w);
}
+ @Translatable
public static Double4 maxMag(Double4 a, Double4 b) {
return new Double4(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w));
}
@@ -584,6 +658,7 @@ public static void maxMag(Double4 a, Double4 b, Double4 result) {
result.w = Math.maxMag(a.w, b.w);
}
+ @Translatable
public static Double4 min(Double4 a, Double4 b) {
return new Double4(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w));
}
@@ -595,6 +670,7 @@ public static void min(Double4 a, Double4 b, Double4 result) {
result.w = Math.min(a.w, b.w);
}
+ @Translatable
public static Double4 minMag(Double4 a, Double4 b) {
return new Double4(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w));
}
@@ -606,6 +682,7 @@ public static void minMag(Double4 a, Double4 b, Double4 result) {
result.w = Math.minMag(a.w, b.w);
}
+ @Translatable
public static Double4 mix(Double4 a, Double4 b, Double4 c) {
return new Double4(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w));
}
@@ -617,6 +694,7 @@ public static void mix(Double4 a, Double4 b, Double4 c, Double4 result) {
result.w = Math.mix(a.w, b.w, c.w);
}
+ @Translatable
public static Double4 clamp(Double4 v, double min, double max) {
return new Double4(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max));
}
@@ -628,6 +706,7 @@ public static void clamp(Double4 v, double min, double max, Double4 result) {
result.w = Math.clamp(v.w, min, max);
}
+ @Translatable
public static Double4 max(Double4 x, double y) {
return new Double4(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y));
}
@@ -639,6 +718,7 @@ public static void max(Double4 x, double y, Double4 result) {
result.w = Math.max(x.w, y);
}
+ @Translatable
public static Double4 min(Double4 x, double y) {
return new Double4(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y));
}
@@ -650,6 +730,7 @@ public static void min(Double4 x, double y, Double4 result) {
result.w = Math.min(x.w, y);
}
+ @Translatable
public static Double4 mix(Double4 x, Double4 y, double a) {
return new Double4(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a));
}
@@ -661,6 +742,7 @@ public static void mix(Double4 x, Double4 y, double a, Double4 result) {
result.w = Math.mix(x.w, y.w, a);
}
+ @Translatable
public static Double4 acos(Double4 a) {
return new Double4(Math.acos(a.x), Math.acos(a.y), Math.acos(a.z), Math.acos(a.w));
}
@@ -672,6 +754,7 @@ public static void acos(Double4 a, Double4 result) {
result.w = Math.acos(a.w);
}
+ @Translatable
public static Double4 acosh(Double4 a) {
return new Double4(Math.acosh(a.x), Math.acosh(a.y), Math.acosh(a.z), Math.acosh(a.w));
}
@@ -683,6 +766,7 @@ public static void acosh(Double4 a, Double4 result) {
result.w = Math.acosh(a.w);
}
+ @Translatable
public static Double4 asin(Double4 a) {
return new Double4(Math.asin(a.x), Math.asin(a.y), Math.asin(a.z), Math.asin(a.w));
}
@@ -694,6 +778,7 @@ public static void asin(Double4 a, Double4 result) {
result.w = Math.asin(a.w);
}
+ @Translatable
public static Double4 asinh(Double4 a) {
return new Double4(Math.asinh(a.x), Math.asinh(a.y), Math.asinh(a.z), Math.asinh(a.w));
}
@@ -705,6 +790,7 @@ public static void asinh(Double4 a, Double4 result) {
result.w = Math.asinh(a.w);
}
+ @Translatable
public static Double4 atan(Double4 a) {
return new Double4(Math.atan(a.x), Math.atan(a.y), Math.atan(a.z), Math.atan(a.w));
}
@@ -716,6 +802,7 @@ public static void atan(Double4 a, Double4 result) {
result.w = Math.atan(a.w);
}
+ @Translatable
public static Double4 atan2(Double4 a, Double4 b) {
return new Double4(Math.atan2(a.x, b.x), Math.atan2(a.y, b.y), Math.atan2(a.z, b.z), Math.atan2(a.w, b.w));
}
@@ -727,6 +814,7 @@ public static void atan2(Double4 a, Double4 b, Double4 result) {
result.w = Math.atan2(a.w, b.w);
}
+ @Translatable
public static Double4 atanh(Double4 a) {
return new Double4(Math.atanh(a.x), Math.atanh(a.y), Math.atanh(a.z), Math.atanh(a.w));
}
@@ -738,6 +826,7 @@ public static void atanh(Double4 a, Double4 result) {
result.w = Math.atanh(a.w);
}
+ @Translatable
public static Double4 cbrt(Double4 a) {
return new Double4(Math.cbrt(a.x), Math.cbrt(a.y), Math.cbrt(a.z), Math.cbrt(a.w));
}
@@ -749,6 +838,7 @@ public static void cbrt(Double4 a, Double4 result) {
result.w = Math.cbrt(a.w);
}
+ @Translatable
public static Double4 ceil(Double4 a) {
return new Double4(Math.ceil(a.x), Math.ceil(a.y), Math.ceil(a.z), Math.ceil(a.w));
}
@@ -760,6 +850,7 @@ public static void ceil(Double4 a, Double4 result) {
result.w = Math.ceil(a.w);
}
+ @Translatable
public static Double4 copySign(Double4 a, Double4 b) {
return new Double4(Math.copySign(a.x, b.x), Math.copySign(a.y, b.y), Math.copySign(a.z, b.z), Math.copySign(a.w, b.w));
}
@@ -771,6 +862,7 @@ public static void copySign(Double4 a, Double4 b, Double4 result) {
result.w = Math.copySign(a.w, b.w);
}
+ @Translatable
public static Double4 cos(Double4 a) {
return new Double4(Math.cos(a.x), Math.cos(a.y), Math.cos(a.z), Math.cos(a.w));
}
@@ -782,6 +874,7 @@ public static void cos(Double4 a, Double4 result) {
result.w = Math.cos(a.w);
}
+ @Translatable
public static Double4 cosh(Double4 a) {
return new Double4(Math.cosh(a.x), Math.cosh(a.y), Math.cosh(a.z), Math.cosh(a.w));
}
@@ -793,6 +886,7 @@ public static void cosh(Double4 a, Double4 result) {
result.w = Math.cosh(a.w);
}
+ @Translatable
public static Double4 erf(Double4 a) {
return new Double4(Math.erf(a.x), Math.erf(a.y), Math.erf(a.z), Math.erf(a.w));
}
@@ -804,6 +898,7 @@ public static void erf(Double4 a, Double4 result) {
result.w = Math.erf(a.w);
}
+ @Translatable
public static Double4 erfc(Double4 a) {
return new Double4(Math.erfc(a.x), Math.erfc(a.y), Math.erfc(a.z), Math.erfc(a.w));
}
@@ -815,6 +910,7 @@ public static void erfc(Double4 a, Double4 result) {
result.w = Math.erfc(a.w);
}
+ @Translatable
public static Double4 exp(Double4 a) {
return new Double4(Math.exp(a.x), Math.exp(a.y), Math.exp(a.z), Math.exp(a.w));
}
@@ -826,6 +922,7 @@ public static void exp(Double4 a, Double4 result) {
result.w = Math.exp(a.w);
}
+ @Translatable
public static Double4 exp10(Double4 a) {
return new Double4(Math.exp10(a.x), Math.exp10(a.y), Math.exp10(a.z), Math.exp10(a.w));
}
@@ -837,6 +934,7 @@ public static void exp10(Double4 a, Double4 result) {
result.w = Math.exp10(a.w);
}
+ @Translatable
public static Double4 exp2(Double4 a) {
return new Double4(Math.exp2(a.x), Math.exp2(a.y), Math.exp2(a.z), Math.exp2(a.w));
}
@@ -848,6 +946,7 @@ public static void exp2(Double4 a, Double4 result) {
result.w = Math.exp2(a.w);
}
+ @Translatable
public static Double4 expm1(Double4 a) {
return new Double4(Math.expm1(a.x), Math.expm1(a.y), Math.expm1(a.z), Math.expm1(a.w));
}
@@ -859,6 +958,7 @@ public static void expm1(Double4 a, Double4 result) {
result.w = Math.expm1(a.w);
}
+ @Translatable
public static Double4 fdim(Double4 a, Double4 b) {
return new Double4(Math.fdim(a.x, b.x), Math.fdim(a.y, b.y), Math.fdim(a.z, b.z), Math.fdim(a.w, b.w));
}
@@ -870,6 +970,7 @@ public static void fdim(Double4 a, Double4 b, Double4 result) {
result.w = Math.fdim(a.w, b.w);
}
+ @Translatable
public static Double4 floor(Double4 a) {
return new Double4(Math.floor(a.x), Math.floor(a.y), Math.floor(a.z), Math.floor(a.w));
}
@@ -881,6 +982,7 @@ public static void floor(Double4 a, Double4 result) {
result.w = Math.floor(a.w);
}
+ @Translatable
public static Double4 fma(Double4 a, Double4 b, Double4 c) {
return new Double4(Math.fma(a.x, b.x, c.x), Math.fma(a.y, b.y, c.y), Math.fma(a.z, b.z, c.z), Math.fma(a.w, b.w, c.w));
}
@@ -892,6 +994,7 @@ public static void fma(Double4 a, Double4 b, Double4 c, Double4 result) {
result.w = Math.fma(a.w, b.w, c.w);
}
+ @Translatable
public static Double4 fmod(Double4 a, Double4 b) {
return new Double4(Math.fmod(a.x, b.x), Math.fmod(a.y, b.y), Math.fmod(a.z, b.z), Math.fmod(a.w, b.w));
}
@@ -903,6 +1006,7 @@ public static void fmod(Double4 a, Double4 b, Double4 result) {
result.w = Math.fmod(a.w, b.w);
}
+ @Translatable
public static Double4 fract(Double4 a) {
return new Double4(Math.fract(a.x), Math.fract(a.y), Math.fract(a.z), Math.fract(a.w));
}
@@ -914,6 +1018,7 @@ public static void fract(Double4 a, Double4 result) {
result.w = Math.fract(a.w);
}
+ @Translatable
public static Double4 frexp(Double4 a) {
return new Double4(Math.frexp(a.x), Math.frexp(a.y), Math.frexp(a.z), Math.frexp(a.w));
}
@@ -925,6 +1030,7 @@ public static void frexp(Double4 a, Double4 result) {
result.w = Math.frexp(a.w);
}
+ @Translatable
public static Double4 getExponent(Double4 a) {
return new Double4(Math.getExponent(a.x), Math.getExponent(a.y), Math.getExponent(a.z), Math.getExponent(a.w));
}
@@ -936,6 +1042,7 @@ public static void getExponent(Double4 a, Double4 result) {
result.w = Math.getExponent(a.w);
}
+ @Translatable
public static Double4 hypot(Double4 a, Double4 b) {
return new Double4(Math.hypot(a.x, b.x), Math.hypot(a.y, b.y), Math.hypot(a.z, b.z), Math.hypot(a.w, b.w));
}
@@ -947,6 +1054,7 @@ public static void hypot(Double4 a, Double4 b, Double4 result) {
result.w = Math.hypot(a.w, b.w);
}
+ @Translatable
public static Double4 lgamma(Double4 a) {
return new Double4(Math.lgamma(a.x), Math.lgamma(a.y), Math.lgamma(a.z), Math.lgamma(a.w));
}
@@ -958,6 +1066,7 @@ public static void lgamma(Double4 a, Double4 result) {
result.w = Math.lgamma(a.w);
}
+ @Translatable
public static Double4 log(Double4 a) {
return new Double4(Math.log(a.x), Math.log(a.y), Math.log(a.z), Math.log(a.w));
}
@@ -969,6 +1078,7 @@ public static void log(Double4 a, Double4 result) {
result.w = Math.log(a.w);
}
+ @Translatable
public static Double4 log10(Double4 a) {
return new Double4(Math.log10(a.x), Math.log10(a.y), Math.log10(a.z), Math.log10(a.w));
}
@@ -980,6 +1090,7 @@ public static void log10(Double4 a, Double4 result) {
result.w = Math.log10(a.w);
}
+ @Translatable
public static Double4 log1p(Double4 a) {
return new Double4(Math.log1p(a.x), Math.log1p(a.y), Math.log1p(a.z), Math.log1p(a.w));
}
@@ -991,6 +1102,7 @@ public static void log1p(Double4 a, Double4 result) {
result.w = Math.log1p(a.w);
}
+ @Translatable
public static Double4 log2(Double4 a) {
return new Double4(Math.log2(a.x), Math.log2(a.y), Math.log2(a.z), Math.log2(a.w));
}
@@ -1002,6 +1114,7 @@ public static void log2(Double4 a, Double4 result) {
result.w = Math.log2(a.w);
}
+ @Translatable
public static Double4 logb(Double4 a) {
return new Double4(Math.logb(a.x), Math.logb(a.y), Math.logb(a.z), Math.logb(a.w));
}
@@ -1013,6 +1126,7 @@ public static void logb(Double4 a, Double4 result) {
result.w = Math.logb(a.w);
}
+ @Translatable
public static Double4 mad(Double4 a, Double4 b, Double4 c) {
return new Double4(Math.mad(a.x, b.x, c.x), Math.mad(a.y, b.y, c.y), Math.mad(a.z, b.z, c.z), Math.mad(a.w, b.w, c.w));
}
@@ -1024,6 +1138,7 @@ public static void mad(Double4 a, Double4 b, Double4 c, Double4 result) {
result.w = Math.mad(a.w, b.w, c.w);
}
+ @Translatable
public static Double4 nextAfter(Double4 a, Double4 b) {
return new Double4(Math.nextAfter(a.x, b.x), Math.nextAfter(a.y, b.y), Math.nextAfter(a.z, b.z), Math.nextAfter(a.w, b.w));
}
@@ -1035,6 +1150,7 @@ public static void nextAfter(Double4 a, Double4 b, Double4 result) {
result.w = Math.nextAfter(a.w, b.w);
}
+ @Translatable
public static Double4 pow(Double4 a, Double4 b) {
return new Double4(Math.pow(a.x, b.x), Math.pow(a.y, b.y), Math.pow(a.z, b.z), Math.pow(a.w, b.w));
}
@@ -1046,6 +1162,7 @@ public static void pow(Double4 a, Double4 b, Double4 result) {
result.w = Math.pow(a.w, b.w);
}
+ @Translatable
public static Double4 powr(Double4 a, Double4 b) {
return new Double4(Math.powr(a.x, b.x), Math.powr(a.y, b.y), Math.powr(a.z, b.z), Math.powr(a.w, b.w));
}
@@ -1057,6 +1174,7 @@ public static void powr(Double4 a, Double4 b, Double4 result) {
result.w = Math.powr(a.w, b.w);
}
+ @Translatable
public static Double4 remainder(Double4 a, Double4 b) {
return new Double4(Math.remainder(a.x, b.x), Math.remainder(a.y, b.y), Math.remainder(a.z, b.z), Math.remainder(a.w, b.w));
}
@@ -1068,6 +1186,7 @@ public static void remainder(Double4 a, Double4 b, Double4 result) {
result.w = Math.remainder(a.w, b.w);
}
+ @Translatable
public static Double4 rint(Double4 a) {
return new Double4(Math.rint(a.x), Math.rint(a.y), Math.rint(a.z), Math.rint(a.w));
}
@@ -1079,6 +1198,7 @@ public static void rint(Double4 a, Double4 result) {
result.w = Math.rint(a.w);
}
+ @Translatable
public static Double4 round(Double4 a) {
return new Double4(Math.round(a.x), Math.round(a.y), Math.round(a.z), Math.round(a.w));
}
@@ -1090,6 +1210,7 @@ public static void round(Double4 a, Double4 result) {
result.w = Math.round(a.w);
}
+ @Translatable
public static Double4 rsqrt(Double4 a) {
return new Double4(Math.rsqrt(a.x), Math.rsqrt(a.y), Math.rsqrt(a.z), Math.rsqrt(a.w));
}
@@ -1101,6 +1222,7 @@ public static void rsqrt(Double4 a, Double4 result) {
result.w = Math.rsqrt(a.w);
}
+ @Translatable
public static Double4 signum(Double4 a) {
return new Double4(Math.signum(a.x), Math.signum(a.y), Math.signum(a.z), Math.signum(a.w));
}
@@ -1112,6 +1234,7 @@ public static void signum(Double4 a, Double4 result) {
result.w = Math.signum(a.w);
}
+ @Translatable
public static Double4 sin(Double4 a) {
return new Double4(Math.sin(a.x), Math.sin(a.y), Math.sin(a.z), Math.sin(a.w));
}
@@ -1123,6 +1246,7 @@ public static void sin(Double4 a, Double4 result) {
result.w = Math.sin(a.w);
}
+ @Translatable
public static Double4 sinh(Double4 a) {
return new Double4(Math.sinh(a.x), Math.sinh(a.y), Math.sinh(a.z), Math.sinh(a.w));
}
@@ -1134,6 +1258,7 @@ public static void sinh(Double4 a, Double4 result) {
result.w = Math.sinh(a.w);
}
+ @Translatable
public static Double4 smoothStep(Double4 a, Double4 b, Double4 c) {
return new Double4(Math.smoothStep(a.x, b.x, c.x), Math.smoothStep(a.y, b.y, c.y), Math.smoothStep(a.z, b.z, c.z), Math.smoothStep(a.w, b.w, c.w));
}
@@ -1145,6 +1270,7 @@ public static void smoothStep(Double4 a, Double4 b, Double4 c, Double4 result) {
result.w = Math.smoothStep(a.w, b.w, c.w);
}
+ @Translatable
public static Double4 sqrt(Double4 a) {
return new Double4(Math.sqrt(a.x), Math.sqrt(a.y), Math.sqrt(a.z), Math.sqrt(a.w));
}
@@ -1156,6 +1282,7 @@ public static void sqrt(Double4 a, Double4 result) {
result.w = Math.sqrt(a.w);
}
+ @Translatable
public static Double4 step(Double4 a, Double4 b) {
return new Double4(Math.step(a.x, b.x), Math.step(a.y, b.y), Math.step(a.z, b.z), Math.step(a.w, b.w));
}
@@ -1167,6 +1294,7 @@ public static void step(Double4 a, Double4 b, Double4 result) {
result.w = Math.step(a.w, b.w);
}
+ @Translatable
public static Double4 tan(Double4 a) {
return new Double4(Math.tan(a.x), Math.tan(a.y), Math.tan(a.z), Math.tan(a.w));
}
@@ -1178,6 +1306,7 @@ public static void tan(Double4 a, Double4 result) {
result.w = Math.tan(a.w);
}
+ @Translatable
public static Double4 tanh(Double4 a) {
return new Double4(Math.tanh(a.x), Math.tanh(a.y), Math.tanh(a.z), Math.tanh(a.w));
}
@@ -1189,6 +1318,7 @@ public static void tanh(Double4 a, Double4 result) {
result.w = Math.tanh(a.w);
}
+ @Translatable
public static Double4 tgamma(Double4 a) {
return new Double4(Math.tgamma(a.x), Math.tgamma(a.y), Math.tgamma(a.z), Math.tgamma(a.w));
}
@@ -1200,6 +1330,7 @@ public static void tgamma(Double4 a, Double4 result) {
result.w = Math.tgamma(a.w);
}
+ @Translatable
public static Double4 toDegrees(Double4 a) {
return new Double4(Math.toDegrees(a.x), Math.toDegrees(a.y), Math.toDegrees(a.z), Math.toDegrees(a.w));
}
@@ -1211,6 +1342,7 @@ public static void toDegrees(Double4 a, Double4 result) {
result.w = Math.toDegrees(a.w);
}
+ @Translatable
public static Double4 toRadians(Double4 a) {
return new Double4(Math.toRadians(a.x), Math.toRadians(a.y), Math.toRadians(a.z), Math.toRadians(a.w));
}
@@ -1222,6 +1354,7 @@ public static void toRadians(Double4 a, Double4 result) {
result.w = Math.toRadians(a.w);
}
+ @Translatable
public static Double4 trunc(Double4 a) {
return new Double4(Math.trunc(a.x), Math.trunc(a.y), Math.trunc(a.z), Math.trunc(a.w));
}
@@ -1233,6 +1366,7 @@ public static void trunc(Double4 a, Double4 result) {
result.w = Math.trunc(a.w);
}
+ @Translatable
public static Double4 scalb(Double4 a, Int4 n) {
return new Double4(Math.scalb(a.x, n.x), Math.scalb(a.y, n.y), Math.scalb(a.z, n.z), Math.scalb(a.w, n.w));
}
@@ -1244,6 +1378,7 @@ public static void scalb(Double4 a, Int4 n, Double4 result) {
result.w = Math.scalb(a.w, n.w);
}
+ @Translatable
public static Double4 ldexp(Double4 a, Int4 n) {
return new Double4(Math.ldexp(a.x, n.x), Math.ldexp(a.y, n.y), Math.ldexp(a.z, n.z), Math.ldexp(a.w, n.w));
}
@@ -1255,6 +1390,7 @@ public static void ldexp(Double4 a, Int4 n, Double4 result) {
result.w = Math.ldexp(a.w, n.w);
}
+ @Translatable
public static Double4 pown(Double4 a, Int4 b) {
return new Double4(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z), Math.pown(a.w, b.w));
}
@@ -1266,6 +1402,7 @@ public static void pown(Double4 a, Int4 b, Double4 result) {
result.w = Math.pown(a.w, b.w);
}
+ @Translatable
public static Double4 rootn(Double4 a, Int4 b) {
return new Double4(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z), Math.pown(a.w, b.w));
}
@@ -1277,6 +1414,7 @@ public static void rootn(Double4 a, Int4 b, Double4 result) {
result.w = Math.pown(a.w, b.w);
}
+ @Translatable
public static Double4 smoothStep(Double4 a, Double4 b, double c) {
return new Double4(Math.smoothStep(a.x, b.x, c), Math.smoothStep(a.y, b.y, c), Math.smoothStep(a.z, b.z, c), Math.smoothStep(a.w, b.w, c));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double8.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double8.java
index 4c6d131..01cdd3f 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double8.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Double8.java
@@ -27,19 +27,30 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Double8 {
+ @Translatable
public double x;
+ @Translatable
public double y;
+ @Translatable
public double z;
+ @Translatable
public double w;
+ @Translatable
public double[] s = new double[4];
+ @Translatable
public Double8() {}
+ @Translatable
public Double8(double x, double y, double z, double w, double s0, double s1, double s2, double s3) {
set(x, y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(double x, double y, double z, double w, double s0, double s1, double s2, double s3) {
this.x = x;
this.y = y;
@@ -51,882 +62,1102 @@ public void set(double x, double y, double z, double w, double s0, double s1, do
this.s[3] = s3;
}
+ @Translatable
public Double8(double v) {
this(v, v, v, v, v, v, v, v);
}
+ @Translatable
public void set(double v) {
set(v, v, v, v, v, v, v, v);
}
+ @Translatable
public Double8(double x, double y, double z, double w, double s0, double s1, Double2 vec1) {
this(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public void set(double x, double y, double z, double w, double s0, double s1, Double2 vec1) {
set(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public Double8(double x, double y, double z, double w, double s0, Double2 vec1, double s3) {
this(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public void set(double x, double y, double z, double w, double s0, Double2 vec1, double s3) {
set(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public Double8(double x, double y, double z, double w, double s0, Double3 vec1) {
this(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(double x, double y, double z, double w, double s0, Double3 vec1) {
set(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Double8(double x, double y, double z, double w, Double2 vec1, double s2, double s3) {
this(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public void set(double x, double y, double z, double w, Double2 vec1, double s2, double s3) {
set(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public Double8(double x, double y, double z, double w, Double2 vec1, Double2 vec2) {
this(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, double y, double z, double w, Double2 vec1, Double2 vec2) {
set(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, double y, double z, double w, Double3 vec1, double s3) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public void set(double x, double y, double z, double w, Double3 vec1, double s3) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public Double8(double x, double y, double z, double w, Double4 vec1) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(double x, double y, double z, double w, Double4 vec1) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Double8(double x, double y, double z, Double2 vec1, double s1, double s2, double s3) {
this(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public void set(double x, double y, double z, Double2 vec1, double s1, double s2, double s3) {
set(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public Double8(double x, double y, double z, Double2 vec1, double s1, Double2 vec2) {
this(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, double y, double z, Double2 vec1, double s1, Double2 vec2) {
set(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, double y, double z, Double2 vec1, Double2 vec2, double s3) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(double x, double y, double z, Double2 vec1, Double2 vec2, double s3) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(double x, double y, double z, Double2 vec1, Double3 vec2) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(double x, double y, double z, Double2 vec1, Double3 vec2) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(double x, double y, double z, Double3 vec1, double s2, double s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public void set(double x, double y, double z, Double3 vec1, double s2, double s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public Double8(double x, double y, double z, Double3 vec1, Double2 vec2) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, double y, double z, Double3 vec1, Double2 vec2) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, double y, double z, Double4 vec1, double s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public void set(double x, double y, double z, Double4 vec1, double s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public Double8(double x, double y, Double2 vec1, double s0, double s1, double s2, double s3) {
this(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(double x, double y, Double2 vec1, double s0, double s1, double s2, double s3) {
set(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public Double8(double x, double y, Double2 vec1, double s0, double s1, Double2 vec2) {
this(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, double y, Double2 vec1, double s0, double s1, Double2 vec2) {
set(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, double y, Double2 vec1, double s0, Double2 vec2, double s3) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(double x, double y, Double2 vec1, double s0, Double2 vec2, double s3) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(double x, double y, Double2 vec1, double s0, Double3 vec2) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(double x, double y, Double2 vec1, double s0, Double3 vec2) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(double x, double y, Double2 vec1, Double2 vec2, double s2, double s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(double x, double y, Double2 vec1, Double2 vec2, double s2, double s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Double8(double x, double y, Double2 vec1, Double2 vec2, Double2 vec3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(double x, double y, Double2 vec1, Double2 vec2, Double2 vec3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Double8(double x, double y, Double2 vec1, Double3 vec2, double s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(double x, double y, Double2 vec1, Double3 vec2, double s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Double8(double x, double y, Double2 vec1, Double4 vec2) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(double x, double y, Double2 vec1, Double4 vec2) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Double8(double x, double y, Double3 vec1, double s1, double s2, double s3) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public void set(double x, double y, Double3 vec1, double s1, double s2, double s3) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public Double8(double x, double y, Double3 vec1, double s1, Double2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, double y, Double3 vec1, double s1, Double2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, double y, Double3 vec1, Double2 vec2, double s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(double x, double y, Double3 vec1, Double2 vec2, double s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(double x, double y, Double3 vec1, Double3 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(double x, double y, Double3 vec1, Double3 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(double x, double y, Double4 vec1, double s2, double s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public void set(double x, double y, Double4 vec1, double s2, double s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public Double8(double x, double y, Double4 vec1, Double2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, double y, Double4 vec1, Double2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, Double2 vec1, double w, double s0, double s1, double s2, double s3) {
this(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(double x, Double2 vec1, double w, double s0, double s1, double s2, double s3) {
set(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public Double8(double x, Double2 vec1, double w, double s0, double s1, Double2 vec2) {
this(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, Double2 vec1, double w, double s0, double s1, Double2 vec2) {
set(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, Double2 vec1, double w, double s0, Double2 vec2, double s3) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(double x, Double2 vec1, double w, double s0, Double2 vec2, double s3) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(double x, Double2 vec1, double w, double s0, Double3 vec2) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(double x, Double2 vec1, double w, double s0, Double3 vec2) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(double x, Double2 vec1, double w, Double2 vec2, double s2, double s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(double x, Double2 vec1, double w, Double2 vec2, double s2, double s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Double8(double x, Double2 vec1, double w, Double2 vec2, Double2 vec3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(double x, Double2 vec1, double w, Double2 vec2, Double2 vec3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Double8(double x, Double2 vec1, double w, Double3 vec2, double s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(double x, Double2 vec1, double w, Double3 vec2, double s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Double8(double x, Double2 vec1, double w, Double4 vec2) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(double x, Double2 vec1, double w, Double4 vec2) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Double8(double x, Double2 vec1, Double2 vec2, double s1, double s2, double s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(double x, Double2 vec1, Double2 vec2, double s1, double s2, double s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Double8(double x, Double2 vec1, Double2 vec2, double s1, Double2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(double x, Double2 vec1, Double2 vec2, double s1, Double2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Double8(double x, Double2 vec1, Double2 vec2, Double2 vec3, double s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(double x, Double2 vec1, Double2 vec2, Double2 vec3, double s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Double8(double x, Double2 vec1, Double2 vec2, Double3 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(double x, Double2 vec1, Double2 vec2, Double3 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Double8(double x, Double2 vec1, Double3 vec2, double s2, double s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(double x, Double2 vec1, Double3 vec2, double s2, double s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Double8(double x, Double2 vec1, Double3 vec2, Double2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(double x, Double2 vec1, Double3 vec2, Double2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Double8(double x, Double2 vec1, Double4 vec2, double s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(double x, Double2 vec1, Double4 vec2, double s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Double8(double x, Double3 vec1, double s0, double s1, double s2, double s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public void set(double x, Double3 vec1, double s0, double s1, double s2, double s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public Double8(double x, Double3 vec1, double s0, double s1, Double2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, Double3 vec1, double s0, double s1, Double2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, Double3 vec1, double s0, Double2 vec2, double s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(double x, Double3 vec1, double s0, Double2 vec2, double s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(double x, Double3 vec1, double s0, Double3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(double x, Double3 vec1, double s0, Double3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(double x, Double3 vec1, Double2 vec2, double s2, double s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(double x, Double3 vec1, Double2 vec2, double s2, double s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Double8(double x, Double3 vec1, Double2 vec2, Double2 vec3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(double x, Double3 vec1, Double2 vec2, Double2 vec3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Double8(double x, Double3 vec1, Double3 vec2, double s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(double x, Double3 vec1, Double3 vec2, double s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Double8(double x, Double3 vec1, Double4 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(double x, Double3 vec1, Double4 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Double8(double x, Double4 vec1, double s1, double s2, double s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public void set(double x, Double4 vec1, double s1, double s2, double s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public Double8(double x, Double4 vec1, double s1, Double2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(double x, Double4 vec1, double s1, Double2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(double x, Double4 vec1, Double2 vec2, double s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(double x, Double4 vec1, Double2 vec2, double s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(double x, Double4 vec1, Double3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(double x, Double4 vec1, Double3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(Double2 vec1, double z, double w, double s0, double s1, double s2, double s3) {
this(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Double2 vec1, double z, double w, double s0, double s1, double s2, double s3) {
set(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public Double8(Double2 vec1, double z, double w, double s0, double s1, Double2 vec2) {
this(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Double2 vec1, double z, double w, double s0, double s1, Double2 vec2) {
set(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(Double2 vec1, double z, double w, double s0, Double2 vec2, double s3) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Double2 vec1, double z, double w, double s0, Double2 vec2, double s3) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(Double2 vec1, double z, double w, double s0, Double3 vec2) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Double2 vec1, double z, double w, double s0, Double3 vec2) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(Double2 vec1, double z, double w, Double2 vec2, double s2, double s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Double2 vec1, double z, double w, Double2 vec2, double s2, double s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Double8(Double2 vec1, double z, double w, Double2 vec2, Double2 vec3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double2 vec1, double z, double w, Double2 vec2, Double2 vec3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double2 vec1, double z, double w, Double3 vec2, double s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Double2 vec1, double z, double w, Double3 vec2, double s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Double8(Double2 vec1, double z, double w, Double4 vec2) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Double2 vec1, double z, double w, Double4 vec2) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Double8(Double2 vec1, double z, Double2 vec2, double s1, double s2, double s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Double2 vec1, double z, Double2 vec2, double s1, double s2, double s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Double8(Double2 vec1, double z, Double2 vec2, double s1, Double2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double2 vec1, double z, Double2 vec2, double s1, Double2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double2 vec1, double z, Double2 vec2, Double2 vec3, double s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Double2 vec1, double z, Double2 vec2, Double2 vec3, double s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Double8(Double2 vec1, double z, Double2 vec2, Double3 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Double2 vec1, double z, Double2 vec2, Double3 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Double8(Double2 vec1, double z, Double3 vec2, double s2, double s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Double2 vec1, double z, Double3 vec2, double s2, double s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Double8(Double2 vec1, double z, Double3 vec2, Double2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double2 vec1, double z, Double3 vec2, Double2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double2 vec1, double z, Double4 vec2, double s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Double2 vec1, double z, Double4 vec2, double s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Double8(Double2 vec1, Double2 vec2, double s0, double s1, double s2, double s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2, double s0, double s1, double s2, double s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public Double8(Double2 vec1, Double2 vec2, double s0, double s1, Double2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2, double s0, double s1, Double2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double2 vec1, Double2 vec2, double s0, Double2 vec3, double s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2, double s0, Double2 vec3, double s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public Double8(Double2 vec1, Double2 vec2, double s0, Double3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2, double s0, Double3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Double8(Double2 vec1, Double2 vec2, Double2 vec3, double s2, double s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2, Double2 vec3, double s2, double s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public Double8(Double2 vec1, Double2 vec2, Double2 vec3, Double2 vec4) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2, Double2 vec3, Double2 vec4) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public Double8(Double2 vec1, Double2 vec2, Double3 vec3, double s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2, Double3 vec3, double s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public Double8(Double2 vec1, Double2 vec2, Double4 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public void set(Double2 vec1, Double2 vec2, Double4 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public Double8(Double2 vec1, Double3 vec2, double s1, double s2, double s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public void set(Double2 vec1, Double3 vec2, double s1, double s2, double s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public Double8(Double2 vec1, Double3 vec2, double s1, Double2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double2 vec1, Double3 vec2, double s1, Double2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double2 vec1, Double3 vec2, Double2 vec3, double s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Double2 vec1, Double3 vec2, Double2 vec3, double s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public Double8(Double2 vec1, Double3 vec2, Double3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Double2 vec1, Double3 vec2, Double3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Double8(Double2 vec1, Double4 vec2, double s2, double s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public void set(Double2 vec1, Double4 vec2, double s2, double s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public Double8(Double2 vec1, Double4 vec2, Double2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double2 vec1, Double4 vec2, Double2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double3 vec1, double w, double s0, double s1, double s2, double s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Double3 vec1, double w, double s0, double s1, double s2, double s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public Double8(Double3 vec1, double w, double s0, double s1, Double2 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Double3 vec1, double w, double s0, double s1, Double2 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(Double3 vec1, double w, double s0, Double2 vec2, double s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Double3 vec1, double w, double s0, Double2 vec2, double s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(Double3 vec1, double w, double s0, Double3 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Double3 vec1, double w, double s0, Double3 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(Double3 vec1, double w, Double2 vec2, double s2, double s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Double3 vec1, double w, Double2 vec2, double s2, double s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Double8(Double3 vec1, double w, Double2 vec2, Double2 vec3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double3 vec1, double w, Double2 vec2, Double2 vec3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double3 vec1, double w, Double3 vec2, double s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Double3 vec1, double w, Double3 vec2, double s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Double8(Double3 vec1, double w, Double4 vec2) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Double3 vec1, double w, Double4 vec2) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Double8(Double3 vec1, Double2 vec2, double s1, double s2, double s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Double3 vec1, Double2 vec2, double s1, double s2, double s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Double8(Double3 vec1, Double2 vec2, double s1, Double2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double3 vec1, Double2 vec2, double s1, Double2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double3 vec1, Double2 vec2, Double2 vec3, double s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Double3 vec1, Double2 vec2, Double2 vec3, double s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Double8(Double3 vec1, Double2 vec2, Double3 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Double3 vec1, Double2 vec2, Double3 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Double8(Double3 vec1, Double3 vec2, double s2, double s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Double3 vec1, Double3 vec2, double s2, double s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Double8(Double3 vec1, Double3 vec2, Double2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double3 vec1, Double3 vec2, Double2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double3 vec1, Double4 vec2, double s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Double3 vec1, Double4 vec2, double s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Double8(Double4 vec1, double s0, double s1, double s2, double s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Double4 vec1, double s0, double s1, double s2, double s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public Double8(Double4 vec1, double s0, double s1, Double2 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Double4 vec1, double s0, double s1, Double2 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Double8(Double4 vec1, double s0, Double2 vec2, double s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Double4 vec1, double s0, Double2 vec2, double s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Double8(Double4 vec1, double s0, Double3 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Double4 vec1, double s0, Double3 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Double8(Double4 vec1, Double2 vec2, double s2, double s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Double4 vec1, Double2 vec2, double s2, double s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Double8(Double4 vec1, Double2 vec2, Double2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Double4 vec1, Double2 vec2, Double2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Double8(Double4 vec1, Double3 vec2, double s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Double4 vec1, Double3 vec2, double s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Double8(Double4 vec1, Double4 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Double4 vec1, Double4 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Double8(Double8 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public void set(Double8 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public Double8 value() {
return new Double8(this);
}
+ @Translatable
public Double4 lo() {
return new Double4(x, y, z, w);
}
@@ -938,6 +1169,7 @@ public void lo(Double4 result) {
result.w = w;
}
+ @Translatable
public Double4 hi() {
return new Double4(s[0], s[1], s[2], s[3]);
}
@@ -949,6 +1181,7 @@ public void hi(Double4 result) {
result.w = s[3];
}
+ @Translatable
public Double4 odd() {
return new Double4(y, w, s[1], s[3]);
}
@@ -960,6 +1193,7 @@ public void odd(Double4 result) {
result.w = s[3];
}
+ @Translatable
public Double4 even() {
return new Double4(x, z, s[0], s[2]);
}
@@ -971,6 +1205,7 @@ public void even(Double4 result) {
result.w = s[2];
}
+ @Translatable
public Byte8 convertByte8() {
return new Byte8((byte)(x), (byte)(y), (byte)(z), (byte)(w), (byte)(s[0]), (byte)(s[1]), (byte)(s[2]), (byte)(s[3]));
}
@@ -986,6 +1221,7 @@ public void convertByte8(Byte8 result) {
result.s[3] = (byte)(s[3]);
}
+ @Translatable
public Short8 convertShort8() {
return new Short8((short)(x), (short)(y), (short)(z), (short)(w), (short)(s[0]), (short)(s[1]), (short)(s[2]), (short)(s[3]));
}
@@ -1001,6 +1237,7 @@ public void convertShort8(Short8 result) {
result.s[3] = (short)(s[3]);
}
+ @Translatable
public Int8 convertInt8() {
return new Int8((int)(x), (int)(y), (int)(z), (int)(w), (int)(s[0]), (int)(s[1]), (int)(s[2]), (int)(s[3]));
}
@@ -1016,6 +1253,7 @@ public void convertInt8(Int8 result) {
result.s[3] = (int)(s[3]);
}
+ @Translatable
public Long8 convertLong8() {
return new Long8((long)(x), (long)(y), (long)(z), (long)(w), (long)(s[0]), (long)(s[1]), (long)(s[2]), (long)(s[3]));
}
@@ -1031,6 +1269,7 @@ public void convertLong8(Long8 result) {
result.s[3] = (long)(s[3]);
}
+ @Translatable
public Float8 convertFloat8() {
return new Float8((float)(x), (float)(y), (float)(z), (float)(w), (float)(s[0]), (float)(s[1]), (float)(s[2]), (float)(s[3]));
}
@@ -1046,6 +1285,7 @@ public void convertFloat8(Float8 result) {
result.s[3] = (float)(s[3]);
}
+ @Translatable
public Double2 asDouble2() {
return new Double2(x, y);
}
@@ -1055,6 +1295,7 @@ public void asDouble2(Double2 result) {
result.y = y;
}
+ @Translatable
public Double3 asDouble3() {
return new Double3(x, y, z);
}
@@ -1065,6 +1306,7 @@ public void asDouble3(Double3 result) {
result.z = z;
}
+ @Translatable
public Double4 asDouble4() {
return new Double4(x, y, z, w);
}
@@ -1076,6 +1318,7 @@ public void asDouble4(Double4 result) {
result.w = w;
}
+ @Translatable
public static Int8 isEqual(Double8 a, Double8 b) {
return new Int8(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0, a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
}
@@ -1091,6 +1334,7 @@ public static void isEqual(Double8 a, Double8 b, Int8 result) {
result.s[3] = a.s[3] == b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isNotEqual(Double8 a, Double8 b) {
return new Int8(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0, a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
}
@@ -1106,6 +1350,7 @@ public static void isNotEqual(Double8 a, Double8 b, Int8 result) {
result.s[3] = a.s[3] != b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreater(Double8 a, Double8 b) {
return new Int8(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0, a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
}
@@ -1121,6 +1366,7 @@ public static void isGreater(Double8 a, Double8 b, Int8 result) {
result.s[3] = a.s[3] > b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreaterEqual(Double8 a, Double8 b) {
return new Int8(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0, a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
}
@@ -1136,6 +1382,7 @@ public static void isGreaterEqual(Double8 a, Double8 b, Int8 result) {
result.s[3] = a.s[3] >= b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLess(Double8 a, Double8 b) {
return new Int8(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0, a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
}
@@ -1151,6 +1398,7 @@ public static void isLess(Double8 a, Double8 b, Int8 result) {
result.s[3] = a.s[3] < b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLessEqual(Double8 a, Double8 b) {
return new Int8(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0, a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
}
@@ -1166,6 +1414,7 @@ public static void isLessEqual(Double8 a, Double8 b, Int8 result) {
result.s[3] = a.s[3] <= b.s[3]? 1 : 0;
}
+ @Translatable
public static Double8 select(Double8 a, Double8 b, Int8 c) {
return new Double8(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w), Math.select(a.s[0], b.s[0], c.s[0]), Math.select(a.s[1], b.s[1], c.s[1]), Math.select(a.s[2], b.s[2], c.s[2]), Math.select(a.s[3], b.s[3], c.s[3]));
}
@@ -1181,6 +1430,7 @@ public static void select(Double8 a, Double8 b, Int8 c, Double8 result) {
result.s[3] = Math.select(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Int8 isFinite(Double8 a) {
return new Int8(Math.isFinite(a.x), Math.isFinite(a.y), Math.isFinite(a.z), Math.isFinite(a.w), Math.isFinite(a.s[0]), Math.isFinite(a.s[1]), Math.isFinite(a.s[2]), Math.isFinite(a.s[3]));
}
@@ -1196,6 +1446,7 @@ public static void isFinite(Double8 a, Int8 result) {
result.s[3] = Math.isFinite(a.s[3]);
}
+ @Translatable
public static Int8 isInf(Double8 a) {
return new Int8(Math.isInf(a.x), Math.isInf(a.y), Math.isInf(a.z), Math.isInf(a.w), Math.isInf(a.s[0]), Math.isInf(a.s[1]), Math.isInf(a.s[2]), Math.isInf(a.s[3]));
}
@@ -1211,6 +1462,7 @@ public static void isInf(Double8 a, Int8 result) {
result.s[3] = Math.isInf(a.s[3]);
}
+ @Translatable
public static Int8 isNaN(Double8 a) {
return new Int8(Math.isNaN(a.x), Math.isNaN(a.y), Math.isNaN(a.z), Math.isNaN(a.w), Math.isNaN(a.s[0]), Math.isNaN(a.s[1]), Math.isNaN(a.s[2]), Math.isNaN(a.s[3]));
}
@@ -1226,6 +1478,7 @@ public static void isNaN(Double8 a, Int8 result) {
result.s[3] = Math.isNaN(a.s[3]);
}
+ @Translatable
public static Int8 isNormal(Double8 a) {
return new Int8(Math.isNormal(a.x), Math.isNormal(a.y), Math.isNormal(a.z), Math.isNormal(a.w), Math.isNormal(a.s[0]), Math.isNormal(a.s[1]), Math.isNormal(a.s[2]), Math.isNormal(a.s[3]));
}
@@ -1241,6 +1494,7 @@ public static void isNormal(Double8 a, Int8 result) {
result.s[3] = Math.isNormal(a.s[3]);
}
+ @Translatable
public static Int8 isOrdered(Double8 a, Double8 b) {
return new Int8(Math.isOrdered(a.x, b.x), Math.isOrdered(a.y, b.y), Math.isOrdered(a.z, b.z), Math.isOrdered(a.w, b.w), Math.isOrdered(a.s[0], b.s[0]), Math.isOrdered(a.s[1], b.s[1]), Math.isOrdered(a.s[2], b.s[2]), Math.isOrdered(a.s[3], b.s[3]));
}
@@ -1256,6 +1510,7 @@ public static void isOrdered(Double8 a, Double8 b, Int8 result) {
result.s[3] = Math.isOrdered(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 isUnordered(Double8 a, Double8 b) {
return new Int8(Math.isUnordered(a.x, b.x), Math.isUnordered(a.y, b.y), Math.isUnordered(a.z, b.z), Math.isUnordered(a.w, b.w), Math.isUnordered(a.s[0], b.s[0]), Math.isUnordered(a.s[1], b.s[1]), Math.isUnordered(a.s[2], b.s[2]), Math.isUnordered(a.s[3], b.s[3]));
}
@@ -1271,14 +1526,17 @@ public static void isUnordered(Double8 a, Double8 b, Int8 result) {
result.s[3] = Math.isUnordered(a.s[3], b.s[3]);
}
+ @Translatable
public static int any(Double8 a) {
return (a.x != 0.0 || a.y != 0.0 || a.z != 0.0 || a.w != 0.0 || a.s[0] != 0.0 || a.s[1] != 0.0 || a.s[2] != 0.0 || a.s[3] != 0.0)? 1 : 0;
}
+ @Translatable
public static int all(Double8 a) {
return (a.x == 0.0 || a.y == 0.0 || a.z == 0.0 || a.w == 0.0 || a.s[0] == 0.0 || a.s[1] == 0.0 || a.s[2] == 0.0 || a.s[3] == 0.0)? 0 : 1;
}
+ @Translatable
public static Double8 neg(Double8 a) {
return new Double8((double)(-a.x), (double)(-a.y), (double)(-a.z), (double)(-a.w), (double)(-a.s[0]), (double)(-a.s[1]), (double)(-a.s[2]), (double)(-a.s[3]));
}
@@ -1294,6 +1552,7 @@ public static void neg(Double8 a, Double8 result) {
result.s[3] = (double)(-a.s[3]);
}
+ @Translatable
public static Double8 add(Double8 a, Double8 b) {
return new Double8((double)(a.x + b.x), (double)(a.y + b.y), (double)(a.z + b.z), (double)(a.w + b.w), (double)(a.s[0] + b.s[0]), (double)(a.s[1] + b.s[1]), (double)(a.s[2] + b.s[2]), (double)(a.s[3] + b.s[3]));
}
@@ -1309,6 +1568,7 @@ public static void add(Double8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] + b.s[3]);
}
+ @Translatable
public static Double8 sub(Double8 a, Double8 b) {
return new Double8((double)(a.x - b.x), (double)(a.y - b.y), (double)(a.z - b.z), (double)(a.w - b.w), (double)(a.s[0] - b.s[0]), (double)(a.s[1] - b.s[1]), (double)(a.s[2] - b.s[2]), (double)(a.s[3] - b.s[3]));
}
@@ -1324,6 +1584,7 @@ public static void sub(Double8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] - b.s[3]);
}
+ @Translatable
public static Double8 mul(Double8 a, Double8 b) {
return new Double8((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w), (double)(a.s[0] * b.s[0]), (double)(a.s[1] * b.s[1]), (double)(a.s[2] * b.s[2]), (double)(a.s[3] * b.s[3]));
}
@@ -1339,6 +1600,7 @@ public static void mul(Double8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Double8 mul(Double8 a, double k) {
return new Double8((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k), (double)(a.s[0] * k), (double)(a.s[1] * k), (double)(a.s[2] * k), (double)(a.s[3] * k));
}
@@ -1354,6 +1616,7 @@ public static void mul(Double8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] * k);
}
+ @Translatable
public static Float8 mul(Double8 a, Float8 b) {
return new Float8((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w), (float)(a.s[0] * b.s[0]), (float)(a.s[1] * b.s[1]), (float)(a.s[2] * b.s[2]), (float)(a.s[3] * b.s[3]));
}
@@ -1369,6 +1632,7 @@ public static void mul(Double8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Float8 mul(Double8 a, float k) {
return new Float8((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k), (float)(a.s[0] * k), (float)(a.s[1] * k), (float)(a.s[2] * k), (float)(a.s[3] * k));
}
@@ -1384,6 +1648,7 @@ public static void mul(Double8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] * k);
}
+ @Translatable
public static Double8 div(Double8 a, Double8 b) {
return new Double8((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w), (double)(a.s[0] / b.s[0]), (double)(a.s[1] / b.s[1]), (double)(a.s[2] / b.s[2]), (double)(a.s[3] / b.s[3]));
}
@@ -1399,6 +1664,7 @@ public static void div(Double8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Double8 div(Double8 a, double k) {
return new Double8((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k), (double)(a.s[0] / k), (double)(a.s[1] / k), (double)(a.s[2] / k), (double)(a.s[3] / k));
}
@@ -1414,6 +1680,7 @@ public static void div(Double8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] / k);
}
+ @Translatable
public static Float8 div(Double8 a, Float8 b) {
return new Float8((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w), (float)(a.s[0] / b.s[0]), (float)(a.s[1] / b.s[1]), (float)(a.s[2] / b.s[2]), (float)(a.s[3] / b.s[3]));
}
@@ -1429,6 +1696,7 @@ public static void div(Double8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Float8 div(Double8 a, float k) {
return new Float8((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k), (float)(a.s[0] / k), (float)(a.s[1] / k), (float)(a.s[2] / k), (float)(a.s[3] / k));
}
@@ -1444,23 +1712,28 @@ public static void div(Double8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] / k);
}
+ @Translatable
public static double dot(Double8 a, Double8 b) {
return (double)(a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w + a.s[0] * b.s[0] + a.s[1] * b.s[1] + a.s[2] * b.s[2] + a.s[3] * b.s[3]);
}
+ @Translatable
public static double distance(Double8 a, Double8 b) {
return distance(a, b, new Double8());
}
+ @Translatable
public static double distance(Double8 a, Double8 b, Double8 tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(Double8 a) {
return Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w + a.s[0] * a.s[0] + a.s[1] * a.s[1] + a.s[2] * a.s[2] + a.s[3] * a.s[3]);
}
+ @Translatable
public static Double8 normalize(Double8 a) {
Double8 result = new Double8();
normalize(a, result);
@@ -1479,6 +1752,7 @@ public static void normalize(Double8 a, Double8 result) {
result.s[3] = (double)(a.s[3] / len);
}
+ @Translatable
public static Double8 abs(Double8 a) {
return new Double8(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w), Math.abs(a.s[0]), Math.abs(a.s[1]), Math.abs(a.s[2]), Math.abs(a.s[3]));
}
@@ -1494,6 +1768,7 @@ public static void abs(Double8 a, Double8 result) {
result.s[3] = Math.abs(a.s[3]);
}
+ @Translatable
public static Double8 clamp(Double8 a, Double8 b, Double8 c) {
return new Double8(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w), Math.clamp(a.s[0], b.s[0], c.s[0]), Math.clamp(a.s[1], b.s[1], c.s[1]), Math.clamp(a.s[2], b.s[2], c.s[2]), Math.clamp(a.s[3], b.s[3], c.s[3]));
}
@@ -1509,6 +1784,7 @@ public static void clamp(Double8 a, Double8 b, Double8 c, Double8 result) {
result.s[3] = Math.clamp(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Double8 max(Double8 a, Double8 b) {
return new Double8(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w), Math.max(a.s[0], b.s[0]), Math.max(a.s[1], b.s[1]), Math.max(a.s[2], b.s[2]), Math.max(a.s[3], b.s[3]));
}
@@ -1524,6 +1800,7 @@ public static void max(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.max(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 maxMag(Double8 a, Double8 b) {
return new Double8(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w), Math.maxMag(a.s[0], b.s[0]), Math.maxMag(a.s[1], b.s[1]), Math.maxMag(a.s[2], b.s[2]), Math.maxMag(a.s[3], b.s[3]));
}
@@ -1539,6 +1816,7 @@ public static void maxMag(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.maxMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 min(Double8 a, Double8 b) {
return new Double8(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w), Math.min(a.s[0], b.s[0]), Math.min(a.s[1], b.s[1]), Math.min(a.s[2], b.s[2]), Math.min(a.s[3], b.s[3]));
}
@@ -1554,6 +1832,7 @@ public static void min(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.min(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 minMag(Double8 a, Double8 b) {
return new Double8(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w), Math.minMag(a.s[0], b.s[0]), Math.minMag(a.s[1], b.s[1]), Math.minMag(a.s[2], b.s[2]), Math.minMag(a.s[3], b.s[3]));
}
@@ -1569,6 +1848,7 @@ public static void minMag(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.minMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 mix(Double8 a, Double8 b, Double8 c) {
return new Double8(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w), Math.mix(a.s[0], b.s[0], c.s[0]), Math.mix(a.s[1], b.s[1], c.s[1]), Math.mix(a.s[2], b.s[2], c.s[2]), Math.mix(a.s[3], b.s[3], c.s[3]));
}
@@ -1584,6 +1864,7 @@ public static void mix(Double8 a, Double8 b, Double8 c, Double8 result) {
result.s[3] = Math.mix(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Double8 clamp(Double8 v, double min, double max) {
return new Double8(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max), Math.clamp(v.s[0], min, max), Math.clamp(v.s[1], min, max), Math.clamp(v.s[2], min, max), Math.clamp(v.s[3], min, max));
}
@@ -1599,6 +1880,7 @@ public static void clamp(Double8 v, double min, double max, Double8 result) {
result.s[3] = Math.clamp(v.s[3], min, max);
}
+ @Translatable
public static Double8 max(Double8 x, double y) {
return new Double8(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y), Math.max(x.s[0], y), Math.max(x.s[1], y), Math.max(x.s[2], y), Math.max(x.s[3], y));
}
@@ -1614,6 +1896,7 @@ public static void max(Double8 x, double y, Double8 result) {
result.s[3] = Math.max(x.s[3], y);
}
+ @Translatable
public static Double8 min(Double8 x, double y) {
return new Double8(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y), Math.min(x.s[0], y), Math.min(x.s[1], y), Math.min(x.s[2], y), Math.min(x.s[3], y));
}
@@ -1629,6 +1912,7 @@ public static void min(Double8 x, double y, Double8 result) {
result.s[3] = Math.min(x.s[3], y);
}
+ @Translatable
public static Double8 mix(Double8 x, Double8 y, double a) {
return new Double8(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a), Math.mix(x.s[0], y.s[0], a), Math.mix(x.s[1], y.s[1], a), Math.mix(x.s[2], y.s[2], a), Math.mix(x.s[3], y.s[3], a));
}
@@ -1644,6 +1928,7 @@ public static void mix(Double8 x, Double8 y, double a, Double8 result) {
result.s[3] = Math.mix(x.s[3], y.s[3], a);
}
+ @Translatable
public static Double8 acos(Double8 a) {
return new Double8(Math.acos(a.x), Math.acos(a.y), Math.acos(a.z), Math.acos(a.w), Math.acos(a.s[0]), Math.acos(a.s[1]), Math.acos(a.s[2]), Math.acos(a.s[3]));
}
@@ -1659,6 +1944,7 @@ public static void acos(Double8 a, Double8 result) {
result.s[3] = Math.acos(a.s[3]);
}
+ @Translatable
public static Double8 acosh(Double8 a) {
return new Double8(Math.acosh(a.x), Math.acosh(a.y), Math.acosh(a.z), Math.acosh(a.w), Math.acosh(a.s[0]), Math.acosh(a.s[1]), Math.acosh(a.s[2]), Math.acosh(a.s[3]));
}
@@ -1674,6 +1960,7 @@ public static void acosh(Double8 a, Double8 result) {
result.s[3] = Math.acosh(a.s[3]);
}
+ @Translatable
public static Double8 asin(Double8 a) {
return new Double8(Math.asin(a.x), Math.asin(a.y), Math.asin(a.z), Math.asin(a.w), Math.asin(a.s[0]), Math.asin(a.s[1]), Math.asin(a.s[2]), Math.asin(a.s[3]));
}
@@ -1689,6 +1976,7 @@ public static void asin(Double8 a, Double8 result) {
result.s[3] = Math.asin(a.s[3]);
}
+ @Translatable
public static Double8 asinh(Double8 a) {
return new Double8(Math.asinh(a.x), Math.asinh(a.y), Math.asinh(a.z), Math.asinh(a.w), Math.asinh(a.s[0]), Math.asinh(a.s[1]), Math.asinh(a.s[2]), Math.asinh(a.s[3]));
}
@@ -1704,6 +1992,7 @@ public static void asinh(Double8 a, Double8 result) {
result.s[3] = Math.asinh(a.s[3]);
}
+ @Translatable
public static Double8 atan(Double8 a) {
return new Double8(Math.atan(a.x), Math.atan(a.y), Math.atan(a.z), Math.atan(a.w), Math.atan(a.s[0]), Math.atan(a.s[1]), Math.atan(a.s[2]), Math.atan(a.s[3]));
}
@@ -1719,6 +2008,7 @@ public static void atan(Double8 a, Double8 result) {
result.s[3] = Math.atan(a.s[3]);
}
+ @Translatable
public static Double8 atan2(Double8 a, Double8 b) {
return new Double8(Math.atan2(a.x, b.x), Math.atan2(a.y, b.y), Math.atan2(a.z, b.z), Math.atan2(a.w, b.w), Math.atan2(a.s[0], b.s[0]), Math.atan2(a.s[1], b.s[1]), Math.atan2(a.s[2], b.s[2]), Math.atan2(a.s[3], b.s[3]));
}
@@ -1734,6 +2024,7 @@ public static void atan2(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.atan2(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 atanh(Double8 a) {
return new Double8(Math.atanh(a.x), Math.atanh(a.y), Math.atanh(a.z), Math.atanh(a.w), Math.atanh(a.s[0]), Math.atanh(a.s[1]), Math.atanh(a.s[2]), Math.atanh(a.s[3]));
}
@@ -1749,6 +2040,7 @@ public static void atanh(Double8 a, Double8 result) {
result.s[3] = Math.atanh(a.s[3]);
}
+ @Translatable
public static Double8 cbrt(Double8 a) {
return new Double8(Math.cbrt(a.x), Math.cbrt(a.y), Math.cbrt(a.z), Math.cbrt(a.w), Math.cbrt(a.s[0]), Math.cbrt(a.s[1]), Math.cbrt(a.s[2]), Math.cbrt(a.s[3]));
}
@@ -1764,6 +2056,7 @@ public static void cbrt(Double8 a, Double8 result) {
result.s[3] = Math.cbrt(a.s[3]);
}
+ @Translatable
public static Double8 ceil(Double8 a) {
return new Double8(Math.ceil(a.x), Math.ceil(a.y), Math.ceil(a.z), Math.ceil(a.w), Math.ceil(a.s[0]), Math.ceil(a.s[1]), Math.ceil(a.s[2]), Math.ceil(a.s[3]));
}
@@ -1779,6 +2072,7 @@ public static void ceil(Double8 a, Double8 result) {
result.s[3] = Math.ceil(a.s[3]);
}
+ @Translatable
public static Double8 copySign(Double8 a, Double8 b) {
return new Double8(Math.copySign(a.x, b.x), Math.copySign(a.y, b.y), Math.copySign(a.z, b.z), Math.copySign(a.w, b.w), Math.copySign(a.s[0], b.s[0]), Math.copySign(a.s[1], b.s[1]), Math.copySign(a.s[2], b.s[2]), Math.copySign(a.s[3], b.s[3]));
}
@@ -1794,6 +2088,7 @@ public static void copySign(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.copySign(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 cos(Double8 a) {
return new Double8(Math.cos(a.x), Math.cos(a.y), Math.cos(a.z), Math.cos(a.w), Math.cos(a.s[0]), Math.cos(a.s[1]), Math.cos(a.s[2]), Math.cos(a.s[3]));
}
@@ -1809,6 +2104,7 @@ public static void cos(Double8 a, Double8 result) {
result.s[3] = Math.cos(a.s[3]);
}
+ @Translatable
public static Double8 cosh(Double8 a) {
return new Double8(Math.cosh(a.x), Math.cosh(a.y), Math.cosh(a.z), Math.cosh(a.w), Math.cosh(a.s[0]), Math.cosh(a.s[1]), Math.cosh(a.s[2]), Math.cosh(a.s[3]));
}
@@ -1824,6 +2120,7 @@ public static void cosh(Double8 a, Double8 result) {
result.s[3] = Math.cosh(a.s[3]);
}
+ @Translatable
public static Double8 erf(Double8 a) {
return new Double8(Math.erf(a.x), Math.erf(a.y), Math.erf(a.z), Math.erf(a.w), Math.erf(a.s[0]), Math.erf(a.s[1]), Math.erf(a.s[2]), Math.erf(a.s[3]));
}
@@ -1839,6 +2136,7 @@ public static void erf(Double8 a, Double8 result) {
result.s[3] = Math.erf(a.s[3]);
}
+ @Translatable
public static Double8 erfc(Double8 a) {
return new Double8(Math.erfc(a.x), Math.erfc(a.y), Math.erfc(a.z), Math.erfc(a.w), Math.erfc(a.s[0]), Math.erfc(a.s[1]), Math.erfc(a.s[2]), Math.erfc(a.s[3]));
}
@@ -1854,6 +2152,7 @@ public static void erfc(Double8 a, Double8 result) {
result.s[3] = Math.erfc(a.s[3]);
}
+ @Translatable
public static Double8 exp(Double8 a) {
return new Double8(Math.exp(a.x), Math.exp(a.y), Math.exp(a.z), Math.exp(a.w), Math.exp(a.s[0]), Math.exp(a.s[1]), Math.exp(a.s[2]), Math.exp(a.s[3]));
}
@@ -1869,6 +2168,7 @@ public static void exp(Double8 a, Double8 result) {
result.s[3] = Math.exp(a.s[3]);
}
+ @Translatable
public static Double8 exp10(Double8 a) {
return new Double8(Math.exp10(a.x), Math.exp10(a.y), Math.exp10(a.z), Math.exp10(a.w), Math.exp10(a.s[0]), Math.exp10(a.s[1]), Math.exp10(a.s[2]), Math.exp10(a.s[3]));
}
@@ -1884,6 +2184,7 @@ public static void exp10(Double8 a, Double8 result) {
result.s[3] = Math.exp10(a.s[3]);
}
+ @Translatable
public static Double8 exp2(Double8 a) {
return new Double8(Math.exp2(a.x), Math.exp2(a.y), Math.exp2(a.z), Math.exp2(a.w), Math.exp2(a.s[0]), Math.exp2(a.s[1]), Math.exp2(a.s[2]), Math.exp2(a.s[3]));
}
@@ -1899,6 +2200,7 @@ public static void exp2(Double8 a, Double8 result) {
result.s[3] = Math.exp2(a.s[3]);
}
+ @Translatable
public static Double8 expm1(Double8 a) {
return new Double8(Math.expm1(a.x), Math.expm1(a.y), Math.expm1(a.z), Math.expm1(a.w), Math.expm1(a.s[0]), Math.expm1(a.s[1]), Math.expm1(a.s[2]), Math.expm1(a.s[3]));
}
@@ -1914,6 +2216,7 @@ public static void expm1(Double8 a, Double8 result) {
result.s[3] = Math.expm1(a.s[3]);
}
+ @Translatable
public static Double8 fdim(Double8 a, Double8 b) {
return new Double8(Math.fdim(a.x, b.x), Math.fdim(a.y, b.y), Math.fdim(a.z, b.z), Math.fdim(a.w, b.w), Math.fdim(a.s[0], b.s[0]), Math.fdim(a.s[1], b.s[1]), Math.fdim(a.s[2], b.s[2]), Math.fdim(a.s[3], b.s[3]));
}
@@ -1929,6 +2232,7 @@ public static void fdim(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.fdim(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 floor(Double8 a) {
return new Double8(Math.floor(a.x), Math.floor(a.y), Math.floor(a.z), Math.floor(a.w), Math.floor(a.s[0]), Math.floor(a.s[1]), Math.floor(a.s[2]), Math.floor(a.s[3]));
}
@@ -1944,6 +2248,7 @@ public static void floor(Double8 a, Double8 result) {
result.s[3] = Math.floor(a.s[3]);
}
+ @Translatable
public static Double8 fma(Double8 a, Double8 b, Double8 c) {
return new Double8(Math.fma(a.x, b.x, c.x), Math.fma(a.y, b.y, c.y), Math.fma(a.z, b.z, c.z), Math.fma(a.w, b.w, c.w), Math.fma(a.s[0], b.s[0], c.s[0]), Math.fma(a.s[1], b.s[1], c.s[1]), Math.fma(a.s[2], b.s[2], c.s[2]), Math.fma(a.s[3], b.s[3], c.s[3]));
}
@@ -1959,6 +2264,7 @@ public static void fma(Double8 a, Double8 b, Double8 c, Double8 result) {
result.s[3] = Math.fma(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Double8 fmod(Double8 a, Double8 b) {
return new Double8(Math.fmod(a.x, b.x), Math.fmod(a.y, b.y), Math.fmod(a.z, b.z), Math.fmod(a.w, b.w), Math.fmod(a.s[0], b.s[0]), Math.fmod(a.s[1], b.s[1]), Math.fmod(a.s[2], b.s[2]), Math.fmod(a.s[3], b.s[3]));
}
@@ -1974,6 +2280,7 @@ public static void fmod(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.fmod(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 fract(Double8 a) {
return new Double8(Math.fract(a.x), Math.fract(a.y), Math.fract(a.z), Math.fract(a.w), Math.fract(a.s[0]), Math.fract(a.s[1]), Math.fract(a.s[2]), Math.fract(a.s[3]));
}
@@ -1989,6 +2296,7 @@ public static void fract(Double8 a, Double8 result) {
result.s[3] = Math.fract(a.s[3]);
}
+ @Translatable
public static Double8 frexp(Double8 a) {
return new Double8(Math.frexp(a.x), Math.frexp(a.y), Math.frexp(a.z), Math.frexp(a.w), Math.frexp(a.s[0]), Math.frexp(a.s[1]), Math.frexp(a.s[2]), Math.frexp(a.s[3]));
}
@@ -2004,6 +2312,7 @@ public static void frexp(Double8 a, Double8 result) {
result.s[3] = Math.frexp(a.s[3]);
}
+ @Translatable
public static Double8 getExponent(Double8 a) {
return new Double8(Math.getExponent(a.x), Math.getExponent(a.y), Math.getExponent(a.z), Math.getExponent(a.w), Math.getExponent(a.s[0]), Math.getExponent(a.s[1]), Math.getExponent(a.s[2]), Math.getExponent(a.s[3]));
}
@@ -2019,6 +2328,7 @@ public static void getExponent(Double8 a, Double8 result) {
result.s[3] = Math.getExponent(a.s[3]);
}
+ @Translatable
public static Double8 hypot(Double8 a, Double8 b) {
return new Double8(Math.hypot(a.x, b.x), Math.hypot(a.y, b.y), Math.hypot(a.z, b.z), Math.hypot(a.w, b.w), Math.hypot(a.s[0], b.s[0]), Math.hypot(a.s[1], b.s[1]), Math.hypot(a.s[2], b.s[2]), Math.hypot(a.s[3], b.s[3]));
}
@@ -2034,6 +2344,7 @@ public static void hypot(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.hypot(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 lgamma(Double8 a) {
return new Double8(Math.lgamma(a.x), Math.lgamma(a.y), Math.lgamma(a.z), Math.lgamma(a.w), Math.lgamma(a.s[0]), Math.lgamma(a.s[1]), Math.lgamma(a.s[2]), Math.lgamma(a.s[3]));
}
@@ -2049,6 +2360,7 @@ public static void lgamma(Double8 a, Double8 result) {
result.s[3] = Math.lgamma(a.s[3]);
}
+ @Translatable
public static Double8 log(Double8 a) {
return new Double8(Math.log(a.x), Math.log(a.y), Math.log(a.z), Math.log(a.w), Math.log(a.s[0]), Math.log(a.s[1]), Math.log(a.s[2]), Math.log(a.s[3]));
}
@@ -2064,6 +2376,7 @@ public static void log(Double8 a, Double8 result) {
result.s[3] = Math.log(a.s[3]);
}
+ @Translatable
public static Double8 log10(Double8 a) {
return new Double8(Math.log10(a.x), Math.log10(a.y), Math.log10(a.z), Math.log10(a.w), Math.log10(a.s[0]), Math.log10(a.s[1]), Math.log10(a.s[2]), Math.log10(a.s[3]));
}
@@ -2079,6 +2392,7 @@ public static void log10(Double8 a, Double8 result) {
result.s[3] = Math.log10(a.s[3]);
}
+ @Translatable
public static Double8 log1p(Double8 a) {
return new Double8(Math.log1p(a.x), Math.log1p(a.y), Math.log1p(a.z), Math.log1p(a.w), Math.log1p(a.s[0]), Math.log1p(a.s[1]), Math.log1p(a.s[2]), Math.log1p(a.s[3]));
}
@@ -2094,6 +2408,7 @@ public static void log1p(Double8 a, Double8 result) {
result.s[3] = Math.log1p(a.s[3]);
}
+ @Translatable
public static Double8 log2(Double8 a) {
return new Double8(Math.log2(a.x), Math.log2(a.y), Math.log2(a.z), Math.log2(a.w), Math.log2(a.s[0]), Math.log2(a.s[1]), Math.log2(a.s[2]), Math.log2(a.s[3]));
}
@@ -2109,6 +2424,7 @@ public static void log2(Double8 a, Double8 result) {
result.s[3] = Math.log2(a.s[3]);
}
+ @Translatable
public static Double8 logb(Double8 a) {
return new Double8(Math.logb(a.x), Math.logb(a.y), Math.logb(a.z), Math.logb(a.w), Math.logb(a.s[0]), Math.logb(a.s[1]), Math.logb(a.s[2]), Math.logb(a.s[3]));
}
@@ -2124,6 +2440,7 @@ public static void logb(Double8 a, Double8 result) {
result.s[3] = Math.logb(a.s[3]);
}
+ @Translatable
public static Double8 mad(Double8 a, Double8 b, Double8 c) {
return new Double8(Math.mad(a.x, b.x, c.x), Math.mad(a.y, b.y, c.y), Math.mad(a.z, b.z, c.z), Math.mad(a.w, b.w, c.w), Math.mad(a.s[0], b.s[0], c.s[0]), Math.mad(a.s[1], b.s[1], c.s[1]), Math.mad(a.s[2], b.s[2], c.s[2]), Math.mad(a.s[3], b.s[3], c.s[3]));
}
@@ -2139,6 +2456,7 @@ public static void mad(Double8 a, Double8 b, Double8 c, Double8 result) {
result.s[3] = Math.mad(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Double8 nextAfter(Double8 a, Double8 b) {
return new Double8(Math.nextAfter(a.x, b.x), Math.nextAfter(a.y, b.y), Math.nextAfter(a.z, b.z), Math.nextAfter(a.w, b.w), Math.nextAfter(a.s[0], b.s[0]), Math.nextAfter(a.s[1], b.s[1]), Math.nextAfter(a.s[2], b.s[2]), Math.nextAfter(a.s[3], b.s[3]));
}
@@ -2154,6 +2472,7 @@ public static void nextAfter(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.nextAfter(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 pow(Double8 a, Double8 b) {
return new Double8(Math.pow(a.x, b.x), Math.pow(a.y, b.y), Math.pow(a.z, b.z), Math.pow(a.w, b.w), Math.pow(a.s[0], b.s[0]), Math.pow(a.s[1], b.s[1]), Math.pow(a.s[2], b.s[2]), Math.pow(a.s[3], b.s[3]));
}
@@ -2169,6 +2488,7 @@ public static void pow(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.pow(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 powr(Double8 a, Double8 b) {
return new Double8(Math.powr(a.x, b.x), Math.powr(a.y, b.y), Math.powr(a.z, b.z), Math.powr(a.w, b.w), Math.powr(a.s[0], b.s[0]), Math.powr(a.s[1], b.s[1]), Math.powr(a.s[2], b.s[2]), Math.powr(a.s[3], b.s[3]));
}
@@ -2184,6 +2504,7 @@ public static void powr(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.powr(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 remainder(Double8 a, Double8 b) {
return new Double8(Math.remainder(a.x, b.x), Math.remainder(a.y, b.y), Math.remainder(a.z, b.z), Math.remainder(a.w, b.w), Math.remainder(a.s[0], b.s[0]), Math.remainder(a.s[1], b.s[1]), Math.remainder(a.s[2], b.s[2]), Math.remainder(a.s[3], b.s[3]));
}
@@ -2199,6 +2520,7 @@ public static void remainder(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.remainder(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 rint(Double8 a) {
return new Double8(Math.rint(a.x), Math.rint(a.y), Math.rint(a.z), Math.rint(a.w), Math.rint(a.s[0]), Math.rint(a.s[1]), Math.rint(a.s[2]), Math.rint(a.s[3]));
}
@@ -2214,6 +2536,7 @@ public static void rint(Double8 a, Double8 result) {
result.s[3] = Math.rint(a.s[3]);
}
+ @Translatable
public static Double8 round(Double8 a) {
return new Double8(Math.round(a.x), Math.round(a.y), Math.round(a.z), Math.round(a.w), Math.round(a.s[0]), Math.round(a.s[1]), Math.round(a.s[2]), Math.round(a.s[3]));
}
@@ -2229,6 +2552,7 @@ public static void round(Double8 a, Double8 result) {
result.s[3] = Math.round(a.s[3]);
}
+ @Translatable
public static Double8 rsqrt(Double8 a) {
return new Double8(Math.rsqrt(a.x), Math.rsqrt(a.y), Math.rsqrt(a.z), Math.rsqrt(a.w), Math.rsqrt(a.s[0]), Math.rsqrt(a.s[1]), Math.rsqrt(a.s[2]), Math.rsqrt(a.s[3]));
}
@@ -2244,6 +2568,7 @@ public static void rsqrt(Double8 a, Double8 result) {
result.s[3] = Math.rsqrt(a.s[3]);
}
+ @Translatable
public static Double8 signum(Double8 a) {
return new Double8(Math.signum(a.x), Math.signum(a.y), Math.signum(a.z), Math.signum(a.w), Math.signum(a.s[0]), Math.signum(a.s[1]), Math.signum(a.s[2]), Math.signum(a.s[3]));
}
@@ -2259,6 +2584,7 @@ public static void signum(Double8 a, Double8 result) {
result.s[3] = Math.signum(a.s[3]);
}
+ @Translatable
public static Double8 sin(Double8 a) {
return new Double8(Math.sin(a.x), Math.sin(a.y), Math.sin(a.z), Math.sin(a.w), Math.sin(a.s[0]), Math.sin(a.s[1]), Math.sin(a.s[2]), Math.sin(a.s[3]));
}
@@ -2274,6 +2600,7 @@ public static void sin(Double8 a, Double8 result) {
result.s[3] = Math.sin(a.s[3]);
}
+ @Translatable
public static Double8 sinh(Double8 a) {
return new Double8(Math.sinh(a.x), Math.sinh(a.y), Math.sinh(a.z), Math.sinh(a.w), Math.sinh(a.s[0]), Math.sinh(a.s[1]), Math.sinh(a.s[2]), Math.sinh(a.s[3]));
}
@@ -2289,6 +2616,7 @@ public static void sinh(Double8 a, Double8 result) {
result.s[3] = Math.sinh(a.s[3]);
}
+ @Translatable
public static Double8 smoothStep(Double8 a, Double8 b, Double8 c) {
return new Double8(Math.smoothStep(a.x, b.x, c.x), Math.smoothStep(a.y, b.y, c.y), Math.smoothStep(a.z, b.z, c.z), Math.smoothStep(a.w, b.w, c.w), Math.smoothStep(a.s[0], b.s[0], c.s[0]), Math.smoothStep(a.s[1], b.s[1], c.s[1]), Math.smoothStep(a.s[2], b.s[2], c.s[2]), Math.smoothStep(a.s[3], b.s[3], c.s[3]));
}
@@ -2304,6 +2632,7 @@ public static void smoothStep(Double8 a, Double8 b, Double8 c, Double8 result) {
result.s[3] = Math.smoothStep(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Double8 sqrt(Double8 a) {
return new Double8(Math.sqrt(a.x), Math.sqrt(a.y), Math.sqrt(a.z), Math.sqrt(a.w), Math.sqrt(a.s[0]), Math.sqrt(a.s[1]), Math.sqrt(a.s[2]), Math.sqrt(a.s[3]));
}
@@ -2319,6 +2648,7 @@ public static void sqrt(Double8 a, Double8 result) {
result.s[3] = Math.sqrt(a.s[3]);
}
+ @Translatable
public static Double8 step(Double8 a, Double8 b) {
return new Double8(Math.step(a.x, b.x), Math.step(a.y, b.y), Math.step(a.z, b.z), Math.step(a.w, b.w), Math.step(a.s[0], b.s[0]), Math.step(a.s[1], b.s[1]), Math.step(a.s[2], b.s[2]), Math.step(a.s[3], b.s[3]));
}
@@ -2334,6 +2664,7 @@ public static void step(Double8 a, Double8 b, Double8 result) {
result.s[3] = Math.step(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 tan(Double8 a) {
return new Double8(Math.tan(a.x), Math.tan(a.y), Math.tan(a.z), Math.tan(a.w), Math.tan(a.s[0]), Math.tan(a.s[1]), Math.tan(a.s[2]), Math.tan(a.s[3]));
}
@@ -2349,6 +2680,7 @@ public static void tan(Double8 a, Double8 result) {
result.s[3] = Math.tan(a.s[3]);
}
+ @Translatable
public static Double8 tanh(Double8 a) {
return new Double8(Math.tanh(a.x), Math.tanh(a.y), Math.tanh(a.z), Math.tanh(a.w), Math.tanh(a.s[0]), Math.tanh(a.s[1]), Math.tanh(a.s[2]), Math.tanh(a.s[3]));
}
@@ -2364,6 +2696,7 @@ public static void tanh(Double8 a, Double8 result) {
result.s[3] = Math.tanh(a.s[3]);
}
+ @Translatable
public static Double8 tgamma(Double8 a) {
return new Double8(Math.tgamma(a.x), Math.tgamma(a.y), Math.tgamma(a.z), Math.tgamma(a.w), Math.tgamma(a.s[0]), Math.tgamma(a.s[1]), Math.tgamma(a.s[2]), Math.tgamma(a.s[3]));
}
@@ -2379,6 +2712,7 @@ public static void tgamma(Double8 a, Double8 result) {
result.s[3] = Math.tgamma(a.s[3]);
}
+ @Translatable
public static Double8 toDegrees(Double8 a) {
return new Double8(Math.toDegrees(a.x), Math.toDegrees(a.y), Math.toDegrees(a.z), Math.toDegrees(a.w), Math.toDegrees(a.s[0]), Math.toDegrees(a.s[1]), Math.toDegrees(a.s[2]), Math.toDegrees(a.s[3]));
}
@@ -2394,6 +2728,7 @@ public static void toDegrees(Double8 a, Double8 result) {
result.s[3] = Math.toDegrees(a.s[3]);
}
+ @Translatable
public static Double8 toRadians(Double8 a) {
return new Double8(Math.toRadians(a.x), Math.toRadians(a.y), Math.toRadians(a.z), Math.toRadians(a.w), Math.toRadians(a.s[0]), Math.toRadians(a.s[1]), Math.toRadians(a.s[2]), Math.toRadians(a.s[3]));
}
@@ -2409,6 +2744,7 @@ public static void toRadians(Double8 a, Double8 result) {
result.s[3] = Math.toRadians(a.s[3]);
}
+ @Translatable
public static Double8 trunc(Double8 a) {
return new Double8(Math.trunc(a.x), Math.trunc(a.y), Math.trunc(a.z), Math.trunc(a.w), Math.trunc(a.s[0]), Math.trunc(a.s[1]), Math.trunc(a.s[2]), Math.trunc(a.s[3]));
}
@@ -2424,6 +2760,7 @@ public static void trunc(Double8 a, Double8 result) {
result.s[3] = Math.trunc(a.s[3]);
}
+ @Translatable
public static Double8 scalb(Double8 a, Int8 n) {
return new Double8(Math.scalb(a.x, n.x), Math.scalb(a.y, n.y), Math.scalb(a.z, n.z), Math.scalb(a.w, n.w), Math.scalb(a.s[0], n.s[0]), Math.scalb(a.s[1], n.s[1]), Math.scalb(a.s[2], n.s[2]), Math.scalb(a.s[3], n.s[3]));
}
@@ -2439,6 +2776,7 @@ public static void scalb(Double8 a, Int8 n, Double8 result) {
result.s[3] = Math.scalb(a.s[3], n.s[3]);
}
+ @Translatable
public static Double8 ldexp(Double8 a, Int8 n) {
return new Double8(Math.ldexp(a.x, n.x), Math.ldexp(a.y, n.y), Math.ldexp(a.z, n.z), Math.ldexp(a.w, n.w), Math.ldexp(a.s[0], n.s[0]), Math.ldexp(a.s[1], n.s[1]), Math.ldexp(a.s[2], n.s[2]), Math.ldexp(a.s[3], n.s[3]));
}
@@ -2454,6 +2792,7 @@ public static void ldexp(Double8 a, Int8 n, Double8 result) {
result.s[3] = Math.ldexp(a.s[3], n.s[3]);
}
+ @Translatable
public static Double8 pown(Double8 a, Int8 b) {
return new Double8(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z), Math.pown(a.w, b.w), Math.pown(a.s[0], b.s[0]), Math.pown(a.s[1], b.s[1]), Math.pown(a.s[2], b.s[2]), Math.pown(a.s[3], b.s[3]));
}
@@ -2469,6 +2808,7 @@ public static void pown(Double8 a, Int8 b, Double8 result) {
result.s[3] = Math.pown(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 rootn(Double8 a, Int8 b) {
return new Double8(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z), Math.pown(a.w, b.w), Math.pown(a.s[0], b.s[0]), Math.pown(a.s[1], b.s[1]), Math.pown(a.s[2], b.s[2]), Math.pown(a.s[3], b.s[3]));
}
@@ -2484,6 +2824,7 @@ public static void rootn(Double8 a, Int8 b, Double8 result) {
result.s[3] = Math.pown(a.s[3], b.s[3]);
}
+ @Translatable
public static Double8 smoothStep(Double8 a, Double8 b, double c) {
return new Double8(Math.smoothStep(a.x, b.x, c), Math.smoothStep(a.y, b.y, c), Math.smoothStep(a.z, b.z, c), Math.smoothStep(a.w, b.w, c), Math.smoothStep(a.s[0], b.s[0], c), Math.smoothStep(a.s[1], b.s[1], c), Math.smoothStep(a.s[2], b.s[2], c), Math.smoothStep(a.s[3], b.s[3], c));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float2.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float2.java
index 8dd9629..7319245 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float2.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float2.java
@@ -27,41 +27,55 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Float2 {
+ @Translatable
public float x;
+ @Translatable
public float y;
+ @Translatable
public Float2() {}
+ @Translatable
public Float2(float x, float y) {
set(x, y);
}
+ @Translatable
public void set(float x, float y) {
this.x = x;
this.y = y;
}
+ @Translatable
public Float2(float v) {
this(v, v);
}
+ @Translatable
public void set(float v) {
set(v, v);
}
+ @Translatable
public Float2(Float2 vec1) {
this(vec1.x, vec1.y);
}
+ @Translatable
public void set(Float2 vec1) {
set(vec1.x, vec1.y);
}
+ @Translatable
public Float2 value() {
return new Float2(this);
}
+ @Translatable
public Byte2 convertByte2() {
return new Byte2((byte)(x), (byte)(y));
}
@@ -71,6 +85,7 @@ public void convertByte2(Byte2 result) {
result.y = (byte)(y);
}
+ @Translatable
public Short2 convertShort2() {
return new Short2((short)(x), (short)(y));
}
@@ -80,6 +95,7 @@ public void convertShort2(Short2 result) {
result.y = (short)(y);
}
+ @Translatable
public Int2 convertInt2() {
return new Int2((int)(x), (int)(y));
}
@@ -89,6 +105,7 @@ public void convertInt2(Int2 result) {
result.y = (int)(y);
}
+ @Translatable
public Long2 convertLong2() {
return new Long2((long)(x), (long)(y));
}
@@ -98,6 +115,7 @@ public void convertLong2(Long2 result) {
result.y = (long)(y);
}
+ @Translatable
public Double2 convertDouble2() {
return new Double2((double)(x), (double)(y));
}
@@ -107,6 +125,7 @@ public void convertDouble2(Double2 result) {
result.y = (double)(y);
}
+ @Translatable
public static Int2 isEqual(Float2 a, Float2 b) {
return new Int2(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0);
}
@@ -116,6 +135,7 @@ public static void isEqual(Float2 a, Float2 b, Int2 result) {
result.y = a.y == b.y? 1 : 0;
}
+ @Translatable
public static Int2 isNotEqual(Float2 a, Float2 b) {
return new Int2(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0);
}
@@ -125,6 +145,7 @@ public static void isNotEqual(Float2 a, Float2 b, Int2 result) {
result.y = a.y != b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreater(Float2 a, Float2 b) {
return new Int2(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0);
}
@@ -134,6 +155,7 @@ public static void isGreater(Float2 a, Float2 b, Int2 result) {
result.y = a.y > b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreaterEqual(Float2 a, Float2 b) {
return new Int2(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0);
}
@@ -143,6 +165,7 @@ public static void isGreaterEqual(Float2 a, Float2 b, Int2 result) {
result.y = a.y >= b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLess(Float2 a, Float2 b) {
return new Int2(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0);
}
@@ -152,6 +175,7 @@ public static void isLess(Float2 a, Float2 b, Int2 result) {
result.y = a.y < b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLessEqual(Float2 a, Float2 b) {
return new Int2(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0);
}
@@ -161,6 +185,7 @@ public static void isLessEqual(Float2 a, Float2 b, Int2 result) {
result.y = a.y <= b.y? 1 : 0;
}
+ @Translatable
public static Float2 select(Float2 a, Float2 b, Int2 c) {
return new Float2(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y));
}
@@ -170,6 +195,7 @@ public static void select(Float2 a, Float2 b, Int2 c, Float2 result) {
result.y = Math.select(a.y, b.y, c.y);
}
+ @Translatable
public static Int2 isFinite(Float2 a) {
return new Int2(Math.isFinite(a.x), Math.isFinite(a.y));
}
@@ -179,6 +205,7 @@ public static void isFinite(Float2 a, Int2 result) {
result.y = Math.isFinite(a.y);
}
+ @Translatable
public static Int2 isInf(Float2 a) {
return new Int2(Math.isInf(a.x), Math.isInf(a.y));
}
@@ -188,6 +215,7 @@ public static void isInf(Float2 a, Int2 result) {
result.y = Math.isInf(a.y);
}
+ @Translatable
public static Int2 isNaN(Float2 a) {
return new Int2(Math.isNaN(a.x), Math.isNaN(a.y));
}
@@ -197,6 +225,7 @@ public static void isNaN(Float2 a, Int2 result) {
result.y = Math.isNaN(a.y);
}
+ @Translatable
public static Int2 isNormal(Float2 a) {
return new Int2(Math.isNormal(a.x), Math.isNormal(a.y));
}
@@ -206,6 +235,7 @@ public static void isNormal(Float2 a, Int2 result) {
result.y = Math.isNormal(a.y);
}
+ @Translatable
public static Int2 isOrdered(Float2 a, Float2 b) {
return new Int2(Math.isOrdered(a.x, b.x), Math.isOrdered(a.y, b.y));
}
@@ -215,6 +245,7 @@ public static void isOrdered(Float2 a, Float2 b, Int2 result) {
result.y = Math.isOrdered(a.y, b.y);
}
+ @Translatable
public static Int2 isUnordered(Float2 a, Float2 b) {
return new Int2(Math.isUnordered(a.x, b.x), Math.isUnordered(a.y, b.y));
}
@@ -224,14 +255,17 @@ public static void isUnordered(Float2 a, Float2 b, Int2 result) {
result.y = Math.isUnordered(a.y, b.y);
}
+ @Translatable
public static int any(Float2 a) {
return (a.x != 0.0f || a.y != 0.0f)? 1 : 0;
}
+ @Translatable
public static int all(Float2 a) {
return (a.x == 0.0f || a.y == 0.0f)? 0 : 1;
}
+ @Translatable
public static Float2 neg(Float2 a) {
return new Float2((float)(-a.x), (float)(-a.y));
}
@@ -241,6 +275,7 @@ public static void neg(Float2 a, Float2 result) {
result.y = (float)(-a.y);
}
+ @Translatable
public static Float2 add(Float2 a, Float2 b) {
return new Float2((float)(a.x + b.x), (float)(a.y + b.y));
}
@@ -250,6 +285,7 @@ public static void add(Float2 a, Float2 b, Float2 result) {
result.y = (float)(a.y + b.y);
}
+ @Translatable
public static Float2 sub(Float2 a, Float2 b) {
return new Float2((float)(a.x - b.x), (float)(a.y - b.y));
}
@@ -259,6 +295,7 @@ public static void sub(Float2 a, Float2 b, Float2 result) {
result.y = (float)(a.y - b.y);
}
+ @Translatable
public static Double2 mul(Float2 a, Double2 b) {
return new Double2((double)(a.x * b.x), (double)(a.y * b.y));
}
@@ -268,6 +305,7 @@ public static void mul(Float2 a, Double2 b, Double2 result) {
result.y = (double)(a.y * b.y);
}
+ @Translatable
public static Double2 mul(Float2 a, double k) {
return new Double2((double)(a.x * k), (double)(a.y * k));
}
@@ -277,6 +315,7 @@ public static void mul(Float2 a, double k, Double2 result) {
result.y = (double)(a.y * k);
}
+ @Translatable
public static Float2 mul(Float2 a, Float2 b) {
return new Float2((float)(a.x * b.x), (float)(a.y * b.y));
}
@@ -286,6 +325,7 @@ public static void mul(Float2 a, Float2 b, Float2 result) {
result.y = (float)(a.y * b.y);
}
+ @Translatable
public static Float2 mul(Float2 a, float k) {
return new Float2((float)(a.x * k), (float)(a.y * k));
}
@@ -295,6 +335,7 @@ public static void mul(Float2 a, float k, Float2 result) {
result.y = (float)(a.y * k);
}
+ @Translatable
public static Double2 div(Float2 a, Double2 b) {
return new Double2((double)(a.x / b.x), (double)(a.y / b.y));
}
@@ -304,6 +345,7 @@ public static void div(Float2 a, Double2 b, Double2 result) {
result.y = (double)(a.y / b.y);
}
+ @Translatable
public static Double2 div(Float2 a, double k) {
return new Double2((double)(a.x / k), (double)(a.y / k));
}
@@ -313,6 +355,7 @@ public static void div(Float2 a, double k, Double2 result) {
result.y = (double)(a.y / k);
}
+ @Translatable
public static Float2 div(Float2 a, Float2 b) {
return new Float2((float)(a.x / b.x), (float)(a.y / b.y));
}
@@ -322,6 +365,7 @@ public static void div(Float2 a, Float2 b, Float2 result) {
result.y = (float)(a.y / b.y);
}
+ @Translatable
public static Float2 div(Float2 a, float k) {
return new Float2((float)(a.x / k), (float)(a.y / k));
}
@@ -331,23 +375,28 @@ public static void div(Float2 a, float k, Float2 result) {
result.y = (float)(a.y / k);
}
+ @Translatable
public static float dot(Float2 a, Float2 b) {
return (float)(a.x * b.x + a.y * b.y);
}
+ @Translatable
public static double distance(Float2 a, Float2 b) {
return distance(a, b, new Float2());
}
+ @Translatable
public static double distance(Float2 a, Float2 b, Float2 tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(Float2 a) {
return Math.sqrt(a.x * a.x + a.y * a.y);
}
+ @Translatable
public static Float2 normalize(Float2 a) {
Float2 result = new Float2();
normalize(a, result);
@@ -360,6 +409,7 @@ public static void normalize(Float2 a, Float2 result) {
result.y = (float)(a.y / len);
}
+ @Translatable
public static Float2 abs(Float2 a) {
return new Float2(Math.abs(a.x), Math.abs(a.y));
}
@@ -369,6 +419,7 @@ public static void abs(Float2 a, Float2 result) {
result.y = Math.abs(a.y);
}
+ @Translatable
public static Float2 clamp(Float2 a, Float2 b, Float2 c) {
return new Float2(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y));
}
@@ -378,6 +429,7 @@ public static void clamp(Float2 a, Float2 b, Float2 c, Float2 result) {
result.y = Math.clamp(a.y, b.y, c.y);
}
+ @Translatable
public static Float2 max(Float2 a, Float2 b) {
return new Float2(Math.max(a.x, b.x), Math.max(a.y, b.y));
}
@@ -387,6 +439,7 @@ public static void max(Float2 a, Float2 b, Float2 result) {
result.y = Math.max(a.y, b.y);
}
+ @Translatable
public static Float2 maxMag(Float2 a, Float2 b) {
return new Float2(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y));
}
@@ -396,6 +449,7 @@ public static void maxMag(Float2 a, Float2 b, Float2 result) {
result.y = Math.maxMag(a.y, b.y);
}
+ @Translatable
public static Float2 min(Float2 a, Float2 b) {
return new Float2(Math.min(a.x, b.x), Math.min(a.y, b.y));
}
@@ -405,6 +459,7 @@ public static void min(Float2 a, Float2 b, Float2 result) {
result.y = Math.min(a.y, b.y);
}
+ @Translatable
public static Float2 minMag(Float2 a, Float2 b) {
return new Float2(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y));
}
@@ -414,6 +469,7 @@ public static void minMag(Float2 a, Float2 b, Float2 result) {
result.y = Math.minMag(a.y, b.y);
}
+ @Translatable
public static Float2 mix(Float2 a, Float2 b, Float2 c) {
return new Float2(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y));
}
@@ -423,6 +479,7 @@ public static void mix(Float2 a, Float2 b, Float2 c, Float2 result) {
result.y = Math.mix(a.y, b.y, c.y);
}
+ @Translatable
public static Float2 clamp(Float2 v, float min, float max) {
return new Float2(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max));
}
@@ -432,6 +489,7 @@ public static void clamp(Float2 v, float min, float max, Float2 result) {
result.y = Math.clamp(v.y, min, max);
}
+ @Translatable
public static Float2 max(Float2 x, float y) {
return new Float2(Math.max(x.x, y), Math.max(x.y, y));
}
@@ -441,6 +499,7 @@ public static void max(Float2 x, float y, Float2 result) {
result.y = Math.max(x.y, y);
}
+ @Translatable
public static Float2 min(Float2 x, float y) {
return new Float2(Math.min(x.x, y), Math.min(x.y, y));
}
@@ -450,6 +509,7 @@ public static void min(Float2 x, float y, Float2 result) {
result.y = Math.min(x.y, y);
}
+ @Translatable
public static Float2 mix(Float2 x, Float2 y, float a) {
return new Float2(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a));
}
@@ -459,6 +519,7 @@ public static void mix(Float2 x, Float2 y, float a, Float2 result) {
result.y = Math.mix(x.y, y.y, a);
}
+ @Translatable
public static Float2 acos(Float2 a) {
return new Float2(Math.acos(a.x), Math.acos(a.y));
}
@@ -468,6 +529,7 @@ public static void acos(Float2 a, Float2 result) {
result.y = Math.acos(a.y);
}
+ @Translatable
public static Float2 acosh(Float2 a) {
return new Float2(Math.acosh(a.x), Math.acosh(a.y));
}
@@ -477,6 +539,7 @@ public static void acosh(Float2 a, Float2 result) {
result.y = Math.acosh(a.y);
}
+ @Translatable
public static Float2 asin(Float2 a) {
return new Float2(Math.asin(a.x), Math.asin(a.y));
}
@@ -486,6 +549,7 @@ public static void asin(Float2 a, Float2 result) {
result.y = Math.asin(a.y);
}
+ @Translatable
public static Float2 asinh(Float2 a) {
return new Float2(Math.asinh(a.x), Math.asinh(a.y));
}
@@ -495,6 +559,7 @@ public static void asinh(Float2 a, Float2 result) {
result.y = Math.asinh(a.y);
}
+ @Translatable
public static Float2 atan(Float2 a) {
return new Float2(Math.atan(a.x), Math.atan(a.y));
}
@@ -504,6 +569,7 @@ public static void atan(Float2 a, Float2 result) {
result.y = Math.atan(a.y);
}
+ @Translatable
public static Float2 atan2(Float2 a, Float2 b) {
return new Float2(Math.atan2(a.x, b.x), Math.atan2(a.y, b.y));
}
@@ -513,6 +579,7 @@ public static void atan2(Float2 a, Float2 b, Float2 result) {
result.y = Math.atan2(a.y, b.y);
}
+ @Translatable
public static Float2 atanh(Float2 a) {
return new Float2(Math.atanh(a.x), Math.atanh(a.y));
}
@@ -522,6 +589,7 @@ public static void atanh(Float2 a, Float2 result) {
result.y = Math.atanh(a.y);
}
+ @Translatable
public static Float2 cbrt(Float2 a) {
return new Float2(Math.cbrt(a.x), Math.cbrt(a.y));
}
@@ -531,6 +599,7 @@ public static void cbrt(Float2 a, Float2 result) {
result.y = Math.cbrt(a.y);
}
+ @Translatable
public static Float2 ceil(Float2 a) {
return new Float2(Math.ceil(a.x), Math.ceil(a.y));
}
@@ -540,6 +609,7 @@ public static void ceil(Float2 a, Float2 result) {
result.y = Math.ceil(a.y);
}
+ @Translatable
public static Float2 copySign(Float2 a, Float2 b) {
return new Float2(Math.copySign(a.x, b.x), Math.copySign(a.y, b.y));
}
@@ -549,6 +619,7 @@ public static void copySign(Float2 a, Float2 b, Float2 result) {
result.y = Math.copySign(a.y, b.y);
}
+ @Translatable
public static Float2 cos(Float2 a) {
return new Float2(Math.cos(a.x), Math.cos(a.y));
}
@@ -558,6 +629,7 @@ public static void cos(Float2 a, Float2 result) {
result.y = Math.cos(a.y);
}
+ @Translatable
public static Float2 cosh(Float2 a) {
return new Float2(Math.cosh(a.x), Math.cosh(a.y));
}
@@ -567,6 +639,7 @@ public static void cosh(Float2 a, Float2 result) {
result.y = Math.cosh(a.y);
}
+ @Translatable
public static Float2 erf(Float2 a) {
return new Float2(Math.erf(a.x), Math.erf(a.y));
}
@@ -576,6 +649,7 @@ public static void erf(Float2 a, Float2 result) {
result.y = Math.erf(a.y);
}
+ @Translatable
public static Float2 erfc(Float2 a) {
return new Float2(Math.erfc(a.x), Math.erfc(a.y));
}
@@ -585,6 +659,7 @@ public static void erfc(Float2 a, Float2 result) {
result.y = Math.erfc(a.y);
}
+ @Translatable
public static Float2 exp(Float2 a) {
return new Float2(Math.exp(a.x), Math.exp(a.y));
}
@@ -594,6 +669,7 @@ public static void exp(Float2 a, Float2 result) {
result.y = Math.exp(a.y);
}
+ @Translatable
public static Float2 exp10(Float2 a) {
return new Float2(Math.exp10(a.x), Math.exp10(a.y));
}
@@ -603,6 +679,7 @@ public static void exp10(Float2 a, Float2 result) {
result.y = Math.exp10(a.y);
}
+ @Translatable
public static Float2 exp2(Float2 a) {
return new Float2(Math.exp2(a.x), Math.exp2(a.y));
}
@@ -612,6 +689,7 @@ public static void exp2(Float2 a, Float2 result) {
result.y = Math.exp2(a.y);
}
+ @Translatable
public static Float2 expm1(Float2 a) {
return new Float2(Math.expm1(a.x), Math.expm1(a.y));
}
@@ -621,6 +699,7 @@ public static void expm1(Float2 a, Float2 result) {
result.y = Math.expm1(a.y);
}
+ @Translatable
public static Float2 fdim(Float2 a, Float2 b) {
return new Float2(Math.fdim(a.x, b.x), Math.fdim(a.y, b.y));
}
@@ -630,6 +709,7 @@ public static void fdim(Float2 a, Float2 b, Float2 result) {
result.y = Math.fdim(a.y, b.y);
}
+ @Translatable
public static Float2 floor(Float2 a) {
return new Float2(Math.floor(a.x), Math.floor(a.y));
}
@@ -639,6 +719,7 @@ public static void floor(Float2 a, Float2 result) {
result.y = Math.floor(a.y);
}
+ @Translatable
public static Float2 fma(Float2 a, Float2 b, Float2 c) {
return new Float2(Math.fma(a.x, b.x, c.x), Math.fma(a.y, b.y, c.y));
}
@@ -648,6 +729,7 @@ public static void fma(Float2 a, Float2 b, Float2 c, Float2 result) {
result.y = Math.fma(a.y, b.y, c.y);
}
+ @Translatable
public static Float2 fmod(Float2 a, Float2 b) {
return new Float2(Math.fmod(a.x, b.x), Math.fmod(a.y, b.y));
}
@@ -657,6 +739,7 @@ public static void fmod(Float2 a, Float2 b, Float2 result) {
result.y = Math.fmod(a.y, b.y);
}
+ @Translatable
public static Float2 fract(Float2 a) {
return new Float2(Math.fract(a.x), Math.fract(a.y));
}
@@ -666,6 +749,7 @@ public static void fract(Float2 a, Float2 result) {
result.y = Math.fract(a.y);
}
+ @Translatable
public static Float2 frexp(Float2 a) {
return new Float2(Math.frexp(a.x), Math.frexp(a.y));
}
@@ -675,6 +759,7 @@ public static void frexp(Float2 a, Float2 result) {
result.y = Math.frexp(a.y);
}
+ @Translatable
public static Float2 getExponent(Float2 a) {
return new Float2(Math.getExponent(a.x), Math.getExponent(a.y));
}
@@ -684,6 +769,7 @@ public static void getExponent(Float2 a, Float2 result) {
result.y = Math.getExponent(a.y);
}
+ @Translatable
public static Float2 hypot(Float2 a, Float2 b) {
return new Float2(Math.hypot(a.x, b.x), Math.hypot(a.y, b.y));
}
@@ -693,6 +779,7 @@ public static void hypot(Float2 a, Float2 b, Float2 result) {
result.y = Math.hypot(a.y, b.y);
}
+ @Translatable
public static Float2 lgamma(Float2 a) {
return new Float2(Math.lgamma(a.x), Math.lgamma(a.y));
}
@@ -702,6 +789,7 @@ public static void lgamma(Float2 a, Float2 result) {
result.y = Math.lgamma(a.y);
}
+ @Translatable
public static Float2 log(Float2 a) {
return new Float2(Math.log(a.x), Math.log(a.y));
}
@@ -711,6 +799,7 @@ public static void log(Float2 a, Float2 result) {
result.y = Math.log(a.y);
}
+ @Translatable
public static Float2 log10(Float2 a) {
return new Float2(Math.log10(a.x), Math.log10(a.y));
}
@@ -720,6 +809,7 @@ public static void log10(Float2 a, Float2 result) {
result.y = Math.log10(a.y);
}
+ @Translatable
public static Float2 log1p(Float2 a) {
return new Float2(Math.log1p(a.x), Math.log1p(a.y));
}
@@ -729,6 +819,7 @@ public static void log1p(Float2 a, Float2 result) {
result.y = Math.log1p(a.y);
}
+ @Translatable
public static Float2 log2(Float2 a) {
return new Float2(Math.log2(a.x), Math.log2(a.y));
}
@@ -738,6 +829,7 @@ public static void log2(Float2 a, Float2 result) {
result.y = Math.log2(a.y);
}
+ @Translatable
public static Float2 logb(Float2 a) {
return new Float2(Math.logb(a.x), Math.logb(a.y));
}
@@ -747,6 +839,7 @@ public static void logb(Float2 a, Float2 result) {
result.y = Math.logb(a.y);
}
+ @Translatable
public static Float2 mad(Float2 a, Float2 b, Float2 c) {
return new Float2(Math.mad(a.x, b.x, c.x), Math.mad(a.y, b.y, c.y));
}
@@ -756,6 +849,7 @@ public static void mad(Float2 a, Float2 b, Float2 c, Float2 result) {
result.y = Math.mad(a.y, b.y, c.y);
}
+ @Translatable
public static Float2 nextAfter(Float2 a, Float2 b) {
return new Float2(Math.nextAfter(a.x, b.x), Math.nextAfter(a.y, b.y));
}
@@ -765,6 +859,7 @@ public static void nextAfter(Float2 a, Float2 b, Float2 result) {
result.y = Math.nextAfter(a.y, b.y);
}
+ @Translatable
public static Float2 pow(Float2 a, Float2 b) {
return new Float2(Math.pow(a.x, b.x), Math.pow(a.y, b.y));
}
@@ -774,6 +869,7 @@ public static void pow(Float2 a, Float2 b, Float2 result) {
result.y = Math.pow(a.y, b.y);
}
+ @Translatable
public static Float2 powr(Float2 a, Float2 b) {
return new Float2(Math.powr(a.x, b.x), Math.powr(a.y, b.y));
}
@@ -783,6 +879,7 @@ public static void powr(Float2 a, Float2 b, Float2 result) {
result.y = Math.powr(a.y, b.y);
}
+ @Translatable
public static Float2 remainder(Float2 a, Float2 b) {
return new Float2(Math.remainder(a.x, b.x), Math.remainder(a.y, b.y));
}
@@ -792,6 +889,7 @@ public static void remainder(Float2 a, Float2 b, Float2 result) {
result.y = Math.remainder(a.y, b.y);
}
+ @Translatable
public static Float2 rint(Float2 a) {
return new Float2(Math.rint(a.x), Math.rint(a.y));
}
@@ -801,6 +899,7 @@ public static void rint(Float2 a, Float2 result) {
result.y = Math.rint(a.y);
}
+ @Translatable
public static Float2 round(Float2 a) {
return new Float2(Math.round(a.x), Math.round(a.y));
}
@@ -810,6 +909,7 @@ public static void round(Float2 a, Float2 result) {
result.y = Math.round(a.y);
}
+ @Translatable
public static Float2 rsqrt(Float2 a) {
return new Float2(Math.rsqrt(a.x), Math.rsqrt(a.y));
}
@@ -819,6 +919,7 @@ public static void rsqrt(Float2 a, Float2 result) {
result.y = Math.rsqrt(a.y);
}
+ @Translatable
public static Float2 signum(Float2 a) {
return new Float2(Math.signum(a.x), Math.signum(a.y));
}
@@ -828,6 +929,7 @@ public static void signum(Float2 a, Float2 result) {
result.y = Math.signum(a.y);
}
+ @Translatable
public static Float2 sin(Float2 a) {
return new Float2(Math.sin(a.x), Math.sin(a.y));
}
@@ -837,6 +939,7 @@ public static void sin(Float2 a, Float2 result) {
result.y = Math.sin(a.y);
}
+ @Translatable
public static Float2 sinh(Float2 a) {
return new Float2(Math.sinh(a.x), Math.sinh(a.y));
}
@@ -846,6 +949,7 @@ public static void sinh(Float2 a, Float2 result) {
result.y = Math.sinh(a.y);
}
+ @Translatable
public static Float2 smoothStep(Float2 a, Float2 b, Float2 c) {
return new Float2(Math.smoothStep(a.x, b.x, c.x), Math.smoothStep(a.y, b.y, c.y));
}
@@ -855,6 +959,7 @@ public static void smoothStep(Float2 a, Float2 b, Float2 c, Float2 result) {
result.y = Math.smoothStep(a.y, b.y, c.y);
}
+ @Translatable
public static Float2 sqrt(Float2 a) {
return new Float2(Math.sqrt(a.x), Math.sqrt(a.y));
}
@@ -864,6 +969,7 @@ public static void sqrt(Float2 a, Float2 result) {
result.y = Math.sqrt(a.y);
}
+ @Translatable
public static Float2 step(Float2 a, Float2 b) {
return new Float2(Math.step(a.x, b.x), Math.step(a.y, b.y));
}
@@ -873,6 +979,7 @@ public static void step(Float2 a, Float2 b, Float2 result) {
result.y = Math.step(a.y, b.y);
}
+ @Translatable
public static Float2 tan(Float2 a) {
return new Float2(Math.tan(a.x), Math.tan(a.y));
}
@@ -882,6 +989,7 @@ public static void tan(Float2 a, Float2 result) {
result.y = Math.tan(a.y);
}
+ @Translatable
public static Float2 tanh(Float2 a) {
return new Float2(Math.tanh(a.x), Math.tanh(a.y));
}
@@ -891,6 +999,7 @@ public static void tanh(Float2 a, Float2 result) {
result.y = Math.tanh(a.y);
}
+ @Translatable
public static Float2 tgamma(Float2 a) {
return new Float2(Math.tgamma(a.x), Math.tgamma(a.y));
}
@@ -900,6 +1009,7 @@ public static void tgamma(Float2 a, Float2 result) {
result.y = Math.tgamma(a.y);
}
+ @Translatable
public static Float2 toDegrees(Float2 a) {
return new Float2(Math.toDegrees(a.x), Math.toDegrees(a.y));
}
@@ -909,6 +1019,7 @@ public static void toDegrees(Float2 a, Float2 result) {
result.y = Math.toDegrees(a.y);
}
+ @Translatable
public static Float2 toRadians(Float2 a) {
return new Float2(Math.toRadians(a.x), Math.toRadians(a.y));
}
@@ -918,6 +1029,7 @@ public static void toRadians(Float2 a, Float2 result) {
result.y = Math.toRadians(a.y);
}
+ @Translatable
public static Float2 trunc(Float2 a) {
return new Float2(Math.trunc(a.x), Math.trunc(a.y));
}
@@ -927,6 +1039,7 @@ public static void trunc(Float2 a, Float2 result) {
result.y = Math.trunc(a.y);
}
+ @Translatable
public static Float2 scalb(Float2 a, Int2 n) {
return new Float2(Math.scalb(a.x, n.x), Math.scalb(a.y, n.y));
}
@@ -936,6 +1049,7 @@ public static void scalb(Float2 a, Int2 n, Float2 result) {
result.y = Math.scalb(a.y, n.y);
}
+ @Translatable
public static Float2 ldexp(Float2 a, Int2 n) {
return new Float2(Math.ldexp(a.x, n.x), Math.ldexp(a.y, n.y));
}
@@ -945,6 +1059,7 @@ public static void ldexp(Float2 a, Int2 n, Float2 result) {
result.y = Math.ldexp(a.y, n.y);
}
+ @Translatable
public static Float2 pown(Float2 a, Int2 b) {
return new Float2(Math.pown(a.x, b.x), Math.pown(a.y, b.y));
}
@@ -954,6 +1069,7 @@ public static void pown(Float2 a, Int2 b, Float2 result) {
result.y = Math.pown(a.y, b.y);
}
+ @Translatable
public static Float2 rootn(Float2 a, Int2 b) {
return new Float2(Math.pown(a.x, b.x), Math.pown(a.y, b.y));
}
@@ -963,6 +1079,7 @@ public static void rootn(Float2 a, Int2 b, Float2 result) {
result.y = Math.pown(a.y, b.y);
}
+ @Translatable
public static Float2 smoothStep(Float2 a, Float2 b, float c) {
return new Float2(Math.smoothStep(a.x, b.x, c), Math.smoothStep(a.y, b.y, c));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float3.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float3.java
index 531ab50..640fc1e 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float3.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float3.java
@@ -27,59 +27,78 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Float3 {
+ @Translatable
public float x;
+ @Translatable
public float y;
+ @Translatable
public float z;
+ @Translatable
public Float3() {}
+ @Translatable
public Float3(float x, float y, float z) {
set(x, y, z);
}
+ @Translatable
public void set(float x, float y, float z) {
this.x = x;
this.y = y;
this.z = z;
}
+ @Translatable
public Float3(float v) {
this(v, v, v);
}
+ @Translatable
public void set(float v) {
set(v, v, v);
}
+ @Translatable
public Float3(float x, Float2 vec1) {
this(x, vec1.x, vec1.y);
}
+ @Translatable
public void set(float x, Float2 vec1) {
set(x, vec1.x, vec1.y);
}
+ @Translatable
public Float3(Float2 vec1, float z) {
this(vec1.x, vec1.y, z);
}
+ @Translatable
public void set(Float2 vec1, float z) {
set(vec1.x, vec1.y, z);
}
+ @Translatable
public Float3(Float3 vec1) {
this(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(Float3 vec1) {
set(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Float3 value() {
return new Float3(this);
}
+ @Translatable
public Byte3 convertByte3() {
return new Byte3((byte)(x), (byte)(y), (byte)(z));
}
@@ -90,6 +109,7 @@ public void convertByte3(Byte3 result) {
result.z = (byte)(z);
}
+ @Translatable
public Short3 convertShort3() {
return new Short3((short)(x), (short)(y), (short)(z));
}
@@ -100,6 +120,7 @@ public void convertShort3(Short3 result) {
result.z = (short)(z);
}
+ @Translatable
public Int3 convertInt3() {
return new Int3((int)(x), (int)(y), (int)(z));
}
@@ -110,6 +131,7 @@ public void convertInt3(Int3 result) {
result.z = (int)(z);
}
+ @Translatable
public Long3 convertLong3() {
return new Long3((long)(x), (long)(y), (long)(z));
}
@@ -120,6 +142,7 @@ public void convertLong3(Long3 result) {
result.z = (long)(z);
}
+ @Translatable
public Double3 convertDouble3() {
return new Double3((double)(x), (double)(y), (double)(z));
}
@@ -130,6 +153,7 @@ public void convertDouble3(Double3 result) {
result.z = (double)(z);
}
+ @Translatable
public Float2 asFloat2() {
return new Float2(x, y);
}
@@ -139,6 +163,7 @@ public void asFloat2(Float2 result) {
result.y = y;
}
+ @Translatable
public static Int3 isEqual(Float3 a, Float3 b) {
return new Int3(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0);
}
@@ -149,6 +174,7 @@ public static void isEqual(Float3 a, Float3 b, Int3 result) {
result.z = a.z == b.z? 1 : 0;
}
+ @Translatable
public static Int3 isNotEqual(Float3 a, Float3 b) {
return new Int3(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0);
}
@@ -159,6 +185,7 @@ public static void isNotEqual(Float3 a, Float3 b, Int3 result) {
result.z = a.z != b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreater(Float3 a, Float3 b) {
return new Int3(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0);
}
@@ -169,6 +196,7 @@ public static void isGreater(Float3 a, Float3 b, Int3 result) {
result.z = a.z > b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreaterEqual(Float3 a, Float3 b) {
return new Int3(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0);
}
@@ -179,6 +207,7 @@ public static void isGreaterEqual(Float3 a, Float3 b, Int3 result) {
result.z = a.z >= b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLess(Float3 a, Float3 b) {
return new Int3(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0);
}
@@ -189,6 +218,7 @@ public static void isLess(Float3 a, Float3 b, Int3 result) {
result.z = a.z < b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLessEqual(Float3 a, Float3 b) {
return new Int3(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0);
}
@@ -199,6 +229,7 @@ public static void isLessEqual(Float3 a, Float3 b, Int3 result) {
result.z = a.z <= b.z? 1 : 0;
}
+ @Translatable
public static Float3 select(Float3 a, Float3 b, Int3 c) {
return new Float3(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z));
}
@@ -209,6 +240,7 @@ public static void select(Float3 a, Float3 b, Int3 c, Float3 result) {
result.z = Math.select(a.z, b.z, c.z);
}
+ @Translatable
public static Int3 isFinite(Float3 a) {
return new Int3(Math.isFinite(a.x), Math.isFinite(a.y), Math.isFinite(a.z));
}
@@ -219,6 +251,7 @@ public static void isFinite(Float3 a, Int3 result) {
result.z = Math.isFinite(a.z);
}
+ @Translatable
public static Int3 isInf(Float3 a) {
return new Int3(Math.isInf(a.x), Math.isInf(a.y), Math.isInf(a.z));
}
@@ -229,6 +262,7 @@ public static void isInf(Float3 a, Int3 result) {
result.z = Math.isInf(a.z);
}
+ @Translatable
public static Int3 isNaN(Float3 a) {
return new Int3(Math.isNaN(a.x), Math.isNaN(a.y), Math.isNaN(a.z));
}
@@ -239,6 +273,7 @@ public static void isNaN(Float3 a, Int3 result) {
result.z = Math.isNaN(a.z);
}
+ @Translatable
public static Int3 isNormal(Float3 a) {
return new Int3(Math.isNormal(a.x), Math.isNormal(a.y), Math.isNormal(a.z));
}
@@ -249,6 +284,7 @@ public static void isNormal(Float3 a, Int3 result) {
result.z = Math.isNormal(a.z);
}
+ @Translatable
public static Int3 isOrdered(Float3 a, Float3 b) {
return new Int3(Math.isOrdered(a.x, b.x), Math.isOrdered(a.y, b.y), Math.isOrdered(a.z, b.z));
}
@@ -259,6 +295,7 @@ public static void isOrdered(Float3 a, Float3 b, Int3 result) {
result.z = Math.isOrdered(a.z, b.z);
}
+ @Translatable
public static Int3 isUnordered(Float3 a, Float3 b) {
return new Int3(Math.isUnordered(a.x, b.x), Math.isUnordered(a.y, b.y), Math.isUnordered(a.z, b.z));
}
@@ -269,14 +306,17 @@ public static void isUnordered(Float3 a, Float3 b, Int3 result) {
result.z = Math.isUnordered(a.z, b.z);
}
+ @Translatable
public static int any(Float3 a) {
return (a.x != 0.0f || a.y != 0.0f || a.z != 0.0f)? 1 : 0;
}
+ @Translatable
public static int all(Float3 a) {
return (a.x == 0.0f || a.y == 0.0f || a.z == 0.0f)? 0 : 1;
}
+ @Translatable
public static Float3 neg(Float3 a) {
return new Float3((float)(-a.x), (float)(-a.y), (float)(-a.z));
}
@@ -287,6 +327,7 @@ public static void neg(Float3 a, Float3 result) {
result.z = (float)(-a.z);
}
+ @Translatable
public static Float3 add(Float3 a, Float3 b) {
return new Float3((float)(a.x + b.x), (float)(a.y + b.y), (float)(a.z + b.z));
}
@@ -297,6 +338,7 @@ public static void add(Float3 a, Float3 b, Float3 result) {
result.z = (float)(a.z + b.z);
}
+ @Translatable
public static Float3 sub(Float3 a, Float3 b) {
return new Float3((float)(a.x - b.x), (float)(a.y - b.y), (float)(a.z - b.z));
}
@@ -307,6 +349,7 @@ public static void sub(Float3 a, Float3 b, Float3 result) {
result.z = (float)(a.z - b.z);
}
+ @Translatable
public static Double3 mul(Float3 a, Double3 b) {
return new Double3((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z));
}
@@ -317,6 +360,7 @@ public static void mul(Float3 a, Double3 b, Double3 result) {
result.z = (double)(a.z * b.z);
}
+ @Translatable
public static Double3 mul(Float3 a, double k) {
return new Double3((double)(a.x * k), (double)(a.y * k), (double)(a.z * k));
}
@@ -327,6 +371,7 @@ public static void mul(Float3 a, double k, Double3 result) {
result.z = (double)(a.z * k);
}
+ @Translatable
public static Float3 mul(Float3 a, Float3 b) {
return new Float3((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z));
}
@@ -337,6 +382,7 @@ public static void mul(Float3 a, Float3 b, Float3 result) {
result.z = (float)(a.z * b.z);
}
+ @Translatable
public static Float3 mul(Float3 a, float k) {
return new Float3((float)(a.x * k), (float)(a.y * k), (float)(a.z * k));
}
@@ -347,6 +393,7 @@ public static void mul(Float3 a, float k, Float3 result) {
result.z = (float)(a.z * k);
}
+ @Translatable
public static Double3 div(Float3 a, Double3 b) {
return new Double3((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z));
}
@@ -357,6 +404,7 @@ public static void div(Float3 a, Double3 b, Double3 result) {
result.z = (double)(a.z / b.z);
}
+ @Translatable
public static Double3 div(Float3 a, double k) {
return new Double3((double)(a.x / k), (double)(a.y / k), (double)(a.z / k));
}
@@ -367,6 +415,7 @@ public static void div(Float3 a, double k, Double3 result) {
result.z = (double)(a.z / k);
}
+ @Translatable
public static Float3 div(Float3 a, Float3 b) {
return new Float3((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z));
}
@@ -377,6 +426,7 @@ public static void div(Float3 a, Float3 b, Float3 result) {
result.z = (float)(a.z / b.z);
}
+ @Translatable
public static Float3 div(Float3 a, float k) {
return new Float3((float)(a.x / k), (float)(a.y / k), (float)(a.z / k));
}
@@ -387,6 +437,7 @@ public static void div(Float3 a, float k, Float3 result) {
result.z = (float)(a.z / k);
}
+ @Translatable
public static Float3 cross(Float3 a, Float3 b) {
Float3 result = new Float3();
cross(a, b, result);
@@ -399,23 +450,28 @@ public static void cross(Float3 a, Float3 b, Float3 result) {
result.z = a.x * b.y - a.y * b.x;
}
+ @Translatable
public static float dot(Float3 a, Float3 b) {
return (float)(a.x * b.x + a.y * b.y + a.z * b.z);
}
+ @Translatable
public static double distance(Float3 a, Float3 b) {
return distance(a, b, new Float3());
}
+ @Translatable
public static double distance(Float3 a, Float3 b, Float3 tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(Float3 a) {
return Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z);
}
+ @Translatable
public static Float3 normalize(Float3 a) {
Float3 result = new Float3();
normalize(a, result);
@@ -429,6 +485,7 @@ public static void normalize(Float3 a, Float3 result) {
result.z = (float)(a.z / len);
}
+ @Translatable
public static Float3 abs(Float3 a) {
return new Float3(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z));
}
@@ -439,6 +496,7 @@ public static void abs(Float3 a, Float3 result) {
result.z = Math.abs(a.z);
}
+ @Translatable
public static Float3 clamp(Float3 a, Float3 b, Float3 c) {
return new Float3(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z));
}
@@ -449,6 +507,7 @@ public static void clamp(Float3 a, Float3 b, Float3 c, Float3 result) {
result.z = Math.clamp(a.z, b.z, c.z);
}
+ @Translatable
public static Float3 max(Float3 a, Float3 b) {
return new Float3(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z));
}
@@ -459,6 +518,7 @@ public static void max(Float3 a, Float3 b, Float3 result) {
result.z = Math.max(a.z, b.z);
}
+ @Translatable
public static Float3 maxMag(Float3 a, Float3 b) {
return new Float3(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z));
}
@@ -469,6 +529,7 @@ public static void maxMag(Float3 a, Float3 b, Float3 result) {
result.z = Math.maxMag(a.z, b.z);
}
+ @Translatable
public static Float3 min(Float3 a, Float3 b) {
return new Float3(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z));
}
@@ -479,6 +540,7 @@ public static void min(Float3 a, Float3 b, Float3 result) {
result.z = Math.min(a.z, b.z);
}
+ @Translatable
public static Float3 minMag(Float3 a, Float3 b) {
return new Float3(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z));
}
@@ -489,6 +551,7 @@ public static void minMag(Float3 a, Float3 b, Float3 result) {
result.z = Math.minMag(a.z, b.z);
}
+ @Translatable
public static Float3 mix(Float3 a, Float3 b, Float3 c) {
return new Float3(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z));
}
@@ -499,6 +562,7 @@ public static void mix(Float3 a, Float3 b, Float3 c, Float3 result) {
result.z = Math.mix(a.z, b.z, c.z);
}
+ @Translatable
public static Float3 clamp(Float3 v, float min, float max) {
return new Float3(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max));
}
@@ -509,6 +573,7 @@ public static void clamp(Float3 v, float min, float max, Float3 result) {
result.z = Math.clamp(v.z, min, max);
}
+ @Translatable
public static Float3 max(Float3 x, float y) {
return new Float3(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y));
}
@@ -519,6 +584,7 @@ public static void max(Float3 x, float y, Float3 result) {
result.z = Math.max(x.z, y);
}
+ @Translatable
public static Float3 min(Float3 x, float y) {
return new Float3(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y));
}
@@ -529,6 +595,7 @@ public static void min(Float3 x, float y, Float3 result) {
result.z = Math.min(x.z, y);
}
+ @Translatable
public static Float3 mix(Float3 x, Float3 y, float a) {
return new Float3(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a));
}
@@ -539,6 +606,7 @@ public static void mix(Float3 x, Float3 y, float a, Float3 result) {
result.z = Math.mix(x.z, y.z, a);
}
+ @Translatable
public static Float3 acos(Float3 a) {
return new Float3(Math.acos(a.x), Math.acos(a.y), Math.acos(a.z));
}
@@ -549,6 +617,7 @@ public static void acos(Float3 a, Float3 result) {
result.z = Math.acos(a.z);
}
+ @Translatable
public static Float3 acosh(Float3 a) {
return new Float3(Math.acosh(a.x), Math.acosh(a.y), Math.acosh(a.z));
}
@@ -559,6 +628,7 @@ public static void acosh(Float3 a, Float3 result) {
result.z = Math.acosh(a.z);
}
+ @Translatable
public static Float3 asin(Float3 a) {
return new Float3(Math.asin(a.x), Math.asin(a.y), Math.asin(a.z));
}
@@ -569,6 +639,7 @@ public static void asin(Float3 a, Float3 result) {
result.z = Math.asin(a.z);
}
+ @Translatable
public static Float3 asinh(Float3 a) {
return new Float3(Math.asinh(a.x), Math.asinh(a.y), Math.asinh(a.z));
}
@@ -579,6 +650,7 @@ public static void asinh(Float3 a, Float3 result) {
result.z = Math.asinh(a.z);
}
+ @Translatable
public static Float3 atan(Float3 a) {
return new Float3(Math.atan(a.x), Math.atan(a.y), Math.atan(a.z));
}
@@ -589,6 +661,7 @@ public static void atan(Float3 a, Float3 result) {
result.z = Math.atan(a.z);
}
+ @Translatable
public static Float3 atan2(Float3 a, Float3 b) {
return new Float3(Math.atan2(a.x, b.x), Math.atan2(a.y, b.y), Math.atan2(a.z, b.z));
}
@@ -599,6 +672,7 @@ public static void atan2(Float3 a, Float3 b, Float3 result) {
result.z = Math.atan2(a.z, b.z);
}
+ @Translatable
public static Float3 atanh(Float3 a) {
return new Float3(Math.atanh(a.x), Math.atanh(a.y), Math.atanh(a.z));
}
@@ -609,6 +683,7 @@ public static void atanh(Float3 a, Float3 result) {
result.z = Math.atanh(a.z);
}
+ @Translatable
public static Float3 cbrt(Float3 a) {
return new Float3(Math.cbrt(a.x), Math.cbrt(a.y), Math.cbrt(a.z));
}
@@ -619,6 +694,7 @@ public static void cbrt(Float3 a, Float3 result) {
result.z = Math.cbrt(a.z);
}
+ @Translatable
public static Float3 ceil(Float3 a) {
return new Float3(Math.ceil(a.x), Math.ceil(a.y), Math.ceil(a.z));
}
@@ -629,6 +705,7 @@ public static void ceil(Float3 a, Float3 result) {
result.z = Math.ceil(a.z);
}
+ @Translatable
public static Float3 copySign(Float3 a, Float3 b) {
return new Float3(Math.copySign(a.x, b.x), Math.copySign(a.y, b.y), Math.copySign(a.z, b.z));
}
@@ -639,6 +716,7 @@ public static void copySign(Float3 a, Float3 b, Float3 result) {
result.z = Math.copySign(a.z, b.z);
}
+ @Translatable
public static Float3 cos(Float3 a) {
return new Float3(Math.cos(a.x), Math.cos(a.y), Math.cos(a.z));
}
@@ -649,6 +727,7 @@ public static void cos(Float3 a, Float3 result) {
result.z = Math.cos(a.z);
}
+ @Translatable
public static Float3 cosh(Float3 a) {
return new Float3(Math.cosh(a.x), Math.cosh(a.y), Math.cosh(a.z));
}
@@ -659,6 +738,7 @@ public static void cosh(Float3 a, Float3 result) {
result.z = Math.cosh(a.z);
}
+ @Translatable
public static Float3 erf(Float3 a) {
return new Float3(Math.erf(a.x), Math.erf(a.y), Math.erf(a.z));
}
@@ -669,6 +749,7 @@ public static void erf(Float3 a, Float3 result) {
result.z = Math.erf(a.z);
}
+ @Translatable
public static Float3 erfc(Float3 a) {
return new Float3(Math.erfc(a.x), Math.erfc(a.y), Math.erfc(a.z));
}
@@ -679,6 +760,7 @@ public static void erfc(Float3 a, Float3 result) {
result.z = Math.erfc(a.z);
}
+ @Translatable
public static Float3 exp(Float3 a) {
return new Float3(Math.exp(a.x), Math.exp(a.y), Math.exp(a.z));
}
@@ -689,6 +771,7 @@ public static void exp(Float3 a, Float3 result) {
result.z = Math.exp(a.z);
}
+ @Translatable
public static Float3 exp10(Float3 a) {
return new Float3(Math.exp10(a.x), Math.exp10(a.y), Math.exp10(a.z));
}
@@ -699,6 +782,7 @@ public static void exp10(Float3 a, Float3 result) {
result.z = Math.exp10(a.z);
}
+ @Translatable
public static Float3 exp2(Float3 a) {
return new Float3(Math.exp2(a.x), Math.exp2(a.y), Math.exp2(a.z));
}
@@ -709,6 +793,7 @@ public static void exp2(Float3 a, Float3 result) {
result.z = Math.exp2(a.z);
}
+ @Translatable
public static Float3 expm1(Float3 a) {
return new Float3(Math.expm1(a.x), Math.expm1(a.y), Math.expm1(a.z));
}
@@ -719,6 +804,7 @@ public static void expm1(Float3 a, Float3 result) {
result.z = Math.expm1(a.z);
}
+ @Translatable
public static Float3 fdim(Float3 a, Float3 b) {
return new Float3(Math.fdim(a.x, b.x), Math.fdim(a.y, b.y), Math.fdim(a.z, b.z));
}
@@ -729,6 +815,7 @@ public static void fdim(Float3 a, Float3 b, Float3 result) {
result.z = Math.fdim(a.z, b.z);
}
+ @Translatable
public static Float3 floor(Float3 a) {
return new Float3(Math.floor(a.x), Math.floor(a.y), Math.floor(a.z));
}
@@ -739,6 +826,7 @@ public static void floor(Float3 a, Float3 result) {
result.z = Math.floor(a.z);
}
+ @Translatable
public static Float3 fma(Float3 a, Float3 b, Float3 c) {
return new Float3(Math.fma(a.x, b.x, c.x), Math.fma(a.y, b.y, c.y), Math.fma(a.z, b.z, c.z));
}
@@ -749,6 +837,7 @@ public static void fma(Float3 a, Float3 b, Float3 c, Float3 result) {
result.z = Math.fma(a.z, b.z, c.z);
}
+ @Translatable
public static Float3 fmod(Float3 a, Float3 b) {
return new Float3(Math.fmod(a.x, b.x), Math.fmod(a.y, b.y), Math.fmod(a.z, b.z));
}
@@ -759,6 +848,7 @@ public static void fmod(Float3 a, Float3 b, Float3 result) {
result.z = Math.fmod(a.z, b.z);
}
+ @Translatable
public static Float3 fract(Float3 a) {
return new Float3(Math.fract(a.x), Math.fract(a.y), Math.fract(a.z));
}
@@ -769,6 +859,7 @@ public static void fract(Float3 a, Float3 result) {
result.z = Math.fract(a.z);
}
+ @Translatable
public static Float3 frexp(Float3 a) {
return new Float3(Math.frexp(a.x), Math.frexp(a.y), Math.frexp(a.z));
}
@@ -779,6 +870,7 @@ public static void frexp(Float3 a, Float3 result) {
result.z = Math.frexp(a.z);
}
+ @Translatable
public static Float3 getExponent(Float3 a) {
return new Float3(Math.getExponent(a.x), Math.getExponent(a.y), Math.getExponent(a.z));
}
@@ -789,6 +881,7 @@ public static void getExponent(Float3 a, Float3 result) {
result.z = Math.getExponent(a.z);
}
+ @Translatable
public static Float3 hypot(Float3 a, Float3 b) {
return new Float3(Math.hypot(a.x, b.x), Math.hypot(a.y, b.y), Math.hypot(a.z, b.z));
}
@@ -799,6 +892,7 @@ public static void hypot(Float3 a, Float3 b, Float3 result) {
result.z = Math.hypot(a.z, b.z);
}
+ @Translatable
public static Float3 lgamma(Float3 a) {
return new Float3(Math.lgamma(a.x), Math.lgamma(a.y), Math.lgamma(a.z));
}
@@ -809,6 +903,7 @@ public static void lgamma(Float3 a, Float3 result) {
result.z = Math.lgamma(a.z);
}
+ @Translatable
public static Float3 log(Float3 a) {
return new Float3(Math.log(a.x), Math.log(a.y), Math.log(a.z));
}
@@ -819,6 +914,7 @@ public static void log(Float3 a, Float3 result) {
result.z = Math.log(a.z);
}
+ @Translatable
public static Float3 log10(Float3 a) {
return new Float3(Math.log10(a.x), Math.log10(a.y), Math.log10(a.z));
}
@@ -829,6 +925,7 @@ public static void log10(Float3 a, Float3 result) {
result.z = Math.log10(a.z);
}
+ @Translatable
public static Float3 log1p(Float3 a) {
return new Float3(Math.log1p(a.x), Math.log1p(a.y), Math.log1p(a.z));
}
@@ -839,6 +936,7 @@ public static void log1p(Float3 a, Float3 result) {
result.z = Math.log1p(a.z);
}
+ @Translatable
public static Float3 log2(Float3 a) {
return new Float3(Math.log2(a.x), Math.log2(a.y), Math.log2(a.z));
}
@@ -849,6 +947,7 @@ public static void log2(Float3 a, Float3 result) {
result.z = Math.log2(a.z);
}
+ @Translatable
public static Float3 logb(Float3 a) {
return new Float3(Math.logb(a.x), Math.logb(a.y), Math.logb(a.z));
}
@@ -859,6 +958,7 @@ public static void logb(Float3 a, Float3 result) {
result.z = Math.logb(a.z);
}
+ @Translatable
public static Float3 mad(Float3 a, Float3 b, Float3 c) {
return new Float3(Math.mad(a.x, b.x, c.x), Math.mad(a.y, b.y, c.y), Math.mad(a.z, b.z, c.z));
}
@@ -869,6 +969,7 @@ public static void mad(Float3 a, Float3 b, Float3 c, Float3 result) {
result.z = Math.mad(a.z, b.z, c.z);
}
+ @Translatable
public static Float3 nextAfter(Float3 a, Float3 b) {
return new Float3(Math.nextAfter(a.x, b.x), Math.nextAfter(a.y, b.y), Math.nextAfter(a.z, b.z));
}
@@ -879,6 +980,7 @@ public static void nextAfter(Float3 a, Float3 b, Float3 result) {
result.z = Math.nextAfter(a.z, b.z);
}
+ @Translatable
public static Float3 pow(Float3 a, Float3 b) {
return new Float3(Math.pow(a.x, b.x), Math.pow(a.y, b.y), Math.pow(a.z, b.z));
}
@@ -889,6 +991,7 @@ public static void pow(Float3 a, Float3 b, Float3 result) {
result.z = Math.pow(a.z, b.z);
}
+ @Translatable
public static Float3 powr(Float3 a, Float3 b) {
return new Float3(Math.powr(a.x, b.x), Math.powr(a.y, b.y), Math.powr(a.z, b.z));
}
@@ -899,6 +1002,7 @@ public static void powr(Float3 a, Float3 b, Float3 result) {
result.z = Math.powr(a.z, b.z);
}
+ @Translatable
public static Float3 remainder(Float3 a, Float3 b) {
return new Float3(Math.remainder(a.x, b.x), Math.remainder(a.y, b.y), Math.remainder(a.z, b.z));
}
@@ -909,6 +1013,7 @@ public static void remainder(Float3 a, Float3 b, Float3 result) {
result.z = Math.remainder(a.z, b.z);
}
+ @Translatable
public static Float3 rint(Float3 a) {
return new Float3(Math.rint(a.x), Math.rint(a.y), Math.rint(a.z));
}
@@ -919,6 +1024,7 @@ public static void rint(Float3 a, Float3 result) {
result.z = Math.rint(a.z);
}
+ @Translatable
public static Float3 round(Float3 a) {
return new Float3(Math.round(a.x), Math.round(a.y), Math.round(a.z));
}
@@ -929,6 +1035,7 @@ public static void round(Float3 a, Float3 result) {
result.z = Math.round(a.z);
}
+ @Translatable
public static Float3 rsqrt(Float3 a) {
return new Float3(Math.rsqrt(a.x), Math.rsqrt(a.y), Math.rsqrt(a.z));
}
@@ -939,6 +1046,7 @@ public static void rsqrt(Float3 a, Float3 result) {
result.z = Math.rsqrt(a.z);
}
+ @Translatable
public static Float3 signum(Float3 a) {
return new Float3(Math.signum(a.x), Math.signum(a.y), Math.signum(a.z));
}
@@ -949,6 +1057,7 @@ public static void signum(Float3 a, Float3 result) {
result.z = Math.signum(a.z);
}
+ @Translatable
public static Float3 sin(Float3 a) {
return new Float3(Math.sin(a.x), Math.sin(a.y), Math.sin(a.z));
}
@@ -959,6 +1068,7 @@ public static void sin(Float3 a, Float3 result) {
result.z = Math.sin(a.z);
}
+ @Translatable
public static Float3 sinh(Float3 a) {
return new Float3(Math.sinh(a.x), Math.sinh(a.y), Math.sinh(a.z));
}
@@ -969,6 +1079,7 @@ public static void sinh(Float3 a, Float3 result) {
result.z = Math.sinh(a.z);
}
+ @Translatable
public static Float3 smoothStep(Float3 a, Float3 b, Float3 c) {
return new Float3(Math.smoothStep(a.x, b.x, c.x), Math.smoothStep(a.y, b.y, c.y), Math.smoothStep(a.z, b.z, c.z));
}
@@ -979,6 +1090,7 @@ public static void smoothStep(Float3 a, Float3 b, Float3 c, Float3 result) {
result.z = Math.smoothStep(a.z, b.z, c.z);
}
+ @Translatable
public static Float3 sqrt(Float3 a) {
return new Float3(Math.sqrt(a.x), Math.sqrt(a.y), Math.sqrt(a.z));
}
@@ -989,6 +1101,7 @@ public static void sqrt(Float3 a, Float3 result) {
result.z = Math.sqrt(a.z);
}
+ @Translatable
public static Float3 step(Float3 a, Float3 b) {
return new Float3(Math.step(a.x, b.x), Math.step(a.y, b.y), Math.step(a.z, b.z));
}
@@ -999,6 +1112,7 @@ public static void step(Float3 a, Float3 b, Float3 result) {
result.z = Math.step(a.z, b.z);
}
+ @Translatable
public static Float3 tan(Float3 a) {
return new Float3(Math.tan(a.x), Math.tan(a.y), Math.tan(a.z));
}
@@ -1009,6 +1123,7 @@ public static void tan(Float3 a, Float3 result) {
result.z = Math.tan(a.z);
}
+ @Translatable
public static Float3 tanh(Float3 a) {
return new Float3(Math.tanh(a.x), Math.tanh(a.y), Math.tanh(a.z));
}
@@ -1019,6 +1134,7 @@ public static void tanh(Float3 a, Float3 result) {
result.z = Math.tanh(a.z);
}
+ @Translatable
public static Float3 tgamma(Float3 a) {
return new Float3(Math.tgamma(a.x), Math.tgamma(a.y), Math.tgamma(a.z));
}
@@ -1029,6 +1145,7 @@ public static void tgamma(Float3 a, Float3 result) {
result.z = Math.tgamma(a.z);
}
+ @Translatable
public static Float3 toDegrees(Float3 a) {
return new Float3(Math.toDegrees(a.x), Math.toDegrees(a.y), Math.toDegrees(a.z));
}
@@ -1039,6 +1156,7 @@ public static void toDegrees(Float3 a, Float3 result) {
result.z = Math.toDegrees(a.z);
}
+ @Translatable
public static Float3 toRadians(Float3 a) {
return new Float3(Math.toRadians(a.x), Math.toRadians(a.y), Math.toRadians(a.z));
}
@@ -1049,6 +1167,7 @@ public static void toRadians(Float3 a, Float3 result) {
result.z = Math.toRadians(a.z);
}
+ @Translatable
public static Float3 trunc(Float3 a) {
return new Float3(Math.trunc(a.x), Math.trunc(a.y), Math.trunc(a.z));
}
@@ -1059,6 +1178,7 @@ public static void trunc(Float3 a, Float3 result) {
result.z = Math.trunc(a.z);
}
+ @Translatable
public static Float3 scalb(Float3 a, Int3 n) {
return new Float3(Math.scalb(a.x, n.x), Math.scalb(a.y, n.y), Math.scalb(a.z, n.z));
}
@@ -1069,6 +1189,7 @@ public static void scalb(Float3 a, Int3 n, Float3 result) {
result.z = Math.scalb(a.z, n.z);
}
+ @Translatable
public static Float3 ldexp(Float3 a, Int3 n) {
return new Float3(Math.ldexp(a.x, n.x), Math.ldexp(a.y, n.y), Math.ldexp(a.z, n.z));
}
@@ -1079,6 +1200,7 @@ public static void ldexp(Float3 a, Int3 n, Float3 result) {
result.z = Math.ldexp(a.z, n.z);
}
+ @Translatable
public static Float3 pown(Float3 a, Int3 b) {
return new Float3(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z));
}
@@ -1089,6 +1211,7 @@ public static void pown(Float3 a, Int3 b, Float3 result) {
result.z = Math.pown(a.z, b.z);
}
+ @Translatable
public static Float3 rootn(Float3 a, Int3 b) {
return new Float3(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z));
}
@@ -1099,6 +1222,7 @@ public static void rootn(Float3 a, Int3 b, Float3 result) {
result.z = Math.pown(a.z, b.z);
}
+ @Translatable
public static Float3 smoothStep(Float3 a, Float3 b, float c) {
return new Float3(Math.smoothStep(a.x, b.x, c), Math.smoothStep(a.y, b.y, c), Math.smoothStep(a.z, b.z, c));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float4.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float4.java
index d2ac91b..7381d79 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float4.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float4.java
@@ -27,18 +27,28 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Float4 {
+ @Translatable
public float x;
+ @Translatable
public float y;
+ @Translatable
public float z;
+ @Translatable
public float w;
+ @Translatable
public Float4() {}
+ @Translatable
public Float4(float x, float y, float z, float w) {
set(x, y, z, w);
}
+ @Translatable
public void set(float x, float y, float z, float w) {
this.x = x;
this.y = y;
@@ -46,74 +56,92 @@ public void set(float x, float y, float z, float w) {
this.w = w;
}
+ @Translatable
public Float4(float v) {
this(v, v, v, v);
}
+ @Translatable
public void set(float v) {
set(v, v, v, v);
}
+ @Translatable
public Float4(float x, float y, Float2 vec1) {
this(x, y, vec1.x, vec1.y);
}
+ @Translatable
public void set(float x, float y, Float2 vec1) {
set(x, y, vec1.x, vec1.y);
}
+ @Translatable
public Float4(float x, Float2 vec1, float w) {
this(x, vec1.x, vec1.y, w);
}
+ @Translatable
public void set(float x, Float2 vec1, float w) {
set(x, vec1.x, vec1.y, w);
}
+ @Translatable
public Float4(float x, Float3 vec1) {
this(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(float x, Float3 vec1) {
set(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Float4(Float2 vec1, float z, float w) {
this(vec1.x, vec1.y, z, w);
}
+ @Translatable
public void set(Float2 vec1, float z, float w) {
set(vec1.x, vec1.y, z, w);
}
+ @Translatable
public Float4(Float2 vec1, Float2 vec2) {
this(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2) {
set(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Float4(Float3 vec1, float w) {
this(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public void set(Float3 vec1, float w) {
set(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public Float4(Float4 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(Float4 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Float4 value() {
return new Float4(this);
}
+ @Translatable
public Float2 lo() {
return new Float2(x, y);
}
@@ -123,6 +151,7 @@ public void lo(Float2 result) {
result.y = y;
}
+ @Translatable
public Float2 hi() {
return new Float2(z, w);
}
@@ -132,6 +161,7 @@ public void hi(Float2 result) {
result.y = w;
}
+ @Translatable
public Float2 odd() {
return new Float2(y, w);
}
@@ -141,6 +171,7 @@ public void odd(Float2 result) {
result.y = w;
}
+ @Translatable
public Float2 even() {
return new Float2(x, z);
}
@@ -150,6 +181,7 @@ public void even(Float2 result) {
result.y = z;
}
+ @Translatable
public Byte4 convertByte4() {
return new Byte4((byte)(x), (byte)(y), (byte)(z), (byte)(w));
}
@@ -161,6 +193,7 @@ public void convertByte4(Byte4 result) {
result.w = (byte)(w);
}
+ @Translatable
public Short4 convertShort4() {
return new Short4((short)(x), (short)(y), (short)(z), (short)(w));
}
@@ -172,6 +205,7 @@ public void convertShort4(Short4 result) {
result.w = (short)(w);
}
+ @Translatable
public Int4 convertInt4() {
return new Int4((int)(x), (int)(y), (int)(z), (int)(w));
}
@@ -183,6 +217,7 @@ public void convertInt4(Int4 result) {
result.w = (int)(w);
}
+ @Translatable
public Long4 convertLong4() {
return new Long4((long)(x), (long)(y), (long)(z), (long)(w));
}
@@ -194,6 +229,7 @@ public void convertLong4(Long4 result) {
result.w = (long)(w);
}
+ @Translatable
public Double4 convertDouble4() {
return new Double4((double)(x), (double)(y), (double)(z), (double)(w));
}
@@ -205,6 +241,7 @@ public void convertDouble4(Double4 result) {
result.w = (double)(w);
}
+ @Translatable
public Float2 asFloat2() {
return new Float2(x, y);
}
@@ -214,6 +251,7 @@ public void asFloat2(Float2 result) {
result.y = y;
}
+ @Translatable
public Float3 asFloat3() {
return new Float3(x, y, z);
}
@@ -224,6 +262,7 @@ public void asFloat3(Float3 result) {
result.z = z;
}
+ @Translatable
public static Int4 isEqual(Float4 a, Float4 b) {
return new Int4(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0);
}
@@ -235,6 +274,7 @@ public static void isEqual(Float4 a, Float4 b, Int4 result) {
result.w = a.w == b.w? 1 : 0;
}
+ @Translatable
public static Int4 isNotEqual(Float4 a, Float4 b) {
return new Int4(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0);
}
@@ -246,6 +286,7 @@ public static void isNotEqual(Float4 a, Float4 b, Int4 result) {
result.w = a.w != b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreater(Float4 a, Float4 b) {
return new Int4(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0);
}
@@ -257,6 +298,7 @@ public static void isGreater(Float4 a, Float4 b, Int4 result) {
result.w = a.w > b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreaterEqual(Float4 a, Float4 b) {
return new Int4(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0);
}
@@ -268,6 +310,7 @@ public static void isGreaterEqual(Float4 a, Float4 b, Int4 result) {
result.w = a.w >= b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLess(Float4 a, Float4 b) {
return new Int4(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0);
}
@@ -279,6 +322,7 @@ public static void isLess(Float4 a, Float4 b, Int4 result) {
result.w = a.w < b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLessEqual(Float4 a, Float4 b) {
return new Int4(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0);
}
@@ -290,6 +334,7 @@ public static void isLessEqual(Float4 a, Float4 b, Int4 result) {
result.w = a.w <= b.w? 1 : 0;
}
+ @Translatable
public static Float4 select(Float4 a, Float4 b, Int4 c) {
return new Float4(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w));
}
@@ -301,6 +346,7 @@ public static void select(Float4 a, Float4 b, Int4 c, Float4 result) {
result.w = Math.select(a.w, b.w, c.w);
}
+ @Translatable
public static Int4 isFinite(Float4 a) {
return new Int4(Math.isFinite(a.x), Math.isFinite(a.y), Math.isFinite(a.z), Math.isFinite(a.w));
}
@@ -312,6 +358,7 @@ public static void isFinite(Float4 a, Int4 result) {
result.w = Math.isFinite(a.w);
}
+ @Translatable
public static Int4 isInf(Float4 a) {
return new Int4(Math.isInf(a.x), Math.isInf(a.y), Math.isInf(a.z), Math.isInf(a.w));
}
@@ -323,6 +370,7 @@ public static void isInf(Float4 a, Int4 result) {
result.w = Math.isInf(a.w);
}
+ @Translatable
public static Int4 isNaN(Float4 a) {
return new Int4(Math.isNaN(a.x), Math.isNaN(a.y), Math.isNaN(a.z), Math.isNaN(a.w));
}
@@ -334,6 +382,7 @@ public static void isNaN(Float4 a, Int4 result) {
result.w = Math.isNaN(a.w);
}
+ @Translatable
public static Int4 isNormal(Float4 a) {
return new Int4(Math.isNormal(a.x), Math.isNormal(a.y), Math.isNormal(a.z), Math.isNormal(a.w));
}
@@ -345,6 +394,7 @@ public static void isNormal(Float4 a, Int4 result) {
result.w = Math.isNormal(a.w);
}
+ @Translatable
public static Int4 isOrdered(Float4 a, Float4 b) {
return new Int4(Math.isOrdered(a.x, b.x), Math.isOrdered(a.y, b.y), Math.isOrdered(a.z, b.z), Math.isOrdered(a.w, b.w));
}
@@ -356,6 +406,7 @@ public static void isOrdered(Float4 a, Float4 b, Int4 result) {
result.w = Math.isOrdered(a.w, b.w);
}
+ @Translatable
public static Int4 isUnordered(Float4 a, Float4 b) {
return new Int4(Math.isUnordered(a.x, b.x), Math.isUnordered(a.y, b.y), Math.isUnordered(a.z, b.z), Math.isUnordered(a.w, b.w));
}
@@ -367,14 +418,17 @@ public static void isUnordered(Float4 a, Float4 b, Int4 result) {
result.w = Math.isUnordered(a.w, b.w);
}
+ @Translatable
public static int any(Float4 a) {
return (a.x != 0.0f || a.y != 0.0f || a.z != 0.0f || a.w != 0.0f)? 1 : 0;
}
+ @Translatable
public static int all(Float4 a) {
return (a.x == 0.0f || a.y == 0.0f || a.z == 0.0f || a.w == 0.0f)? 0 : 1;
}
+ @Translatable
public static Float4 neg(Float4 a) {
return new Float4((float)(-a.x), (float)(-a.y), (float)(-a.z), (float)(-a.w));
}
@@ -386,6 +440,7 @@ public static void neg(Float4 a, Float4 result) {
result.w = (float)(-a.w);
}
+ @Translatable
public static Float4 add(Float4 a, Float4 b) {
return new Float4((float)(a.x + b.x), (float)(a.y + b.y), (float)(a.z + b.z), (float)(a.w + b.w));
}
@@ -397,6 +452,7 @@ public static void add(Float4 a, Float4 b, Float4 result) {
result.w = (float)(a.w + b.w);
}
+ @Translatable
public static Float4 sub(Float4 a, Float4 b) {
return new Float4((float)(a.x - b.x), (float)(a.y - b.y), (float)(a.z - b.z), (float)(a.w - b.w));
}
@@ -408,6 +464,7 @@ public static void sub(Float4 a, Float4 b, Float4 result) {
result.w = (float)(a.w - b.w);
}
+ @Translatable
public static Double4 mul(Float4 a, Double4 b) {
return new Double4((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w));
}
@@ -419,6 +476,7 @@ public static void mul(Float4 a, Double4 b, Double4 result) {
result.w = (double)(a.w * b.w);
}
+ @Translatable
public static Double4 mul(Float4 a, double k) {
return new Double4((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k));
}
@@ -430,6 +488,7 @@ public static void mul(Float4 a, double k, Double4 result) {
result.w = (double)(a.w * k);
}
+ @Translatable
public static Float4 mul(Float4 a, Float4 b) {
return new Float4((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w));
}
@@ -441,6 +500,7 @@ public static void mul(Float4 a, Float4 b, Float4 result) {
result.w = (float)(a.w * b.w);
}
+ @Translatable
public static Float4 mul(Float4 a, float k) {
return new Float4((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k));
}
@@ -452,6 +512,7 @@ public static void mul(Float4 a, float k, Float4 result) {
result.w = (float)(a.w * k);
}
+ @Translatable
public static Double4 div(Float4 a, Double4 b) {
return new Double4((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w));
}
@@ -463,6 +524,7 @@ public static void div(Float4 a, Double4 b, Double4 result) {
result.w = (double)(a.w / b.w);
}
+ @Translatable
public static Double4 div(Float4 a, double k) {
return new Double4((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k));
}
@@ -474,6 +536,7 @@ public static void div(Float4 a, double k, Double4 result) {
result.w = (double)(a.w / k);
}
+ @Translatable
public static Float4 div(Float4 a, Float4 b) {
return new Float4((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w));
}
@@ -485,6 +548,7 @@ public static void div(Float4 a, Float4 b, Float4 result) {
result.w = (float)(a.w / b.w);
}
+ @Translatable
public static Float4 div(Float4 a, float k) {
return new Float4((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k));
}
@@ -496,6 +560,7 @@ public static void div(Float4 a, float k, Float4 result) {
result.w = (float)(a.w / k);
}
+ @Translatable
public static Float4 cross(Float4 a, Float4 b) {
Float4 result = new Float4();
cross(a, b, result);
@@ -509,23 +574,28 @@ public static void cross(Float4 a, Float4 b, Float4 result) {
result.w = 0.0f;
}
+ @Translatable
public static float dot(Float4 a, Float4 b) {
return (float)(a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w);
}
+ @Translatable
public static double distance(Float4 a, Float4 b) {
return distance(a, b, new Float4());
}
+ @Translatable
public static double distance(Float4 a, Float4 b, Float4 tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(Float4 a) {
return Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w);
}
+ @Translatable
public static Float4 normalize(Float4 a) {
Float4 result = new Float4();
normalize(a, result);
@@ -540,6 +610,7 @@ public static void normalize(Float4 a, Float4 result) {
result.w = (float)(a.w / len);
}
+ @Translatable
public static Float4 abs(Float4 a) {
return new Float4(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w));
}
@@ -551,6 +622,7 @@ public static void abs(Float4 a, Float4 result) {
result.w = Math.abs(a.w);
}
+ @Translatable
public static Float4 clamp(Float4 a, Float4 b, Float4 c) {
return new Float4(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w));
}
@@ -562,6 +634,7 @@ public static void clamp(Float4 a, Float4 b, Float4 c, Float4 result) {
result.w = Math.clamp(a.w, b.w, c.w);
}
+ @Translatable
public static Float4 max(Float4 a, Float4 b) {
return new Float4(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w));
}
@@ -573,6 +646,7 @@ public static void max(Float4 a, Float4 b, Float4 result) {
result.w = Math.max(a.w, b.w);
}
+ @Translatable
public static Float4 maxMag(Float4 a, Float4 b) {
return new Float4(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w));
}
@@ -584,6 +658,7 @@ public static void maxMag(Float4 a, Float4 b, Float4 result) {
result.w = Math.maxMag(a.w, b.w);
}
+ @Translatable
public static Float4 min(Float4 a, Float4 b) {
return new Float4(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w));
}
@@ -595,6 +670,7 @@ public static void min(Float4 a, Float4 b, Float4 result) {
result.w = Math.min(a.w, b.w);
}
+ @Translatable
public static Float4 minMag(Float4 a, Float4 b) {
return new Float4(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w));
}
@@ -606,6 +682,7 @@ public static void minMag(Float4 a, Float4 b, Float4 result) {
result.w = Math.minMag(a.w, b.w);
}
+ @Translatable
public static Float4 mix(Float4 a, Float4 b, Float4 c) {
return new Float4(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w));
}
@@ -617,6 +694,7 @@ public static void mix(Float4 a, Float4 b, Float4 c, Float4 result) {
result.w = Math.mix(a.w, b.w, c.w);
}
+ @Translatable
public static Float4 clamp(Float4 v, float min, float max) {
return new Float4(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max));
}
@@ -628,6 +706,7 @@ public static void clamp(Float4 v, float min, float max, Float4 result) {
result.w = Math.clamp(v.w, min, max);
}
+ @Translatable
public static Float4 max(Float4 x, float y) {
return new Float4(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y));
}
@@ -639,6 +718,7 @@ public static void max(Float4 x, float y, Float4 result) {
result.w = Math.max(x.w, y);
}
+ @Translatable
public static Float4 min(Float4 x, float y) {
return new Float4(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y));
}
@@ -650,6 +730,7 @@ public static void min(Float4 x, float y, Float4 result) {
result.w = Math.min(x.w, y);
}
+ @Translatable
public static Float4 mix(Float4 x, Float4 y, float a) {
return new Float4(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a));
}
@@ -661,6 +742,7 @@ public static void mix(Float4 x, Float4 y, float a, Float4 result) {
result.w = Math.mix(x.w, y.w, a);
}
+ @Translatable
public static Float4 acos(Float4 a) {
return new Float4(Math.acos(a.x), Math.acos(a.y), Math.acos(a.z), Math.acos(a.w));
}
@@ -672,6 +754,7 @@ public static void acos(Float4 a, Float4 result) {
result.w = Math.acos(a.w);
}
+ @Translatable
public static Float4 acosh(Float4 a) {
return new Float4(Math.acosh(a.x), Math.acosh(a.y), Math.acosh(a.z), Math.acosh(a.w));
}
@@ -683,6 +766,7 @@ public static void acosh(Float4 a, Float4 result) {
result.w = Math.acosh(a.w);
}
+ @Translatable
public static Float4 asin(Float4 a) {
return new Float4(Math.asin(a.x), Math.asin(a.y), Math.asin(a.z), Math.asin(a.w));
}
@@ -694,6 +778,7 @@ public static void asin(Float4 a, Float4 result) {
result.w = Math.asin(a.w);
}
+ @Translatable
public static Float4 asinh(Float4 a) {
return new Float4(Math.asinh(a.x), Math.asinh(a.y), Math.asinh(a.z), Math.asinh(a.w));
}
@@ -705,6 +790,7 @@ public static void asinh(Float4 a, Float4 result) {
result.w = Math.asinh(a.w);
}
+ @Translatable
public static Float4 atan(Float4 a) {
return new Float4(Math.atan(a.x), Math.atan(a.y), Math.atan(a.z), Math.atan(a.w));
}
@@ -716,6 +802,7 @@ public static void atan(Float4 a, Float4 result) {
result.w = Math.atan(a.w);
}
+ @Translatable
public static Float4 atan2(Float4 a, Float4 b) {
return new Float4(Math.atan2(a.x, b.x), Math.atan2(a.y, b.y), Math.atan2(a.z, b.z), Math.atan2(a.w, b.w));
}
@@ -727,6 +814,7 @@ public static void atan2(Float4 a, Float4 b, Float4 result) {
result.w = Math.atan2(a.w, b.w);
}
+ @Translatable
public static Float4 atanh(Float4 a) {
return new Float4(Math.atanh(a.x), Math.atanh(a.y), Math.atanh(a.z), Math.atanh(a.w));
}
@@ -738,6 +826,7 @@ public static void atanh(Float4 a, Float4 result) {
result.w = Math.atanh(a.w);
}
+ @Translatable
public static Float4 cbrt(Float4 a) {
return new Float4(Math.cbrt(a.x), Math.cbrt(a.y), Math.cbrt(a.z), Math.cbrt(a.w));
}
@@ -749,6 +838,7 @@ public static void cbrt(Float4 a, Float4 result) {
result.w = Math.cbrt(a.w);
}
+ @Translatable
public static Float4 ceil(Float4 a) {
return new Float4(Math.ceil(a.x), Math.ceil(a.y), Math.ceil(a.z), Math.ceil(a.w));
}
@@ -760,6 +850,7 @@ public static void ceil(Float4 a, Float4 result) {
result.w = Math.ceil(a.w);
}
+ @Translatable
public static Float4 copySign(Float4 a, Float4 b) {
return new Float4(Math.copySign(a.x, b.x), Math.copySign(a.y, b.y), Math.copySign(a.z, b.z), Math.copySign(a.w, b.w));
}
@@ -771,6 +862,7 @@ public static void copySign(Float4 a, Float4 b, Float4 result) {
result.w = Math.copySign(a.w, b.w);
}
+ @Translatable
public static Float4 cos(Float4 a) {
return new Float4(Math.cos(a.x), Math.cos(a.y), Math.cos(a.z), Math.cos(a.w));
}
@@ -782,6 +874,7 @@ public static void cos(Float4 a, Float4 result) {
result.w = Math.cos(a.w);
}
+ @Translatable
public static Float4 cosh(Float4 a) {
return new Float4(Math.cosh(a.x), Math.cosh(a.y), Math.cosh(a.z), Math.cosh(a.w));
}
@@ -793,6 +886,7 @@ public static void cosh(Float4 a, Float4 result) {
result.w = Math.cosh(a.w);
}
+ @Translatable
public static Float4 erf(Float4 a) {
return new Float4(Math.erf(a.x), Math.erf(a.y), Math.erf(a.z), Math.erf(a.w));
}
@@ -804,6 +898,7 @@ public static void erf(Float4 a, Float4 result) {
result.w = Math.erf(a.w);
}
+ @Translatable
public static Float4 erfc(Float4 a) {
return new Float4(Math.erfc(a.x), Math.erfc(a.y), Math.erfc(a.z), Math.erfc(a.w));
}
@@ -815,6 +910,7 @@ public static void erfc(Float4 a, Float4 result) {
result.w = Math.erfc(a.w);
}
+ @Translatable
public static Float4 exp(Float4 a) {
return new Float4(Math.exp(a.x), Math.exp(a.y), Math.exp(a.z), Math.exp(a.w));
}
@@ -826,6 +922,7 @@ public static void exp(Float4 a, Float4 result) {
result.w = Math.exp(a.w);
}
+ @Translatable
public static Float4 exp10(Float4 a) {
return new Float4(Math.exp10(a.x), Math.exp10(a.y), Math.exp10(a.z), Math.exp10(a.w));
}
@@ -837,6 +934,7 @@ public static void exp10(Float4 a, Float4 result) {
result.w = Math.exp10(a.w);
}
+ @Translatable
public static Float4 exp2(Float4 a) {
return new Float4(Math.exp2(a.x), Math.exp2(a.y), Math.exp2(a.z), Math.exp2(a.w));
}
@@ -848,6 +946,7 @@ public static void exp2(Float4 a, Float4 result) {
result.w = Math.exp2(a.w);
}
+ @Translatable
public static Float4 expm1(Float4 a) {
return new Float4(Math.expm1(a.x), Math.expm1(a.y), Math.expm1(a.z), Math.expm1(a.w));
}
@@ -859,6 +958,7 @@ public static void expm1(Float4 a, Float4 result) {
result.w = Math.expm1(a.w);
}
+ @Translatable
public static Float4 fdim(Float4 a, Float4 b) {
return new Float4(Math.fdim(a.x, b.x), Math.fdim(a.y, b.y), Math.fdim(a.z, b.z), Math.fdim(a.w, b.w));
}
@@ -870,6 +970,7 @@ public static void fdim(Float4 a, Float4 b, Float4 result) {
result.w = Math.fdim(a.w, b.w);
}
+ @Translatable
public static Float4 floor(Float4 a) {
return new Float4(Math.floor(a.x), Math.floor(a.y), Math.floor(a.z), Math.floor(a.w));
}
@@ -881,6 +982,7 @@ public static void floor(Float4 a, Float4 result) {
result.w = Math.floor(a.w);
}
+ @Translatable
public static Float4 fma(Float4 a, Float4 b, Float4 c) {
return new Float4(Math.fma(a.x, b.x, c.x), Math.fma(a.y, b.y, c.y), Math.fma(a.z, b.z, c.z), Math.fma(a.w, b.w, c.w));
}
@@ -892,6 +994,7 @@ public static void fma(Float4 a, Float4 b, Float4 c, Float4 result) {
result.w = Math.fma(a.w, b.w, c.w);
}
+ @Translatable
public static Float4 fmod(Float4 a, Float4 b) {
return new Float4(Math.fmod(a.x, b.x), Math.fmod(a.y, b.y), Math.fmod(a.z, b.z), Math.fmod(a.w, b.w));
}
@@ -903,6 +1006,7 @@ public static void fmod(Float4 a, Float4 b, Float4 result) {
result.w = Math.fmod(a.w, b.w);
}
+ @Translatable
public static Float4 fract(Float4 a) {
return new Float4(Math.fract(a.x), Math.fract(a.y), Math.fract(a.z), Math.fract(a.w));
}
@@ -914,6 +1018,7 @@ public static void fract(Float4 a, Float4 result) {
result.w = Math.fract(a.w);
}
+ @Translatable
public static Float4 frexp(Float4 a) {
return new Float4(Math.frexp(a.x), Math.frexp(a.y), Math.frexp(a.z), Math.frexp(a.w));
}
@@ -925,6 +1030,7 @@ public static void frexp(Float4 a, Float4 result) {
result.w = Math.frexp(a.w);
}
+ @Translatable
public static Float4 getExponent(Float4 a) {
return new Float4(Math.getExponent(a.x), Math.getExponent(a.y), Math.getExponent(a.z), Math.getExponent(a.w));
}
@@ -936,6 +1042,7 @@ public static void getExponent(Float4 a, Float4 result) {
result.w = Math.getExponent(a.w);
}
+ @Translatable
public static Float4 hypot(Float4 a, Float4 b) {
return new Float4(Math.hypot(a.x, b.x), Math.hypot(a.y, b.y), Math.hypot(a.z, b.z), Math.hypot(a.w, b.w));
}
@@ -947,6 +1054,7 @@ public static void hypot(Float4 a, Float4 b, Float4 result) {
result.w = Math.hypot(a.w, b.w);
}
+ @Translatable
public static Float4 lgamma(Float4 a) {
return new Float4(Math.lgamma(a.x), Math.lgamma(a.y), Math.lgamma(a.z), Math.lgamma(a.w));
}
@@ -958,6 +1066,7 @@ public static void lgamma(Float4 a, Float4 result) {
result.w = Math.lgamma(a.w);
}
+ @Translatable
public static Float4 log(Float4 a) {
return new Float4(Math.log(a.x), Math.log(a.y), Math.log(a.z), Math.log(a.w));
}
@@ -969,6 +1078,7 @@ public static void log(Float4 a, Float4 result) {
result.w = Math.log(a.w);
}
+ @Translatable
public static Float4 log10(Float4 a) {
return new Float4(Math.log10(a.x), Math.log10(a.y), Math.log10(a.z), Math.log10(a.w));
}
@@ -980,6 +1090,7 @@ public static void log10(Float4 a, Float4 result) {
result.w = Math.log10(a.w);
}
+ @Translatable
public static Float4 log1p(Float4 a) {
return new Float4(Math.log1p(a.x), Math.log1p(a.y), Math.log1p(a.z), Math.log1p(a.w));
}
@@ -991,6 +1102,7 @@ public static void log1p(Float4 a, Float4 result) {
result.w = Math.log1p(a.w);
}
+ @Translatable
public static Float4 log2(Float4 a) {
return new Float4(Math.log2(a.x), Math.log2(a.y), Math.log2(a.z), Math.log2(a.w));
}
@@ -1002,6 +1114,7 @@ public static void log2(Float4 a, Float4 result) {
result.w = Math.log2(a.w);
}
+ @Translatable
public static Float4 logb(Float4 a) {
return new Float4(Math.logb(a.x), Math.logb(a.y), Math.logb(a.z), Math.logb(a.w));
}
@@ -1013,6 +1126,7 @@ public static void logb(Float4 a, Float4 result) {
result.w = Math.logb(a.w);
}
+ @Translatable
public static Float4 mad(Float4 a, Float4 b, Float4 c) {
return new Float4(Math.mad(a.x, b.x, c.x), Math.mad(a.y, b.y, c.y), Math.mad(a.z, b.z, c.z), Math.mad(a.w, b.w, c.w));
}
@@ -1024,6 +1138,7 @@ public static void mad(Float4 a, Float4 b, Float4 c, Float4 result) {
result.w = Math.mad(a.w, b.w, c.w);
}
+ @Translatable
public static Float4 nextAfter(Float4 a, Float4 b) {
return new Float4(Math.nextAfter(a.x, b.x), Math.nextAfter(a.y, b.y), Math.nextAfter(a.z, b.z), Math.nextAfter(a.w, b.w));
}
@@ -1035,6 +1150,7 @@ public static void nextAfter(Float4 a, Float4 b, Float4 result) {
result.w = Math.nextAfter(a.w, b.w);
}
+ @Translatable
public static Float4 pow(Float4 a, Float4 b) {
return new Float4(Math.pow(a.x, b.x), Math.pow(a.y, b.y), Math.pow(a.z, b.z), Math.pow(a.w, b.w));
}
@@ -1046,6 +1162,7 @@ public static void pow(Float4 a, Float4 b, Float4 result) {
result.w = Math.pow(a.w, b.w);
}
+ @Translatable
public static Float4 powr(Float4 a, Float4 b) {
return new Float4(Math.powr(a.x, b.x), Math.powr(a.y, b.y), Math.powr(a.z, b.z), Math.powr(a.w, b.w));
}
@@ -1057,6 +1174,7 @@ public static void powr(Float4 a, Float4 b, Float4 result) {
result.w = Math.powr(a.w, b.w);
}
+ @Translatable
public static Float4 remainder(Float4 a, Float4 b) {
return new Float4(Math.remainder(a.x, b.x), Math.remainder(a.y, b.y), Math.remainder(a.z, b.z), Math.remainder(a.w, b.w));
}
@@ -1068,6 +1186,7 @@ public static void remainder(Float4 a, Float4 b, Float4 result) {
result.w = Math.remainder(a.w, b.w);
}
+ @Translatable
public static Float4 rint(Float4 a) {
return new Float4(Math.rint(a.x), Math.rint(a.y), Math.rint(a.z), Math.rint(a.w));
}
@@ -1079,6 +1198,7 @@ public static void rint(Float4 a, Float4 result) {
result.w = Math.rint(a.w);
}
+ @Translatable
public static Float4 round(Float4 a) {
return new Float4(Math.round(a.x), Math.round(a.y), Math.round(a.z), Math.round(a.w));
}
@@ -1090,6 +1210,7 @@ public static void round(Float4 a, Float4 result) {
result.w = Math.round(a.w);
}
+ @Translatable
public static Float4 rsqrt(Float4 a) {
return new Float4(Math.rsqrt(a.x), Math.rsqrt(a.y), Math.rsqrt(a.z), Math.rsqrt(a.w));
}
@@ -1101,6 +1222,7 @@ public static void rsqrt(Float4 a, Float4 result) {
result.w = Math.rsqrt(a.w);
}
+ @Translatable
public static Float4 signum(Float4 a) {
return new Float4(Math.signum(a.x), Math.signum(a.y), Math.signum(a.z), Math.signum(a.w));
}
@@ -1112,6 +1234,7 @@ public static void signum(Float4 a, Float4 result) {
result.w = Math.signum(a.w);
}
+ @Translatable
public static Float4 sin(Float4 a) {
return new Float4(Math.sin(a.x), Math.sin(a.y), Math.sin(a.z), Math.sin(a.w));
}
@@ -1123,6 +1246,7 @@ public static void sin(Float4 a, Float4 result) {
result.w = Math.sin(a.w);
}
+ @Translatable
public static Float4 sinh(Float4 a) {
return new Float4(Math.sinh(a.x), Math.sinh(a.y), Math.sinh(a.z), Math.sinh(a.w));
}
@@ -1134,6 +1258,7 @@ public static void sinh(Float4 a, Float4 result) {
result.w = Math.sinh(a.w);
}
+ @Translatable
public static Float4 smoothStep(Float4 a, Float4 b, Float4 c) {
return new Float4(Math.smoothStep(a.x, b.x, c.x), Math.smoothStep(a.y, b.y, c.y), Math.smoothStep(a.z, b.z, c.z), Math.smoothStep(a.w, b.w, c.w));
}
@@ -1145,6 +1270,7 @@ public static void smoothStep(Float4 a, Float4 b, Float4 c, Float4 result) {
result.w = Math.smoothStep(a.w, b.w, c.w);
}
+ @Translatable
public static Float4 sqrt(Float4 a) {
return new Float4(Math.sqrt(a.x), Math.sqrt(a.y), Math.sqrt(a.z), Math.sqrt(a.w));
}
@@ -1156,6 +1282,7 @@ public static void sqrt(Float4 a, Float4 result) {
result.w = Math.sqrt(a.w);
}
+ @Translatable
public static Float4 step(Float4 a, Float4 b) {
return new Float4(Math.step(a.x, b.x), Math.step(a.y, b.y), Math.step(a.z, b.z), Math.step(a.w, b.w));
}
@@ -1167,6 +1294,7 @@ public static void step(Float4 a, Float4 b, Float4 result) {
result.w = Math.step(a.w, b.w);
}
+ @Translatable
public static Float4 tan(Float4 a) {
return new Float4(Math.tan(a.x), Math.tan(a.y), Math.tan(a.z), Math.tan(a.w));
}
@@ -1178,6 +1306,7 @@ public static void tan(Float4 a, Float4 result) {
result.w = Math.tan(a.w);
}
+ @Translatable
public static Float4 tanh(Float4 a) {
return new Float4(Math.tanh(a.x), Math.tanh(a.y), Math.tanh(a.z), Math.tanh(a.w));
}
@@ -1189,6 +1318,7 @@ public static void tanh(Float4 a, Float4 result) {
result.w = Math.tanh(a.w);
}
+ @Translatable
public static Float4 tgamma(Float4 a) {
return new Float4(Math.tgamma(a.x), Math.tgamma(a.y), Math.tgamma(a.z), Math.tgamma(a.w));
}
@@ -1200,6 +1330,7 @@ public static void tgamma(Float4 a, Float4 result) {
result.w = Math.tgamma(a.w);
}
+ @Translatable
public static Float4 toDegrees(Float4 a) {
return new Float4(Math.toDegrees(a.x), Math.toDegrees(a.y), Math.toDegrees(a.z), Math.toDegrees(a.w));
}
@@ -1211,6 +1342,7 @@ public static void toDegrees(Float4 a, Float4 result) {
result.w = Math.toDegrees(a.w);
}
+ @Translatable
public static Float4 toRadians(Float4 a) {
return new Float4(Math.toRadians(a.x), Math.toRadians(a.y), Math.toRadians(a.z), Math.toRadians(a.w));
}
@@ -1222,6 +1354,7 @@ public static void toRadians(Float4 a, Float4 result) {
result.w = Math.toRadians(a.w);
}
+ @Translatable
public static Float4 trunc(Float4 a) {
return new Float4(Math.trunc(a.x), Math.trunc(a.y), Math.trunc(a.z), Math.trunc(a.w));
}
@@ -1233,6 +1366,7 @@ public static void trunc(Float4 a, Float4 result) {
result.w = Math.trunc(a.w);
}
+ @Translatable
public static Float4 scalb(Float4 a, Int4 n) {
return new Float4(Math.scalb(a.x, n.x), Math.scalb(a.y, n.y), Math.scalb(a.z, n.z), Math.scalb(a.w, n.w));
}
@@ -1244,6 +1378,7 @@ public static void scalb(Float4 a, Int4 n, Float4 result) {
result.w = Math.scalb(a.w, n.w);
}
+ @Translatable
public static Float4 ldexp(Float4 a, Int4 n) {
return new Float4(Math.ldexp(a.x, n.x), Math.ldexp(a.y, n.y), Math.ldexp(a.z, n.z), Math.ldexp(a.w, n.w));
}
@@ -1255,6 +1390,7 @@ public static void ldexp(Float4 a, Int4 n, Float4 result) {
result.w = Math.ldexp(a.w, n.w);
}
+ @Translatable
public static Float4 pown(Float4 a, Int4 b) {
return new Float4(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z), Math.pown(a.w, b.w));
}
@@ -1266,6 +1402,7 @@ public static void pown(Float4 a, Int4 b, Float4 result) {
result.w = Math.pown(a.w, b.w);
}
+ @Translatable
public static Float4 rootn(Float4 a, Int4 b) {
return new Float4(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z), Math.pown(a.w, b.w));
}
@@ -1277,6 +1414,7 @@ public static void rootn(Float4 a, Int4 b, Float4 result) {
result.w = Math.pown(a.w, b.w);
}
+ @Translatable
public static Float4 smoothStep(Float4 a, Float4 b, float c) {
return new Float4(Math.smoothStep(a.x, b.x, c), Math.smoothStep(a.y, b.y, c), Math.smoothStep(a.z, b.z, c), Math.smoothStep(a.w, b.w, c));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float8.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float8.java
index 410338f..ba4f049 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float8.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Float8.java
@@ -27,19 +27,30 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Float8 {
+ @Translatable
public float x;
+ @Translatable
public float y;
+ @Translatable
public float z;
+ @Translatable
public float w;
+ @Translatable
public float[] s = new float[4];
+ @Translatable
public Float8() {}
+ @Translatable
public Float8(float x, float y, float z, float w, float s0, float s1, float s2, float s3) {
set(x, y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(float x, float y, float z, float w, float s0, float s1, float s2, float s3) {
this.x = x;
this.y = y;
@@ -51,882 +62,1102 @@ public void set(float x, float y, float z, float w, float s0, float s1, float s2
this.s[3] = s3;
}
+ @Translatable
public Float8(float v) {
this(v, v, v, v, v, v, v, v);
}
+ @Translatable
public void set(float v) {
set(v, v, v, v, v, v, v, v);
}
+ @Translatable
public Float8(float x, float y, float z, float w, float s0, float s1, Float2 vec1) {
this(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public void set(float x, float y, float z, float w, float s0, float s1, Float2 vec1) {
set(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public Float8(float x, float y, float z, float w, float s0, Float2 vec1, float s3) {
this(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public void set(float x, float y, float z, float w, float s0, Float2 vec1, float s3) {
set(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public Float8(float x, float y, float z, float w, float s0, Float3 vec1) {
this(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(float x, float y, float z, float w, float s0, Float3 vec1) {
set(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Float8(float x, float y, float z, float w, Float2 vec1, float s2, float s3) {
this(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public void set(float x, float y, float z, float w, Float2 vec1, float s2, float s3) {
set(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public Float8(float x, float y, float z, float w, Float2 vec1, Float2 vec2) {
this(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, float y, float z, float w, Float2 vec1, Float2 vec2) {
set(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, float y, float z, float w, Float3 vec1, float s3) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public void set(float x, float y, float z, float w, Float3 vec1, float s3) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public Float8(float x, float y, float z, float w, Float4 vec1) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(float x, float y, float z, float w, Float4 vec1) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Float8(float x, float y, float z, Float2 vec1, float s1, float s2, float s3) {
this(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public void set(float x, float y, float z, Float2 vec1, float s1, float s2, float s3) {
set(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public Float8(float x, float y, float z, Float2 vec1, float s1, Float2 vec2) {
this(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, float y, float z, Float2 vec1, float s1, Float2 vec2) {
set(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, float y, float z, Float2 vec1, Float2 vec2, float s3) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(float x, float y, float z, Float2 vec1, Float2 vec2, float s3) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(float x, float y, float z, Float2 vec1, Float3 vec2) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(float x, float y, float z, Float2 vec1, Float3 vec2) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(float x, float y, float z, Float3 vec1, float s2, float s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public void set(float x, float y, float z, Float3 vec1, float s2, float s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public Float8(float x, float y, float z, Float3 vec1, Float2 vec2) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, float y, float z, Float3 vec1, Float2 vec2) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, float y, float z, Float4 vec1, float s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public void set(float x, float y, float z, Float4 vec1, float s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public Float8(float x, float y, Float2 vec1, float s0, float s1, float s2, float s3) {
this(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(float x, float y, Float2 vec1, float s0, float s1, float s2, float s3) {
set(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public Float8(float x, float y, Float2 vec1, float s0, float s1, Float2 vec2) {
this(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, float y, Float2 vec1, float s0, float s1, Float2 vec2) {
set(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, float y, Float2 vec1, float s0, Float2 vec2, float s3) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(float x, float y, Float2 vec1, float s0, Float2 vec2, float s3) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(float x, float y, Float2 vec1, float s0, Float3 vec2) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(float x, float y, Float2 vec1, float s0, Float3 vec2) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(float x, float y, Float2 vec1, Float2 vec2, float s2, float s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(float x, float y, Float2 vec1, Float2 vec2, float s2, float s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Float8(float x, float y, Float2 vec1, Float2 vec2, Float2 vec3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(float x, float y, Float2 vec1, Float2 vec2, Float2 vec3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Float8(float x, float y, Float2 vec1, Float3 vec2, float s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(float x, float y, Float2 vec1, Float3 vec2, float s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Float8(float x, float y, Float2 vec1, Float4 vec2) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(float x, float y, Float2 vec1, Float4 vec2) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Float8(float x, float y, Float3 vec1, float s1, float s2, float s3) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public void set(float x, float y, Float3 vec1, float s1, float s2, float s3) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public Float8(float x, float y, Float3 vec1, float s1, Float2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, float y, Float3 vec1, float s1, Float2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, float y, Float3 vec1, Float2 vec2, float s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(float x, float y, Float3 vec1, Float2 vec2, float s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(float x, float y, Float3 vec1, Float3 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(float x, float y, Float3 vec1, Float3 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(float x, float y, Float4 vec1, float s2, float s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public void set(float x, float y, Float4 vec1, float s2, float s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public Float8(float x, float y, Float4 vec1, Float2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, float y, Float4 vec1, Float2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, Float2 vec1, float w, float s0, float s1, float s2, float s3) {
this(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(float x, Float2 vec1, float w, float s0, float s1, float s2, float s3) {
set(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public Float8(float x, Float2 vec1, float w, float s0, float s1, Float2 vec2) {
this(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, Float2 vec1, float w, float s0, float s1, Float2 vec2) {
set(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, Float2 vec1, float w, float s0, Float2 vec2, float s3) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(float x, Float2 vec1, float w, float s0, Float2 vec2, float s3) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(float x, Float2 vec1, float w, float s0, Float3 vec2) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(float x, Float2 vec1, float w, float s0, Float3 vec2) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(float x, Float2 vec1, float w, Float2 vec2, float s2, float s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(float x, Float2 vec1, float w, Float2 vec2, float s2, float s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Float8(float x, Float2 vec1, float w, Float2 vec2, Float2 vec3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(float x, Float2 vec1, float w, Float2 vec2, Float2 vec3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Float8(float x, Float2 vec1, float w, Float3 vec2, float s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(float x, Float2 vec1, float w, Float3 vec2, float s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Float8(float x, Float2 vec1, float w, Float4 vec2) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(float x, Float2 vec1, float w, Float4 vec2) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Float8(float x, Float2 vec1, Float2 vec2, float s1, float s2, float s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(float x, Float2 vec1, Float2 vec2, float s1, float s2, float s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Float8(float x, Float2 vec1, Float2 vec2, float s1, Float2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(float x, Float2 vec1, Float2 vec2, float s1, Float2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Float8(float x, Float2 vec1, Float2 vec2, Float2 vec3, float s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(float x, Float2 vec1, Float2 vec2, Float2 vec3, float s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Float8(float x, Float2 vec1, Float2 vec2, Float3 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(float x, Float2 vec1, Float2 vec2, Float3 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Float8(float x, Float2 vec1, Float3 vec2, float s2, float s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(float x, Float2 vec1, Float3 vec2, float s2, float s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Float8(float x, Float2 vec1, Float3 vec2, Float2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(float x, Float2 vec1, Float3 vec2, Float2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Float8(float x, Float2 vec1, Float4 vec2, float s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(float x, Float2 vec1, Float4 vec2, float s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Float8(float x, Float3 vec1, float s0, float s1, float s2, float s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public void set(float x, Float3 vec1, float s0, float s1, float s2, float s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public Float8(float x, Float3 vec1, float s0, float s1, Float2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, Float3 vec1, float s0, float s1, Float2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, Float3 vec1, float s0, Float2 vec2, float s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(float x, Float3 vec1, float s0, Float2 vec2, float s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(float x, Float3 vec1, float s0, Float3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(float x, Float3 vec1, float s0, Float3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(float x, Float3 vec1, Float2 vec2, float s2, float s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(float x, Float3 vec1, Float2 vec2, float s2, float s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Float8(float x, Float3 vec1, Float2 vec2, Float2 vec3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(float x, Float3 vec1, Float2 vec2, Float2 vec3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Float8(float x, Float3 vec1, Float3 vec2, float s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(float x, Float3 vec1, Float3 vec2, float s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Float8(float x, Float3 vec1, Float4 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(float x, Float3 vec1, Float4 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Float8(float x, Float4 vec1, float s1, float s2, float s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public void set(float x, Float4 vec1, float s1, float s2, float s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public Float8(float x, Float4 vec1, float s1, Float2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(float x, Float4 vec1, float s1, Float2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(float x, Float4 vec1, Float2 vec2, float s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(float x, Float4 vec1, Float2 vec2, float s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(float x, Float4 vec1, Float3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(float x, Float4 vec1, Float3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(Float2 vec1, float z, float w, float s0, float s1, float s2, float s3) {
this(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Float2 vec1, float z, float w, float s0, float s1, float s2, float s3) {
set(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public Float8(Float2 vec1, float z, float w, float s0, float s1, Float2 vec2) {
this(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Float2 vec1, float z, float w, float s0, float s1, Float2 vec2) {
set(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(Float2 vec1, float z, float w, float s0, Float2 vec2, float s3) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Float2 vec1, float z, float w, float s0, Float2 vec2, float s3) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(Float2 vec1, float z, float w, float s0, Float3 vec2) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Float2 vec1, float z, float w, float s0, Float3 vec2) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(Float2 vec1, float z, float w, Float2 vec2, float s2, float s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Float2 vec1, float z, float w, Float2 vec2, float s2, float s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Float8(Float2 vec1, float z, float w, Float2 vec2, Float2 vec3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float2 vec1, float z, float w, Float2 vec2, Float2 vec3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float2 vec1, float z, float w, Float3 vec2, float s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Float2 vec1, float z, float w, Float3 vec2, float s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Float8(Float2 vec1, float z, float w, Float4 vec2) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Float2 vec1, float z, float w, Float4 vec2) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Float8(Float2 vec1, float z, Float2 vec2, float s1, float s2, float s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Float2 vec1, float z, Float2 vec2, float s1, float s2, float s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Float8(Float2 vec1, float z, Float2 vec2, float s1, Float2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float2 vec1, float z, Float2 vec2, float s1, Float2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float2 vec1, float z, Float2 vec2, Float2 vec3, float s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Float2 vec1, float z, Float2 vec2, Float2 vec3, float s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Float8(Float2 vec1, float z, Float2 vec2, Float3 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Float2 vec1, float z, Float2 vec2, Float3 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Float8(Float2 vec1, float z, Float3 vec2, float s2, float s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Float2 vec1, float z, Float3 vec2, float s2, float s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Float8(Float2 vec1, float z, Float3 vec2, Float2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float2 vec1, float z, Float3 vec2, Float2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float2 vec1, float z, Float4 vec2, float s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Float2 vec1, float z, Float4 vec2, float s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Float8(Float2 vec1, Float2 vec2, float s0, float s1, float s2, float s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2, float s0, float s1, float s2, float s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public Float8(Float2 vec1, Float2 vec2, float s0, float s1, Float2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2, float s0, float s1, Float2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float2 vec1, Float2 vec2, float s0, Float2 vec3, float s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2, float s0, Float2 vec3, float s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public Float8(Float2 vec1, Float2 vec2, float s0, Float3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2, float s0, Float3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Float8(Float2 vec1, Float2 vec2, Float2 vec3, float s2, float s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2, Float2 vec3, float s2, float s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public Float8(Float2 vec1, Float2 vec2, Float2 vec3, Float2 vec4) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2, Float2 vec3, Float2 vec4) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public Float8(Float2 vec1, Float2 vec2, Float3 vec3, float s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2, Float3 vec3, float s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public Float8(Float2 vec1, Float2 vec2, Float4 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public void set(Float2 vec1, Float2 vec2, Float4 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public Float8(Float2 vec1, Float3 vec2, float s1, float s2, float s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public void set(Float2 vec1, Float3 vec2, float s1, float s2, float s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public Float8(Float2 vec1, Float3 vec2, float s1, Float2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float2 vec1, Float3 vec2, float s1, Float2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float2 vec1, Float3 vec2, Float2 vec3, float s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Float2 vec1, Float3 vec2, Float2 vec3, float s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public Float8(Float2 vec1, Float3 vec2, Float3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Float2 vec1, Float3 vec2, Float3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Float8(Float2 vec1, Float4 vec2, float s2, float s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public void set(Float2 vec1, Float4 vec2, float s2, float s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public Float8(Float2 vec1, Float4 vec2, Float2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float2 vec1, Float4 vec2, Float2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float3 vec1, float w, float s0, float s1, float s2, float s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Float3 vec1, float w, float s0, float s1, float s2, float s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public Float8(Float3 vec1, float w, float s0, float s1, Float2 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Float3 vec1, float w, float s0, float s1, Float2 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(Float3 vec1, float w, float s0, Float2 vec2, float s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Float3 vec1, float w, float s0, Float2 vec2, float s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(Float3 vec1, float w, float s0, Float3 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Float3 vec1, float w, float s0, Float3 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(Float3 vec1, float w, Float2 vec2, float s2, float s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Float3 vec1, float w, Float2 vec2, float s2, float s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Float8(Float3 vec1, float w, Float2 vec2, Float2 vec3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float3 vec1, float w, Float2 vec2, Float2 vec3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float3 vec1, float w, Float3 vec2, float s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Float3 vec1, float w, Float3 vec2, float s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Float8(Float3 vec1, float w, Float4 vec2) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Float3 vec1, float w, Float4 vec2) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Float8(Float3 vec1, Float2 vec2, float s1, float s2, float s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Float3 vec1, Float2 vec2, float s1, float s2, float s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Float8(Float3 vec1, Float2 vec2, float s1, Float2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float3 vec1, Float2 vec2, float s1, Float2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float3 vec1, Float2 vec2, Float2 vec3, float s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Float3 vec1, Float2 vec2, Float2 vec3, float s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Float8(Float3 vec1, Float2 vec2, Float3 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Float3 vec1, Float2 vec2, Float3 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Float8(Float3 vec1, Float3 vec2, float s2, float s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Float3 vec1, Float3 vec2, float s2, float s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Float8(Float3 vec1, Float3 vec2, Float2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float3 vec1, Float3 vec2, Float2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float3 vec1, Float4 vec2, float s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Float3 vec1, Float4 vec2, float s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Float8(Float4 vec1, float s0, float s1, float s2, float s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Float4 vec1, float s0, float s1, float s2, float s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public Float8(Float4 vec1, float s0, float s1, Float2 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Float4 vec1, float s0, float s1, Float2 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Float8(Float4 vec1, float s0, Float2 vec2, float s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Float4 vec1, float s0, Float2 vec2, float s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Float8(Float4 vec1, float s0, Float3 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Float4 vec1, float s0, Float3 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Float8(Float4 vec1, Float2 vec2, float s2, float s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Float4 vec1, Float2 vec2, float s2, float s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Float8(Float4 vec1, Float2 vec2, Float2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Float4 vec1, Float2 vec2, Float2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Float8(Float4 vec1, Float3 vec2, float s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Float4 vec1, Float3 vec2, float s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Float8(Float4 vec1, Float4 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Float4 vec1, Float4 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Float8(Float8 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public void set(Float8 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public Float8 value() {
return new Float8(this);
}
+ @Translatable
public Float4 lo() {
return new Float4(x, y, z, w);
}
@@ -938,6 +1169,7 @@ public void lo(Float4 result) {
result.w = w;
}
+ @Translatable
public Float4 hi() {
return new Float4(s[0], s[1], s[2], s[3]);
}
@@ -949,6 +1181,7 @@ public void hi(Float4 result) {
result.w = s[3];
}
+ @Translatable
public Float4 odd() {
return new Float4(y, w, s[1], s[3]);
}
@@ -960,6 +1193,7 @@ public void odd(Float4 result) {
result.w = s[3];
}
+ @Translatable
public Float4 even() {
return new Float4(x, z, s[0], s[2]);
}
@@ -971,6 +1205,7 @@ public void even(Float4 result) {
result.w = s[2];
}
+ @Translatable
public Byte8 convertByte8() {
return new Byte8((byte)(x), (byte)(y), (byte)(z), (byte)(w), (byte)(s[0]), (byte)(s[1]), (byte)(s[2]), (byte)(s[3]));
}
@@ -986,6 +1221,7 @@ public void convertByte8(Byte8 result) {
result.s[3] = (byte)(s[3]);
}
+ @Translatable
public Short8 convertShort8() {
return new Short8((short)(x), (short)(y), (short)(z), (short)(w), (short)(s[0]), (short)(s[1]), (short)(s[2]), (short)(s[3]));
}
@@ -1001,6 +1237,7 @@ public void convertShort8(Short8 result) {
result.s[3] = (short)(s[3]);
}
+ @Translatable
public Int8 convertInt8() {
return new Int8((int)(x), (int)(y), (int)(z), (int)(w), (int)(s[0]), (int)(s[1]), (int)(s[2]), (int)(s[3]));
}
@@ -1016,6 +1253,7 @@ public void convertInt8(Int8 result) {
result.s[3] = (int)(s[3]);
}
+ @Translatable
public Long8 convertLong8() {
return new Long8((long)(x), (long)(y), (long)(z), (long)(w), (long)(s[0]), (long)(s[1]), (long)(s[2]), (long)(s[3]));
}
@@ -1031,6 +1269,7 @@ public void convertLong8(Long8 result) {
result.s[3] = (long)(s[3]);
}
+ @Translatable
public Double8 convertDouble8() {
return new Double8((double)(x), (double)(y), (double)(z), (double)(w), (double)(s[0]), (double)(s[1]), (double)(s[2]), (double)(s[3]));
}
@@ -1046,6 +1285,7 @@ public void convertDouble8(Double8 result) {
result.s[3] = (double)(s[3]);
}
+ @Translatable
public Float2 asFloat2() {
return new Float2(x, y);
}
@@ -1055,6 +1295,7 @@ public void asFloat2(Float2 result) {
result.y = y;
}
+ @Translatable
public Float3 asFloat3() {
return new Float3(x, y, z);
}
@@ -1065,6 +1306,7 @@ public void asFloat3(Float3 result) {
result.z = z;
}
+ @Translatable
public Float4 asFloat4() {
return new Float4(x, y, z, w);
}
@@ -1076,6 +1318,7 @@ public void asFloat4(Float4 result) {
result.w = w;
}
+ @Translatable
public static Int8 isEqual(Float8 a, Float8 b) {
return new Int8(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0, a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
}
@@ -1091,6 +1334,7 @@ public static void isEqual(Float8 a, Float8 b, Int8 result) {
result.s[3] = a.s[3] == b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isNotEqual(Float8 a, Float8 b) {
return new Int8(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0, a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
}
@@ -1106,6 +1350,7 @@ public static void isNotEqual(Float8 a, Float8 b, Int8 result) {
result.s[3] = a.s[3] != b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreater(Float8 a, Float8 b) {
return new Int8(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0, a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
}
@@ -1121,6 +1366,7 @@ public static void isGreater(Float8 a, Float8 b, Int8 result) {
result.s[3] = a.s[3] > b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreaterEqual(Float8 a, Float8 b) {
return new Int8(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0, a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
}
@@ -1136,6 +1382,7 @@ public static void isGreaterEqual(Float8 a, Float8 b, Int8 result) {
result.s[3] = a.s[3] >= b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLess(Float8 a, Float8 b) {
return new Int8(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0, a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
}
@@ -1151,6 +1398,7 @@ public static void isLess(Float8 a, Float8 b, Int8 result) {
result.s[3] = a.s[3] < b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLessEqual(Float8 a, Float8 b) {
return new Int8(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0, a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
}
@@ -1166,6 +1414,7 @@ public static void isLessEqual(Float8 a, Float8 b, Int8 result) {
result.s[3] = a.s[3] <= b.s[3]? 1 : 0;
}
+ @Translatable
public static Float8 select(Float8 a, Float8 b, Int8 c) {
return new Float8(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w), Math.select(a.s[0], b.s[0], c.s[0]), Math.select(a.s[1], b.s[1], c.s[1]), Math.select(a.s[2], b.s[2], c.s[2]), Math.select(a.s[3], b.s[3], c.s[3]));
}
@@ -1181,6 +1430,7 @@ public static void select(Float8 a, Float8 b, Int8 c, Float8 result) {
result.s[3] = Math.select(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Int8 isFinite(Float8 a) {
return new Int8(Math.isFinite(a.x), Math.isFinite(a.y), Math.isFinite(a.z), Math.isFinite(a.w), Math.isFinite(a.s[0]), Math.isFinite(a.s[1]), Math.isFinite(a.s[2]), Math.isFinite(a.s[3]));
}
@@ -1196,6 +1446,7 @@ public static void isFinite(Float8 a, Int8 result) {
result.s[3] = Math.isFinite(a.s[3]);
}
+ @Translatable
public static Int8 isInf(Float8 a) {
return new Int8(Math.isInf(a.x), Math.isInf(a.y), Math.isInf(a.z), Math.isInf(a.w), Math.isInf(a.s[0]), Math.isInf(a.s[1]), Math.isInf(a.s[2]), Math.isInf(a.s[3]));
}
@@ -1211,6 +1462,7 @@ public static void isInf(Float8 a, Int8 result) {
result.s[3] = Math.isInf(a.s[3]);
}
+ @Translatable
public static Int8 isNaN(Float8 a) {
return new Int8(Math.isNaN(a.x), Math.isNaN(a.y), Math.isNaN(a.z), Math.isNaN(a.w), Math.isNaN(a.s[0]), Math.isNaN(a.s[1]), Math.isNaN(a.s[2]), Math.isNaN(a.s[3]));
}
@@ -1226,6 +1478,7 @@ public static void isNaN(Float8 a, Int8 result) {
result.s[3] = Math.isNaN(a.s[3]);
}
+ @Translatable
public static Int8 isNormal(Float8 a) {
return new Int8(Math.isNormal(a.x), Math.isNormal(a.y), Math.isNormal(a.z), Math.isNormal(a.w), Math.isNormal(a.s[0]), Math.isNormal(a.s[1]), Math.isNormal(a.s[2]), Math.isNormal(a.s[3]));
}
@@ -1241,6 +1494,7 @@ public static void isNormal(Float8 a, Int8 result) {
result.s[3] = Math.isNormal(a.s[3]);
}
+ @Translatable
public static Int8 isOrdered(Float8 a, Float8 b) {
return new Int8(Math.isOrdered(a.x, b.x), Math.isOrdered(a.y, b.y), Math.isOrdered(a.z, b.z), Math.isOrdered(a.w, b.w), Math.isOrdered(a.s[0], b.s[0]), Math.isOrdered(a.s[1], b.s[1]), Math.isOrdered(a.s[2], b.s[2]), Math.isOrdered(a.s[3], b.s[3]));
}
@@ -1256,6 +1510,7 @@ public static void isOrdered(Float8 a, Float8 b, Int8 result) {
result.s[3] = Math.isOrdered(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 isUnordered(Float8 a, Float8 b) {
return new Int8(Math.isUnordered(a.x, b.x), Math.isUnordered(a.y, b.y), Math.isUnordered(a.z, b.z), Math.isUnordered(a.w, b.w), Math.isUnordered(a.s[0], b.s[0]), Math.isUnordered(a.s[1], b.s[1]), Math.isUnordered(a.s[2], b.s[2]), Math.isUnordered(a.s[3], b.s[3]));
}
@@ -1271,14 +1526,17 @@ public static void isUnordered(Float8 a, Float8 b, Int8 result) {
result.s[3] = Math.isUnordered(a.s[3], b.s[3]);
}
+ @Translatable
public static int any(Float8 a) {
return (a.x != 0.0f || a.y != 0.0f || a.z != 0.0f || a.w != 0.0f || a.s[0] != 0.0f || a.s[1] != 0.0f || a.s[2] != 0.0f || a.s[3] != 0.0f)? 1 : 0;
}
+ @Translatable
public static int all(Float8 a) {
return (a.x == 0.0f || a.y == 0.0f || a.z == 0.0f || a.w == 0.0f || a.s[0] == 0.0f || a.s[1] == 0.0f || a.s[2] == 0.0f || a.s[3] == 0.0f)? 0 : 1;
}
+ @Translatable
public static Float8 neg(Float8 a) {
return new Float8((float)(-a.x), (float)(-a.y), (float)(-a.z), (float)(-a.w), (float)(-a.s[0]), (float)(-a.s[1]), (float)(-a.s[2]), (float)(-a.s[3]));
}
@@ -1294,6 +1552,7 @@ public static void neg(Float8 a, Float8 result) {
result.s[3] = (float)(-a.s[3]);
}
+ @Translatable
public static Float8 add(Float8 a, Float8 b) {
return new Float8((float)(a.x + b.x), (float)(a.y + b.y), (float)(a.z + b.z), (float)(a.w + b.w), (float)(a.s[0] + b.s[0]), (float)(a.s[1] + b.s[1]), (float)(a.s[2] + b.s[2]), (float)(a.s[3] + b.s[3]));
}
@@ -1309,6 +1568,7 @@ public static void add(Float8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] + b.s[3]);
}
+ @Translatable
public static Float8 sub(Float8 a, Float8 b) {
return new Float8((float)(a.x - b.x), (float)(a.y - b.y), (float)(a.z - b.z), (float)(a.w - b.w), (float)(a.s[0] - b.s[0]), (float)(a.s[1] - b.s[1]), (float)(a.s[2] - b.s[2]), (float)(a.s[3] - b.s[3]));
}
@@ -1324,6 +1584,7 @@ public static void sub(Float8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] - b.s[3]);
}
+ @Translatable
public static Double8 mul(Float8 a, Double8 b) {
return new Double8((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w), (double)(a.s[0] * b.s[0]), (double)(a.s[1] * b.s[1]), (double)(a.s[2] * b.s[2]), (double)(a.s[3] * b.s[3]));
}
@@ -1339,6 +1600,7 @@ public static void mul(Float8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Double8 mul(Float8 a, double k) {
return new Double8((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k), (double)(a.s[0] * k), (double)(a.s[1] * k), (double)(a.s[2] * k), (double)(a.s[3] * k));
}
@@ -1354,6 +1616,7 @@ public static void mul(Float8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] * k);
}
+ @Translatable
public static Float8 mul(Float8 a, Float8 b) {
return new Float8((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w), (float)(a.s[0] * b.s[0]), (float)(a.s[1] * b.s[1]), (float)(a.s[2] * b.s[2]), (float)(a.s[3] * b.s[3]));
}
@@ -1369,6 +1632,7 @@ public static void mul(Float8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Float8 mul(Float8 a, float k) {
return new Float8((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k), (float)(a.s[0] * k), (float)(a.s[1] * k), (float)(a.s[2] * k), (float)(a.s[3] * k));
}
@@ -1384,6 +1648,7 @@ public static void mul(Float8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] * k);
}
+ @Translatable
public static Double8 div(Float8 a, Double8 b) {
return new Double8((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w), (double)(a.s[0] / b.s[0]), (double)(a.s[1] / b.s[1]), (double)(a.s[2] / b.s[2]), (double)(a.s[3] / b.s[3]));
}
@@ -1399,6 +1664,7 @@ public static void div(Float8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Double8 div(Float8 a, double k) {
return new Double8((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k), (double)(a.s[0] / k), (double)(a.s[1] / k), (double)(a.s[2] / k), (double)(a.s[3] / k));
}
@@ -1414,6 +1680,7 @@ public static void div(Float8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] / k);
}
+ @Translatable
public static Float8 div(Float8 a, Float8 b) {
return new Float8((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w), (float)(a.s[0] / b.s[0]), (float)(a.s[1] / b.s[1]), (float)(a.s[2] / b.s[2]), (float)(a.s[3] / b.s[3]));
}
@@ -1429,6 +1696,7 @@ public static void div(Float8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Float8 div(Float8 a, float k) {
return new Float8((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k), (float)(a.s[0] / k), (float)(a.s[1] / k), (float)(a.s[2] / k), (float)(a.s[3] / k));
}
@@ -1444,23 +1712,28 @@ public static void div(Float8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] / k);
}
+ @Translatable
public static float dot(Float8 a, Float8 b) {
return (float)(a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w + a.s[0] * b.s[0] + a.s[1] * b.s[1] + a.s[2] * b.s[2] + a.s[3] * b.s[3]);
}
+ @Translatable
public static double distance(Float8 a, Float8 b) {
return distance(a, b, new Float8());
}
+ @Translatable
public static double distance(Float8 a, Float8 b, Float8 tmp) {
sub(a, b, tmp);
return length(tmp);
}
+ @Translatable
public static double length(Float8 a) {
return Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w + a.s[0] * a.s[0] + a.s[1] * a.s[1] + a.s[2] * a.s[2] + a.s[3] * a.s[3]);
}
+ @Translatable
public static Float8 normalize(Float8 a) {
Float8 result = new Float8();
normalize(a, result);
@@ -1479,6 +1752,7 @@ public static void normalize(Float8 a, Float8 result) {
result.s[3] = (float)(a.s[3] / len);
}
+ @Translatable
public static Float8 abs(Float8 a) {
return new Float8(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w), Math.abs(a.s[0]), Math.abs(a.s[1]), Math.abs(a.s[2]), Math.abs(a.s[3]));
}
@@ -1494,6 +1768,7 @@ public static void abs(Float8 a, Float8 result) {
result.s[3] = Math.abs(a.s[3]);
}
+ @Translatable
public static Float8 clamp(Float8 a, Float8 b, Float8 c) {
return new Float8(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w), Math.clamp(a.s[0], b.s[0], c.s[0]), Math.clamp(a.s[1], b.s[1], c.s[1]), Math.clamp(a.s[2], b.s[2], c.s[2]), Math.clamp(a.s[3], b.s[3], c.s[3]));
}
@@ -1509,6 +1784,7 @@ public static void clamp(Float8 a, Float8 b, Float8 c, Float8 result) {
result.s[3] = Math.clamp(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Float8 max(Float8 a, Float8 b) {
return new Float8(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w), Math.max(a.s[0], b.s[0]), Math.max(a.s[1], b.s[1]), Math.max(a.s[2], b.s[2]), Math.max(a.s[3], b.s[3]));
}
@@ -1524,6 +1800,7 @@ public static void max(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.max(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 maxMag(Float8 a, Float8 b) {
return new Float8(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w), Math.maxMag(a.s[0], b.s[0]), Math.maxMag(a.s[1], b.s[1]), Math.maxMag(a.s[2], b.s[2]), Math.maxMag(a.s[3], b.s[3]));
}
@@ -1539,6 +1816,7 @@ public static void maxMag(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.maxMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 min(Float8 a, Float8 b) {
return new Float8(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w), Math.min(a.s[0], b.s[0]), Math.min(a.s[1], b.s[1]), Math.min(a.s[2], b.s[2]), Math.min(a.s[3], b.s[3]));
}
@@ -1554,6 +1832,7 @@ public static void min(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.min(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 minMag(Float8 a, Float8 b) {
return new Float8(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w), Math.minMag(a.s[0], b.s[0]), Math.minMag(a.s[1], b.s[1]), Math.minMag(a.s[2], b.s[2]), Math.minMag(a.s[3], b.s[3]));
}
@@ -1569,6 +1848,7 @@ public static void minMag(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.minMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 mix(Float8 a, Float8 b, Float8 c) {
return new Float8(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w), Math.mix(a.s[0], b.s[0], c.s[0]), Math.mix(a.s[1], b.s[1], c.s[1]), Math.mix(a.s[2], b.s[2], c.s[2]), Math.mix(a.s[3], b.s[3], c.s[3]));
}
@@ -1584,6 +1864,7 @@ public static void mix(Float8 a, Float8 b, Float8 c, Float8 result) {
result.s[3] = Math.mix(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Float8 clamp(Float8 v, float min, float max) {
return new Float8(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max), Math.clamp(v.s[0], min, max), Math.clamp(v.s[1], min, max), Math.clamp(v.s[2], min, max), Math.clamp(v.s[3], min, max));
}
@@ -1599,6 +1880,7 @@ public static void clamp(Float8 v, float min, float max, Float8 result) {
result.s[3] = Math.clamp(v.s[3], min, max);
}
+ @Translatable
public static Float8 max(Float8 x, float y) {
return new Float8(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y), Math.max(x.s[0], y), Math.max(x.s[1], y), Math.max(x.s[2], y), Math.max(x.s[3], y));
}
@@ -1614,6 +1896,7 @@ public static void max(Float8 x, float y, Float8 result) {
result.s[3] = Math.max(x.s[3], y);
}
+ @Translatable
public static Float8 min(Float8 x, float y) {
return new Float8(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y), Math.min(x.s[0], y), Math.min(x.s[1], y), Math.min(x.s[2], y), Math.min(x.s[3], y));
}
@@ -1629,6 +1912,7 @@ public static void min(Float8 x, float y, Float8 result) {
result.s[3] = Math.min(x.s[3], y);
}
+ @Translatable
public static Float8 mix(Float8 x, Float8 y, float a) {
return new Float8(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a), Math.mix(x.s[0], y.s[0], a), Math.mix(x.s[1], y.s[1], a), Math.mix(x.s[2], y.s[2], a), Math.mix(x.s[3], y.s[3], a));
}
@@ -1644,6 +1928,7 @@ public static void mix(Float8 x, Float8 y, float a, Float8 result) {
result.s[3] = Math.mix(x.s[3], y.s[3], a);
}
+ @Translatable
public static Float8 acos(Float8 a) {
return new Float8(Math.acos(a.x), Math.acos(a.y), Math.acos(a.z), Math.acos(a.w), Math.acos(a.s[0]), Math.acos(a.s[1]), Math.acos(a.s[2]), Math.acos(a.s[3]));
}
@@ -1659,6 +1944,7 @@ public static void acos(Float8 a, Float8 result) {
result.s[3] = Math.acos(a.s[3]);
}
+ @Translatable
public static Float8 acosh(Float8 a) {
return new Float8(Math.acosh(a.x), Math.acosh(a.y), Math.acosh(a.z), Math.acosh(a.w), Math.acosh(a.s[0]), Math.acosh(a.s[1]), Math.acosh(a.s[2]), Math.acosh(a.s[3]));
}
@@ -1674,6 +1960,7 @@ public static void acosh(Float8 a, Float8 result) {
result.s[3] = Math.acosh(a.s[3]);
}
+ @Translatable
public static Float8 asin(Float8 a) {
return new Float8(Math.asin(a.x), Math.asin(a.y), Math.asin(a.z), Math.asin(a.w), Math.asin(a.s[0]), Math.asin(a.s[1]), Math.asin(a.s[2]), Math.asin(a.s[3]));
}
@@ -1689,6 +1976,7 @@ public static void asin(Float8 a, Float8 result) {
result.s[3] = Math.asin(a.s[3]);
}
+ @Translatable
public static Float8 asinh(Float8 a) {
return new Float8(Math.asinh(a.x), Math.asinh(a.y), Math.asinh(a.z), Math.asinh(a.w), Math.asinh(a.s[0]), Math.asinh(a.s[1]), Math.asinh(a.s[2]), Math.asinh(a.s[3]));
}
@@ -1704,6 +1992,7 @@ public static void asinh(Float8 a, Float8 result) {
result.s[3] = Math.asinh(a.s[3]);
}
+ @Translatable
public static Float8 atan(Float8 a) {
return new Float8(Math.atan(a.x), Math.atan(a.y), Math.atan(a.z), Math.atan(a.w), Math.atan(a.s[0]), Math.atan(a.s[1]), Math.atan(a.s[2]), Math.atan(a.s[3]));
}
@@ -1719,6 +2008,7 @@ public static void atan(Float8 a, Float8 result) {
result.s[3] = Math.atan(a.s[3]);
}
+ @Translatable
public static Float8 atan2(Float8 a, Float8 b) {
return new Float8(Math.atan2(a.x, b.x), Math.atan2(a.y, b.y), Math.atan2(a.z, b.z), Math.atan2(a.w, b.w), Math.atan2(a.s[0], b.s[0]), Math.atan2(a.s[1], b.s[1]), Math.atan2(a.s[2], b.s[2]), Math.atan2(a.s[3], b.s[3]));
}
@@ -1734,6 +2024,7 @@ public static void atan2(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.atan2(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 atanh(Float8 a) {
return new Float8(Math.atanh(a.x), Math.atanh(a.y), Math.atanh(a.z), Math.atanh(a.w), Math.atanh(a.s[0]), Math.atanh(a.s[1]), Math.atanh(a.s[2]), Math.atanh(a.s[3]));
}
@@ -1749,6 +2040,7 @@ public static void atanh(Float8 a, Float8 result) {
result.s[3] = Math.atanh(a.s[3]);
}
+ @Translatable
public static Float8 cbrt(Float8 a) {
return new Float8(Math.cbrt(a.x), Math.cbrt(a.y), Math.cbrt(a.z), Math.cbrt(a.w), Math.cbrt(a.s[0]), Math.cbrt(a.s[1]), Math.cbrt(a.s[2]), Math.cbrt(a.s[3]));
}
@@ -1764,6 +2056,7 @@ public static void cbrt(Float8 a, Float8 result) {
result.s[3] = Math.cbrt(a.s[3]);
}
+ @Translatable
public static Float8 ceil(Float8 a) {
return new Float8(Math.ceil(a.x), Math.ceil(a.y), Math.ceil(a.z), Math.ceil(a.w), Math.ceil(a.s[0]), Math.ceil(a.s[1]), Math.ceil(a.s[2]), Math.ceil(a.s[3]));
}
@@ -1779,6 +2072,7 @@ public static void ceil(Float8 a, Float8 result) {
result.s[3] = Math.ceil(a.s[3]);
}
+ @Translatable
public static Float8 copySign(Float8 a, Float8 b) {
return new Float8(Math.copySign(a.x, b.x), Math.copySign(a.y, b.y), Math.copySign(a.z, b.z), Math.copySign(a.w, b.w), Math.copySign(a.s[0], b.s[0]), Math.copySign(a.s[1], b.s[1]), Math.copySign(a.s[2], b.s[2]), Math.copySign(a.s[3], b.s[3]));
}
@@ -1794,6 +2088,7 @@ public static void copySign(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.copySign(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 cos(Float8 a) {
return new Float8(Math.cos(a.x), Math.cos(a.y), Math.cos(a.z), Math.cos(a.w), Math.cos(a.s[0]), Math.cos(a.s[1]), Math.cos(a.s[2]), Math.cos(a.s[3]));
}
@@ -1809,6 +2104,7 @@ public static void cos(Float8 a, Float8 result) {
result.s[3] = Math.cos(a.s[3]);
}
+ @Translatable
public static Float8 cosh(Float8 a) {
return new Float8(Math.cosh(a.x), Math.cosh(a.y), Math.cosh(a.z), Math.cosh(a.w), Math.cosh(a.s[0]), Math.cosh(a.s[1]), Math.cosh(a.s[2]), Math.cosh(a.s[3]));
}
@@ -1824,6 +2120,7 @@ public static void cosh(Float8 a, Float8 result) {
result.s[3] = Math.cosh(a.s[3]);
}
+ @Translatable
public static Float8 erf(Float8 a) {
return new Float8(Math.erf(a.x), Math.erf(a.y), Math.erf(a.z), Math.erf(a.w), Math.erf(a.s[0]), Math.erf(a.s[1]), Math.erf(a.s[2]), Math.erf(a.s[3]));
}
@@ -1839,6 +2136,7 @@ public static void erf(Float8 a, Float8 result) {
result.s[3] = Math.erf(a.s[3]);
}
+ @Translatable
public static Float8 erfc(Float8 a) {
return new Float8(Math.erfc(a.x), Math.erfc(a.y), Math.erfc(a.z), Math.erfc(a.w), Math.erfc(a.s[0]), Math.erfc(a.s[1]), Math.erfc(a.s[2]), Math.erfc(a.s[3]));
}
@@ -1854,6 +2152,7 @@ public static void erfc(Float8 a, Float8 result) {
result.s[3] = Math.erfc(a.s[3]);
}
+ @Translatable
public static Float8 exp(Float8 a) {
return new Float8(Math.exp(a.x), Math.exp(a.y), Math.exp(a.z), Math.exp(a.w), Math.exp(a.s[0]), Math.exp(a.s[1]), Math.exp(a.s[2]), Math.exp(a.s[3]));
}
@@ -1869,6 +2168,7 @@ public static void exp(Float8 a, Float8 result) {
result.s[3] = Math.exp(a.s[3]);
}
+ @Translatable
public static Float8 exp10(Float8 a) {
return new Float8(Math.exp10(a.x), Math.exp10(a.y), Math.exp10(a.z), Math.exp10(a.w), Math.exp10(a.s[0]), Math.exp10(a.s[1]), Math.exp10(a.s[2]), Math.exp10(a.s[3]));
}
@@ -1884,6 +2184,7 @@ public static void exp10(Float8 a, Float8 result) {
result.s[3] = Math.exp10(a.s[3]);
}
+ @Translatable
public static Float8 exp2(Float8 a) {
return new Float8(Math.exp2(a.x), Math.exp2(a.y), Math.exp2(a.z), Math.exp2(a.w), Math.exp2(a.s[0]), Math.exp2(a.s[1]), Math.exp2(a.s[2]), Math.exp2(a.s[3]));
}
@@ -1899,6 +2200,7 @@ public static void exp2(Float8 a, Float8 result) {
result.s[3] = Math.exp2(a.s[3]);
}
+ @Translatable
public static Float8 expm1(Float8 a) {
return new Float8(Math.expm1(a.x), Math.expm1(a.y), Math.expm1(a.z), Math.expm1(a.w), Math.expm1(a.s[0]), Math.expm1(a.s[1]), Math.expm1(a.s[2]), Math.expm1(a.s[3]));
}
@@ -1914,6 +2216,7 @@ public static void expm1(Float8 a, Float8 result) {
result.s[3] = Math.expm1(a.s[3]);
}
+ @Translatable
public static Float8 fdim(Float8 a, Float8 b) {
return new Float8(Math.fdim(a.x, b.x), Math.fdim(a.y, b.y), Math.fdim(a.z, b.z), Math.fdim(a.w, b.w), Math.fdim(a.s[0], b.s[0]), Math.fdim(a.s[1], b.s[1]), Math.fdim(a.s[2], b.s[2]), Math.fdim(a.s[3], b.s[3]));
}
@@ -1929,6 +2232,7 @@ public static void fdim(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.fdim(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 floor(Float8 a) {
return new Float8(Math.floor(a.x), Math.floor(a.y), Math.floor(a.z), Math.floor(a.w), Math.floor(a.s[0]), Math.floor(a.s[1]), Math.floor(a.s[2]), Math.floor(a.s[3]));
}
@@ -1944,6 +2248,7 @@ public static void floor(Float8 a, Float8 result) {
result.s[3] = Math.floor(a.s[3]);
}
+ @Translatable
public static Float8 fma(Float8 a, Float8 b, Float8 c) {
return new Float8(Math.fma(a.x, b.x, c.x), Math.fma(a.y, b.y, c.y), Math.fma(a.z, b.z, c.z), Math.fma(a.w, b.w, c.w), Math.fma(a.s[0], b.s[0], c.s[0]), Math.fma(a.s[1], b.s[1], c.s[1]), Math.fma(a.s[2], b.s[2], c.s[2]), Math.fma(a.s[3], b.s[3], c.s[3]));
}
@@ -1959,6 +2264,7 @@ public static void fma(Float8 a, Float8 b, Float8 c, Float8 result) {
result.s[3] = Math.fma(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Float8 fmod(Float8 a, Float8 b) {
return new Float8(Math.fmod(a.x, b.x), Math.fmod(a.y, b.y), Math.fmod(a.z, b.z), Math.fmod(a.w, b.w), Math.fmod(a.s[0], b.s[0]), Math.fmod(a.s[1], b.s[1]), Math.fmod(a.s[2], b.s[2]), Math.fmod(a.s[3], b.s[3]));
}
@@ -1974,6 +2280,7 @@ public static void fmod(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.fmod(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 fract(Float8 a) {
return new Float8(Math.fract(a.x), Math.fract(a.y), Math.fract(a.z), Math.fract(a.w), Math.fract(a.s[0]), Math.fract(a.s[1]), Math.fract(a.s[2]), Math.fract(a.s[3]));
}
@@ -1989,6 +2296,7 @@ public static void fract(Float8 a, Float8 result) {
result.s[3] = Math.fract(a.s[3]);
}
+ @Translatable
public static Float8 frexp(Float8 a) {
return new Float8(Math.frexp(a.x), Math.frexp(a.y), Math.frexp(a.z), Math.frexp(a.w), Math.frexp(a.s[0]), Math.frexp(a.s[1]), Math.frexp(a.s[2]), Math.frexp(a.s[3]));
}
@@ -2004,6 +2312,7 @@ public static void frexp(Float8 a, Float8 result) {
result.s[3] = Math.frexp(a.s[3]);
}
+ @Translatable
public static Float8 getExponent(Float8 a) {
return new Float8(Math.getExponent(a.x), Math.getExponent(a.y), Math.getExponent(a.z), Math.getExponent(a.w), Math.getExponent(a.s[0]), Math.getExponent(a.s[1]), Math.getExponent(a.s[2]), Math.getExponent(a.s[3]));
}
@@ -2019,6 +2328,7 @@ public static void getExponent(Float8 a, Float8 result) {
result.s[3] = Math.getExponent(a.s[3]);
}
+ @Translatable
public static Float8 hypot(Float8 a, Float8 b) {
return new Float8(Math.hypot(a.x, b.x), Math.hypot(a.y, b.y), Math.hypot(a.z, b.z), Math.hypot(a.w, b.w), Math.hypot(a.s[0], b.s[0]), Math.hypot(a.s[1], b.s[1]), Math.hypot(a.s[2], b.s[2]), Math.hypot(a.s[3], b.s[3]));
}
@@ -2034,6 +2344,7 @@ public static void hypot(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.hypot(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 lgamma(Float8 a) {
return new Float8(Math.lgamma(a.x), Math.lgamma(a.y), Math.lgamma(a.z), Math.lgamma(a.w), Math.lgamma(a.s[0]), Math.lgamma(a.s[1]), Math.lgamma(a.s[2]), Math.lgamma(a.s[3]));
}
@@ -2049,6 +2360,7 @@ public static void lgamma(Float8 a, Float8 result) {
result.s[3] = Math.lgamma(a.s[3]);
}
+ @Translatable
public static Float8 log(Float8 a) {
return new Float8(Math.log(a.x), Math.log(a.y), Math.log(a.z), Math.log(a.w), Math.log(a.s[0]), Math.log(a.s[1]), Math.log(a.s[2]), Math.log(a.s[3]));
}
@@ -2064,6 +2376,7 @@ public static void log(Float8 a, Float8 result) {
result.s[3] = Math.log(a.s[3]);
}
+ @Translatable
public static Float8 log10(Float8 a) {
return new Float8(Math.log10(a.x), Math.log10(a.y), Math.log10(a.z), Math.log10(a.w), Math.log10(a.s[0]), Math.log10(a.s[1]), Math.log10(a.s[2]), Math.log10(a.s[3]));
}
@@ -2079,6 +2392,7 @@ public static void log10(Float8 a, Float8 result) {
result.s[3] = Math.log10(a.s[3]);
}
+ @Translatable
public static Float8 log1p(Float8 a) {
return new Float8(Math.log1p(a.x), Math.log1p(a.y), Math.log1p(a.z), Math.log1p(a.w), Math.log1p(a.s[0]), Math.log1p(a.s[1]), Math.log1p(a.s[2]), Math.log1p(a.s[3]));
}
@@ -2094,6 +2408,7 @@ public static void log1p(Float8 a, Float8 result) {
result.s[3] = Math.log1p(a.s[3]);
}
+ @Translatable
public static Float8 log2(Float8 a) {
return new Float8(Math.log2(a.x), Math.log2(a.y), Math.log2(a.z), Math.log2(a.w), Math.log2(a.s[0]), Math.log2(a.s[1]), Math.log2(a.s[2]), Math.log2(a.s[3]));
}
@@ -2109,6 +2424,7 @@ public static void log2(Float8 a, Float8 result) {
result.s[3] = Math.log2(a.s[3]);
}
+ @Translatable
public static Float8 logb(Float8 a) {
return new Float8(Math.logb(a.x), Math.logb(a.y), Math.logb(a.z), Math.logb(a.w), Math.logb(a.s[0]), Math.logb(a.s[1]), Math.logb(a.s[2]), Math.logb(a.s[3]));
}
@@ -2124,6 +2440,7 @@ public static void logb(Float8 a, Float8 result) {
result.s[3] = Math.logb(a.s[3]);
}
+ @Translatable
public static Float8 mad(Float8 a, Float8 b, Float8 c) {
return new Float8(Math.mad(a.x, b.x, c.x), Math.mad(a.y, b.y, c.y), Math.mad(a.z, b.z, c.z), Math.mad(a.w, b.w, c.w), Math.mad(a.s[0], b.s[0], c.s[0]), Math.mad(a.s[1], b.s[1], c.s[1]), Math.mad(a.s[2], b.s[2], c.s[2]), Math.mad(a.s[3], b.s[3], c.s[3]));
}
@@ -2139,6 +2456,7 @@ public static void mad(Float8 a, Float8 b, Float8 c, Float8 result) {
result.s[3] = Math.mad(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Float8 nextAfter(Float8 a, Float8 b) {
return new Float8(Math.nextAfter(a.x, b.x), Math.nextAfter(a.y, b.y), Math.nextAfter(a.z, b.z), Math.nextAfter(a.w, b.w), Math.nextAfter(a.s[0], b.s[0]), Math.nextAfter(a.s[1], b.s[1]), Math.nextAfter(a.s[2], b.s[2]), Math.nextAfter(a.s[3], b.s[3]));
}
@@ -2154,6 +2472,7 @@ public static void nextAfter(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.nextAfter(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 pow(Float8 a, Float8 b) {
return new Float8(Math.pow(a.x, b.x), Math.pow(a.y, b.y), Math.pow(a.z, b.z), Math.pow(a.w, b.w), Math.pow(a.s[0], b.s[0]), Math.pow(a.s[1], b.s[1]), Math.pow(a.s[2], b.s[2]), Math.pow(a.s[3], b.s[3]));
}
@@ -2169,6 +2488,7 @@ public static void pow(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.pow(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 powr(Float8 a, Float8 b) {
return new Float8(Math.powr(a.x, b.x), Math.powr(a.y, b.y), Math.powr(a.z, b.z), Math.powr(a.w, b.w), Math.powr(a.s[0], b.s[0]), Math.powr(a.s[1], b.s[1]), Math.powr(a.s[2], b.s[2]), Math.powr(a.s[3], b.s[3]));
}
@@ -2184,6 +2504,7 @@ public static void powr(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.powr(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 remainder(Float8 a, Float8 b) {
return new Float8(Math.remainder(a.x, b.x), Math.remainder(a.y, b.y), Math.remainder(a.z, b.z), Math.remainder(a.w, b.w), Math.remainder(a.s[0], b.s[0]), Math.remainder(a.s[1], b.s[1]), Math.remainder(a.s[2], b.s[2]), Math.remainder(a.s[3], b.s[3]));
}
@@ -2199,6 +2520,7 @@ public static void remainder(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.remainder(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 rint(Float8 a) {
return new Float8(Math.rint(a.x), Math.rint(a.y), Math.rint(a.z), Math.rint(a.w), Math.rint(a.s[0]), Math.rint(a.s[1]), Math.rint(a.s[2]), Math.rint(a.s[3]));
}
@@ -2214,6 +2536,7 @@ public static void rint(Float8 a, Float8 result) {
result.s[3] = Math.rint(a.s[3]);
}
+ @Translatable
public static Float8 round(Float8 a) {
return new Float8(Math.round(a.x), Math.round(a.y), Math.round(a.z), Math.round(a.w), Math.round(a.s[0]), Math.round(a.s[1]), Math.round(a.s[2]), Math.round(a.s[3]));
}
@@ -2229,6 +2552,7 @@ public static void round(Float8 a, Float8 result) {
result.s[3] = Math.round(a.s[3]);
}
+ @Translatable
public static Float8 rsqrt(Float8 a) {
return new Float8(Math.rsqrt(a.x), Math.rsqrt(a.y), Math.rsqrt(a.z), Math.rsqrt(a.w), Math.rsqrt(a.s[0]), Math.rsqrt(a.s[1]), Math.rsqrt(a.s[2]), Math.rsqrt(a.s[3]));
}
@@ -2244,6 +2568,7 @@ public static void rsqrt(Float8 a, Float8 result) {
result.s[3] = Math.rsqrt(a.s[3]);
}
+ @Translatable
public static Float8 signum(Float8 a) {
return new Float8(Math.signum(a.x), Math.signum(a.y), Math.signum(a.z), Math.signum(a.w), Math.signum(a.s[0]), Math.signum(a.s[1]), Math.signum(a.s[2]), Math.signum(a.s[3]));
}
@@ -2259,6 +2584,7 @@ public static void signum(Float8 a, Float8 result) {
result.s[3] = Math.signum(a.s[3]);
}
+ @Translatable
public static Float8 sin(Float8 a) {
return new Float8(Math.sin(a.x), Math.sin(a.y), Math.sin(a.z), Math.sin(a.w), Math.sin(a.s[0]), Math.sin(a.s[1]), Math.sin(a.s[2]), Math.sin(a.s[3]));
}
@@ -2274,6 +2600,7 @@ public static void sin(Float8 a, Float8 result) {
result.s[3] = Math.sin(a.s[3]);
}
+ @Translatable
public static Float8 sinh(Float8 a) {
return new Float8(Math.sinh(a.x), Math.sinh(a.y), Math.sinh(a.z), Math.sinh(a.w), Math.sinh(a.s[0]), Math.sinh(a.s[1]), Math.sinh(a.s[2]), Math.sinh(a.s[3]));
}
@@ -2289,6 +2616,7 @@ public static void sinh(Float8 a, Float8 result) {
result.s[3] = Math.sinh(a.s[3]);
}
+ @Translatable
public static Float8 smoothStep(Float8 a, Float8 b, Float8 c) {
return new Float8(Math.smoothStep(a.x, b.x, c.x), Math.smoothStep(a.y, b.y, c.y), Math.smoothStep(a.z, b.z, c.z), Math.smoothStep(a.w, b.w, c.w), Math.smoothStep(a.s[0], b.s[0], c.s[0]), Math.smoothStep(a.s[1], b.s[1], c.s[1]), Math.smoothStep(a.s[2], b.s[2], c.s[2]), Math.smoothStep(a.s[3], b.s[3], c.s[3]));
}
@@ -2304,6 +2632,7 @@ public static void smoothStep(Float8 a, Float8 b, Float8 c, Float8 result) {
result.s[3] = Math.smoothStep(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Float8 sqrt(Float8 a) {
return new Float8(Math.sqrt(a.x), Math.sqrt(a.y), Math.sqrt(a.z), Math.sqrt(a.w), Math.sqrt(a.s[0]), Math.sqrt(a.s[1]), Math.sqrt(a.s[2]), Math.sqrt(a.s[3]));
}
@@ -2319,6 +2648,7 @@ public static void sqrt(Float8 a, Float8 result) {
result.s[3] = Math.sqrt(a.s[3]);
}
+ @Translatable
public static Float8 step(Float8 a, Float8 b) {
return new Float8(Math.step(a.x, b.x), Math.step(a.y, b.y), Math.step(a.z, b.z), Math.step(a.w, b.w), Math.step(a.s[0], b.s[0]), Math.step(a.s[1], b.s[1]), Math.step(a.s[2], b.s[2]), Math.step(a.s[3], b.s[3]));
}
@@ -2334,6 +2664,7 @@ public static void step(Float8 a, Float8 b, Float8 result) {
result.s[3] = Math.step(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 tan(Float8 a) {
return new Float8(Math.tan(a.x), Math.tan(a.y), Math.tan(a.z), Math.tan(a.w), Math.tan(a.s[0]), Math.tan(a.s[1]), Math.tan(a.s[2]), Math.tan(a.s[3]));
}
@@ -2349,6 +2680,7 @@ public static void tan(Float8 a, Float8 result) {
result.s[3] = Math.tan(a.s[3]);
}
+ @Translatable
public static Float8 tanh(Float8 a) {
return new Float8(Math.tanh(a.x), Math.tanh(a.y), Math.tanh(a.z), Math.tanh(a.w), Math.tanh(a.s[0]), Math.tanh(a.s[1]), Math.tanh(a.s[2]), Math.tanh(a.s[3]));
}
@@ -2364,6 +2696,7 @@ public static void tanh(Float8 a, Float8 result) {
result.s[3] = Math.tanh(a.s[3]);
}
+ @Translatable
public static Float8 tgamma(Float8 a) {
return new Float8(Math.tgamma(a.x), Math.tgamma(a.y), Math.tgamma(a.z), Math.tgamma(a.w), Math.tgamma(a.s[0]), Math.tgamma(a.s[1]), Math.tgamma(a.s[2]), Math.tgamma(a.s[3]));
}
@@ -2379,6 +2712,7 @@ public static void tgamma(Float8 a, Float8 result) {
result.s[3] = Math.tgamma(a.s[3]);
}
+ @Translatable
public static Float8 toDegrees(Float8 a) {
return new Float8(Math.toDegrees(a.x), Math.toDegrees(a.y), Math.toDegrees(a.z), Math.toDegrees(a.w), Math.toDegrees(a.s[0]), Math.toDegrees(a.s[1]), Math.toDegrees(a.s[2]), Math.toDegrees(a.s[3]));
}
@@ -2394,6 +2728,7 @@ public static void toDegrees(Float8 a, Float8 result) {
result.s[3] = Math.toDegrees(a.s[3]);
}
+ @Translatable
public static Float8 toRadians(Float8 a) {
return new Float8(Math.toRadians(a.x), Math.toRadians(a.y), Math.toRadians(a.z), Math.toRadians(a.w), Math.toRadians(a.s[0]), Math.toRadians(a.s[1]), Math.toRadians(a.s[2]), Math.toRadians(a.s[3]));
}
@@ -2409,6 +2744,7 @@ public static void toRadians(Float8 a, Float8 result) {
result.s[3] = Math.toRadians(a.s[3]);
}
+ @Translatable
public static Float8 trunc(Float8 a) {
return new Float8(Math.trunc(a.x), Math.trunc(a.y), Math.trunc(a.z), Math.trunc(a.w), Math.trunc(a.s[0]), Math.trunc(a.s[1]), Math.trunc(a.s[2]), Math.trunc(a.s[3]));
}
@@ -2424,6 +2760,7 @@ public static void trunc(Float8 a, Float8 result) {
result.s[3] = Math.trunc(a.s[3]);
}
+ @Translatable
public static Float8 scalb(Float8 a, Int8 n) {
return new Float8(Math.scalb(a.x, n.x), Math.scalb(a.y, n.y), Math.scalb(a.z, n.z), Math.scalb(a.w, n.w), Math.scalb(a.s[0], n.s[0]), Math.scalb(a.s[1], n.s[1]), Math.scalb(a.s[2], n.s[2]), Math.scalb(a.s[3], n.s[3]));
}
@@ -2439,6 +2776,7 @@ public static void scalb(Float8 a, Int8 n, Float8 result) {
result.s[3] = Math.scalb(a.s[3], n.s[3]);
}
+ @Translatable
public static Float8 ldexp(Float8 a, Int8 n) {
return new Float8(Math.ldexp(a.x, n.x), Math.ldexp(a.y, n.y), Math.ldexp(a.z, n.z), Math.ldexp(a.w, n.w), Math.ldexp(a.s[0], n.s[0]), Math.ldexp(a.s[1], n.s[1]), Math.ldexp(a.s[2], n.s[2]), Math.ldexp(a.s[3], n.s[3]));
}
@@ -2454,6 +2792,7 @@ public static void ldexp(Float8 a, Int8 n, Float8 result) {
result.s[3] = Math.ldexp(a.s[3], n.s[3]);
}
+ @Translatable
public static Float8 pown(Float8 a, Int8 b) {
return new Float8(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z), Math.pown(a.w, b.w), Math.pown(a.s[0], b.s[0]), Math.pown(a.s[1], b.s[1]), Math.pown(a.s[2], b.s[2]), Math.pown(a.s[3], b.s[3]));
}
@@ -2469,6 +2808,7 @@ public static void pown(Float8 a, Int8 b, Float8 result) {
result.s[3] = Math.pown(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 rootn(Float8 a, Int8 b) {
return new Float8(Math.pown(a.x, b.x), Math.pown(a.y, b.y), Math.pown(a.z, b.z), Math.pown(a.w, b.w), Math.pown(a.s[0], b.s[0]), Math.pown(a.s[1], b.s[1]), Math.pown(a.s[2], b.s[2]), Math.pown(a.s[3], b.s[3]));
}
@@ -2484,6 +2824,7 @@ public static void rootn(Float8 a, Int8 b, Float8 result) {
result.s[3] = Math.pown(a.s[3], b.s[3]);
}
+ @Translatable
public static Float8 smoothStep(Float8 a, Float8 b, float c) {
return new Float8(Math.smoothStep(a.x, b.x, c), Math.smoothStep(a.y, b.y, c), Math.smoothStep(a.z, b.z, c), Math.smoothStep(a.w, b.w, c), Math.smoothStep(a.s[0], b.s[0], c), Math.smoothStep(a.s[1], b.s[1], c), Math.smoothStep(a.s[2], b.s[2], c), Math.smoothStep(a.s[3], b.s[3], c));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int2.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int2.java
index 1aa1851..92aca69 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int2.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int2.java
@@ -27,41 +27,55 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Int2 {
+ @Translatable
public int x;
+ @Translatable
public int y;
+ @Translatable
public Int2() {}
+ @Translatable
public Int2(int x, int y) {
set(x, y);
}
+ @Translatable
public void set(int x, int y) {
this.x = x;
this.y = y;
}
+ @Translatable
public Int2(int v) {
this(v, v);
}
+ @Translatable
public void set(int v) {
set(v, v);
}
+ @Translatable
public Int2(Int2 vec1) {
this(vec1.x, vec1.y);
}
+ @Translatable
public void set(Int2 vec1) {
set(vec1.x, vec1.y);
}
+ @Translatable
public Int2 value() {
return new Int2(this);
}
+ @Translatable
public Byte2 convertByte2() {
return new Byte2((byte)(x), (byte)(y));
}
@@ -71,6 +85,7 @@ public void convertByte2(Byte2 result) {
result.y = (byte)(y);
}
+ @Translatable
public Short2 convertShort2() {
return new Short2((short)(x), (short)(y));
}
@@ -80,6 +95,7 @@ public void convertShort2(Short2 result) {
result.y = (short)(y);
}
+ @Translatable
public Long2 convertLong2() {
return new Long2((long)(x), (long)(y));
}
@@ -89,6 +105,7 @@ public void convertLong2(Long2 result) {
result.y = (long)(y);
}
+ @Translatable
public Float2 convertFloat2() {
return new Float2((float)(x), (float)(y));
}
@@ -98,6 +115,7 @@ public void convertFloat2(Float2 result) {
result.y = (float)(y);
}
+ @Translatable
public Double2 convertDouble2() {
return new Double2((double)(x), (double)(y));
}
@@ -107,6 +125,7 @@ public void convertDouble2(Double2 result) {
result.y = (double)(y);
}
+ @Translatable
public static Int2 isEqual(Int2 a, Int2 b) {
return new Int2(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0);
}
@@ -116,6 +135,7 @@ public static void isEqual(Int2 a, Int2 b, Int2 result) {
result.y = a.y == b.y? 1 : 0;
}
+ @Translatable
public static Int2 isNotEqual(Int2 a, Int2 b) {
return new Int2(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0);
}
@@ -125,6 +145,7 @@ public static void isNotEqual(Int2 a, Int2 b, Int2 result) {
result.y = a.y != b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreater(Int2 a, Int2 b) {
return new Int2(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0);
}
@@ -134,6 +155,7 @@ public static void isGreater(Int2 a, Int2 b, Int2 result) {
result.y = a.y > b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreaterEqual(Int2 a, Int2 b) {
return new Int2(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0);
}
@@ -143,6 +165,7 @@ public static void isGreaterEqual(Int2 a, Int2 b, Int2 result) {
result.y = a.y >= b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLess(Int2 a, Int2 b) {
return new Int2(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0);
}
@@ -152,6 +175,7 @@ public static void isLess(Int2 a, Int2 b, Int2 result) {
result.y = a.y < b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLessEqual(Int2 a, Int2 b) {
return new Int2(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0);
}
@@ -161,6 +185,7 @@ public static void isLessEqual(Int2 a, Int2 b, Int2 result) {
result.y = a.y <= b.y? 1 : 0;
}
+ @Translatable
public static Int2 select(Int2 a, Int2 b, Int2 c) {
return new Int2(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y));
}
@@ -170,14 +195,17 @@ public static void select(Int2 a, Int2 b, Int2 c, Int2 result) {
result.y = Math.select(a.y, b.y, c.y);
}
+ @Translatable
public static int any(Int2 a) {
return (a.x != 0 || a.y != 0)? 1 : 0;
}
+ @Translatable
public static int all(Int2 a) {
return (a.x == 0 || a.y == 0)? 0 : 1;
}
+ @Translatable
public static Int2 neg(Int2 a) {
return new Int2((int)(-a.x), (int)(-a.y));
}
@@ -187,6 +215,7 @@ public static void neg(Int2 a, Int2 result) {
result.y = (int)(-a.y);
}
+ @Translatable
public static Int2 add(Int2 a, Int2 b) {
return new Int2((int)(a.x + b.x), (int)(a.y + b.y));
}
@@ -196,6 +225,7 @@ public static void add(Int2 a, Int2 b, Int2 result) {
result.y = (int)(a.y + b.y);
}
+ @Translatable
public static Int2 sub(Int2 a, Int2 b) {
return new Int2((int)(a.x - b.x), (int)(a.y - b.y));
}
@@ -205,6 +235,7 @@ public static void sub(Int2 a, Int2 b, Int2 result) {
result.y = (int)(a.y - b.y);
}
+ @Translatable
public static Double2 mul(Int2 a, Double2 b) {
return new Double2((double)(a.x * b.x), (double)(a.y * b.y));
}
@@ -214,6 +245,7 @@ public static void mul(Int2 a, Double2 b, Double2 result) {
result.y = (double)(a.y * b.y);
}
+ @Translatable
public static Double2 mul(Int2 a, double k) {
return new Double2((double)(a.x * k), (double)(a.y * k));
}
@@ -223,6 +255,7 @@ public static void mul(Int2 a, double k, Double2 result) {
result.y = (double)(a.y * k);
}
+ @Translatable
public static Float2 mul(Int2 a, Float2 b) {
return new Float2((float)(a.x * b.x), (float)(a.y * b.y));
}
@@ -232,6 +265,7 @@ public static void mul(Int2 a, Float2 b, Float2 result) {
result.y = (float)(a.y * b.y);
}
+ @Translatable
public static Float2 mul(Int2 a, float k) {
return new Float2((float)(a.x * k), (float)(a.y * k));
}
@@ -241,6 +275,7 @@ public static void mul(Int2 a, float k, Float2 result) {
result.y = (float)(a.y * k);
}
+ @Translatable
public static Int2 mul(Int2 a, Int2 b) {
return new Int2((int)(a.x * b.x), (int)(a.y * b.y));
}
@@ -250,6 +285,7 @@ public static void mul(Int2 a, Int2 b, Int2 result) {
result.y = (int)(a.y * b.y);
}
+ @Translatable
public static Int2 mul(Int2 a, int k) {
return new Int2((int)(a.x * k), (int)(a.y * k));
}
@@ -259,6 +295,7 @@ public static void mul(Int2 a, int k, Int2 result) {
result.y = (int)(a.y * k);
}
+ @Translatable
public static Double2 div(Int2 a, Double2 b) {
return new Double2((double)(a.x / b.x), (double)(a.y / b.y));
}
@@ -268,6 +305,7 @@ public static void div(Int2 a, Double2 b, Double2 result) {
result.y = (double)(a.y / b.y);
}
+ @Translatable
public static Double2 div(Int2 a, double k) {
return new Double2((double)(a.x / k), (double)(a.y / k));
}
@@ -277,6 +315,7 @@ public static void div(Int2 a, double k, Double2 result) {
result.y = (double)(a.y / k);
}
+ @Translatable
public static Float2 div(Int2 a, Float2 b) {
return new Float2((float)(a.x / b.x), (float)(a.y / b.y));
}
@@ -286,6 +325,7 @@ public static void div(Int2 a, Float2 b, Float2 result) {
result.y = (float)(a.y / b.y);
}
+ @Translatable
public static Float2 div(Int2 a, float k) {
return new Float2((float)(a.x / k), (float)(a.y / k));
}
@@ -295,6 +335,7 @@ public static void div(Int2 a, float k, Float2 result) {
result.y = (float)(a.y / k);
}
+ @Translatable
public static Int2 div(Int2 a, Int2 b) {
return new Int2((int)(a.x / b.x), (int)(a.y / b.y));
}
@@ -304,6 +345,7 @@ public static void div(Int2 a, Int2 b, Int2 result) {
result.y = (int)(a.y / b.y);
}
+ @Translatable
public static Int2 div(Int2 a, int k) {
return new Int2((int)(a.x / k), (int)(a.y / k));
}
@@ -313,6 +355,7 @@ public static void div(Int2 a, int k, Int2 result) {
result.y = (int)(a.y / k);
}
+ @Translatable
public static Int2 mod(Int2 a, Int2 b) {
return new Int2((int)(a.x % b.x), (int)(a.y % b.y));
}
@@ -322,6 +365,7 @@ public static void mod(Int2 a, Int2 b, Int2 result) {
result.y = (int)(a.y % b.y);
}
+ @Translatable
public static Int2 mod(Int2 a, int k) {
return new Int2((int)(a.x % k), (int)(a.y % k));
}
@@ -331,6 +375,7 @@ public static void mod(Int2 a, int k, Int2 result) {
result.y = (int)(a.y % k);
}
+ @Translatable
public static Int2 bitAnd(Int2 a, Int2 b) {
return new Int2((int)(a.x & b.x), (int)(a.y & b.y));
}
@@ -340,6 +385,7 @@ public static void bitAnd(Int2 a, Int2 b, Int2 result) {
result.y = (int)(a.y & b.y);
}
+ @Translatable
public static Int2 bitOr(Int2 a, Int2 b) {
return new Int2((int)(a.x | b.x), (int)(a.y | b.y));
}
@@ -349,6 +395,7 @@ public static void bitOr(Int2 a, Int2 b, Int2 result) {
result.y = (int)(a.y | b.y);
}
+ @Translatable
public static Int2 bitXor(Int2 a, Int2 b) {
return new Int2((int)(a.x ^ b.x), (int)(a.y ^ b.y));
}
@@ -358,6 +405,7 @@ public static void bitXor(Int2 a, Int2 b, Int2 result) {
result.y = (int)(a.y ^ b.y);
}
+ @Translatable
public static Int2 bitNot(Int2 a) {
return new Int2((int)(~a.x), (int)(~a.y));
}
@@ -367,6 +415,7 @@ public static void bitNot(Int2 a, Int2 result) {
result.y = (int)(~a.y);
}
+ @Translatable
public static Int2 abs(Int2 a) {
return new Int2(Math.abs(a.x), Math.abs(a.y));
}
@@ -376,6 +425,7 @@ public static void abs(Int2 a, Int2 result) {
result.y = Math.abs(a.y);
}
+ @Translatable
public static Int2 clamp(Int2 a, Int2 b, Int2 c) {
return new Int2(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y));
}
@@ -385,6 +435,7 @@ public static void clamp(Int2 a, Int2 b, Int2 c, Int2 result) {
result.y = Math.clamp(a.y, b.y, c.y);
}
+ @Translatable
public static Int2 max(Int2 a, Int2 b) {
return new Int2(Math.max(a.x, b.x), Math.max(a.y, b.y));
}
@@ -394,6 +445,7 @@ public static void max(Int2 a, Int2 b, Int2 result) {
result.y = Math.max(a.y, b.y);
}
+ @Translatable
public static Int2 maxMag(Int2 a, Int2 b) {
return new Int2(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y));
}
@@ -403,6 +455,7 @@ public static void maxMag(Int2 a, Int2 b, Int2 result) {
result.y = Math.maxMag(a.y, b.y);
}
+ @Translatable
public static Int2 min(Int2 a, Int2 b) {
return new Int2(Math.min(a.x, b.x), Math.min(a.y, b.y));
}
@@ -412,6 +465,7 @@ public static void min(Int2 a, Int2 b, Int2 result) {
result.y = Math.min(a.y, b.y);
}
+ @Translatable
public static Int2 minMag(Int2 a, Int2 b) {
return new Int2(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y));
}
@@ -421,6 +475,7 @@ public static void minMag(Int2 a, Int2 b, Int2 result) {
result.y = Math.minMag(a.y, b.y);
}
+ @Translatable
public static Int2 mix(Int2 a, Int2 b, Int2 c) {
return new Int2(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y));
}
@@ -430,6 +485,7 @@ public static void mix(Int2 a, Int2 b, Int2 c, Int2 result) {
result.y = Math.mix(a.y, b.y, c.y);
}
+ @Translatable
public static Int2 clamp(Int2 v, int min, int max) {
return new Int2(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max));
}
@@ -439,6 +495,7 @@ public static void clamp(Int2 v, int min, int max, Int2 result) {
result.y = Math.clamp(v.y, min, max);
}
+ @Translatable
public static Int2 max(Int2 x, int y) {
return new Int2(Math.max(x.x, y), Math.max(x.y, y));
}
@@ -448,6 +505,7 @@ public static void max(Int2 x, int y, Int2 result) {
result.y = Math.max(x.y, y);
}
+ @Translatable
public static Int2 min(Int2 x, int y) {
return new Int2(Math.min(x.x, y), Math.min(x.y, y));
}
@@ -457,6 +515,7 @@ public static void min(Int2 x, int y, Int2 result) {
result.y = Math.min(x.y, y);
}
+ @Translatable
public static Int2 mix(Int2 x, Int2 y, int a) {
return new Int2(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a));
}
@@ -466,6 +525,7 @@ public static void mix(Int2 x, Int2 y, int a, Int2 result) {
result.y = Math.mix(x.y, y.y, a);
}
+ @Translatable
public static Int2 absDiff(Int2 a, Int2 b) {
return new Int2(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y));
}
@@ -475,6 +535,7 @@ public static void absDiff(Int2 a, Int2 b, Int2 result) {
result.y = Math.absDiff(a.y, b.y);
}
+ @Translatable
public static Int2 addSat(Int2 a, Int2 b) {
return new Int2(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y));
}
@@ -484,6 +545,7 @@ public static void addSat(Int2 a, Int2 b, Int2 result) {
result.y = Math.addSat(a.y, b.y);
}
+ @Translatable
public static Int2 clz(Int2 a) {
return new Int2(Math.clz(a.x), Math.clz(a.y));
}
@@ -493,6 +555,7 @@ public static void clz(Int2 a, Int2 result) {
result.y = Math.clz(a.y);
}
+ @Translatable
public static Int2 hadd(Int2 a, Int2 b) {
return new Int2(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y));
}
@@ -502,6 +565,7 @@ public static void hadd(Int2 a, Int2 b, Int2 result) {
result.y = Math.hadd(a.y, b.y);
}
+ @Translatable
public static Int2 madHi(Int2 a, Int2 b, Int2 c) {
return new Int2(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y));
}
@@ -511,6 +575,7 @@ public static void madHi(Int2 a, Int2 b, Int2 c, Int2 result) {
result.y = Math.madHi(a.y, b.y, c.y);
}
+ @Translatable
public static Int2 madSat(Int2 a, Int2 b, Int2 c) {
return new Int2(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y));
}
@@ -520,6 +585,7 @@ public static void madSat(Int2 a, Int2 b, Int2 c, Int2 result) {
result.y = Math.madSat(a.y, b.y, c.y);
}
+ @Translatable
public static Int2 mulHi(Int2 a, Int2 b) {
return new Int2(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y));
}
@@ -529,6 +595,7 @@ public static void mulHi(Int2 a, Int2 b, Int2 result) {
result.y = Math.mulHi(a.y, b.y);
}
+ @Translatable
public static Int2 rhadd(Int2 a, Int2 b) {
return new Int2(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y));
}
@@ -538,6 +605,7 @@ public static void rhadd(Int2 a, Int2 b, Int2 result) {
result.y = Math.rhadd(a.y, b.y);
}
+ @Translatable
public static Int2 rotate(Int2 a, Int2 b) {
return new Int2(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y));
}
@@ -547,6 +615,7 @@ public static void rotate(Int2 a, Int2 b, Int2 result) {
result.y = Math.rotate(a.y, b.y);
}
+ @Translatable
public static Int2 subSat(Int2 a, Int2 b) {
return new Int2(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y));
}
@@ -556,6 +625,7 @@ public static void subSat(Int2 a, Int2 b, Int2 result) {
result.y = Math.subSat(a.y, b.y);
}
+ @Translatable
public static Int2 mad24(Int2 a, Int2 b, Int2 c) {
return new Int2(Math.mad24(a.x, b.x, c.x), Math.mad24(a.y, b.y, c.y));
}
@@ -565,6 +635,7 @@ public static void mad24(Int2 a, Int2 b, Int2 c, Int2 result) {
result.y = Math.mad24(a.y, b.y, c.y);
}
+ @Translatable
public static Int2 mul24(Int2 a, Int2 b) {
return new Int2(Math.mul24(a.x, b.x), Math.mul24(a.y, b.y));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int3.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int3.java
index db25fd0..d81b6f9 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int3.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int3.java
@@ -27,59 +27,78 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Int3 {
+ @Translatable
public int x;
+ @Translatable
public int y;
+ @Translatable
public int z;
+ @Translatable
public Int3() {}
+ @Translatable
public Int3(int x, int y, int z) {
set(x, y, z);
}
+ @Translatable
public void set(int x, int y, int z) {
this.x = x;
this.y = y;
this.z = z;
}
+ @Translatable
public Int3(int v) {
this(v, v, v);
}
+ @Translatable
public void set(int v) {
set(v, v, v);
}
+ @Translatable
public Int3(int x, Int2 vec1) {
this(x, vec1.x, vec1.y);
}
+ @Translatable
public void set(int x, Int2 vec1) {
set(x, vec1.x, vec1.y);
}
+ @Translatable
public Int3(Int2 vec1, int z) {
this(vec1.x, vec1.y, z);
}
+ @Translatable
public void set(Int2 vec1, int z) {
set(vec1.x, vec1.y, z);
}
+ @Translatable
public Int3(Int3 vec1) {
this(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(Int3 vec1) {
set(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Int3 value() {
return new Int3(this);
}
+ @Translatable
public Byte3 convertByte3() {
return new Byte3((byte)(x), (byte)(y), (byte)(z));
}
@@ -90,6 +109,7 @@ public void convertByte3(Byte3 result) {
result.z = (byte)(z);
}
+ @Translatable
public Short3 convertShort3() {
return new Short3((short)(x), (short)(y), (short)(z));
}
@@ -100,6 +120,7 @@ public void convertShort3(Short3 result) {
result.z = (short)(z);
}
+ @Translatable
public Long3 convertLong3() {
return new Long3((long)(x), (long)(y), (long)(z));
}
@@ -110,6 +131,7 @@ public void convertLong3(Long3 result) {
result.z = (long)(z);
}
+ @Translatable
public Float3 convertFloat3() {
return new Float3((float)(x), (float)(y), (float)(z));
}
@@ -120,6 +142,7 @@ public void convertFloat3(Float3 result) {
result.z = (float)(z);
}
+ @Translatable
public Double3 convertDouble3() {
return new Double3((double)(x), (double)(y), (double)(z));
}
@@ -130,6 +153,7 @@ public void convertDouble3(Double3 result) {
result.z = (double)(z);
}
+ @Translatable
public Int2 asInt2() {
return new Int2(x, y);
}
@@ -139,6 +163,7 @@ public void asInt2(Int2 result) {
result.y = y;
}
+ @Translatable
public static Int3 isEqual(Int3 a, Int3 b) {
return new Int3(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0);
}
@@ -149,6 +174,7 @@ public static void isEqual(Int3 a, Int3 b, Int3 result) {
result.z = a.z == b.z? 1 : 0;
}
+ @Translatable
public static Int3 isNotEqual(Int3 a, Int3 b) {
return new Int3(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0);
}
@@ -159,6 +185,7 @@ public static void isNotEqual(Int3 a, Int3 b, Int3 result) {
result.z = a.z != b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreater(Int3 a, Int3 b) {
return new Int3(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0);
}
@@ -169,6 +196,7 @@ public static void isGreater(Int3 a, Int3 b, Int3 result) {
result.z = a.z > b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreaterEqual(Int3 a, Int3 b) {
return new Int3(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0);
}
@@ -179,6 +207,7 @@ public static void isGreaterEqual(Int3 a, Int3 b, Int3 result) {
result.z = a.z >= b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLess(Int3 a, Int3 b) {
return new Int3(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0);
}
@@ -189,6 +218,7 @@ public static void isLess(Int3 a, Int3 b, Int3 result) {
result.z = a.z < b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLessEqual(Int3 a, Int3 b) {
return new Int3(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0);
}
@@ -199,6 +229,7 @@ public static void isLessEqual(Int3 a, Int3 b, Int3 result) {
result.z = a.z <= b.z? 1 : 0;
}
+ @Translatable
public static Int3 select(Int3 a, Int3 b, Int3 c) {
return new Int3(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z));
}
@@ -209,14 +240,17 @@ public static void select(Int3 a, Int3 b, Int3 c, Int3 result) {
result.z = Math.select(a.z, b.z, c.z);
}
+ @Translatable
public static int any(Int3 a) {
return (a.x != 0 || a.y != 0 || a.z != 0)? 1 : 0;
}
+ @Translatable
public static int all(Int3 a) {
return (a.x == 0 || a.y == 0 || a.z == 0)? 0 : 1;
}
+ @Translatable
public static Int3 neg(Int3 a) {
return new Int3((int)(-a.x), (int)(-a.y), (int)(-a.z));
}
@@ -227,6 +261,7 @@ public static void neg(Int3 a, Int3 result) {
result.z = (int)(-a.z);
}
+ @Translatable
public static Int3 add(Int3 a, Int3 b) {
return new Int3((int)(a.x + b.x), (int)(a.y + b.y), (int)(a.z + b.z));
}
@@ -237,6 +272,7 @@ public static void add(Int3 a, Int3 b, Int3 result) {
result.z = (int)(a.z + b.z);
}
+ @Translatable
public static Int3 sub(Int3 a, Int3 b) {
return new Int3((int)(a.x - b.x), (int)(a.y - b.y), (int)(a.z - b.z));
}
@@ -247,6 +283,7 @@ public static void sub(Int3 a, Int3 b, Int3 result) {
result.z = (int)(a.z - b.z);
}
+ @Translatable
public static Double3 mul(Int3 a, Double3 b) {
return new Double3((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z));
}
@@ -257,6 +294,7 @@ public static void mul(Int3 a, Double3 b, Double3 result) {
result.z = (double)(a.z * b.z);
}
+ @Translatable
public static Double3 mul(Int3 a, double k) {
return new Double3((double)(a.x * k), (double)(a.y * k), (double)(a.z * k));
}
@@ -267,6 +305,7 @@ public static void mul(Int3 a, double k, Double3 result) {
result.z = (double)(a.z * k);
}
+ @Translatable
public static Float3 mul(Int3 a, Float3 b) {
return new Float3((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z));
}
@@ -277,6 +316,7 @@ public static void mul(Int3 a, Float3 b, Float3 result) {
result.z = (float)(a.z * b.z);
}
+ @Translatable
public static Float3 mul(Int3 a, float k) {
return new Float3((float)(a.x * k), (float)(a.y * k), (float)(a.z * k));
}
@@ -287,6 +327,7 @@ public static void mul(Int3 a, float k, Float3 result) {
result.z = (float)(a.z * k);
}
+ @Translatable
public static Int3 mul(Int3 a, Int3 b) {
return new Int3((int)(a.x * b.x), (int)(a.y * b.y), (int)(a.z * b.z));
}
@@ -297,6 +338,7 @@ public static void mul(Int3 a, Int3 b, Int3 result) {
result.z = (int)(a.z * b.z);
}
+ @Translatable
public static Int3 mul(Int3 a, int k) {
return new Int3((int)(a.x * k), (int)(a.y * k), (int)(a.z * k));
}
@@ -307,6 +349,7 @@ public static void mul(Int3 a, int k, Int3 result) {
result.z = (int)(a.z * k);
}
+ @Translatable
public static Double3 div(Int3 a, Double3 b) {
return new Double3((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z));
}
@@ -317,6 +360,7 @@ public static void div(Int3 a, Double3 b, Double3 result) {
result.z = (double)(a.z / b.z);
}
+ @Translatable
public static Double3 div(Int3 a, double k) {
return new Double3((double)(a.x / k), (double)(a.y / k), (double)(a.z / k));
}
@@ -327,6 +371,7 @@ public static void div(Int3 a, double k, Double3 result) {
result.z = (double)(a.z / k);
}
+ @Translatable
public static Float3 div(Int3 a, Float3 b) {
return new Float3((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z));
}
@@ -337,6 +382,7 @@ public static void div(Int3 a, Float3 b, Float3 result) {
result.z = (float)(a.z / b.z);
}
+ @Translatable
public static Float3 div(Int3 a, float k) {
return new Float3((float)(a.x / k), (float)(a.y / k), (float)(a.z / k));
}
@@ -347,6 +393,7 @@ public static void div(Int3 a, float k, Float3 result) {
result.z = (float)(a.z / k);
}
+ @Translatable
public static Int3 div(Int3 a, Int3 b) {
return new Int3((int)(a.x / b.x), (int)(a.y / b.y), (int)(a.z / b.z));
}
@@ -357,6 +404,7 @@ public static void div(Int3 a, Int3 b, Int3 result) {
result.z = (int)(a.z / b.z);
}
+ @Translatable
public static Int3 div(Int3 a, int k) {
return new Int3((int)(a.x / k), (int)(a.y / k), (int)(a.z / k));
}
@@ -367,6 +415,7 @@ public static void div(Int3 a, int k, Int3 result) {
result.z = (int)(a.z / k);
}
+ @Translatable
public static Int3 mod(Int3 a, Int3 b) {
return new Int3((int)(a.x % b.x), (int)(a.y % b.y), (int)(a.z % b.z));
}
@@ -377,6 +426,7 @@ public static void mod(Int3 a, Int3 b, Int3 result) {
result.z = (int)(a.z % b.z);
}
+ @Translatable
public static Int3 mod(Int3 a, int k) {
return new Int3((int)(a.x % k), (int)(a.y % k), (int)(a.z % k));
}
@@ -387,6 +437,7 @@ public static void mod(Int3 a, int k, Int3 result) {
result.z = (int)(a.z % k);
}
+ @Translatable
public static Int3 bitAnd(Int3 a, Int3 b) {
return new Int3((int)(a.x & b.x), (int)(a.y & b.y), (int)(a.z & b.z));
}
@@ -397,6 +448,7 @@ public static void bitAnd(Int3 a, Int3 b, Int3 result) {
result.z = (int)(a.z & b.z);
}
+ @Translatable
public static Int3 bitOr(Int3 a, Int3 b) {
return new Int3((int)(a.x | b.x), (int)(a.y | b.y), (int)(a.z | b.z));
}
@@ -407,6 +459,7 @@ public static void bitOr(Int3 a, Int3 b, Int3 result) {
result.z = (int)(a.z | b.z);
}
+ @Translatable
public static Int3 bitXor(Int3 a, Int3 b) {
return new Int3((int)(a.x ^ b.x), (int)(a.y ^ b.y), (int)(a.z ^ b.z));
}
@@ -417,6 +470,7 @@ public static void bitXor(Int3 a, Int3 b, Int3 result) {
result.z = (int)(a.z ^ b.z);
}
+ @Translatable
public static Int3 bitNot(Int3 a) {
return new Int3((int)(~a.x), (int)(~a.y), (int)(~a.z));
}
@@ -427,6 +481,7 @@ public static void bitNot(Int3 a, Int3 result) {
result.z = (int)(~a.z);
}
+ @Translatable
public static Int3 abs(Int3 a) {
return new Int3(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z));
}
@@ -437,6 +492,7 @@ public static void abs(Int3 a, Int3 result) {
result.z = Math.abs(a.z);
}
+ @Translatable
public static Int3 clamp(Int3 a, Int3 b, Int3 c) {
return new Int3(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z));
}
@@ -447,6 +503,7 @@ public static void clamp(Int3 a, Int3 b, Int3 c, Int3 result) {
result.z = Math.clamp(a.z, b.z, c.z);
}
+ @Translatable
public static Int3 max(Int3 a, Int3 b) {
return new Int3(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z));
}
@@ -457,6 +514,7 @@ public static void max(Int3 a, Int3 b, Int3 result) {
result.z = Math.max(a.z, b.z);
}
+ @Translatable
public static Int3 maxMag(Int3 a, Int3 b) {
return new Int3(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z));
}
@@ -467,6 +525,7 @@ public static void maxMag(Int3 a, Int3 b, Int3 result) {
result.z = Math.maxMag(a.z, b.z);
}
+ @Translatable
public static Int3 min(Int3 a, Int3 b) {
return new Int3(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z));
}
@@ -477,6 +536,7 @@ public static void min(Int3 a, Int3 b, Int3 result) {
result.z = Math.min(a.z, b.z);
}
+ @Translatable
public static Int3 minMag(Int3 a, Int3 b) {
return new Int3(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z));
}
@@ -487,6 +547,7 @@ public static void minMag(Int3 a, Int3 b, Int3 result) {
result.z = Math.minMag(a.z, b.z);
}
+ @Translatable
public static Int3 mix(Int3 a, Int3 b, Int3 c) {
return new Int3(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z));
}
@@ -497,6 +558,7 @@ public static void mix(Int3 a, Int3 b, Int3 c, Int3 result) {
result.z = Math.mix(a.z, b.z, c.z);
}
+ @Translatable
public static Int3 clamp(Int3 v, int min, int max) {
return new Int3(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max));
}
@@ -507,6 +569,7 @@ public static void clamp(Int3 v, int min, int max, Int3 result) {
result.z = Math.clamp(v.z, min, max);
}
+ @Translatable
public static Int3 max(Int3 x, int y) {
return new Int3(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y));
}
@@ -517,6 +580,7 @@ public static void max(Int3 x, int y, Int3 result) {
result.z = Math.max(x.z, y);
}
+ @Translatable
public static Int3 min(Int3 x, int y) {
return new Int3(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y));
}
@@ -527,6 +591,7 @@ public static void min(Int3 x, int y, Int3 result) {
result.z = Math.min(x.z, y);
}
+ @Translatable
public static Int3 mix(Int3 x, Int3 y, int a) {
return new Int3(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a));
}
@@ -537,6 +602,7 @@ public static void mix(Int3 x, Int3 y, int a, Int3 result) {
result.z = Math.mix(x.z, y.z, a);
}
+ @Translatable
public static Int3 absDiff(Int3 a, Int3 b) {
return new Int3(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z));
}
@@ -547,6 +613,7 @@ public static void absDiff(Int3 a, Int3 b, Int3 result) {
result.z = Math.absDiff(a.z, b.z);
}
+ @Translatable
public static Int3 addSat(Int3 a, Int3 b) {
return new Int3(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z));
}
@@ -557,6 +624,7 @@ public static void addSat(Int3 a, Int3 b, Int3 result) {
result.z = Math.addSat(a.z, b.z);
}
+ @Translatable
public static Int3 clz(Int3 a) {
return new Int3(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z));
}
@@ -567,6 +635,7 @@ public static void clz(Int3 a, Int3 result) {
result.z = Math.clz(a.z);
}
+ @Translatable
public static Int3 hadd(Int3 a, Int3 b) {
return new Int3(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z));
}
@@ -577,6 +646,7 @@ public static void hadd(Int3 a, Int3 b, Int3 result) {
result.z = Math.hadd(a.z, b.z);
}
+ @Translatable
public static Int3 madHi(Int3 a, Int3 b, Int3 c) {
return new Int3(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z));
}
@@ -587,6 +657,7 @@ public static void madHi(Int3 a, Int3 b, Int3 c, Int3 result) {
result.z = Math.madHi(a.z, b.z, c.z);
}
+ @Translatable
public static Int3 madSat(Int3 a, Int3 b, Int3 c) {
return new Int3(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z));
}
@@ -597,6 +668,7 @@ public static void madSat(Int3 a, Int3 b, Int3 c, Int3 result) {
result.z = Math.madSat(a.z, b.z, c.z);
}
+ @Translatable
public static Int3 mulHi(Int3 a, Int3 b) {
return new Int3(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z));
}
@@ -607,6 +679,7 @@ public static void mulHi(Int3 a, Int3 b, Int3 result) {
result.z = Math.mulHi(a.z, b.z);
}
+ @Translatable
public static Int3 rhadd(Int3 a, Int3 b) {
return new Int3(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z));
}
@@ -617,6 +690,7 @@ public static void rhadd(Int3 a, Int3 b, Int3 result) {
result.z = Math.rhadd(a.z, b.z);
}
+ @Translatable
public static Int3 rotate(Int3 a, Int3 b) {
return new Int3(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z));
}
@@ -627,6 +701,7 @@ public static void rotate(Int3 a, Int3 b, Int3 result) {
result.z = Math.rotate(a.z, b.z);
}
+ @Translatable
public static Int3 subSat(Int3 a, Int3 b) {
return new Int3(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z));
}
@@ -637,6 +712,7 @@ public static void subSat(Int3 a, Int3 b, Int3 result) {
result.z = Math.subSat(a.z, b.z);
}
+ @Translatable
public static Int3 mad24(Int3 a, Int3 b, Int3 c) {
return new Int3(Math.mad24(a.x, b.x, c.x), Math.mad24(a.y, b.y, c.y), Math.mad24(a.z, b.z, c.z));
}
@@ -647,6 +723,7 @@ public static void mad24(Int3 a, Int3 b, Int3 c, Int3 result) {
result.z = Math.mad24(a.z, b.z, c.z);
}
+ @Translatable
public static Int3 mul24(Int3 a, Int3 b) {
return new Int3(Math.mul24(a.x, b.x), Math.mul24(a.y, b.y), Math.mul24(a.z, b.z));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int4.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int4.java
index f05b3ef..81397e5 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int4.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int4.java
@@ -27,18 +27,28 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Int4 {
+ @Translatable
public int x;
+ @Translatable
public int y;
+ @Translatable
public int z;
+ @Translatable
public int w;
+ @Translatable
public Int4() {}
+ @Translatable
public Int4(int x, int y, int z, int w) {
set(x, y, z, w);
}
+ @Translatable
public void set(int x, int y, int z, int w) {
this.x = x;
this.y = y;
@@ -46,74 +56,92 @@ public void set(int x, int y, int z, int w) {
this.w = w;
}
+ @Translatable
public Int4(int v) {
this(v, v, v, v);
}
+ @Translatable
public void set(int v) {
set(v, v, v, v);
}
+ @Translatable
public Int4(int x, int y, Int2 vec1) {
this(x, y, vec1.x, vec1.y);
}
+ @Translatable
public void set(int x, int y, Int2 vec1) {
set(x, y, vec1.x, vec1.y);
}
+ @Translatable
public Int4(int x, Int2 vec1, int w) {
this(x, vec1.x, vec1.y, w);
}
+ @Translatable
public void set(int x, Int2 vec1, int w) {
set(x, vec1.x, vec1.y, w);
}
+ @Translatable
public Int4(int x, Int3 vec1) {
this(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(int x, Int3 vec1) {
set(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Int4(Int2 vec1, int z, int w) {
this(vec1.x, vec1.y, z, w);
}
+ @Translatable
public void set(Int2 vec1, int z, int w) {
set(vec1.x, vec1.y, z, w);
}
+ @Translatable
public Int4(Int2 vec1, Int2 vec2) {
this(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2) {
set(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Int4(Int3 vec1, int w) {
this(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public void set(Int3 vec1, int w) {
set(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public Int4(Int4 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(Int4 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Int4 value() {
return new Int4(this);
}
+ @Translatable
public Int2 lo() {
return new Int2(x, y);
}
@@ -123,6 +151,7 @@ public void lo(Int2 result) {
result.y = y;
}
+ @Translatable
public Int2 hi() {
return new Int2(z, w);
}
@@ -132,6 +161,7 @@ public void hi(Int2 result) {
result.y = w;
}
+ @Translatable
public Int2 odd() {
return new Int2(y, w);
}
@@ -141,6 +171,7 @@ public void odd(Int2 result) {
result.y = w;
}
+ @Translatable
public Int2 even() {
return new Int2(x, z);
}
@@ -150,6 +181,7 @@ public void even(Int2 result) {
result.y = z;
}
+ @Translatable
public Byte4 convertByte4() {
return new Byte4((byte)(x), (byte)(y), (byte)(z), (byte)(w));
}
@@ -161,6 +193,7 @@ public void convertByte4(Byte4 result) {
result.w = (byte)(w);
}
+ @Translatable
public Short4 convertShort4() {
return new Short4((short)(x), (short)(y), (short)(z), (short)(w));
}
@@ -172,6 +205,7 @@ public void convertShort4(Short4 result) {
result.w = (short)(w);
}
+ @Translatable
public Long4 convertLong4() {
return new Long4((long)(x), (long)(y), (long)(z), (long)(w));
}
@@ -183,6 +217,7 @@ public void convertLong4(Long4 result) {
result.w = (long)(w);
}
+ @Translatable
public Float4 convertFloat4() {
return new Float4((float)(x), (float)(y), (float)(z), (float)(w));
}
@@ -194,6 +229,7 @@ public void convertFloat4(Float4 result) {
result.w = (float)(w);
}
+ @Translatable
public Double4 convertDouble4() {
return new Double4((double)(x), (double)(y), (double)(z), (double)(w));
}
@@ -205,6 +241,7 @@ public void convertDouble4(Double4 result) {
result.w = (double)(w);
}
+ @Translatable
public Int2 asInt2() {
return new Int2(x, y);
}
@@ -214,6 +251,7 @@ public void asInt2(Int2 result) {
result.y = y;
}
+ @Translatable
public Int3 asInt3() {
return new Int3(x, y, z);
}
@@ -224,6 +262,7 @@ public void asInt3(Int3 result) {
result.z = z;
}
+ @Translatable
public static Int4 isEqual(Int4 a, Int4 b) {
return new Int4(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0);
}
@@ -235,6 +274,7 @@ public static void isEqual(Int4 a, Int4 b, Int4 result) {
result.w = a.w == b.w? 1 : 0;
}
+ @Translatable
public static Int4 isNotEqual(Int4 a, Int4 b) {
return new Int4(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0);
}
@@ -246,6 +286,7 @@ public static void isNotEqual(Int4 a, Int4 b, Int4 result) {
result.w = a.w != b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreater(Int4 a, Int4 b) {
return new Int4(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0);
}
@@ -257,6 +298,7 @@ public static void isGreater(Int4 a, Int4 b, Int4 result) {
result.w = a.w > b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreaterEqual(Int4 a, Int4 b) {
return new Int4(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0);
}
@@ -268,6 +310,7 @@ public static void isGreaterEqual(Int4 a, Int4 b, Int4 result) {
result.w = a.w >= b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLess(Int4 a, Int4 b) {
return new Int4(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0);
}
@@ -279,6 +322,7 @@ public static void isLess(Int4 a, Int4 b, Int4 result) {
result.w = a.w < b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLessEqual(Int4 a, Int4 b) {
return new Int4(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0);
}
@@ -290,6 +334,7 @@ public static void isLessEqual(Int4 a, Int4 b, Int4 result) {
result.w = a.w <= b.w? 1 : 0;
}
+ @Translatable
public static Int4 select(Int4 a, Int4 b, Int4 c) {
return new Int4(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w));
}
@@ -301,14 +346,17 @@ public static void select(Int4 a, Int4 b, Int4 c, Int4 result) {
result.w = Math.select(a.w, b.w, c.w);
}
+ @Translatable
public static int any(Int4 a) {
return (a.x != 0 || a.y != 0 || a.z != 0 || a.w != 0)? 1 : 0;
}
+ @Translatable
public static int all(Int4 a) {
return (a.x == 0 || a.y == 0 || a.z == 0 || a.w == 0)? 0 : 1;
}
+ @Translatable
public static Int4 neg(Int4 a) {
return new Int4((int)(-a.x), (int)(-a.y), (int)(-a.z), (int)(-a.w));
}
@@ -320,6 +368,7 @@ public static void neg(Int4 a, Int4 result) {
result.w = (int)(-a.w);
}
+ @Translatable
public static Int4 add(Int4 a, Int4 b) {
return new Int4((int)(a.x + b.x), (int)(a.y + b.y), (int)(a.z + b.z), (int)(a.w + b.w));
}
@@ -331,6 +380,7 @@ public static void add(Int4 a, Int4 b, Int4 result) {
result.w = (int)(a.w + b.w);
}
+ @Translatable
public static Int4 sub(Int4 a, Int4 b) {
return new Int4((int)(a.x - b.x), (int)(a.y - b.y), (int)(a.z - b.z), (int)(a.w - b.w));
}
@@ -342,6 +392,7 @@ public static void sub(Int4 a, Int4 b, Int4 result) {
result.w = (int)(a.w - b.w);
}
+ @Translatable
public static Double4 mul(Int4 a, Double4 b) {
return new Double4((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w));
}
@@ -353,6 +404,7 @@ public static void mul(Int4 a, Double4 b, Double4 result) {
result.w = (double)(a.w * b.w);
}
+ @Translatable
public static Double4 mul(Int4 a, double k) {
return new Double4((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k));
}
@@ -364,6 +416,7 @@ public static void mul(Int4 a, double k, Double4 result) {
result.w = (double)(a.w * k);
}
+ @Translatable
public static Float4 mul(Int4 a, Float4 b) {
return new Float4((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w));
}
@@ -375,6 +428,7 @@ public static void mul(Int4 a, Float4 b, Float4 result) {
result.w = (float)(a.w * b.w);
}
+ @Translatable
public static Float4 mul(Int4 a, float k) {
return new Float4((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k));
}
@@ -386,6 +440,7 @@ public static void mul(Int4 a, float k, Float4 result) {
result.w = (float)(a.w * k);
}
+ @Translatable
public static Int4 mul(Int4 a, Int4 b) {
return new Int4((int)(a.x * b.x), (int)(a.y * b.y), (int)(a.z * b.z), (int)(a.w * b.w));
}
@@ -397,6 +452,7 @@ public static void mul(Int4 a, Int4 b, Int4 result) {
result.w = (int)(a.w * b.w);
}
+ @Translatable
public static Int4 mul(Int4 a, int k) {
return new Int4((int)(a.x * k), (int)(a.y * k), (int)(a.z * k), (int)(a.w * k));
}
@@ -408,6 +464,7 @@ public static void mul(Int4 a, int k, Int4 result) {
result.w = (int)(a.w * k);
}
+ @Translatable
public static Double4 div(Int4 a, Double4 b) {
return new Double4((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w));
}
@@ -419,6 +476,7 @@ public static void div(Int4 a, Double4 b, Double4 result) {
result.w = (double)(a.w / b.w);
}
+ @Translatable
public static Double4 div(Int4 a, double k) {
return new Double4((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k));
}
@@ -430,6 +488,7 @@ public static void div(Int4 a, double k, Double4 result) {
result.w = (double)(a.w / k);
}
+ @Translatable
public static Float4 div(Int4 a, Float4 b) {
return new Float4((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w));
}
@@ -441,6 +500,7 @@ public static void div(Int4 a, Float4 b, Float4 result) {
result.w = (float)(a.w / b.w);
}
+ @Translatable
public static Float4 div(Int4 a, float k) {
return new Float4((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k));
}
@@ -452,6 +512,7 @@ public static void div(Int4 a, float k, Float4 result) {
result.w = (float)(a.w / k);
}
+ @Translatable
public static Int4 div(Int4 a, Int4 b) {
return new Int4((int)(a.x / b.x), (int)(a.y / b.y), (int)(a.z / b.z), (int)(a.w / b.w));
}
@@ -463,6 +524,7 @@ public static void div(Int4 a, Int4 b, Int4 result) {
result.w = (int)(a.w / b.w);
}
+ @Translatable
public static Int4 div(Int4 a, int k) {
return new Int4((int)(a.x / k), (int)(a.y / k), (int)(a.z / k), (int)(a.w / k));
}
@@ -474,6 +536,7 @@ public static void div(Int4 a, int k, Int4 result) {
result.w = (int)(a.w / k);
}
+ @Translatable
public static Int4 mod(Int4 a, Int4 b) {
return new Int4((int)(a.x % b.x), (int)(a.y % b.y), (int)(a.z % b.z), (int)(a.w % b.w));
}
@@ -485,6 +548,7 @@ public static void mod(Int4 a, Int4 b, Int4 result) {
result.w = (int)(a.w % b.w);
}
+ @Translatable
public static Int4 mod(Int4 a, int k) {
return new Int4((int)(a.x % k), (int)(a.y % k), (int)(a.z % k), (int)(a.w % k));
}
@@ -496,6 +560,7 @@ public static void mod(Int4 a, int k, Int4 result) {
result.w = (int)(a.w % k);
}
+ @Translatable
public static Int4 bitAnd(Int4 a, Int4 b) {
return new Int4((int)(a.x & b.x), (int)(a.y & b.y), (int)(a.z & b.z), (int)(a.w & b.w));
}
@@ -507,6 +572,7 @@ public static void bitAnd(Int4 a, Int4 b, Int4 result) {
result.w = (int)(a.w & b.w);
}
+ @Translatable
public static Int4 bitOr(Int4 a, Int4 b) {
return new Int4((int)(a.x | b.x), (int)(a.y | b.y), (int)(a.z | b.z), (int)(a.w | b.w));
}
@@ -518,6 +584,7 @@ public static void bitOr(Int4 a, Int4 b, Int4 result) {
result.w = (int)(a.w | b.w);
}
+ @Translatable
public static Int4 bitXor(Int4 a, Int4 b) {
return new Int4((int)(a.x ^ b.x), (int)(a.y ^ b.y), (int)(a.z ^ b.z), (int)(a.w ^ b.w));
}
@@ -529,6 +596,7 @@ public static void bitXor(Int4 a, Int4 b, Int4 result) {
result.w = (int)(a.w ^ b.w);
}
+ @Translatable
public static Int4 bitNot(Int4 a) {
return new Int4((int)(~a.x), (int)(~a.y), (int)(~a.z), (int)(~a.w));
}
@@ -540,6 +608,7 @@ public static void bitNot(Int4 a, Int4 result) {
result.w = (int)(~a.w);
}
+ @Translatable
public static Int4 abs(Int4 a) {
return new Int4(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w));
}
@@ -551,6 +620,7 @@ public static void abs(Int4 a, Int4 result) {
result.w = Math.abs(a.w);
}
+ @Translatable
public static Int4 clamp(Int4 a, Int4 b, Int4 c) {
return new Int4(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w));
}
@@ -562,6 +632,7 @@ public static void clamp(Int4 a, Int4 b, Int4 c, Int4 result) {
result.w = Math.clamp(a.w, b.w, c.w);
}
+ @Translatable
public static Int4 max(Int4 a, Int4 b) {
return new Int4(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w));
}
@@ -573,6 +644,7 @@ public static void max(Int4 a, Int4 b, Int4 result) {
result.w = Math.max(a.w, b.w);
}
+ @Translatable
public static Int4 maxMag(Int4 a, Int4 b) {
return new Int4(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w));
}
@@ -584,6 +656,7 @@ public static void maxMag(Int4 a, Int4 b, Int4 result) {
result.w = Math.maxMag(a.w, b.w);
}
+ @Translatable
public static Int4 min(Int4 a, Int4 b) {
return new Int4(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w));
}
@@ -595,6 +668,7 @@ public static void min(Int4 a, Int4 b, Int4 result) {
result.w = Math.min(a.w, b.w);
}
+ @Translatable
public static Int4 minMag(Int4 a, Int4 b) {
return new Int4(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w));
}
@@ -606,6 +680,7 @@ public static void minMag(Int4 a, Int4 b, Int4 result) {
result.w = Math.minMag(a.w, b.w);
}
+ @Translatable
public static Int4 mix(Int4 a, Int4 b, Int4 c) {
return new Int4(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w));
}
@@ -617,6 +692,7 @@ public static void mix(Int4 a, Int4 b, Int4 c, Int4 result) {
result.w = Math.mix(a.w, b.w, c.w);
}
+ @Translatable
public static Int4 clamp(Int4 v, int min, int max) {
return new Int4(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max));
}
@@ -628,6 +704,7 @@ public static void clamp(Int4 v, int min, int max, Int4 result) {
result.w = Math.clamp(v.w, min, max);
}
+ @Translatable
public static Int4 max(Int4 x, int y) {
return new Int4(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y));
}
@@ -639,6 +716,7 @@ public static void max(Int4 x, int y, Int4 result) {
result.w = Math.max(x.w, y);
}
+ @Translatable
public static Int4 min(Int4 x, int y) {
return new Int4(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y));
}
@@ -650,6 +728,7 @@ public static void min(Int4 x, int y, Int4 result) {
result.w = Math.min(x.w, y);
}
+ @Translatable
public static Int4 mix(Int4 x, Int4 y, int a) {
return new Int4(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a));
}
@@ -661,6 +740,7 @@ public static void mix(Int4 x, Int4 y, int a, Int4 result) {
result.w = Math.mix(x.w, y.w, a);
}
+ @Translatable
public static Int4 absDiff(Int4 a, Int4 b) {
return new Int4(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z), Math.absDiff(a.w, b.w));
}
@@ -672,6 +752,7 @@ public static void absDiff(Int4 a, Int4 b, Int4 result) {
result.w = Math.absDiff(a.w, b.w);
}
+ @Translatable
public static Int4 addSat(Int4 a, Int4 b) {
return new Int4(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z), Math.addSat(a.w, b.w));
}
@@ -683,6 +764,7 @@ public static void addSat(Int4 a, Int4 b, Int4 result) {
result.w = Math.addSat(a.w, b.w);
}
+ @Translatable
public static Int4 clz(Int4 a) {
return new Int4(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z), Math.clz(a.w));
}
@@ -694,6 +776,7 @@ public static void clz(Int4 a, Int4 result) {
result.w = Math.clz(a.w);
}
+ @Translatable
public static Int4 hadd(Int4 a, Int4 b) {
return new Int4(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z), Math.hadd(a.w, b.w));
}
@@ -705,6 +788,7 @@ public static void hadd(Int4 a, Int4 b, Int4 result) {
result.w = Math.hadd(a.w, b.w);
}
+ @Translatable
public static Int4 madHi(Int4 a, Int4 b, Int4 c) {
return new Int4(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z), Math.madHi(a.w, b.w, c.w));
}
@@ -716,6 +800,7 @@ public static void madHi(Int4 a, Int4 b, Int4 c, Int4 result) {
result.w = Math.madHi(a.w, b.w, c.w);
}
+ @Translatable
public static Int4 madSat(Int4 a, Int4 b, Int4 c) {
return new Int4(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z), Math.madSat(a.w, b.w, c.w));
}
@@ -727,6 +812,7 @@ public static void madSat(Int4 a, Int4 b, Int4 c, Int4 result) {
result.w = Math.madSat(a.w, b.w, c.w);
}
+ @Translatable
public static Int4 mulHi(Int4 a, Int4 b) {
return new Int4(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z), Math.mulHi(a.w, b.w));
}
@@ -738,6 +824,7 @@ public static void mulHi(Int4 a, Int4 b, Int4 result) {
result.w = Math.mulHi(a.w, b.w);
}
+ @Translatable
public static Int4 rhadd(Int4 a, Int4 b) {
return new Int4(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z), Math.rhadd(a.w, b.w));
}
@@ -749,6 +836,7 @@ public static void rhadd(Int4 a, Int4 b, Int4 result) {
result.w = Math.rhadd(a.w, b.w);
}
+ @Translatable
public static Int4 rotate(Int4 a, Int4 b) {
return new Int4(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z), Math.rotate(a.w, b.w));
}
@@ -760,6 +848,7 @@ public static void rotate(Int4 a, Int4 b, Int4 result) {
result.w = Math.rotate(a.w, b.w);
}
+ @Translatable
public static Int4 subSat(Int4 a, Int4 b) {
return new Int4(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z), Math.subSat(a.w, b.w));
}
@@ -771,6 +860,7 @@ public static void subSat(Int4 a, Int4 b, Int4 result) {
result.w = Math.subSat(a.w, b.w);
}
+ @Translatable
public static Int4 mad24(Int4 a, Int4 b, Int4 c) {
return new Int4(Math.mad24(a.x, b.x, c.x), Math.mad24(a.y, b.y, c.y), Math.mad24(a.z, b.z, c.z), Math.mad24(a.w, b.w, c.w));
}
@@ -782,6 +872,7 @@ public static void mad24(Int4 a, Int4 b, Int4 c, Int4 result) {
result.w = Math.mad24(a.w, b.w, c.w);
}
+ @Translatable
public static Int4 mul24(Int4 a, Int4 b) {
return new Int4(Math.mul24(a.x, b.x), Math.mul24(a.y, b.y), Math.mul24(a.z, b.z), Math.mul24(a.w, b.w));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int8.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int8.java
index 6ba152e..7ebbc6b 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int8.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Int8.java
@@ -27,19 +27,30 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Int8 {
+ @Translatable
public int x;
+ @Translatable
public int y;
+ @Translatable
public int z;
+ @Translatable
public int w;
+ @Translatable
public int[] s = new int[4];
+ @Translatable
public Int8() {}
+ @Translatable
public Int8(int x, int y, int z, int w, int s0, int s1, int s2, int s3) {
set(x, y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(int x, int y, int z, int w, int s0, int s1, int s2, int s3) {
this.x = x;
this.y = y;
@@ -51,882 +62,1102 @@ public void set(int x, int y, int z, int w, int s0, int s1, int s2, int s3) {
this.s[3] = s3;
}
+ @Translatable
public Int8(int v) {
this(v, v, v, v, v, v, v, v);
}
+ @Translatable
public void set(int v) {
set(v, v, v, v, v, v, v, v);
}
+ @Translatable
public Int8(int x, int y, int z, int w, int s0, int s1, Int2 vec1) {
this(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public void set(int x, int y, int z, int w, int s0, int s1, Int2 vec1) {
set(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public Int8(int x, int y, int z, int w, int s0, Int2 vec1, int s3) {
this(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public void set(int x, int y, int z, int w, int s0, Int2 vec1, int s3) {
set(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public Int8(int x, int y, int z, int w, int s0, Int3 vec1) {
this(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(int x, int y, int z, int w, int s0, Int3 vec1) {
set(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Int8(int x, int y, int z, int w, Int2 vec1, int s2, int s3) {
this(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public void set(int x, int y, int z, int w, Int2 vec1, int s2, int s3) {
set(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public Int8(int x, int y, int z, int w, Int2 vec1, Int2 vec2) {
this(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, int y, int z, int w, Int2 vec1, Int2 vec2) {
set(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, int y, int z, int w, Int3 vec1, int s3) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public void set(int x, int y, int z, int w, Int3 vec1, int s3) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public Int8(int x, int y, int z, int w, Int4 vec1) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(int x, int y, int z, int w, Int4 vec1) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Int8(int x, int y, int z, Int2 vec1, int s1, int s2, int s3) {
this(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public void set(int x, int y, int z, Int2 vec1, int s1, int s2, int s3) {
set(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public Int8(int x, int y, int z, Int2 vec1, int s1, Int2 vec2) {
this(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, int y, int z, Int2 vec1, int s1, Int2 vec2) {
set(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, int y, int z, Int2 vec1, Int2 vec2, int s3) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(int x, int y, int z, Int2 vec1, Int2 vec2, int s3) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(int x, int y, int z, Int2 vec1, Int3 vec2) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(int x, int y, int z, Int2 vec1, Int3 vec2) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(int x, int y, int z, Int3 vec1, int s2, int s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public void set(int x, int y, int z, Int3 vec1, int s2, int s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public Int8(int x, int y, int z, Int3 vec1, Int2 vec2) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, int y, int z, Int3 vec1, Int2 vec2) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, int y, int z, Int4 vec1, int s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public void set(int x, int y, int z, Int4 vec1, int s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public Int8(int x, int y, Int2 vec1, int s0, int s1, int s2, int s3) {
this(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(int x, int y, Int2 vec1, int s0, int s1, int s2, int s3) {
set(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public Int8(int x, int y, Int2 vec1, int s0, int s1, Int2 vec2) {
this(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, int y, Int2 vec1, int s0, int s1, Int2 vec2) {
set(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, int y, Int2 vec1, int s0, Int2 vec2, int s3) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(int x, int y, Int2 vec1, int s0, Int2 vec2, int s3) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(int x, int y, Int2 vec1, int s0, Int3 vec2) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(int x, int y, Int2 vec1, int s0, Int3 vec2) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(int x, int y, Int2 vec1, Int2 vec2, int s2, int s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(int x, int y, Int2 vec1, Int2 vec2, int s2, int s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Int8(int x, int y, Int2 vec1, Int2 vec2, Int2 vec3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(int x, int y, Int2 vec1, Int2 vec2, Int2 vec3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Int8(int x, int y, Int2 vec1, Int3 vec2, int s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(int x, int y, Int2 vec1, Int3 vec2, int s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Int8(int x, int y, Int2 vec1, Int4 vec2) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(int x, int y, Int2 vec1, Int4 vec2) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Int8(int x, int y, Int3 vec1, int s1, int s2, int s3) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public void set(int x, int y, Int3 vec1, int s1, int s2, int s3) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public Int8(int x, int y, Int3 vec1, int s1, Int2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, int y, Int3 vec1, int s1, Int2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, int y, Int3 vec1, Int2 vec2, int s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(int x, int y, Int3 vec1, Int2 vec2, int s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(int x, int y, Int3 vec1, Int3 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(int x, int y, Int3 vec1, Int3 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(int x, int y, Int4 vec1, int s2, int s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public void set(int x, int y, Int4 vec1, int s2, int s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public Int8(int x, int y, Int4 vec1, Int2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, int y, Int4 vec1, Int2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, Int2 vec1, int w, int s0, int s1, int s2, int s3) {
this(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(int x, Int2 vec1, int w, int s0, int s1, int s2, int s3) {
set(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public Int8(int x, Int2 vec1, int w, int s0, int s1, Int2 vec2) {
this(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, Int2 vec1, int w, int s0, int s1, Int2 vec2) {
set(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, Int2 vec1, int w, int s0, Int2 vec2, int s3) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(int x, Int2 vec1, int w, int s0, Int2 vec2, int s3) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(int x, Int2 vec1, int w, int s0, Int3 vec2) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(int x, Int2 vec1, int w, int s0, Int3 vec2) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(int x, Int2 vec1, int w, Int2 vec2, int s2, int s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(int x, Int2 vec1, int w, Int2 vec2, int s2, int s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Int8(int x, Int2 vec1, int w, Int2 vec2, Int2 vec3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(int x, Int2 vec1, int w, Int2 vec2, Int2 vec3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Int8(int x, Int2 vec1, int w, Int3 vec2, int s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(int x, Int2 vec1, int w, Int3 vec2, int s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Int8(int x, Int2 vec1, int w, Int4 vec2) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(int x, Int2 vec1, int w, Int4 vec2) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Int8(int x, Int2 vec1, Int2 vec2, int s1, int s2, int s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(int x, Int2 vec1, Int2 vec2, int s1, int s2, int s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Int8(int x, Int2 vec1, Int2 vec2, int s1, Int2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(int x, Int2 vec1, Int2 vec2, int s1, Int2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Int8(int x, Int2 vec1, Int2 vec2, Int2 vec3, int s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(int x, Int2 vec1, Int2 vec2, Int2 vec3, int s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Int8(int x, Int2 vec1, Int2 vec2, Int3 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(int x, Int2 vec1, Int2 vec2, Int3 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Int8(int x, Int2 vec1, Int3 vec2, int s2, int s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(int x, Int2 vec1, Int3 vec2, int s2, int s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Int8(int x, Int2 vec1, Int3 vec2, Int2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(int x, Int2 vec1, Int3 vec2, Int2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Int8(int x, Int2 vec1, Int4 vec2, int s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(int x, Int2 vec1, Int4 vec2, int s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Int8(int x, Int3 vec1, int s0, int s1, int s2, int s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public void set(int x, Int3 vec1, int s0, int s1, int s2, int s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public Int8(int x, Int3 vec1, int s0, int s1, Int2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, Int3 vec1, int s0, int s1, Int2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, Int3 vec1, int s0, Int2 vec2, int s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(int x, Int3 vec1, int s0, Int2 vec2, int s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(int x, Int3 vec1, int s0, Int3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(int x, Int3 vec1, int s0, Int3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(int x, Int3 vec1, Int2 vec2, int s2, int s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(int x, Int3 vec1, Int2 vec2, int s2, int s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Int8(int x, Int3 vec1, Int2 vec2, Int2 vec3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(int x, Int3 vec1, Int2 vec2, Int2 vec3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Int8(int x, Int3 vec1, Int3 vec2, int s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(int x, Int3 vec1, Int3 vec2, int s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Int8(int x, Int3 vec1, Int4 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(int x, Int3 vec1, Int4 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Int8(int x, Int4 vec1, int s1, int s2, int s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public void set(int x, Int4 vec1, int s1, int s2, int s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public Int8(int x, Int4 vec1, int s1, Int2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(int x, Int4 vec1, int s1, Int2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(int x, Int4 vec1, Int2 vec2, int s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(int x, Int4 vec1, Int2 vec2, int s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(int x, Int4 vec1, Int3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(int x, Int4 vec1, Int3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(Int2 vec1, int z, int w, int s0, int s1, int s2, int s3) {
this(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Int2 vec1, int z, int w, int s0, int s1, int s2, int s3) {
set(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public Int8(Int2 vec1, int z, int w, int s0, int s1, Int2 vec2) {
this(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Int2 vec1, int z, int w, int s0, int s1, Int2 vec2) {
set(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(Int2 vec1, int z, int w, int s0, Int2 vec2, int s3) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Int2 vec1, int z, int w, int s0, Int2 vec2, int s3) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(Int2 vec1, int z, int w, int s0, Int3 vec2) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Int2 vec1, int z, int w, int s0, Int3 vec2) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(Int2 vec1, int z, int w, Int2 vec2, int s2, int s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Int2 vec1, int z, int w, Int2 vec2, int s2, int s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Int8(Int2 vec1, int z, int w, Int2 vec2, Int2 vec3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int2 vec1, int z, int w, Int2 vec2, Int2 vec3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int2 vec1, int z, int w, Int3 vec2, int s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Int2 vec1, int z, int w, Int3 vec2, int s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Int8(Int2 vec1, int z, int w, Int4 vec2) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Int2 vec1, int z, int w, Int4 vec2) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Int8(Int2 vec1, int z, Int2 vec2, int s1, int s2, int s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Int2 vec1, int z, Int2 vec2, int s1, int s2, int s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Int8(Int2 vec1, int z, Int2 vec2, int s1, Int2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int2 vec1, int z, Int2 vec2, int s1, Int2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int2 vec1, int z, Int2 vec2, Int2 vec3, int s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Int2 vec1, int z, Int2 vec2, Int2 vec3, int s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Int8(Int2 vec1, int z, Int2 vec2, Int3 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Int2 vec1, int z, Int2 vec2, Int3 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Int8(Int2 vec1, int z, Int3 vec2, int s2, int s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Int2 vec1, int z, Int3 vec2, int s2, int s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Int8(Int2 vec1, int z, Int3 vec2, Int2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int2 vec1, int z, Int3 vec2, Int2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int2 vec1, int z, Int4 vec2, int s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Int2 vec1, int z, Int4 vec2, int s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Int8(Int2 vec1, Int2 vec2, int s0, int s1, int s2, int s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2, int s0, int s1, int s2, int s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public Int8(Int2 vec1, Int2 vec2, int s0, int s1, Int2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2, int s0, int s1, Int2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int2 vec1, Int2 vec2, int s0, Int2 vec3, int s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2, int s0, Int2 vec3, int s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public Int8(Int2 vec1, Int2 vec2, int s0, Int3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2, int s0, Int3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Int8(Int2 vec1, Int2 vec2, Int2 vec3, int s2, int s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2, Int2 vec3, int s2, int s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public Int8(Int2 vec1, Int2 vec2, Int2 vec3, Int2 vec4) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2, Int2 vec3, Int2 vec4) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public Int8(Int2 vec1, Int2 vec2, Int3 vec3, int s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2, Int3 vec3, int s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public Int8(Int2 vec1, Int2 vec2, Int4 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public void set(Int2 vec1, Int2 vec2, Int4 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public Int8(Int2 vec1, Int3 vec2, int s1, int s2, int s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public void set(Int2 vec1, Int3 vec2, int s1, int s2, int s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public Int8(Int2 vec1, Int3 vec2, int s1, Int2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int2 vec1, Int3 vec2, int s1, Int2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int2 vec1, Int3 vec2, Int2 vec3, int s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Int2 vec1, Int3 vec2, Int2 vec3, int s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public Int8(Int2 vec1, Int3 vec2, Int3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Int2 vec1, Int3 vec2, Int3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Int8(Int2 vec1, Int4 vec2, int s2, int s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public void set(Int2 vec1, Int4 vec2, int s2, int s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public Int8(Int2 vec1, Int4 vec2, Int2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int2 vec1, Int4 vec2, Int2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int3 vec1, int w, int s0, int s1, int s2, int s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Int3 vec1, int w, int s0, int s1, int s2, int s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public Int8(Int3 vec1, int w, int s0, int s1, Int2 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Int3 vec1, int w, int s0, int s1, Int2 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(Int3 vec1, int w, int s0, Int2 vec2, int s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Int3 vec1, int w, int s0, Int2 vec2, int s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(Int3 vec1, int w, int s0, Int3 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Int3 vec1, int w, int s0, Int3 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(Int3 vec1, int w, Int2 vec2, int s2, int s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Int3 vec1, int w, Int2 vec2, int s2, int s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Int8(Int3 vec1, int w, Int2 vec2, Int2 vec3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int3 vec1, int w, Int2 vec2, Int2 vec3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int3 vec1, int w, Int3 vec2, int s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Int3 vec1, int w, Int3 vec2, int s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Int8(Int3 vec1, int w, Int4 vec2) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Int3 vec1, int w, Int4 vec2) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Int8(Int3 vec1, Int2 vec2, int s1, int s2, int s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Int3 vec1, Int2 vec2, int s1, int s2, int s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Int8(Int3 vec1, Int2 vec2, int s1, Int2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int3 vec1, Int2 vec2, int s1, Int2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int3 vec1, Int2 vec2, Int2 vec3, int s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Int3 vec1, Int2 vec2, Int2 vec3, int s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Int8(Int3 vec1, Int2 vec2, Int3 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Int3 vec1, Int2 vec2, Int3 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Int8(Int3 vec1, Int3 vec2, int s2, int s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Int3 vec1, Int3 vec2, int s2, int s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Int8(Int3 vec1, Int3 vec2, Int2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int3 vec1, Int3 vec2, Int2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int3 vec1, Int4 vec2, int s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Int3 vec1, Int4 vec2, int s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Int8(Int4 vec1, int s0, int s1, int s2, int s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Int4 vec1, int s0, int s1, int s2, int s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public Int8(Int4 vec1, int s0, int s1, Int2 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Int4 vec1, int s0, int s1, Int2 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Int8(Int4 vec1, int s0, Int2 vec2, int s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Int4 vec1, int s0, Int2 vec2, int s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Int8(Int4 vec1, int s0, Int3 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Int4 vec1, int s0, Int3 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Int8(Int4 vec1, Int2 vec2, int s2, int s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Int4 vec1, Int2 vec2, int s2, int s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Int8(Int4 vec1, Int2 vec2, Int2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Int4 vec1, Int2 vec2, Int2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Int8(Int4 vec1, Int3 vec2, int s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Int4 vec1, Int3 vec2, int s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Int8(Int4 vec1, Int4 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Int4 vec1, Int4 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Int8(Int8 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public void set(Int8 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public Int8 value() {
return new Int8(this);
}
+ @Translatable
public Int4 lo() {
return new Int4(x, y, z, w);
}
@@ -938,6 +1169,7 @@ public void lo(Int4 result) {
result.w = w;
}
+ @Translatable
public Int4 hi() {
return new Int4(s[0], s[1], s[2], s[3]);
}
@@ -949,6 +1181,7 @@ public void hi(Int4 result) {
result.w = s[3];
}
+ @Translatable
public Int4 odd() {
return new Int4(y, w, s[1], s[3]);
}
@@ -960,6 +1193,7 @@ public void odd(Int4 result) {
result.w = s[3];
}
+ @Translatable
public Int4 even() {
return new Int4(x, z, s[0], s[2]);
}
@@ -971,6 +1205,7 @@ public void even(Int4 result) {
result.w = s[2];
}
+ @Translatable
public Byte8 convertByte8() {
return new Byte8((byte)(x), (byte)(y), (byte)(z), (byte)(w), (byte)(s[0]), (byte)(s[1]), (byte)(s[2]), (byte)(s[3]));
}
@@ -986,6 +1221,7 @@ public void convertByte8(Byte8 result) {
result.s[3] = (byte)(s[3]);
}
+ @Translatable
public Short8 convertShort8() {
return new Short8((short)(x), (short)(y), (short)(z), (short)(w), (short)(s[0]), (short)(s[1]), (short)(s[2]), (short)(s[3]));
}
@@ -1001,6 +1237,7 @@ public void convertShort8(Short8 result) {
result.s[3] = (short)(s[3]);
}
+ @Translatable
public Long8 convertLong8() {
return new Long8((long)(x), (long)(y), (long)(z), (long)(w), (long)(s[0]), (long)(s[1]), (long)(s[2]), (long)(s[3]));
}
@@ -1016,6 +1253,7 @@ public void convertLong8(Long8 result) {
result.s[3] = (long)(s[3]);
}
+ @Translatable
public Float8 convertFloat8() {
return new Float8((float)(x), (float)(y), (float)(z), (float)(w), (float)(s[0]), (float)(s[1]), (float)(s[2]), (float)(s[3]));
}
@@ -1031,6 +1269,7 @@ public void convertFloat8(Float8 result) {
result.s[3] = (float)(s[3]);
}
+ @Translatable
public Double8 convertDouble8() {
return new Double8((double)(x), (double)(y), (double)(z), (double)(w), (double)(s[0]), (double)(s[1]), (double)(s[2]), (double)(s[3]));
}
@@ -1046,6 +1285,7 @@ public void convertDouble8(Double8 result) {
result.s[3] = (double)(s[3]);
}
+ @Translatable
public Int2 asInt2() {
return new Int2(x, y);
}
@@ -1055,6 +1295,7 @@ public void asInt2(Int2 result) {
result.y = y;
}
+ @Translatable
public Int3 asInt3() {
return new Int3(x, y, z);
}
@@ -1065,6 +1306,7 @@ public void asInt3(Int3 result) {
result.z = z;
}
+ @Translatable
public Int4 asInt4() {
return new Int4(x, y, z, w);
}
@@ -1076,6 +1318,7 @@ public void asInt4(Int4 result) {
result.w = w;
}
+ @Translatable
public static Int8 isEqual(Int8 a, Int8 b) {
return new Int8(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0, a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
}
@@ -1091,6 +1334,7 @@ public static void isEqual(Int8 a, Int8 b, Int8 result) {
result.s[3] = a.s[3] == b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isNotEqual(Int8 a, Int8 b) {
return new Int8(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0, a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
}
@@ -1106,6 +1350,7 @@ public static void isNotEqual(Int8 a, Int8 b, Int8 result) {
result.s[3] = a.s[3] != b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreater(Int8 a, Int8 b) {
return new Int8(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0, a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
}
@@ -1121,6 +1366,7 @@ public static void isGreater(Int8 a, Int8 b, Int8 result) {
result.s[3] = a.s[3] > b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreaterEqual(Int8 a, Int8 b) {
return new Int8(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0, a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
}
@@ -1136,6 +1382,7 @@ public static void isGreaterEqual(Int8 a, Int8 b, Int8 result) {
result.s[3] = a.s[3] >= b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLess(Int8 a, Int8 b) {
return new Int8(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0, a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
}
@@ -1151,6 +1398,7 @@ public static void isLess(Int8 a, Int8 b, Int8 result) {
result.s[3] = a.s[3] < b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLessEqual(Int8 a, Int8 b) {
return new Int8(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0, a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
}
@@ -1166,6 +1414,7 @@ public static void isLessEqual(Int8 a, Int8 b, Int8 result) {
result.s[3] = a.s[3] <= b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 select(Int8 a, Int8 b, Int8 c) {
return new Int8(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w), Math.select(a.s[0], b.s[0], c.s[0]), Math.select(a.s[1], b.s[1], c.s[1]), Math.select(a.s[2], b.s[2], c.s[2]), Math.select(a.s[3], b.s[3], c.s[3]));
}
@@ -1181,14 +1430,17 @@ public static void select(Int8 a, Int8 b, Int8 c, Int8 result) {
result.s[3] = Math.select(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static int any(Int8 a) {
return (a.x != 0 || a.y != 0 || a.z != 0 || a.w != 0 || a.s[0] != 0 || a.s[1] != 0 || a.s[2] != 0 || a.s[3] != 0)? 1 : 0;
}
+ @Translatable
public static int all(Int8 a) {
return (a.x == 0 || a.y == 0 || a.z == 0 || a.w == 0 || a.s[0] == 0 || a.s[1] == 0 || a.s[2] == 0 || a.s[3] == 0)? 0 : 1;
}
+ @Translatable
public static Int8 neg(Int8 a) {
return new Int8((int)(-a.x), (int)(-a.y), (int)(-a.z), (int)(-a.w), (int)(-a.s[0]), (int)(-a.s[1]), (int)(-a.s[2]), (int)(-a.s[3]));
}
@@ -1204,6 +1456,7 @@ public static void neg(Int8 a, Int8 result) {
result.s[3] = (int)(-a.s[3]);
}
+ @Translatable
public static Int8 add(Int8 a, Int8 b) {
return new Int8((int)(a.x + b.x), (int)(a.y + b.y), (int)(a.z + b.z), (int)(a.w + b.w), (int)(a.s[0] + b.s[0]), (int)(a.s[1] + b.s[1]), (int)(a.s[2] + b.s[2]), (int)(a.s[3] + b.s[3]));
}
@@ -1219,6 +1472,7 @@ public static void add(Int8 a, Int8 b, Int8 result) {
result.s[3] = (int)(a.s[3] + b.s[3]);
}
+ @Translatable
public static Int8 sub(Int8 a, Int8 b) {
return new Int8((int)(a.x - b.x), (int)(a.y - b.y), (int)(a.z - b.z), (int)(a.w - b.w), (int)(a.s[0] - b.s[0]), (int)(a.s[1] - b.s[1]), (int)(a.s[2] - b.s[2]), (int)(a.s[3] - b.s[3]));
}
@@ -1234,6 +1488,7 @@ public static void sub(Int8 a, Int8 b, Int8 result) {
result.s[3] = (int)(a.s[3] - b.s[3]);
}
+ @Translatable
public static Double8 mul(Int8 a, Double8 b) {
return new Double8((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w), (double)(a.s[0] * b.s[0]), (double)(a.s[1] * b.s[1]), (double)(a.s[2] * b.s[2]), (double)(a.s[3] * b.s[3]));
}
@@ -1249,6 +1504,7 @@ public static void mul(Int8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Double8 mul(Int8 a, double k) {
return new Double8((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k), (double)(a.s[0] * k), (double)(a.s[1] * k), (double)(a.s[2] * k), (double)(a.s[3] * k));
}
@@ -1264,6 +1520,7 @@ public static void mul(Int8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] * k);
}
+ @Translatable
public static Float8 mul(Int8 a, Float8 b) {
return new Float8((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w), (float)(a.s[0] * b.s[0]), (float)(a.s[1] * b.s[1]), (float)(a.s[2] * b.s[2]), (float)(a.s[3] * b.s[3]));
}
@@ -1279,6 +1536,7 @@ public static void mul(Int8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Float8 mul(Int8 a, float k) {
return new Float8((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k), (float)(a.s[0] * k), (float)(a.s[1] * k), (float)(a.s[2] * k), (float)(a.s[3] * k));
}
@@ -1294,6 +1552,7 @@ public static void mul(Int8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] * k);
}
+ @Translatable
public static Int8 mul(Int8 a, Int8 b) {
return new Int8((int)(a.x * b.x), (int)(a.y * b.y), (int)(a.z * b.z), (int)(a.w * b.w), (int)(a.s[0] * b.s[0]), (int)(a.s[1] * b.s[1]), (int)(a.s[2] * b.s[2]), (int)(a.s[3] * b.s[3]));
}
@@ -1309,6 +1568,7 @@ public static void mul(Int8 a, Int8 b, Int8 result) {
result.s[3] = (int)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Int8 mul(Int8 a, int k) {
return new Int8((int)(a.x * k), (int)(a.y * k), (int)(a.z * k), (int)(a.w * k), (int)(a.s[0] * k), (int)(a.s[1] * k), (int)(a.s[2] * k), (int)(a.s[3] * k));
}
@@ -1324,6 +1584,7 @@ public static void mul(Int8 a, int k, Int8 result) {
result.s[3] = (int)(a.s[3] * k);
}
+ @Translatable
public static Double8 div(Int8 a, Double8 b) {
return new Double8((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w), (double)(a.s[0] / b.s[0]), (double)(a.s[1] / b.s[1]), (double)(a.s[2] / b.s[2]), (double)(a.s[3] / b.s[3]));
}
@@ -1339,6 +1600,7 @@ public static void div(Int8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Double8 div(Int8 a, double k) {
return new Double8((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k), (double)(a.s[0] / k), (double)(a.s[1] / k), (double)(a.s[2] / k), (double)(a.s[3] / k));
}
@@ -1354,6 +1616,7 @@ public static void div(Int8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] / k);
}
+ @Translatable
public static Float8 div(Int8 a, Float8 b) {
return new Float8((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w), (float)(a.s[0] / b.s[0]), (float)(a.s[1] / b.s[1]), (float)(a.s[2] / b.s[2]), (float)(a.s[3] / b.s[3]));
}
@@ -1369,6 +1632,7 @@ public static void div(Int8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Float8 div(Int8 a, float k) {
return new Float8((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k), (float)(a.s[0] / k), (float)(a.s[1] / k), (float)(a.s[2] / k), (float)(a.s[3] / k));
}
@@ -1384,6 +1648,7 @@ public static void div(Int8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] / k);
}
+ @Translatable
public static Int8 div(Int8 a, Int8 b) {
return new Int8((int)(a.x / b.x), (int)(a.y / b.y), (int)(a.z / b.z), (int)(a.w / b.w), (int)(a.s[0] / b.s[0]), (int)(a.s[1] / b.s[1]), (int)(a.s[2] / b.s[2]), (int)(a.s[3] / b.s[3]));
}
@@ -1399,6 +1664,7 @@ public static void div(Int8 a, Int8 b, Int8 result) {
result.s[3] = (int)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Int8 div(Int8 a, int k) {
return new Int8((int)(a.x / k), (int)(a.y / k), (int)(a.z / k), (int)(a.w / k), (int)(a.s[0] / k), (int)(a.s[1] / k), (int)(a.s[2] / k), (int)(a.s[3] / k));
}
@@ -1414,6 +1680,7 @@ public static void div(Int8 a, int k, Int8 result) {
result.s[3] = (int)(a.s[3] / k);
}
+ @Translatable
public static Int8 mod(Int8 a, Int8 b) {
return new Int8((int)(a.x % b.x), (int)(a.y % b.y), (int)(a.z % b.z), (int)(a.w % b.w), (int)(a.s[0] % b.s[0]), (int)(a.s[1] % b.s[1]), (int)(a.s[2] % b.s[2]), (int)(a.s[3] % b.s[3]));
}
@@ -1429,6 +1696,7 @@ public static void mod(Int8 a, Int8 b, Int8 result) {
result.s[3] = (int)(a.s[3] % b.s[3]);
}
+ @Translatable
public static Int8 mod(Int8 a, int k) {
return new Int8((int)(a.x % k), (int)(a.y % k), (int)(a.z % k), (int)(a.w % k), (int)(a.s[0] % k), (int)(a.s[1] % k), (int)(a.s[2] % k), (int)(a.s[3] % k));
}
@@ -1444,6 +1712,7 @@ public static void mod(Int8 a, int k, Int8 result) {
result.s[3] = (int)(a.s[3] % k);
}
+ @Translatable
public static Int8 bitAnd(Int8 a, Int8 b) {
return new Int8((int)(a.x & b.x), (int)(a.y & b.y), (int)(a.z & b.z), (int)(a.w & b.w), (int)(a.s[0] & b.s[0]), (int)(a.s[1] & b.s[1]), (int)(a.s[2] & b.s[2]), (int)(a.s[3] & b.s[3]));
}
@@ -1459,6 +1728,7 @@ public static void bitAnd(Int8 a, Int8 b, Int8 result) {
result.s[3] = (int)(a.s[3] & b.s[3]);
}
+ @Translatable
public static Int8 bitOr(Int8 a, Int8 b) {
return new Int8((int)(a.x | b.x), (int)(a.y | b.y), (int)(a.z | b.z), (int)(a.w | b.w), (int)(a.s[0] | b.s[0]), (int)(a.s[1] | b.s[1]), (int)(a.s[2] | b.s[2]), (int)(a.s[3] | b.s[3]));
}
@@ -1474,6 +1744,7 @@ public static void bitOr(Int8 a, Int8 b, Int8 result) {
result.s[3] = (int)(a.s[3] | b.s[3]);
}
+ @Translatable
public static Int8 bitXor(Int8 a, Int8 b) {
return new Int8((int)(a.x ^ b.x), (int)(a.y ^ b.y), (int)(a.z ^ b.z), (int)(a.w ^ b.w), (int)(a.s[0] ^ b.s[0]), (int)(a.s[1] ^ b.s[1]), (int)(a.s[2] ^ b.s[2]), (int)(a.s[3] ^ b.s[3]));
}
@@ -1489,6 +1760,7 @@ public static void bitXor(Int8 a, Int8 b, Int8 result) {
result.s[3] = (int)(a.s[3] ^ b.s[3]);
}
+ @Translatable
public static Int8 bitNot(Int8 a) {
return new Int8((int)(~a.x), (int)(~a.y), (int)(~a.z), (int)(~a.w), (int)(~a.s[0]), (int)(~a.s[1]), (int)(~a.s[2]), (int)(~a.s[3]));
}
@@ -1504,6 +1776,7 @@ public static void bitNot(Int8 a, Int8 result) {
result.s[3] = (int)(~a.s[3]);
}
+ @Translatable
public static Int8 abs(Int8 a) {
return new Int8(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w), Math.abs(a.s[0]), Math.abs(a.s[1]), Math.abs(a.s[2]), Math.abs(a.s[3]));
}
@@ -1519,6 +1792,7 @@ public static void abs(Int8 a, Int8 result) {
result.s[3] = Math.abs(a.s[3]);
}
+ @Translatable
public static Int8 clamp(Int8 a, Int8 b, Int8 c) {
return new Int8(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w), Math.clamp(a.s[0], b.s[0], c.s[0]), Math.clamp(a.s[1], b.s[1], c.s[1]), Math.clamp(a.s[2], b.s[2], c.s[2]), Math.clamp(a.s[3], b.s[3], c.s[3]));
}
@@ -1534,6 +1808,7 @@ public static void clamp(Int8 a, Int8 b, Int8 c, Int8 result) {
result.s[3] = Math.clamp(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Int8 max(Int8 a, Int8 b) {
return new Int8(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w), Math.max(a.s[0], b.s[0]), Math.max(a.s[1], b.s[1]), Math.max(a.s[2], b.s[2]), Math.max(a.s[3], b.s[3]));
}
@@ -1549,6 +1824,7 @@ public static void max(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.max(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 maxMag(Int8 a, Int8 b) {
return new Int8(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w), Math.maxMag(a.s[0], b.s[0]), Math.maxMag(a.s[1], b.s[1]), Math.maxMag(a.s[2], b.s[2]), Math.maxMag(a.s[3], b.s[3]));
}
@@ -1564,6 +1840,7 @@ public static void maxMag(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.maxMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 min(Int8 a, Int8 b) {
return new Int8(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w), Math.min(a.s[0], b.s[0]), Math.min(a.s[1], b.s[1]), Math.min(a.s[2], b.s[2]), Math.min(a.s[3], b.s[3]));
}
@@ -1579,6 +1856,7 @@ public static void min(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.min(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 minMag(Int8 a, Int8 b) {
return new Int8(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w), Math.minMag(a.s[0], b.s[0]), Math.minMag(a.s[1], b.s[1]), Math.minMag(a.s[2], b.s[2]), Math.minMag(a.s[3], b.s[3]));
}
@@ -1594,6 +1872,7 @@ public static void minMag(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.minMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 mix(Int8 a, Int8 b, Int8 c) {
return new Int8(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w), Math.mix(a.s[0], b.s[0], c.s[0]), Math.mix(a.s[1], b.s[1], c.s[1]), Math.mix(a.s[2], b.s[2], c.s[2]), Math.mix(a.s[3], b.s[3], c.s[3]));
}
@@ -1609,6 +1888,7 @@ public static void mix(Int8 a, Int8 b, Int8 c, Int8 result) {
result.s[3] = Math.mix(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Int8 clamp(Int8 v, int min, int max) {
return new Int8(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max), Math.clamp(v.s[0], min, max), Math.clamp(v.s[1], min, max), Math.clamp(v.s[2], min, max), Math.clamp(v.s[3], min, max));
}
@@ -1624,6 +1904,7 @@ public static void clamp(Int8 v, int min, int max, Int8 result) {
result.s[3] = Math.clamp(v.s[3], min, max);
}
+ @Translatable
public static Int8 max(Int8 x, int y) {
return new Int8(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y), Math.max(x.s[0], y), Math.max(x.s[1], y), Math.max(x.s[2], y), Math.max(x.s[3], y));
}
@@ -1639,6 +1920,7 @@ public static void max(Int8 x, int y, Int8 result) {
result.s[3] = Math.max(x.s[3], y);
}
+ @Translatable
public static Int8 min(Int8 x, int y) {
return new Int8(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y), Math.min(x.s[0], y), Math.min(x.s[1], y), Math.min(x.s[2], y), Math.min(x.s[3], y));
}
@@ -1654,6 +1936,7 @@ public static void min(Int8 x, int y, Int8 result) {
result.s[3] = Math.min(x.s[3], y);
}
+ @Translatable
public static Int8 mix(Int8 x, Int8 y, int a) {
return new Int8(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a), Math.mix(x.s[0], y.s[0], a), Math.mix(x.s[1], y.s[1], a), Math.mix(x.s[2], y.s[2], a), Math.mix(x.s[3], y.s[3], a));
}
@@ -1669,6 +1952,7 @@ public static void mix(Int8 x, Int8 y, int a, Int8 result) {
result.s[3] = Math.mix(x.s[3], y.s[3], a);
}
+ @Translatable
public static Int8 absDiff(Int8 a, Int8 b) {
return new Int8(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z), Math.absDiff(a.w, b.w), Math.absDiff(a.s[0], b.s[0]), Math.absDiff(a.s[1], b.s[1]), Math.absDiff(a.s[2], b.s[2]), Math.absDiff(a.s[3], b.s[3]));
}
@@ -1684,6 +1968,7 @@ public static void absDiff(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.absDiff(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 addSat(Int8 a, Int8 b) {
return new Int8(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z), Math.addSat(a.w, b.w), Math.addSat(a.s[0], b.s[0]), Math.addSat(a.s[1], b.s[1]), Math.addSat(a.s[2], b.s[2]), Math.addSat(a.s[3], b.s[3]));
}
@@ -1699,6 +1984,7 @@ public static void addSat(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.addSat(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 clz(Int8 a) {
return new Int8(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z), Math.clz(a.w), Math.clz(a.s[0]), Math.clz(a.s[1]), Math.clz(a.s[2]), Math.clz(a.s[3]));
}
@@ -1714,6 +2000,7 @@ public static void clz(Int8 a, Int8 result) {
result.s[3] = Math.clz(a.s[3]);
}
+ @Translatable
public static Int8 hadd(Int8 a, Int8 b) {
return new Int8(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z), Math.hadd(a.w, b.w), Math.hadd(a.s[0], b.s[0]), Math.hadd(a.s[1], b.s[1]), Math.hadd(a.s[2], b.s[2]), Math.hadd(a.s[3], b.s[3]));
}
@@ -1729,6 +2016,7 @@ public static void hadd(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.hadd(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 madHi(Int8 a, Int8 b, Int8 c) {
return new Int8(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z), Math.madHi(a.w, b.w, c.w), Math.madHi(a.s[0], b.s[0], c.s[0]), Math.madHi(a.s[1], b.s[1], c.s[1]), Math.madHi(a.s[2], b.s[2], c.s[2]), Math.madHi(a.s[3], b.s[3], c.s[3]));
}
@@ -1744,6 +2032,7 @@ public static void madHi(Int8 a, Int8 b, Int8 c, Int8 result) {
result.s[3] = Math.madHi(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Int8 madSat(Int8 a, Int8 b, Int8 c) {
return new Int8(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z), Math.madSat(a.w, b.w, c.w), Math.madSat(a.s[0], b.s[0], c.s[0]), Math.madSat(a.s[1], b.s[1], c.s[1]), Math.madSat(a.s[2], b.s[2], c.s[2]), Math.madSat(a.s[3], b.s[3], c.s[3]));
}
@@ -1759,6 +2048,7 @@ public static void madSat(Int8 a, Int8 b, Int8 c, Int8 result) {
result.s[3] = Math.madSat(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Int8 mulHi(Int8 a, Int8 b) {
return new Int8(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z), Math.mulHi(a.w, b.w), Math.mulHi(a.s[0], b.s[0]), Math.mulHi(a.s[1], b.s[1]), Math.mulHi(a.s[2], b.s[2]), Math.mulHi(a.s[3], b.s[3]));
}
@@ -1774,6 +2064,7 @@ public static void mulHi(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.mulHi(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 rhadd(Int8 a, Int8 b) {
return new Int8(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z), Math.rhadd(a.w, b.w), Math.rhadd(a.s[0], b.s[0]), Math.rhadd(a.s[1], b.s[1]), Math.rhadd(a.s[2], b.s[2]), Math.rhadd(a.s[3], b.s[3]));
}
@@ -1789,6 +2080,7 @@ public static void rhadd(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.rhadd(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 rotate(Int8 a, Int8 b) {
return new Int8(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z), Math.rotate(a.w, b.w), Math.rotate(a.s[0], b.s[0]), Math.rotate(a.s[1], b.s[1]), Math.rotate(a.s[2], b.s[2]), Math.rotate(a.s[3], b.s[3]));
}
@@ -1804,6 +2096,7 @@ public static void rotate(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.rotate(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 subSat(Int8 a, Int8 b) {
return new Int8(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z), Math.subSat(a.w, b.w), Math.subSat(a.s[0], b.s[0]), Math.subSat(a.s[1], b.s[1]), Math.subSat(a.s[2], b.s[2]), Math.subSat(a.s[3], b.s[3]));
}
@@ -1819,6 +2112,7 @@ public static void subSat(Int8 a, Int8 b, Int8 result) {
result.s[3] = Math.subSat(a.s[3], b.s[3]);
}
+ @Translatable
public static Int8 mad24(Int8 a, Int8 b, Int8 c) {
return new Int8(Math.mad24(a.x, b.x, c.x), Math.mad24(a.y, b.y, c.y), Math.mad24(a.z, b.z, c.z), Math.mad24(a.w, b.w, c.w), Math.mad24(a.s[0], b.s[0], c.s[0]), Math.mad24(a.s[1], b.s[1], c.s[1]), Math.mad24(a.s[2], b.s[2], c.s[2]), Math.mad24(a.s[3], b.s[3], c.s[3]));
}
@@ -1834,6 +2128,7 @@ public static void mad24(Int8 a, Int8 b, Int8 c, Int8 result) {
result.s[3] = Math.mad24(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Int8 mul24(Int8 a, Int8 b) {
return new Int8(Math.mul24(a.x, b.x), Math.mul24(a.y, b.y), Math.mul24(a.z, b.z), Math.mul24(a.w, b.w), Math.mul24(a.s[0], b.s[0]), Math.mul24(a.s[1], b.s[1]), Math.mul24(a.s[2], b.s[2]), Math.mul24(a.s[3], b.s[3]));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long2.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long2.java
index bbce978..ac0f9b7 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long2.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long2.java
@@ -27,41 +27,55 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Long2 {
+ @Translatable
public long x;
+ @Translatable
public long y;
+ @Translatable
public Long2() {}
+ @Translatable
public Long2(long x, long y) {
set(x, y);
}
+ @Translatable
public void set(long x, long y) {
this.x = x;
this.y = y;
}
+ @Translatable
public Long2(long v) {
this(v, v);
}
+ @Translatable
public void set(long v) {
set(v, v);
}
+ @Translatable
public Long2(Long2 vec1) {
this(vec1.x, vec1.y);
}
+ @Translatable
public void set(Long2 vec1) {
set(vec1.x, vec1.y);
}
+ @Translatable
public Long2 value() {
return new Long2(this);
}
+ @Translatable
public Byte2 convertByte2() {
return new Byte2((byte)(x), (byte)(y));
}
@@ -71,6 +85,7 @@ public void convertByte2(Byte2 result) {
result.y = (byte)(y);
}
+ @Translatable
public Short2 convertShort2() {
return new Short2((short)(x), (short)(y));
}
@@ -80,6 +95,7 @@ public void convertShort2(Short2 result) {
result.y = (short)(y);
}
+ @Translatable
public Int2 convertInt2() {
return new Int2((int)(x), (int)(y));
}
@@ -89,6 +105,7 @@ public void convertInt2(Int2 result) {
result.y = (int)(y);
}
+ @Translatable
public Float2 convertFloat2() {
return new Float2((float)(x), (float)(y));
}
@@ -98,6 +115,7 @@ public void convertFloat2(Float2 result) {
result.y = (float)(y);
}
+ @Translatable
public Double2 convertDouble2() {
return new Double2((double)(x), (double)(y));
}
@@ -107,6 +125,7 @@ public void convertDouble2(Double2 result) {
result.y = (double)(y);
}
+ @Translatable
public static Int2 isEqual(Long2 a, Long2 b) {
return new Int2(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0);
}
@@ -116,6 +135,7 @@ public static void isEqual(Long2 a, Long2 b, Int2 result) {
result.y = a.y == b.y? 1 : 0;
}
+ @Translatable
public static Int2 isNotEqual(Long2 a, Long2 b) {
return new Int2(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0);
}
@@ -125,6 +145,7 @@ public static void isNotEqual(Long2 a, Long2 b, Int2 result) {
result.y = a.y != b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreater(Long2 a, Long2 b) {
return new Int2(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0);
}
@@ -134,6 +155,7 @@ public static void isGreater(Long2 a, Long2 b, Int2 result) {
result.y = a.y > b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreaterEqual(Long2 a, Long2 b) {
return new Int2(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0);
}
@@ -143,6 +165,7 @@ public static void isGreaterEqual(Long2 a, Long2 b, Int2 result) {
result.y = a.y >= b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLess(Long2 a, Long2 b) {
return new Int2(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0);
}
@@ -152,6 +175,7 @@ public static void isLess(Long2 a, Long2 b, Int2 result) {
result.y = a.y < b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLessEqual(Long2 a, Long2 b) {
return new Int2(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0);
}
@@ -161,6 +185,7 @@ public static void isLessEqual(Long2 a, Long2 b, Int2 result) {
result.y = a.y <= b.y? 1 : 0;
}
+ @Translatable
public static Long2 select(Long2 a, Long2 b, Int2 c) {
return new Long2(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y));
}
@@ -170,14 +195,17 @@ public static void select(Long2 a, Long2 b, Int2 c, Long2 result) {
result.y = Math.select(a.y, b.y, c.y);
}
+ @Translatable
public static int any(Long2 a) {
return (a.x != 0L || a.y != 0L)? 1 : 0;
}
+ @Translatable
public static int all(Long2 a) {
return (a.x == 0L || a.y == 0L)? 0 : 1;
}
+ @Translatable
public static Long2 neg(Long2 a) {
return new Long2((long)(-a.x), (long)(-a.y));
}
@@ -187,6 +215,7 @@ public static void neg(Long2 a, Long2 result) {
result.y = (long)(-a.y);
}
+ @Translatable
public static Long2 add(Long2 a, Long2 b) {
return new Long2((long)(a.x + b.x), (long)(a.y + b.y));
}
@@ -196,6 +225,7 @@ public static void add(Long2 a, Long2 b, Long2 result) {
result.y = (long)(a.y + b.y);
}
+ @Translatable
public static Long2 sub(Long2 a, Long2 b) {
return new Long2((long)(a.x - b.x), (long)(a.y - b.y));
}
@@ -205,6 +235,7 @@ public static void sub(Long2 a, Long2 b, Long2 result) {
result.y = (long)(a.y - b.y);
}
+ @Translatable
public static Double2 mul(Long2 a, Double2 b) {
return new Double2((double)(a.x * b.x), (double)(a.y * b.y));
}
@@ -214,6 +245,7 @@ public static void mul(Long2 a, Double2 b, Double2 result) {
result.y = (double)(a.y * b.y);
}
+ @Translatable
public static Double2 mul(Long2 a, double k) {
return new Double2((double)(a.x * k), (double)(a.y * k));
}
@@ -223,6 +255,7 @@ public static void mul(Long2 a, double k, Double2 result) {
result.y = (double)(a.y * k);
}
+ @Translatable
public static Float2 mul(Long2 a, Float2 b) {
return new Float2((float)(a.x * b.x), (float)(a.y * b.y));
}
@@ -232,6 +265,7 @@ public static void mul(Long2 a, Float2 b, Float2 result) {
result.y = (float)(a.y * b.y);
}
+ @Translatable
public static Float2 mul(Long2 a, float k) {
return new Float2((float)(a.x * k), (float)(a.y * k));
}
@@ -241,6 +275,7 @@ public static void mul(Long2 a, float k, Float2 result) {
result.y = (float)(a.y * k);
}
+ @Translatable
public static Long2 mul(Long2 a, Long2 b) {
return new Long2((long)(a.x * b.x), (long)(a.y * b.y));
}
@@ -250,6 +285,7 @@ public static void mul(Long2 a, Long2 b, Long2 result) {
result.y = (long)(a.y * b.y);
}
+ @Translatable
public static Long2 mul(Long2 a, long k) {
return new Long2((long)(a.x * k), (long)(a.y * k));
}
@@ -259,6 +295,7 @@ public static void mul(Long2 a, long k, Long2 result) {
result.y = (long)(a.y * k);
}
+ @Translatable
public static Double2 div(Long2 a, Double2 b) {
return new Double2((double)(a.x / b.x), (double)(a.y / b.y));
}
@@ -268,6 +305,7 @@ public static void div(Long2 a, Double2 b, Double2 result) {
result.y = (double)(a.y / b.y);
}
+ @Translatable
public static Double2 div(Long2 a, double k) {
return new Double2((double)(a.x / k), (double)(a.y / k));
}
@@ -277,6 +315,7 @@ public static void div(Long2 a, double k, Double2 result) {
result.y = (double)(a.y / k);
}
+ @Translatable
public static Float2 div(Long2 a, Float2 b) {
return new Float2((float)(a.x / b.x), (float)(a.y / b.y));
}
@@ -286,6 +325,7 @@ public static void div(Long2 a, Float2 b, Float2 result) {
result.y = (float)(a.y / b.y);
}
+ @Translatable
public static Float2 div(Long2 a, float k) {
return new Float2((float)(a.x / k), (float)(a.y / k));
}
@@ -295,6 +335,7 @@ public static void div(Long2 a, float k, Float2 result) {
result.y = (float)(a.y / k);
}
+ @Translatable
public static Long2 div(Long2 a, Long2 b) {
return new Long2((long)(a.x / b.x), (long)(a.y / b.y));
}
@@ -304,6 +345,7 @@ public static void div(Long2 a, Long2 b, Long2 result) {
result.y = (long)(a.y / b.y);
}
+ @Translatable
public static Long2 div(Long2 a, long k) {
return new Long2((long)(a.x / k), (long)(a.y / k));
}
@@ -313,6 +355,7 @@ public static void div(Long2 a, long k, Long2 result) {
result.y = (long)(a.y / k);
}
+ @Translatable
public static Long2 mod(Long2 a, Long2 b) {
return new Long2((long)(a.x % b.x), (long)(a.y % b.y));
}
@@ -322,6 +365,7 @@ public static void mod(Long2 a, Long2 b, Long2 result) {
result.y = (long)(a.y % b.y);
}
+ @Translatable
public static Long2 mod(Long2 a, long k) {
return new Long2((long)(a.x % k), (long)(a.y % k));
}
@@ -331,6 +375,7 @@ public static void mod(Long2 a, long k, Long2 result) {
result.y = (long)(a.y % k);
}
+ @Translatable
public static Long2 bitAnd(Long2 a, Long2 b) {
return new Long2((long)(a.x & b.x), (long)(a.y & b.y));
}
@@ -340,6 +385,7 @@ public static void bitAnd(Long2 a, Long2 b, Long2 result) {
result.y = (long)(a.y & b.y);
}
+ @Translatable
public static Long2 bitOr(Long2 a, Long2 b) {
return new Long2((long)(a.x | b.x), (long)(a.y | b.y));
}
@@ -349,6 +395,7 @@ public static void bitOr(Long2 a, Long2 b, Long2 result) {
result.y = (long)(a.y | b.y);
}
+ @Translatable
public static Long2 bitXor(Long2 a, Long2 b) {
return new Long2((long)(a.x ^ b.x), (long)(a.y ^ b.y));
}
@@ -358,6 +405,7 @@ public static void bitXor(Long2 a, Long2 b, Long2 result) {
result.y = (long)(a.y ^ b.y);
}
+ @Translatable
public static Long2 bitNot(Long2 a) {
return new Long2((long)(~a.x), (long)(~a.y));
}
@@ -367,6 +415,7 @@ public static void bitNot(Long2 a, Long2 result) {
result.y = (long)(~a.y);
}
+ @Translatable
public static Long2 abs(Long2 a) {
return new Long2(Math.abs(a.x), Math.abs(a.y));
}
@@ -376,6 +425,7 @@ public static void abs(Long2 a, Long2 result) {
result.y = Math.abs(a.y);
}
+ @Translatable
public static Long2 clamp(Long2 a, Long2 b, Long2 c) {
return new Long2(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y));
}
@@ -385,6 +435,7 @@ public static void clamp(Long2 a, Long2 b, Long2 c, Long2 result) {
result.y = Math.clamp(a.y, b.y, c.y);
}
+ @Translatable
public static Long2 max(Long2 a, Long2 b) {
return new Long2(Math.max(a.x, b.x), Math.max(a.y, b.y));
}
@@ -394,6 +445,7 @@ public static void max(Long2 a, Long2 b, Long2 result) {
result.y = Math.max(a.y, b.y);
}
+ @Translatable
public static Long2 maxMag(Long2 a, Long2 b) {
return new Long2(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y));
}
@@ -403,6 +455,7 @@ public static void maxMag(Long2 a, Long2 b, Long2 result) {
result.y = Math.maxMag(a.y, b.y);
}
+ @Translatable
public static Long2 min(Long2 a, Long2 b) {
return new Long2(Math.min(a.x, b.x), Math.min(a.y, b.y));
}
@@ -412,6 +465,7 @@ public static void min(Long2 a, Long2 b, Long2 result) {
result.y = Math.min(a.y, b.y);
}
+ @Translatable
public static Long2 minMag(Long2 a, Long2 b) {
return new Long2(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y));
}
@@ -421,6 +475,7 @@ public static void minMag(Long2 a, Long2 b, Long2 result) {
result.y = Math.minMag(a.y, b.y);
}
+ @Translatable
public static Long2 mix(Long2 a, Long2 b, Long2 c) {
return new Long2(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y));
}
@@ -430,6 +485,7 @@ public static void mix(Long2 a, Long2 b, Long2 c, Long2 result) {
result.y = Math.mix(a.y, b.y, c.y);
}
+ @Translatable
public static Long2 clamp(Long2 v, long min, long max) {
return new Long2(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max));
}
@@ -439,6 +495,7 @@ public static void clamp(Long2 v, long min, long max, Long2 result) {
result.y = Math.clamp(v.y, min, max);
}
+ @Translatable
public static Long2 max(Long2 x, long y) {
return new Long2(Math.max(x.x, y), Math.max(x.y, y));
}
@@ -448,6 +505,7 @@ public static void max(Long2 x, long y, Long2 result) {
result.y = Math.max(x.y, y);
}
+ @Translatable
public static Long2 min(Long2 x, long y) {
return new Long2(Math.min(x.x, y), Math.min(x.y, y));
}
@@ -457,6 +515,7 @@ public static void min(Long2 x, long y, Long2 result) {
result.y = Math.min(x.y, y);
}
+ @Translatable
public static Long2 mix(Long2 x, Long2 y, long a) {
return new Long2(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a));
}
@@ -466,6 +525,7 @@ public static void mix(Long2 x, Long2 y, long a, Long2 result) {
result.y = Math.mix(x.y, y.y, a);
}
+ @Translatable
public static Long2 absDiff(Long2 a, Long2 b) {
return new Long2(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y));
}
@@ -475,6 +535,7 @@ public static void absDiff(Long2 a, Long2 b, Long2 result) {
result.y = Math.absDiff(a.y, b.y);
}
+ @Translatable
public static Long2 addSat(Long2 a, Long2 b) {
return new Long2(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y));
}
@@ -484,6 +545,7 @@ public static void addSat(Long2 a, Long2 b, Long2 result) {
result.y = Math.addSat(a.y, b.y);
}
+ @Translatable
public static Long2 clz(Long2 a) {
return new Long2(Math.clz(a.x), Math.clz(a.y));
}
@@ -493,6 +555,7 @@ public static void clz(Long2 a, Long2 result) {
result.y = Math.clz(a.y);
}
+ @Translatable
public static Long2 hadd(Long2 a, Long2 b) {
return new Long2(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y));
}
@@ -502,6 +565,7 @@ public static void hadd(Long2 a, Long2 b, Long2 result) {
result.y = Math.hadd(a.y, b.y);
}
+ @Translatable
public static Long2 madHi(Long2 a, Long2 b, Long2 c) {
return new Long2(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y));
}
@@ -511,6 +575,7 @@ public static void madHi(Long2 a, Long2 b, Long2 c, Long2 result) {
result.y = Math.madHi(a.y, b.y, c.y);
}
+ @Translatable
public static Long2 madSat(Long2 a, Long2 b, Long2 c) {
return new Long2(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y));
}
@@ -520,6 +585,7 @@ public static void madSat(Long2 a, Long2 b, Long2 c, Long2 result) {
result.y = Math.madSat(a.y, b.y, c.y);
}
+ @Translatable
public static Long2 mulHi(Long2 a, Long2 b) {
return new Long2(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y));
}
@@ -529,6 +595,7 @@ public static void mulHi(Long2 a, Long2 b, Long2 result) {
result.y = Math.mulHi(a.y, b.y);
}
+ @Translatable
public static Long2 rhadd(Long2 a, Long2 b) {
return new Long2(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y));
}
@@ -538,6 +605,7 @@ public static void rhadd(Long2 a, Long2 b, Long2 result) {
result.y = Math.rhadd(a.y, b.y);
}
+ @Translatable
public static Long2 rotate(Long2 a, Long2 b) {
return new Long2(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y));
}
@@ -547,6 +615,7 @@ public static void rotate(Long2 a, Long2 b, Long2 result) {
result.y = Math.rotate(a.y, b.y);
}
+ @Translatable
public static Long2 subSat(Long2 a, Long2 b) {
return new Long2(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long3.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long3.java
index 7b9d788..2b99e3f 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long3.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long3.java
@@ -27,59 +27,78 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Long3 {
+ @Translatable
public long x;
+ @Translatable
public long y;
+ @Translatable
public long z;
+ @Translatable
public Long3() {}
+ @Translatable
public Long3(long x, long y, long z) {
set(x, y, z);
}
+ @Translatable
public void set(long x, long y, long z) {
this.x = x;
this.y = y;
this.z = z;
}
+ @Translatable
public Long3(long v) {
this(v, v, v);
}
+ @Translatable
public void set(long v) {
set(v, v, v);
}
+ @Translatable
public Long3(long x, Long2 vec1) {
this(x, vec1.x, vec1.y);
}
+ @Translatable
public void set(long x, Long2 vec1) {
set(x, vec1.x, vec1.y);
}
+ @Translatable
public Long3(Long2 vec1, long z) {
this(vec1.x, vec1.y, z);
}
+ @Translatable
public void set(Long2 vec1, long z) {
set(vec1.x, vec1.y, z);
}
+ @Translatable
public Long3(Long3 vec1) {
this(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(Long3 vec1) {
set(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Long3 value() {
return new Long3(this);
}
+ @Translatable
public Byte3 convertByte3() {
return new Byte3((byte)(x), (byte)(y), (byte)(z));
}
@@ -90,6 +109,7 @@ public void convertByte3(Byte3 result) {
result.z = (byte)(z);
}
+ @Translatable
public Short3 convertShort3() {
return new Short3((short)(x), (short)(y), (short)(z));
}
@@ -100,6 +120,7 @@ public void convertShort3(Short3 result) {
result.z = (short)(z);
}
+ @Translatable
public Int3 convertInt3() {
return new Int3((int)(x), (int)(y), (int)(z));
}
@@ -110,6 +131,7 @@ public void convertInt3(Int3 result) {
result.z = (int)(z);
}
+ @Translatable
public Float3 convertFloat3() {
return new Float3((float)(x), (float)(y), (float)(z));
}
@@ -120,6 +142,7 @@ public void convertFloat3(Float3 result) {
result.z = (float)(z);
}
+ @Translatable
public Double3 convertDouble3() {
return new Double3((double)(x), (double)(y), (double)(z));
}
@@ -130,6 +153,7 @@ public void convertDouble3(Double3 result) {
result.z = (double)(z);
}
+ @Translatable
public Long2 asLong2() {
return new Long2(x, y);
}
@@ -139,6 +163,7 @@ public void asLong2(Long2 result) {
result.y = y;
}
+ @Translatable
public static Int3 isEqual(Long3 a, Long3 b) {
return new Int3(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0);
}
@@ -149,6 +174,7 @@ public static void isEqual(Long3 a, Long3 b, Int3 result) {
result.z = a.z == b.z? 1 : 0;
}
+ @Translatable
public static Int3 isNotEqual(Long3 a, Long3 b) {
return new Int3(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0);
}
@@ -159,6 +185,7 @@ public static void isNotEqual(Long3 a, Long3 b, Int3 result) {
result.z = a.z != b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreater(Long3 a, Long3 b) {
return new Int3(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0);
}
@@ -169,6 +196,7 @@ public static void isGreater(Long3 a, Long3 b, Int3 result) {
result.z = a.z > b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreaterEqual(Long3 a, Long3 b) {
return new Int3(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0);
}
@@ -179,6 +207,7 @@ public static void isGreaterEqual(Long3 a, Long3 b, Int3 result) {
result.z = a.z >= b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLess(Long3 a, Long3 b) {
return new Int3(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0);
}
@@ -189,6 +218,7 @@ public static void isLess(Long3 a, Long3 b, Int3 result) {
result.z = a.z < b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLessEqual(Long3 a, Long3 b) {
return new Int3(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0);
}
@@ -199,6 +229,7 @@ public static void isLessEqual(Long3 a, Long3 b, Int3 result) {
result.z = a.z <= b.z? 1 : 0;
}
+ @Translatable
public static Long3 select(Long3 a, Long3 b, Int3 c) {
return new Long3(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z));
}
@@ -209,14 +240,17 @@ public static void select(Long3 a, Long3 b, Int3 c, Long3 result) {
result.z = Math.select(a.z, b.z, c.z);
}
+ @Translatable
public static int any(Long3 a) {
return (a.x != 0L || a.y != 0L || a.z != 0L)? 1 : 0;
}
+ @Translatable
public static int all(Long3 a) {
return (a.x == 0L || a.y == 0L || a.z == 0L)? 0 : 1;
}
+ @Translatable
public static Long3 neg(Long3 a) {
return new Long3((long)(-a.x), (long)(-a.y), (long)(-a.z));
}
@@ -227,6 +261,7 @@ public static void neg(Long3 a, Long3 result) {
result.z = (long)(-a.z);
}
+ @Translatable
public static Long3 add(Long3 a, Long3 b) {
return new Long3((long)(a.x + b.x), (long)(a.y + b.y), (long)(a.z + b.z));
}
@@ -237,6 +272,7 @@ public static void add(Long3 a, Long3 b, Long3 result) {
result.z = (long)(a.z + b.z);
}
+ @Translatable
public static Long3 sub(Long3 a, Long3 b) {
return new Long3((long)(a.x - b.x), (long)(a.y - b.y), (long)(a.z - b.z));
}
@@ -247,6 +283,7 @@ public static void sub(Long3 a, Long3 b, Long3 result) {
result.z = (long)(a.z - b.z);
}
+ @Translatable
public static Double3 mul(Long3 a, Double3 b) {
return new Double3((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z));
}
@@ -257,6 +294,7 @@ public static void mul(Long3 a, Double3 b, Double3 result) {
result.z = (double)(a.z * b.z);
}
+ @Translatable
public static Double3 mul(Long3 a, double k) {
return new Double3((double)(a.x * k), (double)(a.y * k), (double)(a.z * k));
}
@@ -267,6 +305,7 @@ public static void mul(Long3 a, double k, Double3 result) {
result.z = (double)(a.z * k);
}
+ @Translatable
public static Float3 mul(Long3 a, Float3 b) {
return new Float3((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z));
}
@@ -277,6 +316,7 @@ public static void mul(Long3 a, Float3 b, Float3 result) {
result.z = (float)(a.z * b.z);
}
+ @Translatable
public static Float3 mul(Long3 a, float k) {
return new Float3((float)(a.x * k), (float)(a.y * k), (float)(a.z * k));
}
@@ -287,6 +327,7 @@ public static void mul(Long3 a, float k, Float3 result) {
result.z = (float)(a.z * k);
}
+ @Translatable
public static Long3 mul(Long3 a, Long3 b) {
return new Long3((long)(a.x * b.x), (long)(a.y * b.y), (long)(a.z * b.z));
}
@@ -297,6 +338,7 @@ public static void mul(Long3 a, Long3 b, Long3 result) {
result.z = (long)(a.z * b.z);
}
+ @Translatable
public static Long3 mul(Long3 a, long k) {
return new Long3((long)(a.x * k), (long)(a.y * k), (long)(a.z * k));
}
@@ -307,6 +349,7 @@ public static void mul(Long3 a, long k, Long3 result) {
result.z = (long)(a.z * k);
}
+ @Translatable
public static Double3 div(Long3 a, Double3 b) {
return new Double3((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z));
}
@@ -317,6 +360,7 @@ public static void div(Long3 a, Double3 b, Double3 result) {
result.z = (double)(a.z / b.z);
}
+ @Translatable
public static Double3 div(Long3 a, double k) {
return new Double3((double)(a.x / k), (double)(a.y / k), (double)(a.z / k));
}
@@ -327,6 +371,7 @@ public static void div(Long3 a, double k, Double3 result) {
result.z = (double)(a.z / k);
}
+ @Translatable
public static Float3 div(Long3 a, Float3 b) {
return new Float3((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z));
}
@@ -337,6 +382,7 @@ public static void div(Long3 a, Float3 b, Float3 result) {
result.z = (float)(a.z / b.z);
}
+ @Translatable
public static Float3 div(Long3 a, float k) {
return new Float3((float)(a.x / k), (float)(a.y / k), (float)(a.z / k));
}
@@ -347,6 +393,7 @@ public static void div(Long3 a, float k, Float3 result) {
result.z = (float)(a.z / k);
}
+ @Translatable
public static Long3 div(Long3 a, Long3 b) {
return new Long3((long)(a.x / b.x), (long)(a.y / b.y), (long)(a.z / b.z));
}
@@ -357,6 +404,7 @@ public static void div(Long3 a, Long3 b, Long3 result) {
result.z = (long)(a.z / b.z);
}
+ @Translatable
public static Long3 div(Long3 a, long k) {
return new Long3((long)(a.x / k), (long)(a.y / k), (long)(a.z / k));
}
@@ -367,6 +415,7 @@ public static void div(Long3 a, long k, Long3 result) {
result.z = (long)(a.z / k);
}
+ @Translatable
public static Long3 mod(Long3 a, Long3 b) {
return new Long3((long)(a.x % b.x), (long)(a.y % b.y), (long)(a.z % b.z));
}
@@ -377,6 +426,7 @@ public static void mod(Long3 a, Long3 b, Long3 result) {
result.z = (long)(a.z % b.z);
}
+ @Translatable
public static Long3 mod(Long3 a, long k) {
return new Long3((long)(a.x % k), (long)(a.y % k), (long)(a.z % k));
}
@@ -387,6 +437,7 @@ public static void mod(Long3 a, long k, Long3 result) {
result.z = (long)(a.z % k);
}
+ @Translatable
public static Long3 bitAnd(Long3 a, Long3 b) {
return new Long3((long)(a.x & b.x), (long)(a.y & b.y), (long)(a.z & b.z));
}
@@ -397,6 +448,7 @@ public static void bitAnd(Long3 a, Long3 b, Long3 result) {
result.z = (long)(a.z & b.z);
}
+ @Translatable
public static Long3 bitOr(Long3 a, Long3 b) {
return new Long3((long)(a.x | b.x), (long)(a.y | b.y), (long)(a.z | b.z));
}
@@ -407,6 +459,7 @@ public static void bitOr(Long3 a, Long3 b, Long3 result) {
result.z = (long)(a.z | b.z);
}
+ @Translatable
public static Long3 bitXor(Long3 a, Long3 b) {
return new Long3((long)(a.x ^ b.x), (long)(a.y ^ b.y), (long)(a.z ^ b.z));
}
@@ -417,6 +470,7 @@ public static void bitXor(Long3 a, Long3 b, Long3 result) {
result.z = (long)(a.z ^ b.z);
}
+ @Translatable
public static Long3 bitNot(Long3 a) {
return new Long3((long)(~a.x), (long)(~a.y), (long)(~a.z));
}
@@ -427,6 +481,7 @@ public static void bitNot(Long3 a, Long3 result) {
result.z = (long)(~a.z);
}
+ @Translatable
public static Long3 abs(Long3 a) {
return new Long3(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z));
}
@@ -437,6 +492,7 @@ public static void abs(Long3 a, Long3 result) {
result.z = Math.abs(a.z);
}
+ @Translatable
public static Long3 clamp(Long3 a, Long3 b, Long3 c) {
return new Long3(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z));
}
@@ -447,6 +503,7 @@ public static void clamp(Long3 a, Long3 b, Long3 c, Long3 result) {
result.z = Math.clamp(a.z, b.z, c.z);
}
+ @Translatable
public static Long3 max(Long3 a, Long3 b) {
return new Long3(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z));
}
@@ -457,6 +514,7 @@ public static void max(Long3 a, Long3 b, Long3 result) {
result.z = Math.max(a.z, b.z);
}
+ @Translatable
public static Long3 maxMag(Long3 a, Long3 b) {
return new Long3(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z));
}
@@ -467,6 +525,7 @@ public static void maxMag(Long3 a, Long3 b, Long3 result) {
result.z = Math.maxMag(a.z, b.z);
}
+ @Translatable
public static Long3 min(Long3 a, Long3 b) {
return new Long3(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z));
}
@@ -477,6 +536,7 @@ public static void min(Long3 a, Long3 b, Long3 result) {
result.z = Math.min(a.z, b.z);
}
+ @Translatable
public static Long3 minMag(Long3 a, Long3 b) {
return new Long3(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z));
}
@@ -487,6 +547,7 @@ public static void minMag(Long3 a, Long3 b, Long3 result) {
result.z = Math.minMag(a.z, b.z);
}
+ @Translatable
public static Long3 mix(Long3 a, Long3 b, Long3 c) {
return new Long3(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z));
}
@@ -497,6 +558,7 @@ public static void mix(Long3 a, Long3 b, Long3 c, Long3 result) {
result.z = Math.mix(a.z, b.z, c.z);
}
+ @Translatable
public static Long3 clamp(Long3 v, long min, long max) {
return new Long3(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max));
}
@@ -507,6 +569,7 @@ public static void clamp(Long3 v, long min, long max, Long3 result) {
result.z = Math.clamp(v.z, min, max);
}
+ @Translatable
public static Long3 max(Long3 x, long y) {
return new Long3(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y));
}
@@ -517,6 +580,7 @@ public static void max(Long3 x, long y, Long3 result) {
result.z = Math.max(x.z, y);
}
+ @Translatable
public static Long3 min(Long3 x, long y) {
return new Long3(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y));
}
@@ -527,6 +591,7 @@ public static void min(Long3 x, long y, Long3 result) {
result.z = Math.min(x.z, y);
}
+ @Translatable
public static Long3 mix(Long3 x, Long3 y, long a) {
return new Long3(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a));
}
@@ -537,6 +602,7 @@ public static void mix(Long3 x, Long3 y, long a, Long3 result) {
result.z = Math.mix(x.z, y.z, a);
}
+ @Translatable
public static Long3 absDiff(Long3 a, Long3 b) {
return new Long3(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z));
}
@@ -547,6 +613,7 @@ public static void absDiff(Long3 a, Long3 b, Long3 result) {
result.z = Math.absDiff(a.z, b.z);
}
+ @Translatable
public static Long3 addSat(Long3 a, Long3 b) {
return new Long3(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z));
}
@@ -557,6 +624,7 @@ public static void addSat(Long3 a, Long3 b, Long3 result) {
result.z = Math.addSat(a.z, b.z);
}
+ @Translatable
public static Long3 clz(Long3 a) {
return new Long3(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z));
}
@@ -567,6 +635,7 @@ public static void clz(Long3 a, Long3 result) {
result.z = Math.clz(a.z);
}
+ @Translatable
public static Long3 hadd(Long3 a, Long3 b) {
return new Long3(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z));
}
@@ -577,6 +646,7 @@ public static void hadd(Long3 a, Long3 b, Long3 result) {
result.z = Math.hadd(a.z, b.z);
}
+ @Translatable
public static Long3 madHi(Long3 a, Long3 b, Long3 c) {
return new Long3(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z));
}
@@ -587,6 +657,7 @@ public static void madHi(Long3 a, Long3 b, Long3 c, Long3 result) {
result.z = Math.madHi(a.z, b.z, c.z);
}
+ @Translatable
public static Long3 madSat(Long3 a, Long3 b, Long3 c) {
return new Long3(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z));
}
@@ -597,6 +668,7 @@ public static void madSat(Long3 a, Long3 b, Long3 c, Long3 result) {
result.z = Math.madSat(a.z, b.z, c.z);
}
+ @Translatable
public static Long3 mulHi(Long3 a, Long3 b) {
return new Long3(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z));
}
@@ -607,6 +679,7 @@ public static void mulHi(Long3 a, Long3 b, Long3 result) {
result.z = Math.mulHi(a.z, b.z);
}
+ @Translatable
public static Long3 rhadd(Long3 a, Long3 b) {
return new Long3(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z));
}
@@ -617,6 +690,7 @@ public static void rhadd(Long3 a, Long3 b, Long3 result) {
result.z = Math.rhadd(a.z, b.z);
}
+ @Translatable
public static Long3 rotate(Long3 a, Long3 b) {
return new Long3(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z));
}
@@ -627,6 +701,7 @@ public static void rotate(Long3 a, Long3 b, Long3 result) {
result.z = Math.rotate(a.z, b.z);
}
+ @Translatable
public static Long3 subSat(Long3 a, Long3 b) {
return new Long3(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long4.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long4.java
index 10b4c92..6c67633 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long4.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long4.java
@@ -27,18 +27,28 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Long4 {
+ @Translatable
public long x;
+ @Translatable
public long y;
+ @Translatable
public long z;
+ @Translatable
public long w;
+ @Translatable
public Long4() {}
+ @Translatable
public Long4(long x, long y, long z, long w) {
set(x, y, z, w);
}
+ @Translatable
public void set(long x, long y, long z, long w) {
this.x = x;
this.y = y;
@@ -46,74 +56,92 @@ public void set(long x, long y, long z, long w) {
this.w = w;
}
+ @Translatable
public Long4(long v) {
this(v, v, v, v);
}
+ @Translatable
public void set(long v) {
set(v, v, v, v);
}
+ @Translatable
public Long4(long x, long y, Long2 vec1) {
this(x, y, vec1.x, vec1.y);
}
+ @Translatable
public void set(long x, long y, Long2 vec1) {
set(x, y, vec1.x, vec1.y);
}
+ @Translatable
public Long4(long x, Long2 vec1, long w) {
this(x, vec1.x, vec1.y, w);
}
+ @Translatable
public void set(long x, Long2 vec1, long w) {
set(x, vec1.x, vec1.y, w);
}
+ @Translatable
public Long4(long x, Long3 vec1) {
this(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(long x, Long3 vec1) {
set(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Long4(Long2 vec1, long z, long w) {
this(vec1.x, vec1.y, z, w);
}
+ @Translatable
public void set(Long2 vec1, long z, long w) {
set(vec1.x, vec1.y, z, w);
}
+ @Translatable
public Long4(Long2 vec1, Long2 vec2) {
this(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2) {
set(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Long4(Long3 vec1, long w) {
this(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public void set(Long3 vec1, long w) {
set(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public Long4(Long4 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(Long4 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Long4 value() {
return new Long4(this);
}
+ @Translatable
public Long2 lo() {
return new Long2(x, y);
}
@@ -123,6 +151,7 @@ public void lo(Long2 result) {
result.y = y;
}
+ @Translatable
public Long2 hi() {
return new Long2(z, w);
}
@@ -132,6 +161,7 @@ public void hi(Long2 result) {
result.y = w;
}
+ @Translatable
public Long2 odd() {
return new Long2(y, w);
}
@@ -141,6 +171,7 @@ public void odd(Long2 result) {
result.y = w;
}
+ @Translatable
public Long2 even() {
return new Long2(x, z);
}
@@ -150,6 +181,7 @@ public void even(Long2 result) {
result.y = z;
}
+ @Translatable
public Byte4 convertByte4() {
return new Byte4((byte)(x), (byte)(y), (byte)(z), (byte)(w));
}
@@ -161,6 +193,7 @@ public void convertByte4(Byte4 result) {
result.w = (byte)(w);
}
+ @Translatable
public Short4 convertShort4() {
return new Short4((short)(x), (short)(y), (short)(z), (short)(w));
}
@@ -172,6 +205,7 @@ public void convertShort4(Short4 result) {
result.w = (short)(w);
}
+ @Translatable
public Int4 convertInt4() {
return new Int4((int)(x), (int)(y), (int)(z), (int)(w));
}
@@ -183,6 +217,7 @@ public void convertInt4(Int4 result) {
result.w = (int)(w);
}
+ @Translatable
public Float4 convertFloat4() {
return new Float4((float)(x), (float)(y), (float)(z), (float)(w));
}
@@ -194,6 +229,7 @@ public void convertFloat4(Float4 result) {
result.w = (float)(w);
}
+ @Translatable
public Double4 convertDouble4() {
return new Double4((double)(x), (double)(y), (double)(z), (double)(w));
}
@@ -205,6 +241,7 @@ public void convertDouble4(Double4 result) {
result.w = (double)(w);
}
+ @Translatable
public Long2 asLong2() {
return new Long2(x, y);
}
@@ -214,6 +251,7 @@ public void asLong2(Long2 result) {
result.y = y;
}
+ @Translatable
public Long3 asLong3() {
return new Long3(x, y, z);
}
@@ -224,6 +262,7 @@ public void asLong3(Long3 result) {
result.z = z;
}
+ @Translatable
public static Int4 isEqual(Long4 a, Long4 b) {
return new Int4(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0);
}
@@ -235,6 +274,7 @@ public static void isEqual(Long4 a, Long4 b, Int4 result) {
result.w = a.w == b.w? 1 : 0;
}
+ @Translatable
public static Int4 isNotEqual(Long4 a, Long4 b) {
return new Int4(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0);
}
@@ -246,6 +286,7 @@ public static void isNotEqual(Long4 a, Long4 b, Int4 result) {
result.w = a.w != b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreater(Long4 a, Long4 b) {
return new Int4(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0);
}
@@ -257,6 +298,7 @@ public static void isGreater(Long4 a, Long4 b, Int4 result) {
result.w = a.w > b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreaterEqual(Long4 a, Long4 b) {
return new Int4(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0);
}
@@ -268,6 +310,7 @@ public static void isGreaterEqual(Long4 a, Long4 b, Int4 result) {
result.w = a.w >= b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLess(Long4 a, Long4 b) {
return new Int4(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0);
}
@@ -279,6 +322,7 @@ public static void isLess(Long4 a, Long4 b, Int4 result) {
result.w = a.w < b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLessEqual(Long4 a, Long4 b) {
return new Int4(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0);
}
@@ -290,6 +334,7 @@ public static void isLessEqual(Long4 a, Long4 b, Int4 result) {
result.w = a.w <= b.w? 1 : 0;
}
+ @Translatable
public static Long4 select(Long4 a, Long4 b, Int4 c) {
return new Long4(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w));
}
@@ -301,14 +346,17 @@ public static void select(Long4 a, Long4 b, Int4 c, Long4 result) {
result.w = Math.select(a.w, b.w, c.w);
}
+ @Translatable
public static int any(Long4 a) {
return (a.x != 0L || a.y != 0L || a.z != 0L || a.w != 0L)? 1 : 0;
}
+ @Translatable
public static int all(Long4 a) {
return (a.x == 0L || a.y == 0L || a.z == 0L || a.w == 0L)? 0 : 1;
}
+ @Translatable
public static Long4 neg(Long4 a) {
return new Long4((long)(-a.x), (long)(-a.y), (long)(-a.z), (long)(-a.w));
}
@@ -320,6 +368,7 @@ public static void neg(Long4 a, Long4 result) {
result.w = (long)(-a.w);
}
+ @Translatable
public static Long4 add(Long4 a, Long4 b) {
return new Long4((long)(a.x + b.x), (long)(a.y + b.y), (long)(a.z + b.z), (long)(a.w + b.w));
}
@@ -331,6 +380,7 @@ public static void add(Long4 a, Long4 b, Long4 result) {
result.w = (long)(a.w + b.w);
}
+ @Translatable
public static Long4 sub(Long4 a, Long4 b) {
return new Long4((long)(a.x - b.x), (long)(a.y - b.y), (long)(a.z - b.z), (long)(a.w - b.w));
}
@@ -342,6 +392,7 @@ public static void sub(Long4 a, Long4 b, Long4 result) {
result.w = (long)(a.w - b.w);
}
+ @Translatable
public static Double4 mul(Long4 a, Double4 b) {
return new Double4((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w));
}
@@ -353,6 +404,7 @@ public static void mul(Long4 a, Double4 b, Double4 result) {
result.w = (double)(a.w * b.w);
}
+ @Translatable
public static Double4 mul(Long4 a, double k) {
return new Double4((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k));
}
@@ -364,6 +416,7 @@ public static void mul(Long4 a, double k, Double4 result) {
result.w = (double)(a.w * k);
}
+ @Translatable
public static Float4 mul(Long4 a, Float4 b) {
return new Float4((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w));
}
@@ -375,6 +428,7 @@ public static void mul(Long4 a, Float4 b, Float4 result) {
result.w = (float)(a.w * b.w);
}
+ @Translatable
public static Float4 mul(Long4 a, float k) {
return new Float4((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k));
}
@@ -386,6 +440,7 @@ public static void mul(Long4 a, float k, Float4 result) {
result.w = (float)(a.w * k);
}
+ @Translatable
public static Long4 mul(Long4 a, Long4 b) {
return new Long4((long)(a.x * b.x), (long)(a.y * b.y), (long)(a.z * b.z), (long)(a.w * b.w));
}
@@ -397,6 +452,7 @@ public static void mul(Long4 a, Long4 b, Long4 result) {
result.w = (long)(a.w * b.w);
}
+ @Translatable
public static Long4 mul(Long4 a, long k) {
return new Long4((long)(a.x * k), (long)(a.y * k), (long)(a.z * k), (long)(a.w * k));
}
@@ -408,6 +464,7 @@ public static void mul(Long4 a, long k, Long4 result) {
result.w = (long)(a.w * k);
}
+ @Translatable
public static Double4 div(Long4 a, Double4 b) {
return new Double4((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w));
}
@@ -419,6 +476,7 @@ public static void div(Long4 a, Double4 b, Double4 result) {
result.w = (double)(a.w / b.w);
}
+ @Translatable
public static Double4 div(Long4 a, double k) {
return new Double4((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k));
}
@@ -430,6 +488,7 @@ public static void div(Long4 a, double k, Double4 result) {
result.w = (double)(a.w / k);
}
+ @Translatable
public static Float4 div(Long4 a, Float4 b) {
return new Float4((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w));
}
@@ -441,6 +500,7 @@ public static void div(Long4 a, Float4 b, Float4 result) {
result.w = (float)(a.w / b.w);
}
+ @Translatable
public static Float4 div(Long4 a, float k) {
return new Float4((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k));
}
@@ -452,6 +512,7 @@ public static void div(Long4 a, float k, Float4 result) {
result.w = (float)(a.w / k);
}
+ @Translatable
public static Long4 div(Long4 a, Long4 b) {
return new Long4((long)(a.x / b.x), (long)(a.y / b.y), (long)(a.z / b.z), (long)(a.w / b.w));
}
@@ -463,6 +524,7 @@ public static void div(Long4 a, Long4 b, Long4 result) {
result.w = (long)(a.w / b.w);
}
+ @Translatable
public static Long4 div(Long4 a, long k) {
return new Long4((long)(a.x / k), (long)(a.y / k), (long)(a.z / k), (long)(a.w / k));
}
@@ -474,6 +536,7 @@ public static void div(Long4 a, long k, Long4 result) {
result.w = (long)(a.w / k);
}
+ @Translatable
public static Long4 mod(Long4 a, Long4 b) {
return new Long4((long)(a.x % b.x), (long)(a.y % b.y), (long)(a.z % b.z), (long)(a.w % b.w));
}
@@ -485,6 +548,7 @@ public static void mod(Long4 a, Long4 b, Long4 result) {
result.w = (long)(a.w % b.w);
}
+ @Translatable
public static Long4 mod(Long4 a, long k) {
return new Long4((long)(a.x % k), (long)(a.y % k), (long)(a.z % k), (long)(a.w % k));
}
@@ -496,6 +560,7 @@ public static void mod(Long4 a, long k, Long4 result) {
result.w = (long)(a.w % k);
}
+ @Translatable
public static Long4 bitAnd(Long4 a, Long4 b) {
return new Long4((long)(a.x & b.x), (long)(a.y & b.y), (long)(a.z & b.z), (long)(a.w & b.w));
}
@@ -507,6 +572,7 @@ public static void bitAnd(Long4 a, Long4 b, Long4 result) {
result.w = (long)(a.w & b.w);
}
+ @Translatable
public static Long4 bitOr(Long4 a, Long4 b) {
return new Long4((long)(a.x | b.x), (long)(a.y | b.y), (long)(a.z | b.z), (long)(a.w | b.w));
}
@@ -518,6 +584,7 @@ public static void bitOr(Long4 a, Long4 b, Long4 result) {
result.w = (long)(a.w | b.w);
}
+ @Translatable
public static Long4 bitXor(Long4 a, Long4 b) {
return new Long4((long)(a.x ^ b.x), (long)(a.y ^ b.y), (long)(a.z ^ b.z), (long)(a.w ^ b.w));
}
@@ -529,6 +596,7 @@ public static void bitXor(Long4 a, Long4 b, Long4 result) {
result.w = (long)(a.w ^ b.w);
}
+ @Translatable
public static Long4 bitNot(Long4 a) {
return new Long4((long)(~a.x), (long)(~a.y), (long)(~a.z), (long)(~a.w));
}
@@ -540,6 +608,7 @@ public static void bitNot(Long4 a, Long4 result) {
result.w = (long)(~a.w);
}
+ @Translatable
public static Long4 abs(Long4 a) {
return new Long4(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w));
}
@@ -551,6 +620,7 @@ public static void abs(Long4 a, Long4 result) {
result.w = Math.abs(a.w);
}
+ @Translatable
public static Long4 clamp(Long4 a, Long4 b, Long4 c) {
return new Long4(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w));
}
@@ -562,6 +632,7 @@ public static void clamp(Long4 a, Long4 b, Long4 c, Long4 result) {
result.w = Math.clamp(a.w, b.w, c.w);
}
+ @Translatable
public static Long4 max(Long4 a, Long4 b) {
return new Long4(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w));
}
@@ -573,6 +644,7 @@ public static void max(Long4 a, Long4 b, Long4 result) {
result.w = Math.max(a.w, b.w);
}
+ @Translatable
public static Long4 maxMag(Long4 a, Long4 b) {
return new Long4(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w));
}
@@ -584,6 +656,7 @@ public static void maxMag(Long4 a, Long4 b, Long4 result) {
result.w = Math.maxMag(a.w, b.w);
}
+ @Translatable
public static Long4 min(Long4 a, Long4 b) {
return new Long4(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w));
}
@@ -595,6 +668,7 @@ public static void min(Long4 a, Long4 b, Long4 result) {
result.w = Math.min(a.w, b.w);
}
+ @Translatable
public static Long4 minMag(Long4 a, Long4 b) {
return new Long4(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w));
}
@@ -606,6 +680,7 @@ public static void minMag(Long4 a, Long4 b, Long4 result) {
result.w = Math.minMag(a.w, b.w);
}
+ @Translatable
public static Long4 mix(Long4 a, Long4 b, Long4 c) {
return new Long4(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w));
}
@@ -617,6 +692,7 @@ public static void mix(Long4 a, Long4 b, Long4 c, Long4 result) {
result.w = Math.mix(a.w, b.w, c.w);
}
+ @Translatable
public static Long4 clamp(Long4 v, long min, long max) {
return new Long4(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max));
}
@@ -628,6 +704,7 @@ public static void clamp(Long4 v, long min, long max, Long4 result) {
result.w = Math.clamp(v.w, min, max);
}
+ @Translatable
public static Long4 max(Long4 x, long y) {
return new Long4(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y));
}
@@ -639,6 +716,7 @@ public static void max(Long4 x, long y, Long4 result) {
result.w = Math.max(x.w, y);
}
+ @Translatable
public static Long4 min(Long4 x, long y) {
return new Long4(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y));
}
@@ -650,6 +728,7 @@ public static void min(Long4 x, long y, Long4 result) {
result.w = Math.min(x.w, y);
}
+ @Translatable
public static Long4 mix(Long4 x, Long4 y, long a) {
return new Long4(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a));
}
@@ -661,6 +740,7 @@ public static void mix(Long4 x, Long4 y, long a, Long4 result) {
result.w = Math.mix(x.w, y.w, a);
}
+ @Translatable
public static Long4 absDiff(Long4 a, Long4 b) {
return new Long4(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z), Math.absDiff(a.w, b.w));
}
@@ -672,6 +752,7 @@ public static void absDiff(Long4 a, Long4 b, Long4 result) {
result.w = Math.absDiff(a.w, b.w);
}
+ @Translatable
public static Long4 addSat(Long4 a, Long4 b) {
return new Long4(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z), Math.addSat(a.w, b.w));
}
@@ -683,6 +764,7 @@ public static void addSat(Long4 a, Long4 b, Long4 result) {
result.w = Math.addSat(a.w, b.w);
}
+ @Translatable
public static Long4 clz(Long4 a) {
return new Long4(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z), Math.clz(a.w));
}
@@ -694,6 +776,7 @@ public static void clz(Long4 a, Long4 result) {
result.w = Math.clz(a.w);
}
+ @Translatable
public static Long4 hadd(Long4 a, Long4 b) {
return new Long4(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z), Math.hadd(a.w, b.w));
}
@@ -705,6 +788,7 @@ public static void hadd(Long4 a, Long4 b, Long4 result) {
result.w = Math.hadd(a.w, b.w);
}
+ @Translatable
public static Long4 madHi(Long4 a, Long4 b, Long4 c) {
return new Long4(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z), Math.madHi(a.w, b.w, c.w));
}
@@ -716,6 +800,7 @@ public static void madHi(Long4 a, Long4 b, Long4 c, Long4 result) {
result.w = Math.madHi(a.w, b.w, c.w);
}
+ @Translatable
public static Long4 madSat(Long4 a, Long4 b, Long4 c) {
return new Long4(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z), Math.madSat(a.w, b.w, c.w));
}
@@ -727,6 +812,7 @@ public static void madSat(Long4 a, Long4 b, Long4 c, Long4 result) {
result.w = Math.madSat(a.w, b.w, c.w);
}
+ @Translatable
public static Long4 mulHi(Long4 a, Long4 b) {
return new Long4(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z), Math.mulHi(a.w, b.w));
}
@@ -738,6 +824,7 @@ public static void mulHi(Long4 a, Long4 b, Long4 result) {
result.w = Math.mulHi(a.w, b.w);
}
+ @Translatable
public static Long4 rhadd(Long4 a, Long4 b) {
return new Long4(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z), Math.rhadd(a.w, b.w));
}
@@ -749,6 +836,7 @@ public static void rhadd(Long4 a, Long4 b, Long4 result) {
result.w = Math.rhadd(a.w, b.w);
}
+ @Translatable
public static Long4 rotate(Long4 a, Long4 b) {
return new Long4(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z), Math.rotate(a.w, b.w));
}
@@ -760,6 +848,7 @@ public static void rotate(Long4 a, Long4 b, Long4 result) {
result.w = Math.rotate(a.w, b.w);
}
+ @Translatable
public static Long4 subSat(Long4 a, Long4 b) {
return new Long4(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z), Math.subSat(a.w, b.w));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long8.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long8.java
index 05b5dbc..7217263 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long8.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Long8.java
@@ -27,19 +27,30 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Long8 {
+ @Translatable
public long x;
+ @Translatable
public long y;
+ @Translatable
public long z;
+ @Translatable
public long w;
+ @Translatable
public long[] s = new long[4];
+ @Translatable
public Long8() {}
+ @Translatable
public Long8(long x, long y, long z, long w, long s0, long s1, long s2, long s3) {
set(x, y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(long x, long y, long z, long w, long s0, long s1, long s2, long s3) {
this.x = x;
this.y = y;
@@ -51,882 +62,1102 @@ public void set(long x, long y, long z, long w, long s0, long s1, long s2, long
this.s[3] = s3;
}
+ @Translatable
public Long8(long v) {
this(v, v, v, v, v, v, v, v);
}
+ @Translatable
public void set(long v) {
set(v, v, v, v, v, v, v, v);
}
+ @Translatable
public Long8(long x, long y, long z, long w, long s0, long s1, Long2 vec1) {
this(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public void set(long x, long y, long z, long w, long s0, long s1, Long2 vec1) {
set(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public Long8(long x, long y, long z, long w, long s0, Long2 vec1, long s3) {
this(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public void set(long x, long y, long z, long w, long s0, Long2 vec1, long s3) {
set(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public Long8(long x, long y, long z, long w, long s0, Long3 vec1) {
this(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(long x, long y, long z, long w, long s0, Long3 vec1) {
set(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Long8(long x, long y, long z, long w, Long2 vec1, long s2, long s3) {
this(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public void set(long x, long y, long z, long w, Long2 vec1, long s2, long s3) {
set(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public Long8(long x, long y, long z, long w, Long2 vec1, Long2 vec2) {
this(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, long y, long z, long w, Long2 vec1, Long2 vec2) {
set(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, long y, long z, long w, Long3 vec1, long s3) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public void set(long x, long y, long z, long w, Long3 vec1, long s3) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public Long8(long x, long y, long z, long w, Long4 vec1) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(long x, long y, long z, long w, Long4 vec1) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Long8(long x, long y, long z, Long2 vec1, long s1, long s2, long s3) {
this(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public void set(long x, long y, long z, Long2 vec1, long s1, long s2, long s3) {
set(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public Long8(long x, long y, long z, Long2 vec1, long s1, Long2 vec2) {
this(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, long y, long z, Long2 vec1, long s1, Long2 vec2) {
set(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, long y, long z, Long2 vec1, Long2 vec2, long s3) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(long x, long y, long z, Long2 vec1, Long2 vec2, long s3) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(long x, long y, long z, Long2 vec1, Long3 vec2) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(long x, long y, long z, Long2 vec1, Long3 vec2) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(long x, long y, long z, Long3 vec1, long s2, long s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public void set(long x, long y, long z, Long3 vec1, long s2, long s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public Long8(long x, long y, long z, Long3 vec1, Long2 vec2) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, long y, long z, Long3 vec1, Long2 vec2) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, long y, long z, Long4 vec1, long s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public void set(long x, long y, long z, Long4 vec1, long s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public Long8(long x, long y, Long2 vec1, long s0, long s1, long s2, long s3) {
this(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(long x, long y, Long2 vec1, long s0, long s1, long s2, long s3) {
set(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public Long8(long x, long y, Long2 vec1, long s0, long s1, Long2 vec2) {
this(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, long y, Long2 vec1, long s0, long s1, Long2 vec2) {
set(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, long y, Long2 vec1, long s0, Long2 vec2, long s3) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(long x, long y, Long2 vec1, long s0, Long2 vec2, long s3) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(long x, long y, Long2 vec1, long s0, Long3 vec2) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(long x, long y, Long2 vec1, long s0, Long3 vec2) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(long x, long y, Long2 vec1, Long2 vec2, long s2, long s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(long x, long y, Long2 vec1, Long2 vec2, long s2, long s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Long8(long x, long y, Long2 vec1, Long2 vec2, Long2 vec3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(long x, long y, Long2 vec1, Long2 vec2, Long2 vec3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Long8(long x, long y, Long2 vec1, Long3 vec2, long s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(long x, long y, Long2 vec1, Long3 vec2, long s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Long8(long x, long y, Long2 vec1, Long4 vec2) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(long x, long y, Long2 vec1, Long4 vec2) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Long8(long x, long y, Long3 vec1, long s1, long s2, long s3) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public void set(long x, long y, Long3 vec1, long s1, long s2, long s3) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public Long8(long x, long y, Long3 vec1, long s1, Long2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, long y, Long3 vec1, long s1, Long2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, long y, Long3 vec1, Long2 vec2, long s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(long x, long y, Long3 vec1, Long2 vec2, long s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(long x, long y, Long3 vec1, Long3 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(long x, long y, Long3 vec1, Long3 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(long x, long y, Long4 vec1, long s2, long s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public void set(long x, long y, Long4 vec1, long s2, long s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public Long8(long x, long y, Long4 vec1, Long2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, long y, Long4 vec1, Long2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, Long2 vec1, long w, long s0, long s1, long s2, long s3) {
this(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(long x, Long2 vec1, long w, long s0, long s1, long s2, long s3) {
set(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public Long8(long x, Long2 vec1, long w, long s0, long s1, Long2 vec2) {
this(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, Long2 vec1, long w, long s0, long s1, Long2 vec2) {
set(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, Long2 vec1, long w, long s0, Long2 vec2, long s3) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(long x, Long2 vec1, long w, long s0, Long2 vec2, long s3) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(long x, Long2 vec1, long w, long s0, Long3 vec2) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(long x, Long2 vec1, long w, long s0, Long3 vec2) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(long x, Long2 vec1, long w, Long2 vec2, long s2, long s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(long x, Long2 vec1, long w, Long2 vec2, long s2, long s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Long8(long x, Long2 vec1, long w, Long2 vec2, Long2 vec3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(long x, Long2 vec1, long w, Long2 vec2, Long2 vec3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Long8(long x, Long2 vec1, long w, Long3 vec2, long s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(long x, Long2 vec1, long w, Long3 vec2, long s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Long8(long x, Long2 vec1, long w, Long4 vec2) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(long x, Long2 vec1, long w, Long4 vec2) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Long8(long x, Long2 vec1, Long2 vec2, long s1, long s2, long s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(long x, Long2 vec1, Long2 vec2, long s1, long s2, long s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Long8(long x, Long2 vec1, Long2 vec2, long s1, Long2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(long x, Long2 vec1, Long2 vec2, long s1, Long2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Long8(long x, Long2 vec1, Long2 vec2, Long2 vec3, long s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(long x, Long2 vec1, Long2 vec2, Long2 vec3, long s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Long8(long x, Long2 vec1, Long2 vec2, Long3 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(long x, Long2 vec1, Long2 vec2, Long3 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Long8(long x, Long2 vec1, Long3 vec2, long s2, long s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(long x, Long2 vec1, Long3 vec2, long s2, long s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Long8(long x, Long2 vec1, Long3 vec2, Long2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(long x, Long2 vec1, Long3 vec2, Long2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Long8(long x, Long2 vec1, Long4 vec2, long s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(long x, Long2 vec1, Long4 vec2, long s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Long8(long x, Long3 vec1, long s0, long s1, long s2, long s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public void set(long x, Long3 vec1, long s0, long s1, long s2, long s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public Long8(long x, Long3 vec1, long s0, long s1, Long2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, Long3 vec1, long s0, long s1, Long2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, Long3 vec1, long s0, Long2 vec2, long s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(long x, Long3 vec1, long s0, Long2 vec2, long s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(long x, Long3 vec1, long s0, Long3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(long x, Long3 vec1, long s0, Long3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(long x, Long3 vec1, Long2 vec2, long s2, long s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(long x, Long3 vec1, Long2 vec2, long s2, long s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Long8(long x, Long3 vec1, Long2 vec2, Long2 vec3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(long x, Long3 vec1, Long2 vec2, Long2 vec3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Long8(long x, Long3 vec1, Long3 vec2, long s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(long x, Long3 vec1, Long3 vec2, long s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Long8(long x, Long3 vec1, Long4 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(long x, Long3 vec1, Long4 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Long8(long x, Long4 vec1, long s1, long s2, long s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public void set(long x, Long4 vec1, long s1, long s2, long s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public Long8(long x, Long4 vec1, long s1, Long2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(long x, Long4 vec1, long s1, Long2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(long x, Long4 vec1, Long2 vec2, long s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(long x, Long4 vec1, Long2 vec2, long s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(long x, Long4 vec1, Long3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(long x, Long4 vec1, Long3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(Long2 vec1, long z, long w, long s0, long s1, long s2, long s3) {
this(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Long2 vec1, long z, long w, long s0, long s1, long s2, long s3) {
set(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public Long8(Long2 vec1, long z, long w, long s0, long s1, Long2 vec2) {
this(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Long2 vec1, long z, long w, long s0, long s1, Long2 vec2) {
set(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(Long2 vec1, long z, long w, long s0, Long2 vec2, long s3) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Long2 vec1, long z, long w, long s0, Long2 vec2, long s3) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(Long2 vec1, long z, long w, long s0, Long3 vec2) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Long2 vec1, long z, long w, long s0, Long3 vec2) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(Long2 vec1, long z, long w, Long2 vec2, long s2, long s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Long2 vec1, long z, long w, Long2 vec2, long s2, long s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Long8(Long2 vec1, long z, long w, Long2 vec2, Long2 vec3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long2 vec1, long z, long w, Long2 vec2, Long2 vec3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long2 vec1, long z, long w, Long3 vec2, long s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Long2 vec1, long z, long w, Long3 vec2, long s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Long8(Long2 vec1, long z, long w, Long4 vec2) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Long2 vec1, long z, long w, Long4 vec2) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Long8(Long2 vec1, long z, Long2 vec2, long s1, long s2, long s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Long2 vec1, long z, Long2 vec2, long s1, long s2, long s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Long8(Long2 vec1, long z, Long2 vec2, long s1, Long2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long2 vec1, long z, Long2 vec2, long s1, Long2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long2 vec1, long z, Long2 vec2, Long2 vec3, long s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Long2 vec1, long z, Long2 vec2, Long2 vec3, long s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Long8(Long2 vec1, long z, Long2 vec2, Long3 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Long2 vec1, long z, Long2 vec2, Long3 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Long8(Long2 vec1, long z, Long3 vec2, long s2, long s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Long2 vec1, long z, Long3 vec2, long s2, long s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Long8(Long2 vec1, long z, Long3 vec2, Long2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long2 vec1, long z, Long3 vec2, Long2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long2 vec1, long z, Long4 vec2, long s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Long2 vec1, long z, Long4 vec2, long s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Long8(Long2 vec1, Long2 vec2, long s0, long s1, long s2, long s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2, long s0, long s1, long s2, long s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public Long8(Long2 vec1, Long2 vec2, long s0, long s1, Long2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2, long s0, long s1, Long2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long2 vec1, Long2 vec2, long s0, Long2 vec3, long s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2, long s0, Long2 vec3, long s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public Long8(Long2 vec1, Long2 vec2, long s0, Long3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2, long s0, Long3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Long8(Long2 vec1, Long2 vec2, Long2 vec3, long s2, long s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2, Long2 vec3, long s2, long s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public Long8(Long2 vec1, Long2 vec2, Long2 vec3, Long2 vec4) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2, Long2 vec3, Long2 vec4) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public Long8(Long2 vec1, Long2 vec2, Long3 vec3, long s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2, Long3 vec3, long s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public Long8(Long2 vec1, Long2 vec2, Long4 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public void set(Long2 vec1, Long2 vec2, Long4 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public Long8(Long2 vec1, Long3 vec2, long s1, long s2, long s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public void set(Long2 vec1, Long3 vec2, long s1, long s2, long s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public Long8(Long2 vec1, Long3 vec2, long s1, Long2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long2 vec1, Long3 vec2, long s1, Long2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long2 vec1, Long3 vec2, Long2 vec3, long s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Long2 vec1, Long3 vec2, Long2 vec3, long s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public Long8(Long2 vec1, Long3 vec2, Long3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Long2 vec1, Long3 vec2, Long3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Long8(Long2 vec1, Long4 vec2, long s2, long s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public void set(Long2 vec1, Long4 vec2, long s2, long s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public Long8(Long2 vec1, Long4 vec2, Long2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long2 vec1, Long4 vec2, Long2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long3 vec1, long w, long s0, long s1, long s2, long s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Long3 vec1, long w, long s0, long s1, long s2, long s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public Long8(Long3 vec1, long w, long s0, long s1, Long2 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Long3 vec1, long w, long s0, long s1, Long2 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(Long3 vec1, long w, long s0, Long2 vec2, long s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Long3 vec1, long w, long s0, Long2 vec2, long s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(Long3 vec1, long w, long s0, Long3 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Long3 vec1, long w, long s0, Long3 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(Long3 vec1, long w, Long2 vec2, long s2, long s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Long3 vec1, long w, Long2 vec2, long s2, long s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Long8(Long3 vec1, long w, Long2 vec2, Long2 vec3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long3 vec1, long w, Long2 vec2, Long2 vec3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long3 vec1, long w, Long3 vec2, long s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Long3 vec1, long w, Long3 vec2, long s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Long8(Long3 vec1, long w, Long4 vec2) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Long3 vec1, long w, Long4 vec2) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Long8(Long3 vec1, Long2 vec2, long s1, long s2, long s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Long3 vec1, Long2 vec2, long s1, long s2, long s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Long8(Long3 vec1, Long2 vec2, long s1, Long2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long3 vec1, Long2 vec2, long s1, Long2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long3 vec1, Long2 vec2, Long2 vec3, long s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Long3 vec1, Long2 vec2, Long2 vec3, long s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Long8(Long3 vec1, Long2 vec2, Long3 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Long3 vec1, Long2 vec2, Long3 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Long8(Long3 vec1, Long3 vec2, long s2, long s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Long3 vec1, Long3 vec2, long s2, long s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Long8(Long3 vec1, Long3 vec2, Long2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long3 vec1, Long3 vec2, Long2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long3 vec1, Long4 vec2, long s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Long3 vec1, Long4 vec2, long s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Long8(Long4 vec1, long s0, long s1, long s2, long s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Long4 vec1, long s0, long s1, long s2, long s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public Long8(Long4 vec1, long s0, long s1, Long2 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Long4 vec1, long s0, long s1, Long2 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Long8(Long4 vec1, long s0, Long2 vec2, long s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Long4 vec1, long s0, Long2 vec2, long s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Long8(Long4 vec1, long s0, Long3 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Long4 vec1, long s0, Long3 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Long8(Long4 vec1, Long2 vec2, long s2, long s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Long4 vec1, Long2 vec2, long s2, long s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Long8(Long4 vec1, Long2 vec2, Long2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Long4 vec1, Long2 vec2, Long2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Long8(Long4 vec1, Long3 vec2, long s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Long4 vec1, Long3 vec2, long s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Long8(Long4 vec1, Long4 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Long4 vec1, Long4 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Long8(Long8 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public void set(Long8 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public Long8 value() {
return new Long8(this);
}
+ @Translatable
public Long4 lo() {
return new Long4(x, y, z, w);
}
@@ -938,6 +1169,7 @@ public void lo(Long4 result) {
result.w = w;
}
+ @Translatable
public Long4 hi() {
return new Long4(s[0], s[1], s[2], s[3]);
}
@@ -949,6 +1181,7 @@ public void hi(Long4 result) {
result.w = s[3];
}
+ @Translatable
public Long4 odd() {
return new Long4(y, w, s[1], s[3]);
}
@@ -960,6 +1193,7 @@ public void odd(Long4 result) {
result.w = s[3];
}
+ @Translatable
public Long4 even() {
return new Long4(x, z, s[0], s[2]);
}
@@ -971,6 +1205,7 @@ public void even(Long4 result) {
result.w = s[2];
}
+ @Translatable
public Byte8 convertByte8() {
return new Byte8((byte)(x), (byte)(y), (byte)(z), (byte)(w), (byte)(s[0]), (byte)(s[1]), (byte)(s[2]), (byte)(s[3]));
}
@@ -986,6 +1221,7 @@ public void convertByte8(Byte8 result) {
result.s[3] = (byte)(s[3]);
}
+ @Translatable
public Short8 convertShort8() {
return new Short8((short)(x), (short)(y), (short)(z), (short)(w), (short)(s[0]), (short)(s[1]), (short)(s[2]), (short)(s[3]));
}
@@ -1001,6 +1237,7 @@ public void convertShort8(Short8 result) {
result.s[3] = (short)(s[3]);
}
+ @Translatable
public Int8 convertInt8() {
return new Int8((int)(x), (int)(y), (int)(z), (int)(w), (int)(s[0]), (int)(s[1]), (int)(s[2]), (int)(s[3]));
}
@@ -1016,6 +1253,7 @@ public void convertInt8(Int8 result) {
result.s[3] = (int)(s[3]);
}
+ @Translatable
public Float8 convertFloat8() {
return new Float8((float)(x), (float)(y), (float)(z), (float)(w), (float)(s[0]), (float)(s[1]), (float)(s[2]), (float)(s[3]));
}
@@ -1031,6 +1269,7 @@ public void convertFloat8(Float8 result) {
result.s[3] = (float)(s[3]);
}
+ @Translatable
public Double8 convertDouble8() {
return new Double8((double)(x), (double)(y), (double)(z), (double)(w), (double)(s[0]), (double)(s[1]), (double)(s[2]), (double)(s[3]));
}
@@ -1046,6 +1285,7 @@ public void convertDouble8(Double8 result) {
result.s[3] = (double)(s[3]);
}
+ @Translatable
public Long2 asLong2() {
return new Long2(x, y);
}
@@ -1055,6 +1295,7 @@ public void asLong2(Long2 result) {
result.y = y;
}
+ @Translatable
public Long3 asLong3() {
return new Long3(x, y, z);
}
@@ -1065,6 +1306,7 @@ public void asLong3(Long3 result) {
result.z = z;
}
+ @Translatable
public Long4 asLong4() {
return new Long4(x, y, z, w);
}
@@ -1076,6 +1318,7 @@ public void asLong4(Long4 result) {
result.w = w;
}
+ @Translatable
public static Int8 isEqual(Long8 a, Long8 b) {
return new Int8(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0, a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
}
@@ -1091,6 +1334,7 @@ public static void isEqual(Long8 a, Long8 b, Int8 result) {
result.s[3] = a.s[3] == b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isNotEqual(Long8 a, Long8 b) {
return new Int8(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0, a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
}
@@ -1106,6 +1350,7 @@ public static void isNotEqual(Long8 a, Long8 b, Int8 result) {
result.s[3] = a.s[3] != b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreater(Long8 a, Long8 b) {
return new Int8(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0, a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
}
@@ -1121,6 +1366,7 @@ public static void isGreater(Long8 a, Long8 b, Int8 result) {
result.s[3] = a.s[3] > b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreaterEqual(Long8 a, Long8 b) {
return new Int8(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0, a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
}
@@ -1136,6 +1382,7 @@ public static void isGreaterEqual(Long8 a, Long8 b, Int8 result) {
result.s[3] = a.s[3] >= b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLess(Long8 a, Long8 b) {
return new Int8(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0, a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
}
@@ -1151,6 +1398,7 @@ public static void isLess(Long8 a, Long8 b, Int8 result) {
result.s[3] = a.s[3] < b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLessEqual(Long8 a, Long8 b) {
return new Int8(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0, a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
}
@@ -1166,6 +1414,7 @@ public static void isLessEqual(Long8 a, Long8 b, Int8 result) {
result.s[3] = a.s[3] <= b.s[3]? 1 : 0;
}
+ @Translatable
public static Long8 select(Long8 a, Long8 b, Int8 c) {
return new Long8(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w), Math.select(a.s[0], b.s[0], c.s[0]), Math.select(a.s[1], b.s[1], c.s[1]), Math.select(a.s[2], b.s[2], c.s[2]), Math.select(a.s[3], b.s[3], c.s[3]));
}
@@ -1181,14 +1430,17 @@ public static void select(Long8 a, Long8 b, Int8 c, Long8 result) {
result.s[3] = Math.select(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static int any(Long8 a) {
return (a.x != 0L || a.y != 0L || a.z != 0L || a.w != 0L || a.s[0] != 0L || a.s[1] != 0L || a.s[2] != 0L || a.s[3] != 0L)? 1 : 0;
}
+ @Translatable
public static int all(Long8 a) {
return (a.x == 0L || a.y == 0L || a.z == 0L || a.w == 0L || a.s[0] == 0L || a.s[1] == 0L || a.s[2] == 0L || a.s[3] == 0L)? 0 : 1;
}
+ @Translatable
public static Long8 neg(Long8 a) {
return new Long8((long)(-a.x), (long)(-a.y), (long)(-a.z), (long)(-a.w), (long)(-a.s[0]), (long)(-a.s[1]), (long)(-a.s[2]), (long)(-a.s[3]));
}
@@ -1204,6 +1456,7 @@ public static void neg(Long8 a, Long8 result) {
result.s[3] = (long)(-a.s[3]);
}
+ @Translatable
public static Long8 add(Long8 a, Long8 b) {
return new Long8((long)(a.x + b.x), (long)(a.y + b.y), (long)(a.z + b.z), (long)(a.w + b.w), (long)(a.s[0] + b.s[0]), (long)(a.s[1] + b.s[1]), (long)(a.s[2] + b.s[2]), (long)(a.s[3] + b.s[3]));
}
@@ -1219,6 +1472,7 @@ public static void add(Long8 a, Long8 b, Long8 result) {
result.s[3] = (long)(a.s[3] + b.s[3]);
}
+ @Translatable
public static Long8 sub(Long8 a, Long8 b) {
return new Long8((long)(a.x - b.x), (long)(a.y - b.y), (long)(a.z - b.z), (long)(a.w - b.w), (long)(a.s[0] - b.s[0]), (long)(a.s[1] - b.s[1]), (long)(a.s[2] - b.s[2]), (long)(a.s[3] - b.s[3]));
}
@@ -1234,6 +1488,7 @@ public static void sub(Long8 a, Long8 b, Long8 result) {
result.s[3] = (long)(a.s[3] - b.s[3]);
}
+ @Translatable
public static Double8 mul(Long8 a, Double8 b) {
return new Double8((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w), (double)(a.s[0] * b.s[0]), (double)(a.s[1] * b.s[1]), (double)(a.s[2] * b.s[2]), (double)(a.s[3] * b.s[3]));
}
@@ -1249,6 +1504,7 @@ public static void mul(Long8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Double8 mul(Long8 a, double k) {
return new Double8((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k), (double)(a.s[0] * k), (double)(a.s[1] * k), (double)(a.s[2] * k), (double)(a.s[3] * k));
}
@@ -1264,6 +1520,7 @@ public static void mul(Long8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] * k);
}
+ @Translatable
public static Float8 mul(Long8 a, Float8 b) {
return new Float8((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w), (float)(a.s[0] * b.s[0]), (float)(a.s[1] * b.s[1]), (float)(a.s[2] * b.s[2]), (float)(a.s[3] * b.s[3]));
}
@@ -1279,6 +1536,7 @@ public static void mul(Long8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Float8 mul(Long8 a, float k) {
return new Float8((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k), (float)(a.s[0] * k), (float)(a.s[1] * k), (float)(a.s[2] * k), (float)(a.s[3] * k));
}
@@ -1294,6 +1552,7 @@ public static void mul(Long8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] * k);
}
+ @Translatable
public static Long8 mul(Long8 a, Long8 b) {
return new Long8((long)(a.x * b.x), (long)(a.y * b.y), (long)(a.z * b.z), (long)(a.w * b.w), (long)(a.s[0] * b.s[0]), (long)(a.s[1] * b.s[1]), (long)(a.s[2] * b.s[2]), (long)(a.s[3] * b.s[3]));
}
@@ -1309,6 +1568,7 @@ public static void mul(Long8 a, Long8 b, Long8 result) {
result.s[3] = (long)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Long8 mul(Long8 a, long k) {
return new Long8((long)(a.x * k), (long)(a.y * k), (long)(a.z * k), (long)(a.w * k), (long)(a.s[0] * k), (long)(a.s[1] * k), (long)(a.s[2] * k), (long)(a.s[3] * k));
}
@@ -1324,6 +1584,7 @@ public static void mul(Long8 a, long k, Long8 result) {
result.s[3] = (long)(a.s[3] * k);
}
+ @Translatable
public static Double8 div(Long8 a, Double8 b) {
return new Double8((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w), (double)(a.s[0] / b.s[0]), (double)(a.s[1] / b.s[1]), (double)(a.s[2] / b.s[2]), (double)(a.s[3] / b.s[3]));
}
@@ -1339,6 +1600,7 @@ public static void div(Long8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Double8 div(Long8 a, double k) {
return new Double8((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k), (double)(a.s[0] / k), (double)(a.s[1] / k), (double)(a.s[2] / k), (double)(a.s[3] / k));
}
@@ -1354,6 +1616,7 @@ public static void div(Long8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] / k);
}
+ @Translatable
public static Float8 div(Long8 a, Float8 b) {
return new Float8((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w), (float)(a.s[0] / b.s[0]), (float)(a.s[1] / b.s[1]), (float)(a.s[2] / b.s[2]), (float)(a.s[3] / b.s[3]));
}
@@ -1369,6 +1632,7 @@ public static void div(Long8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Float8 div(Long8 a, float k) {
return new Float8((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k), (float)(a.s[0] / k), (float)(a.s[1] / k), (float)(a.s[2] / k), (float)(a.s[3] / k));
}
@@ -1384,6 +1648,7 @@ public static void div(Long8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] / k);
}
+ @Translatable
public static Long8 div(Long8 a, Long8 b) {
return new Long8((long)(a.x / b.x), (long)(a.y / b.y), (long)(a.z / b.z), (long)(a.w / b.w), (long)(a.s[0] / b.s[0]), (long)(a.s[1] / b.s[1]), (long)(a.s[2] / b.s[2]), (long)(a.s[3] / b.s[3]));
}
@@ -1399,6 +1664,7 @@ public static void div(Long8 a, Long8 b, Long8 result) {
result.s[3] = (long)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Long8 div(Long8 a, long k) {
return new Long8((long)(a.x / k), (long)(a.y / k), (long)(a.z / k), (long)(a.w / k), (long)(a.s[0] / k), (long)(a.s[1] / k), (long)(a.s[2] / k), (long)(a.s[3] / k));
}
@@ -1414,6 +1680,7 @@ public static void div(Long8 a, long k, Long8 result) {
result.s[3] = (long)(a.s[3] / k);
}
+ @Translatable
public static Long8 mod(Long8 a, Long8 b) {
return new Long8((long)(a.x % b.x), (long)(a.y % b.y), (long)(a.z % b.z), (long)(a.w % b.w), (long)(a.s[0] % b.s[0]), (long)(a.s[1] % b.s[1]), (long)(a.s[2] % b.s[2]), (long)(a.s[3] % b.s[3]));
}
@@ -1429,6 +1696,7 @@ public static void mod(Long8 a, Long8 b, Long8 result) {
result.s[3] = (long)(a.s[3] % b.s[3]);
}
+ @Translatable
public static Long8 mod(Long8 a, long k) {
return new Long8((long)(a.x % k), (long)(a.y % k), (long)(a.z % k), (long)(a.w % k), (long)(a.s[0] % k), (long)(a.s[1] % k), (long)(a.s[2] % k), (long)(a.s[3] % k));
}
@@ -1444,6 +1712,7 @@ public static void mod(Long8 a, long k, Long8 result) {
result.s[3] = (long)(a.s[3] % k);
}
+ @Translatable
public static Long8 bitAnd(Long8 a, Long8 b) {
return new Long8((long)(a.x & b.x), (long)(a.y & b.y), (long)(a.z & b.z), (long)(a.w & b.w), (long)(a.s[0] & b.s[0]), (long)(a.s[1] & b.s[1]), (long)(a.s[2] & b.s[2]), (long)(a.s[3] & b.s[3]));
}
@@ -1459,6 +1728,7 @@ public static void bitAnd(Long8 a, Long8 b, Long8 result) {
result.s[3] = (long)(a.s[3] & b.s[3]);
}
+ @Translatable
public static Long8 bitOr(Long8 a, Long8 b) {
return new Long8((long)(a.x | b.x), (long)(a.y | b.y), (long)(a.z | b.z), (long)(a.w | b.w), (long)(a.s[0] | b.s[0]), (long)(a.s[1] | b.s[1]), (long)(a.s[2] | b.s[2]), (long)(a.s[3] | b.s[3]));
}
@@ -1474,6 +1744,7 @@ public static void bitOr(Long8 a, Long8 b, Long8 result) {
result.s[3] = (long)(a.s[3] | b.s[3]);
}
+ @Translatable
public static Long8 bitXor(Long8 a, Long8 b) {
return new Long8((long)(a.x ^ b.x), (long)(a.y ^ b.y), (long)(a.z ^ b.z), (long)(a.w ^ b.w), (long)(a.s[0] ^ b.s[0]), (long)(a.s[1] ^ b.s[1]), (long)(a.s[2] ^ b.s[2]), (long)(a.s[3] ^ b.s[3]));
}
@@ -1489,6 +1760,7 @@ public static void bitXor(Long8 a, Long8 b, Long8 result) {
result.s[3] = (long)(a.s[3] ^ b.s[3]);
}
+ @Translatable
public static Long8 bitNot(Long8 a) {
return new Long8((long)(~a.x), (long)(~a.y), (long)(~a.z), (long)(~a.w), (long)(~a.s[0]), (long)(~a.s[1]), (long)(~a.s[2]), (long)(~a.s[3]));
}
@@ -1504,6 +1776,7 @@ public static void bitNot(Long8 a, Long8 result) {
result.s[3] = (long)(~a.s[3]);
}
+ @Translatable
public static Long8 abs(Long8 a) {
return new Long8(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w), Math.abs(a.s[0]), Math.abs(a.s[1]), Math.abs(a.s[2]), Math.abs(a.s[3]));
}
@@ -1519,6 +1792,7 @@ public static void abs(Long8 a, Long8 result) {
result.s[3] = Math.abs(a.s[3]);
}
+ @Translatable
public static Long8 clamp(Long8 a, Long8 b, Long8 c) {
return new Long8(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w), Math.clamp(a.s[0], b.s[0], c.s[0]), Math.clamp(a.s[1], b.s[1], c.s[1]), Math.clamp(a.s[2], b.s[2], c.s[2]), Math.clamp(a.s[3], b.s[3], c.s[3]));
}
@@ -1534,6 +1808,7 @@ public static void clamp(Long8 a, Long8 b, Long8 c, Long8 result) {
result.s[3] = Math.clamp(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Long8 max(Long8 a, Long8 b) {
return new Long8(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w), Math.max(a.s[0], b.s[0]), Math.max(a.s[1], b.s[1]), Math.max(a.s[2], b.s[2]), Math.max(a.s[3], b.s[3]));
}
@@ -1549,6 +1824,7 @@ public static void max(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.max(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 maxMag(Long8 a, Long8 b) {
return new Long8(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w), Math.maxMag(a.s[0], b.s[0]), Math.maxMag(a.s[1], b.s[1]), Math.maxMag(a.s[2], b.s[2]), Math.maxMag(a.s[3], b.s[3]));
}
@@ -1564,6 +1840,7 @@ public static void maxMag(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.maxMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 min(Long8 a, Long8 b) {
return new Long8(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w), Math.min(a.s[0], b.s[0]), Math.min(a.s[1], b.s[1]), Math.min(a.s[2], b.s[2]), Math.min(a.s[3], b.s[3]));
}
@@ -1579,6 +1856,7 @@ public static void min(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.min(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 minMag(Long8 a, Long8 b) {
return new Long8(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w), Math.minMag(a.s[0], b.s[0]), Math.minMag(a.s[1], b.s[1]), Math.minMag(a.s[2], b.s[2]), Math.minMag(a.s[3], b.s[3]));
}
@@ -1594,6 +1872,7 @@ public static void minMag(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.minMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 mix(Long8 a, Long8 b, Long8 c) {
return new Long8(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w), Math.mix(a.s[0], b.s[0], c.s[0]), Math.mix(a.s[1], b.s[1], c.s[1]), Math.mix(a.s[2], b.s[2], c.s[2]), Math.mix(a.s[3], b.s[3], c.s[3]));
}
@@ -1609,6 +1888,7 @@ public static void mix(Long8 a, Long8 b, Long8 c, Long8 result) {
result.s[3] = Math.mix(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Long8 clamp(Long8 v, long min, long max) {
return new Long8(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max), Math.clamp(v.s[0], min, max), Math.clamp(v.s[1], min, max), Math.clamp(v.s[2], min, max), Math.clamp(v.s[3], min, max));
}
@@ -1624,6 +1904,7 @@ public static void clamp(Long8 v, long min, long max, Long8 result) {
result.s[3] = Math.clamp(v.s[3], min, max);
}
+ @Translatable
public static Long8 max(Long8 x, long y) {
return new Long8(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y), Math.max(x.s[0], y), Math.max(x.s[1], y), Math.max(x.s[2], y), Math.max(x.s[3], y));
}
@@ -1639,6 +1920,7 @@ public static void max(Long8 x, long y, Long8 result) {
result.s[3] = Math.max(x.s[3], y);
}
+ @Translatable
public static Long8 min(Long8 x, long y) {
return new Long8(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y), Math.min(x.s[0], y), Math.min(x.s[1], y), Math.min(x.s[2], y), Math.min(x.s[3], y));
}
@@ -1654,6 +1936,7 @@ public static void min(Long8 x, long y, Long8 result) {
result.s[3] = Math.min(x.s[3], y);
}
+ @Translatable
public static Long8 mix(Long8 x, Long8 y, long a) {
return new Long8(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a), Math.mix(x.s[0], y.s[0], a), Math.mix(x.s[1], y.s[1], a), Math.mix(x.s[2], y.s[2], a), Math.mix(x.s[3], y.s[3], a));
}
@@ -1669,6 +1952,7 @@ public static void mix(Long8 x, Long8 y, long a, Long8 result) {
result.s[3] = Math.mix(x.s[3], y.s[3], a);
}
+ @Translatable
public static Long8 absDiff(Long8 a, Long8 b) {
return new Long8(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z), Math.absDiff(a.w, b.w), Math.absDiff(a.s[0], b.s[0]), Math.absDiff(a.s[1], b.s[1]), Math.absDiff(a.s[2], b.s[2]), Math.absDiff(a.s[3], b.s[3]));
}
@@ -1684,6 +1968,7 @@ public static void absDiff(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.absDiff(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 addSat(Long8 a, Long8 b) {
return new Long8(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z), Math.addSat(a.w, b.w), Math.addSat(a.s[0], b.s[0]), Math.addSat(a.s[1], b.s[1]), Math.addSat(a.s[2], b.s[2]), Math.addSat(a.s[3], b.s[3]));
}
@@ -1699,6 +1984,7 @@ public static void addSat(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.addSat(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 clz(Long8 a) {
return new Long8(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z), Math.clz(a.w), Math.clz(a.s[0]), Math.clz(a.s[1]), Math.clz(a.s[2]), Math.clz(a.s[3]));
}
@@ -1714,6 +2000,7 @@ public static void clz(Long8 a, Long8 result) {
result.s[3] = Math.clz(a.s[3]);
}
+ @Translatable
public static Long8 hadd(Long8 a, Long8 b) {
return new Long8(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z), Math.hadd(a.w, b.w), Math.hadd(a.s[0], b.s[0]), Math.hadd(a.s[1], b.s[1]), Math.hadd(a.s[2], b.s[2]), Math.hadd(a.s[3], b.s[3]));
}
@@ -1729,6 +2016,7 @@ public static void hadd(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.hadd(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 madHi(Long8 a, Long8 b, Long8 c) {
return new Long8(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z), Math.madHi(a.w, b.w, c.w), Math.madHi(a.s[0], b.s[0], c.s[0]), Math.madHi(a.s[1], b.s[1], c.s[1]), Math.madHi(a.s[2], b.s[2], c.s[2]), Math.madHi(a.s[3], b.s[3], c.s[3]));
}
@@ -1744,6 +2032,7 @@ public static void madHi(Long8 a, Long8 b, Long8 c, Long8 result) {
result.s[3] = Math.madHi(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Long8 madSat(Long8 a, Long8 b, Long8 c) {
return new Long8(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z), Math.madSat(a.w, b.w, c.w), Math.madSat(a.s[0], b.s[0], c.s[0]), Math.madSat(a.s[1], b.s[1], c.s[1]), Math.madSat(a.s[2], b.s[2], c.s[2]), Math.madSat(a.s[3], b.s[3], c.s[3]));
}
@@ -1759,6 +2048,7 @@ public static void madSat(Long8 a, Long8 b, Long8 c, Long8 result) {
result.s[3] = Math.madSat(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Long8 mulHi(Long8 a, Long8 b) {
return new Long8(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z), Math.mulHi(a.w, b.w), Math.mulHi(a.s[0], b.s[0]), Math.mulHi(a.s[1], b.s[1]), Math.mulHi(a.s[2], b.s[2]), Math.mulHi(a.s[3], b.s[3]));
}
@@ -1774,6 +2064,7 @@ public static void mulHi(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.mulHi(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 rhadd(Long8 a, Long8 b) {
return new Long8(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z), Math.rhadd(a.w, b.w), Math.rhadd(a.s[0], b.s[0]), Math.rhadd(a.s[1], b.s[1]), Math.rhadd(a.s[2], b.s[2]), Math.rhadd(a.s[3], b.s[3]));
}
@@ -1789,6 +2080,7 @@ public static void rhadd(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.rhadd(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 rotate(Long8 a, Long8 b) {
return new Long8(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z), Math.rotate(a.w, b.w), Math.rotate(a.s[0], b.s[0]), Math.rotate(a.s[1], b.s[1]), Math.rotate(a.s[2], b.s[2]), Math.rotate(a.s[3], b.s[3]));
}
@@ -1804,6 +2096,7 @@ public static void rotate(Long8 a, Long8 b, Long8 result) {
result.s[3] = Math.rotate(a.s[3], b.s[3]);
}
+ @Translatable
public static Long8 subSat(Long8 a, Long8 b) {
return new Long8(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z), Math.subSat(a.w, b.w), Math.subSat(a.s[0], b.s[0]), Math.subSat(a.s[1], b.s[1]), Math.subSat(a.s[2], b.s[2]), Math.subSat(a.s[3], b.s[3]));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short2.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short2.java
index 550df23..faa8445 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short2.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short2.java
@@ -27,41 +27,55 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Short2 {
+ @Translatable
public short x;
+ @Translatable
public short y;
+ @Translatable
public Short2() {}
+ @Translatable
public Short2(short x, short y) {
set(x, y);
}
+ @Translatable
public void set(short x, short y) {
this.x = x;
this.y = y;
}
+ @Translatable
public Short2(short v) {
this(v, v);
}
+ @Translatable
public void set(short v) {
set(v, v);
}
+ @Translatable
public Short2(Short2 vec1) {
this(vec1.x, vec1.y);
}
+ @Translatable
public void set(Short2 vec1) {
set(vec1.x, vec1.y);
}
+ @Translatable
public Short2 value() {
return new Short2(this);
}
+ @Translatable
public Byte2 convertByte2() {
return new Byte2((byte)(x), (byte)(y));
}
@@ -71,6 +85,7 @@ public void convertByte2(Byte2 result) {
result.y = (byte)(y);
}
+ @Translatable
public Int2 convertInt2() {
return new Int2((int)(x), (int)(y));
}
@@ -80,6 +95,7 @@ public void convertInt2(Int2 result) {
result.y = (int)(y);
}
+ @Translatable
public Long2 convertLong2() {
return new Long2((long)(x), (long)(y));
}
@@ -89,6 +105,7 @@ public void convertLong2(Long2 result) {
result.y = (long)(y);
}
+ @Translatable
public Float2 convertFloat2() {
return new Float2((float)(x), (float)(y));
}
@@ -98,6 +115,7 @@ public void convertFloat2(Float2 result) {
result.y = (float)(y);
}
+ @Translatable
public Double2 convertDouble2() {
return new Double2((double)(x), (double)(y));
}
@@ -107,6 +125,7 @@ public void convertDouble2(Double2 result) {
result.y = (double)(y);
}
+ @Translatable
public static Int2 isEqual(Short2 a, Short2 b) {
return new Int2(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0);
}
@@ -116,6 +135,7 @@ public static void isEqual(Short2 a, Short2 b, Int2 result) {
result.y = a.y == b.y? 1 : 0;
}
+ @Translatable
public static Int2 isNotEqual(Short2 a, Short2 b) {
return new Int2(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0);
}
@@ -125,6 +145,7 @@ public static void isNotEqual(Short2 a, Short2 b, Int2 result) {
result.y = a.y != b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreater(Short2 a, Short2 b) {
return new Int2(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0);
}
@@ -134,6 +155,7 @@ public static void isGreater(Short2 a, Short2 b, Int2 result) {
result.y = a.y > b.y? 1 : 0;
}
+ @Translatable
public static Int2 isGreaterEqual(Short2 a, Short2 b) {
return new Int2(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0);
}
@@ -143,6 +165,7 @@ public static void isGreaterEqual(Short2 a, Short2 b, Int2 result) {
result.y = a.y >= b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLess(Short2 a, Short2 b) {
return new Int2(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0);
}
@@ -152,6 +175,7 @@ public static void isLess(Short2 a, Short2 b, Int2 result) {
result.y = a.y < b.y? 1 : 0;
}
+ @Translatable
public static Int2 isLessEqual(Short2 a, Short2 b) {
return new Int2(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0);
}
@@ -161,6 +185,7 @@ public static void isLessEqual(Short2 a, Short2 b, Int2 result) {
result.y = a.y <= b.y? 1 : 0;
}
+ @Translatable
public static Short2 select(Short2 a, Short2 b, Int2 c) {
return new Short2(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y));
}
@@ -170,14 +195,17 @@ public static void select(Short2 a, Short2 b, Int2 c, Short2 result) {
result.y = Math.select(a.y, b.y, c.y);
}
+ @Translatable
public static int any(Short2 a) {
return (a.x != (short) 0 || a.y != (short) 0)? 1 : 0;
}
+ @Translatable
public static int all(Short2 a) {
return (a.x == (short) 0 || a.y == (short) 0)? 0 : 1;
}
+ @Translatable
public static Short2 neg(Short2 a) {
return new Short2((short)(-a.x), (short)(-a.y));
}
@@ -187,6 +215,7 @@ public static void neg(Short2 a, Short2 result) {
result.y = (short)(-a.y);
}
+ @Translatable
public static Short2 add(Short2 a, Short2 b) {
return new Short2((short)(a.x + b.x), (short)(a.y + b.y));
}
@@ -196,6 +225,7 @@ public static void add(Short2 a, Short2 b, Short2 result) {
result.y = (short)(a.y + b.y);
}
+ @Translatable
public static Short2 sub(Short2 a, Short2 b) {
return new Short2((short)(a.x - b.x), (short)(a.y - b.y));
}
@@ -205,6 +235,7 @@ public static void sub(Short2 a, Short2 b, Short2 result) {
result.y = (short)(a.y - b.y);
}
+ @Translatable
public static Double2 mul(Short2 a, Double2 b) {
return new Double2((double)(a.x * b.x), (double)(a.y * b.y));
}
@@ -214,6 +245,7 @@ public static void mul(Short2 a, Double2 b, Double2 result) {
result.y = (double)(a.y * b.y);
}
+ @Translatable
public static Double2 mul(Short2 a, double k) {
return new Double2((double)(a.x * k), (double)(a.y * k));
}
@@ -223,6 +255,7 @@ public static void mul(Short2 a, double k, Double2 result) {
result.y = (double)(a.y * k);
}
+ @Translatable
public static Float2 mul(Short2 a, Float2 b) {
return new Float2((float)(a.x * b.x), (float)(a.y * b.y));
}
@@ -232,6 +265,7 @@ public static void mul(Short2 a, Float2 b, Float2 result) {
result.y = (float)(a.y * b.y);
}
+ @Translatable
public static Float2 mul(Short2 a, float k) {
return new Float2((float)(a.x * k), (float)(a.y * k));
}
@@ -241,6 +275,7 @@ public static void mul(Short2 a, float k, Float2 result) {
result.y = (float)(a.y * k);
}
+ @Translatable
public static Short2 mul(Short2 a, Short2 b) {
return new Short2((short)(a.x * b.x), (short)(a.y * b.y));
}
@@ -250,6 +285,7 @@ public static void mul(Short2 a, Short2 b, Short2 result) {
result.y = (short)(a.y * b.y);
}
+ @Translatable
public static Short2 mul(Short2 a, short k) {
return new Short2((short)(a.x * k), (short)(a.y * k));
}
@@ -259,6 +295,7 @@ public static void mul(Short2 a, short k, Short2 result) {
result.y = (short)(a.y * k);
}
+ @Translatable
public static Double2 div(Short2 a, Double2 b) {
return new Double2((double)(a.x / b.x), (double)(a.y / b.y));
}
@@ -268,6 +305,7 @@ public static void div(Short2 a, Double2 b, Double2 result) {
result.y = (double)(a.y / b.y);
}
+ @Translatable
public static Double2 div(Short2 a, double k) {
return new Double2((double)(a.x / k), (double)(a.y / k));
}
@@ -277,6 +315,7 @@ public static void div(Short2 a, double k, Double2 result) {
result.y = (double)(a.y / k);
}
+ @Translatable
public static Float2 div(Short2 a, Float2 b) {
return new Float2((float)(a.x / b.x), (float)(a.y / b.y));
}
@@ -286,6 +325,7 @@ public static void div(Short2 a, Float2 b, Float2 result) {
result.y = (float)(a.y / b.y);
}
+ @Translatable
public static Float2 div(Short2 a, float k) {
return new Float2((float)(a.x / k), (float)(a.y / k));
}
@@ -295,6 +335,7 @@ public static void div(Short2 a, float k, Float2 result) {
result.y = (float)(a.y / k);
}
+ @Translatable
public static Short2 div(Short2 a, Short2 b) {
return new Short2((short)(a.x / b.x), (short)(a.y / b.y));
}
@@ -304,6 +345,7 @@ public static void div(Short2 a, Short2 b, Short2 result) {
result.y = (short)(a.y / b.y);
}
+ @Translatable
public static Short2 div(Short2 a, short k) {
return new Short2((short)(a.x / k), (short)(a.y / k));
}
@@ -313,6 +355,7 @@ public static void div(Short2 a, short k, Short2 result) {
result.y = (short)(a.y / k);
}
+ @Translatable
public static Short2 mod(Short2 a, Short2 b) {
return new Short2((short)(a.x % b.x), (short)(a.y % b.y));
}
@@ -322,6 +365,7 @@ public static void mod(Short2 a, Short2 b, Short2 result) {
result.y = (short)(a.y % b.y);
}
+ @Translatable
public static Short2 mod(Short2 a, short k) {
return new Short2((short)(a.x % k), (short)(a.y % k));
}
@@ -331,6 +375,7 @@ public static void mod(Short2 a, short k, Short2 result) {
result.y = (short)(a.y % k);
}
+ @Translatable
public static Short2 bitAnd(Short2 a, Short2 b) {
return new Short2((short)(a.x & b.x), (short)(a.y & b.y));
}
@@ -340,6 +385,7 @@ public static void bitAnd(Short2 a, Short2 b, Short2 result) {
result.y = (short)(a.y & b.y);
}
+ @Translatable
public static Short2 bitOr(Short2 a, Short2 b) {
return new Short2((short)(a.x | b.x), (short)(a.y | b.y));
}
@@ -349,6 +395,7 @@ public static void bitOr(Short2 a, Short2 b, Short2 result) {
result.y = (short)(a.y | b.y);
}
+ @Translatable
public static Short2 bitXor(Short2 a, Short2 b) {
return new Short2((short)(a.x ^ b.x), (short)(a.y ^ b.y));
}
@@ -358,6 +405,7 @@ public static void bitXor(Short2 a, Short2 b, Short2 result) {
result.y = (short)(a.y ^ b.y);
}
+ @Translatable
public static Short2 bitNot(Short2 a) {
return new Short2((short)(~a.x), (short)(~a.y));
}
@@ -367,6 +415,7 @@ public static void bitNot(Short2 a, Short2 result) {
result.y = (short)(~a.y);
}
+ @Translatable
public static Short2 abs(Short2 a) {
return new Short2(Math.abs(a.x), Math.abs(a.y));
}
@@ -376,6 +425,7 @@ public static void abs(Short2 a, Short2 result) {
result.y = Math.abs(a.y);
}
+ @Translatable
public static Short2 clamp(Short2 a, Short2 b, Short2 c) {
return new Short2(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y));
}
@@ -385,6 +435,7 @@ public static void clamp(Short2 a, Short2 b, Short2 c, Short2 result) {
result.y = Math.clamp(a.y, b.y, c.y);
}
+ @Translatable
public static Short2 max(Short2 a, Short2 b) {
return new Short2(Math.max(a.x, b.x), Math.max(a.y, b.y));
}
@@ -394,6 +445,7 @@ public static void max(Short2 a, Short2 b, Short2 result) {
result.y = Math.max(a.y, b.y);
}
+ @Translatable
public static Short2 maxMag(Short2 a, Short2 b) {
return new Short2(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y));
}
@@ -403,6 +455,7 @@ public static void maxMag(Short2 a, Short2 b, Short2 result) {
result.y = Math.maxMag(a.y, b.y);
}
+ @Translatable
public static Short2 min(Short2 a, Short2 b) {
return new Short2(Math.min(a.x, b.x), Math.min(a.y, b.y));
}
@@ -412,6 +465,7 @@ public static void min(Short2 a, Short2 b, Short2 result) {
result.y = Math.min(a.y, b.y);
}
+ @Translatable
public static Short2 minMag(Short2 a, Short2 b) {
return new Short2(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y));
}
@@ -421,6 +475,7 @@ public static void minMag(Short2 a, Short2 b, Short2 result) {
result.y = Math.minMag(a.y, b.y);
}
+ @Translatable
public static Short2 mix(Short2 a, Short2 b, Short2 c) {
return new Short2(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y));
}
@@ -430,6 +485,7 @@ public static void mix(Short2 a, Short2 b, Short2 c, Short2 result) {
result.y = Math.mix(a.y, b.y, c.y);
}
+ @Translatable
public static Short2 clamp(Short2 v, short min, short max) {
return new Short2(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max));
}
@@ -439,6 +495,7 @@ public static void clamp(Short2 v, short min, short max, Short2 result) {
result.y = Math.clamp(v.y, min, max);
}
+ @Translatable
public static Short2 max(Short2 x, short y) {
return new Short2(Math.max(x.x, y), Math.max(x.y, y));
}
@@ -448,6 +505,7 @@ public static void max(Short2 x, short y, Short2 result) {
result.y = Math.max(x.y, y);
}
+ @Translatable
public static Short2 min(Short2 x, short y) {
return new Short2(Math.min(x.x, y), Math.min(x.y, y));
}
@@ -457,6 +515,7 @@ public static void min(Short2 x, short y, Short2 result) {
result.y = Math.min(x.y, y);
}
+ @Translatable
public static Short2 mix(Short2 x, Short2 y, short a) {
return new Short2(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a));
}
@@ -466,6 +525,7 @@ public static void mix(Short2 x, Short2 y, short a, Short2 result) {
result.y = Math.mix(x.y, y.y, a);
}
+ @Translatable
public static Short2 absDiff(Short2 a, Short2 b) {
return new Short2(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y));
}
@@ -475,6 +535,7 @@ public static void absDiff(Short2 a, Short2 b, Short2 result) {
result.y = Math.absDiff(a.y, b.y);
}
+ @Translatable
public static Short2 addSat(Short2 a, Short2 b) {
return new Short2(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y));
}
@@ -484,6 +545,7 @@ public static void addSat(Short2 a, Short2 b, Short2 result) {
result.y = Math.addSat(a.y, b.y);
}
+ @Translatable
public static Short2 clz(Short2 a) {
return new Short2(Math.clz(a.x), Math.clz(a.y));
}
@@ -493,6 +555,7 @@ public static void clz(Short2 a, Short2 result) {
result.y = Math.clz(a.y);
}
+ @Translatable
public static Short2 hadd(Short2 a, Short2 b) {
return new Short2(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y));
}
@@ -502,6 +565,7 @@ public static void hadd(Short2 a, Short2 b, Short2 result) {
result.y = Math.hadd(a.y, b.y);
}
+ @Translatable
public static Short2 madHi(Short2 a, Short2 b, Short2 c) {
return new Short2(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y));
}
@@ -511,6 +575,7 @@ public static void madHi(Short2 a, Short2 b, Short2 c, Short2 result) {
result.y = Math.madHi(a.y, b.y, c.y);
}
+ @Translatable
public static Short2 madSat(Short2 a, Short2 b, Short2 c) {
return new Short2(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y));
}
@@ -520,6 +585,7 @@ public static void madSat(Short2 a, Short2 b, Short2 c, Short2 result) {
result.y = Math.madSat(a.y, b.y, c.y);
}
+ @Translatable
public static Short2 mulHi(Short2 a, Short2 b) {
return new Short2(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y));
}
@@ -529,6 +595,7 @@ public static void mulHi(Short2 a, Short2 b, Short2 result) {
result.y = Math.mulHi(a.y, b.y);
}
+ @Translatable
public static Short2 rhadd(Short2 a, Short2 b) {
return new Short2(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y));
}
@@ -538,6 +605,7 @@ public static void rhadd(Short2 a, Short2 b, Short2 result) {
result.y = Math.rhadd(a.y, b.y);
}
+ @Translatable
public static Short2 rotate(Short2 a, Short2 b) {
return new Short2(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y));
}
@@ -547,6 +615,7 @@ public static void rotate(Short2 a, Short2 b, Short2 result) {
result.y = Math.rotate(a.y, b.y);
}
+ @Translatable
public static Short2 subSat(Short2 a, Short2 b) {
return new Short2(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short3.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short3.java
index af1b49c..9f7b784 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short3.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short3.java
@@ -27,59 +27,78 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Short3 {
+ @Translatable
public short x;
+ @Translatable
public short y;
+ @Translatable
public short z;
+ @Translatable
public Short3() {}
+ @Translatable
public Short3(short x, short y, short z) {
set(x, y, z);
}
+ @Translatable
public void set(short x, short y, short z) {
this.x = x;
this.y = y;
this.z = z;
}
+ @Translatable
public Short3(short v) {
this(v, v, v);
}
+ @Translatable
public void set(short v) {
set(v, v, v);
}
+ @Translatable
public Short3(short x, Short2 vec1) {
this(x, vec1.x, vec1.y);
}
+ @Translatable
public void set(short x, Short2 vec1) {
set(x, vec1.x, vec1.y);
}
+ @Translatable
public Short3(Short2 vec1, short z) {
this(vec1.x, vec1.y, z);
}
+ @Translatable
public void set(Short2 vec1, short z) {
set(vec1.x, vec1.y, z);
}
+ @Translatable
public Short3(Short3 vec1) {
this(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(Short3 vec1) {
set(vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Short3 value() {
return new Short3(this);
}
+ @Translatable
public Byte3 convertByte3() {
return new Byte3((byte)(x), (byte)(y), (byte)(z));
}
@@ -90,6 +109,7 @@ public void convertByte3(Byte3 result) {
result.z = (byte)(z);
}
+ @Translatable
public Int3 convertInt3() {
return new Int3((int)(x), (int)(y), (int)(z));
}
@@ -100,6 +120,7 @@ public void convertInt3(Int3 result) {
result.z = (int)(z);
}
+ @Translatable
public Long3 convertLong3() {
return new Long3((long)(x), (long)(y), (long)(z));
}
@@ -110,6 +131,7 @@ public void convertLong3(Long3 result) {
result.z = (long)(z);
}
+ @Translatable
public Float3 convertFloat3() {
return new Float3((float)(x), (float)(y), (float)(z));
}
@@ -120,6 +142,7 @@ public void convertFloat3(Float3 result) {
result.z = (float)(z);
}
+ @Translatable
public Double3 convertDouble3() {
return new Double3((double)(x), (double)(y), (double)(z));
}
@@ -130,6 +153,7 @@ public void convertDouble3(Double3 result) {
result.z = (double)(z);
}
+ @Translatable
public Short2 asShort2() {
return new Short2(x, y);
}
@@ -139,6 +163,7 @@ public void asShort2(Short2 result) {
result.y = y;
}
+ @Translatable
public static Int3 isEqual(Short3 a, Short3 b) {
return new Int3(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0);
}
@@ -149,6 +174,7 @@ public static void isEqual(Short3 a, Short3 b, Int3 result) {
result.z = a.z == b.z? 1 : 0;
}
+ @Translatable
public static Int3 isNotEqual(Short3 a, Short3 b) {
return new Int3(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0);
}
@@ -159,6 +185,7 @@ public static void isNotEqual(Short3 a, Short3 b, Int3 result) {
result.z = a.z != b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreater(Short3 a, Short3 b) {
return new Int3(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0);
}
@@ -169,6 +196,7 @@ public static void isGreater(Short3 a, Short3 b, Int3 result) {
result.z = a.z > b.z? 1 : 0;
}
+ @Translatable
public static Int3 isGreaterEqual(Short3 a, Short3 b) {
return new Int3(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0);
}
@@ -179,6 +207,7 @@ public static void isGreaterEqual(Short3 a, Short3 b, Int3 result) {
result.z = a.z >= b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLess(Short3 a, Short3 b) {
return new Int3(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0);
}
@@ -189,6 +218,7 @@ public static void isLess(Short3 a, Short3 b, Int3 result) {
result.z = a.z < b.z? 1 : 0;
}
+ @Translatable
public static Int3 isLessEqual(Short3 a, Short3 b) {
return new Int3(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0);
}
@@ -199,6 +229,7 @@ public static void isLessEqual(Short3 a, Short3 b, Int3 result) {
result.z = a.z <= b.z? 1 : 0;
}
+ @Translatable
public static Short3 select(Short3 a, Short3 b, Int3 c) {
return new Short3(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z));
}
@@ -209,14 +240,17 @@ public static void select(Short3 a, Short3 b, Int3 c, Short3 result) {
result.z = Math.select(a.z, b.z, c.z);
}
+ @Translatable
public static int any(Short3 a) {
return (a.x != (short) 0 || a.y != (short) 0 || a.z != (short) 0)? 1 : 0;
}
+ @Translatable
public static int all(Short3 a) {
return (a.x == (short) 0 || a.y == (short) 0 || a.z == (short) 0)? 0 : 1;
}
+ @Translatable
public static Short3 neg(Short3 a) {
return new Short3((short)(-a.x), (short)(-a.y), (short)(-a.z));
}
@@ -227,6 +261,7 @@ public static void neg(Short3 a, Short3 result) {
result.z = (short)(-a.z);
}
+ @Translatable
public static Short3 add(Short3 a, Short3 b) {
return new Short3((short)(a.x + b.x), (short)(a.y + b.y), (short)(a.z + b.z));
}
@@ -237,6 +272,7 @@ public static void add(Short3 a, Short3 b, Short3 result) {
result.z = (short)(a.z + b.z);
}
+ @Translatable
public static Short3 sub(Short3 a, Short3 b) {
return new Short3((short)(a.x - b.x), (short)(a.y - b.y), (short)(a.z - b.z));
}
@@ -247,6 +283,7 @@ public static void sub(Short3 a, Short3 b, Short3 result) {
result.z = (short)(a.z - b.z);
}
+ @Translatable
public static Double3 mul(Short3 a, Double3 b) {
return new Double3((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z));
}
@@ -257,6 +294,7 @@ public static void mul(Short3 a, Double3 b, Double3 result) {
result.z = (double)(a.z * b.z);
}
+ @Translatable
public static Double3 mul(Short3 a, double k) {
return new Double3((double)(a.x * k), (double)(a.y * k), (double)(a.z * k));
}
@@ -267,6 +305,7 @@ public static void mul(Short3 a, double k, Double3 result) {
result.z = (double)(a.z * k);
}
+ @Translatable
public static Float3 mul(Short3 a, Float3 b) {
return new Float3((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z));
}
@@ -277,6 +316,7 @@ public static void mul(Short3 a, Float3 b, Float3 result) {
result.z = (float)(a.z * b.z);
}
+ @Translatable
public static Float3 mul(Short3 a, float k) {
return new Float3((float)(a.x * k), (float)(a.y * k), (float)(a.z * k));
}
@@ -287,6 +327,7 @@ public static void mul(Short3 a, float k, Float3 result) {
result.z = (float)(a.z * k);
}
+ @Translatable
public static Short3 mul(Short3 a, Short3 b) {
return new Short3((short)(a.x * b.x), (short)(a.y * b.y), (short)(a.z * b.z));
}
@@ -297,6 +338,7 @@ public static void mul(Short3 a, Short3 b, Short3 result) {
result.z = (short)(a.z * b.z);
}
+ @Translatable
public static Short3 mul(Short3 a, short k) {
return new Short3((short)(a.x * k), (short)(a.y * k), (short)(a.z * k));
}
@@ -307,6 +349,7 @@ public static void mul(Short3 a, short k, Short3 result) {
result.z = (short)(a.z * k);
}
+ @Translatable
public static Double3 div(Short3 a, Double3 b) {
return new Double3((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z));
}
@@ -317,6 +360,7 @@ public static void div(Short3 a, Double3 b, Double3 result) {
result.z = (double)(a.z / b.z);
}
+ @Translatable
public static Double3 div(Short3 a, double k) {
return new Double3((double)(a.x / k), (double)(a.y / k), (double)(a.z / k));
}
@@ -327,6 +371,7 @@ public static void div(Short3 a, double k, Double3 result) {
result.z = (double)(a.z / k);
}
+ @Translatable
public static Float3 div(Short3 a, Float3 b) {
return new Float3((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z));
}
@@ -337,6 +382,7 @@ public static void div(Short3 a, Float3 b, Float3 result) {
result.z = (float)(a.z / b.z);
}
+ @Translatable
public static Float3 div(Short3 a, float k) {
return new Float3((float)(a.x / k), (float)(a.y / k), (float)(a.z / k));
}
@@ -347,6 +393,7 @@ public static void div(Short3 a, float k, Float3 result) {
result.z = (float)(a.z / k);
}
+ @Translatable
public static Short3 div(Short3 a, Short3 b) {
return new Short3((short)(a.x / b.x), (short)(a.y / b.y), (short)(a.z / b.z));
}
@@ -357,6 +404,7 @@ public static void div(Short3 a, Short3 b, Short3 result) {
result.z = (short)(a.z / b.z);
}
+ @Translatable
public static Short3 div(Short3 a, short k) {
return new Short3((short)(a.x / k), (short)(a.y / k), (short)(a.z / k));
}
@@ -367,6 +415,7 @@ public static void div(Short3 a, short k, Short3 result) {
result.z = (short)(a.z / k);
}
+ @Translatable
public static Short3 mod(Short3 a, Short3 b) {
return new Short3((short)(a.x % b.x), (short)(a.y % b.y), (short)(a.z % b.z));
}
@@ -377,6 +426,7 @@ public static void mod(Short3 a, Short3 b, Short3 result) {
result.z = (short)(a.z % b.z);
}
+ @Translatable
public static Short3 mod(Short3 a, short k) {
return new Short3((short)(a.x % k), (short)(a.y % k), (short)(a.z % k));
}
@@ -387,6 +437,7 @@ public static void mod(Short3 a, short k, Short3 result) {
result.z = (short)(a.z % k);
}
+ @Translatable
public static Short3 bitAnd(Short3 a, Short3 b) {
return new Short3((short)(a.x & b.x), (short)(a.y & b.y), (short)(a.z & b.z));
}
@@ -397,6 +448,7 @@ public static void bitAnd(Short3 a, Short3 b, Short3 result) {
result.z = (short)(a.z & b.z);
}
+ @Translatable
public static Short3 bitOr(Short3 a, Short3 b) {
return new Short3((short)(a.x | b.x), (short)(a.y | b.y), (short)(a.z | b.z));
}
@@ -407,6 +459,7 @@ public static void bitOr(Short3 a, Short3 b, Short3 result) {
result.z = (short)(a.z | b.z);
}
+ @Translatable
public static Short3 bitXor(Short3 a, Short3 b) {
return new Short3((short)(a.x ^ b.x), (short)(a.y ^ b.y), (short)(a.z ^ b.z));
}
@@ -417,6 +470,7 @@ public static void bitXor(Short3 a, Short3 b, Short3 result) {
result.z = (short)(a.z ^ b.z);
}
+ @Translatable
public static Short3 bitNot(Short3 a) {
return new Short3((short)(~a.x), (short)(~a.y), (short)(~a.z));
}
@@ -427,6 +481,7 @@ public static void bitNot(Short3 a, Short3 result) {
result.z = (short)(~a.z);
}
+ @Translatable
public static Short3 abs(Short3 a) {
return new Short3(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z));
}
@@ -437,6 +492,7 @@ public static void abs(Short3 a, Short3 result) {
result.z = Math.abs(a.z);
}
+ @Translatable
public static Short3 clamp(Short3 a, Short3 b, Short3 c) {
return new Short3(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z));
}
@@ -447,6 +503,7 @@ public static void clamp(Short3 a, Short3 b, Short3 c, Short3 result) {
result.z = Math.clamp(a.z, b.z, c.z);
}
+ @Translatable
public static Short3 max(Short3 a, Short3 b) {
return new Short3(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z));
}
@@ -457,6 +514,7 @@ public static void max(Short3 a, Short3 b, Short3 result) {
result.z = Math.max(a.z, b.z);
}
+ @Translatable
public static Short3 maxMag(Short3 a, Short3 b) {
return new Short3(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z));
}
@@ -467,6 +525,7 @@ public static void maxMag(Short3 a, Short3 b, Short3 result) {
result.z = Math.maxMag(a.z, b.z);
}
+ @Translatable
public static Short3 min(Short3 a, Short3 b) {
return new Short3(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z));
}
@@ -477,6 +536,7 @@ public static void min(Short3 a, Short3 b, Short3 result) {
result.z = Math.min(a.z, b.z);
}
+ @Translatable
public static Short3 minMag(Short3 a, Short3 b) {
return new Short3(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z));
}
@@ -487,6 +547,7 @@ public static void minMag(Short3 a, Short3 b, Short3 result) {
result.z = Math.minMag(a.z, b.z);
}
+ @Translatable
public static Short3 mix(Short3 a, Short3 b, Short3 c) {
return new Short3(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z));
}
@@ -497,6 +558,7 @@ public static void mix(Short3 a, Short3 b, Short3 c, Short3 result) {
result.z = Math.mix(a.z, b.z, c.z);
}
+ @Translatable
public static Short3 clamp(Short3 v, short min, short max) {
return new Short3(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max));
}
@@ -507,6 +569,7 @@ public static void clamp(Short3 v, short min, short max, Short3 result) {
result.z = Math.clamp(v.z, min, max);
}
+ @Translatable
public static Short3 max(Short3 x, short y) {
return new Short3(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y));
}
@@ -517,6 +580,7 @@ public static void max(Short3 x, short y, Short3 result) {
result.z = Math.max(x.z, y);
}
+ @Translatable
public static Short3 min(Short3 x, short y) {
return new Short3(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y));
}
@@ -527,6 +591,7 @@ public static void min(Short3 x, short y, Short3 result) {
result.z = Math.min(x.z, y);
}
+ @Translatable
public static Short3 mix(Short3 x, Short3 y, short a) {
return new Short3(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a));
}
@@ -537,6 +602,7 @@ public static void mix(Short3 x, Short3 y, short a, Short3 result) {
result.z = Math.mix(x.z, y.z, a);
}
+ @Translatable
public static Short3 absDiff(Short3 a, Short3 b) {
return new Short3(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z));
}
@@ -547,6 +613,7 @@ public static void absDiff(Short3 a, Short3 b, Short3 result) {
result.z = Math.absDiff(a.z, b.z);
}
+ @Translatable
public static Short3 addSat(Short3 a, Short3 b) {
return new Short3(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z));
}
@@ -557,6 +624,7 @@ public static void addSat(Short3 a, Short3 b, Short3 result) {
result.z = Math.addSat(a.z, b.z);
}
+ @Translatable
public static Short3 clz(Short3 a) {
return new Short3(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z));
}
@@ -567,6 +635,7 @@ public static void clz(Short3 a, Short3 result) {
result.z = Math.clz(a.z);
}
+ @Translatable
public static Short3 hadd(Short3 a, Short3 b) {
return new Short3(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z));
}
@@ -577,6 +646,7 @@ public static void hadd(Short3 a, Short3 b, Short3 result) {
result.z = Math.hadd(a.z, b.z);
}
+ @Translatable
public static Short3 madHi(Short3 a, Short3 b, Short3 c) {
return new Short3(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z));
}
@@ -587,6 +657,7 @@ public static void madHi(Short3 a, Short3 b, Short3 c, Short3 result) {
result.z = Math.madHi(a.z, b.z, c.z);
}
+ @Translatable
public static Short3 madSat(Short3 a, Short3 b, Short3 c) {
return new Short3(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z));
}
@@ -597,6 +668,7 @@ public static void madSat(Short3 a, Short3 b, Short3 c, Short3 result) {
result.z = Math.madSat(a.z, b.z, c.z);
}
+ @Translatable
public static Short3 mulHi(Short3 a, Short3 b) {
return new Short3(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z));
}
@@ -607,6 +679,7 @@ public static void mulHi(Short3 a, Short3 b, Short3 result) {
result.z = Math.mulHi(a.z, b.z);
}
+ @Translatable
public static Short3 rhadd(Short3 a, Short3 b) {
return new Short3(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z));
}
@@ -617,6 +690,7 @@ public static void rhadd(Short3 a, Short3 b, Short3 result) {
result.z = Math.rhadd(a.z, b.z);
}
+ @Translatable
public static Short3 rotate(Short3 a, Short3 b) {
return new Short3(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z));
}
@@ -627,6 +701,7 @@ public static void rotate(Short3 a, Short3 b, Short3 result) {
result.z = Math.rotate(a.z, b.z);
}
+ @Translatable
public static Short3 subSat(Short3 a, Short3 b) {
return new Short3(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short4.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short4.java
index 17ee3f0..1e6504a 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short4.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short4.java
@@ -27,18 +27,28 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Short4 {
+ @Translatable
public short x;
+ @Translatable
public short y;
+ @Translatable
public short z;
+ @Translatable
public short w;
+ @Translatable
public Short4() {}
+ @Translatable
public Short4(short x, short y, short z, short w) {
set(x, y, z, w);
}
+ @Translatable
public void set(short x, short y, short z, short w) {
this.x = x;
this.y = y;
@@ -46,74 +56,92 @@ public void set(short x, short y, short z, short w) {
this.w = w;
}
+ @Translatable
public Short4(short v) {
this(v, v, v, v);
}
+ @Translatable
public void set(short v) {
set(v, v, v, v);
}
+ @Translatable
public Short4(short x, short y, Short2 vec1) {
this(x, y, vec1.x, vec1.y);
}
+ @Translatable
public void set(short x, short y, Short2 vec1) {
set(x, y, vec1.x, vec1.y);
}
+ @Translatable
public Short4(short x, Short2 vec1, short w) {
this(x, vec1.x, vec1.y, w);
}
+ @Translatable
public void set(short x, Short2 vec1, short w) {
set(x, vec1.x, vec1.y, w);
}
+ @Translatable
public Short4(short x, Short3 vec1) {
this(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(short x, Short3 vec1) {
set(x, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Short4(Short2 vec1, short z, short w) {
this(vec1.x, vec1.y, z, w);
}
+ @Translatable
public void set(Short2 vec1, short z, short w) {
set(vec1.x, vec1.y, z, w);
}
+ @Translatable
public Short4(Short2 vec1, Short2 vec2) {
this(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2) {
set(vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Short4(Short3 vec1, short w) {
this(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public void set(Short3 vec1, short w) {
set(vec1.x, vec1.y, vec1.z, w);
}
+ @Translatable
public Short4(Short4 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(Short4 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Short4 value() {
return new Short4(this);
}
+ @Translatable
public Short2 lo() {
return new Short2(x, y);
}
@@ -123,6 +151,7 @@ public void lo(Short2 result) {
result.y = y;
}
+ @Translatable
public Short2 hi() {
return new Short2(z, w);
}
@@ -132,6 +161,7 @@ public void hi(Short2 result) {
result.y = w;
}
+ @Translatable
public Short2 odd() {
return new Short2(y, w);
}
@@ -141,6 +171,7 @@ public void odd(Short2 result) {
result.y = w;
}
+ @Translatable
public Short2 even() {
return new Short2(x, z);
}
@@ -150,6 +181,7 @@ public void even(Short2 result) {
result.y = z;
}
+ @Translatable
public Byte4 convertByte4() {
return new Byte4((byte)(x), (byte)(y), (byte)(z), (byte)(w));
}
@@ -161,6 +193,7 @@ public void convertByte4(Byte4 result) {
result.w = (byte)(w);
}
+ @Translatable
public Int4 convertInt4() {
return new Int4((int)(x), (int)(y), (int)(z), (int)(w));
}
@@ -172,6 +205,7 @@ public void convertInt4(Int4 result) {
result.w = (int)(w);
}
+ @Translatable
public Long4 convertLong4() {
return new Long4((long)(x), (long)(y), (long)(z), (long)(w));
}
@@ -183,6 +217,7 @@ public void convertLong4(Long4 result) {
result.w = (long)(w);
}
+ @Translatable
public Float4 convertFloat4() {
return new Float4((float)(x), (float)(y), (float)(z), (float)(w));
}
@@ -194,6 +229,7 @@ public void convertFloat4(Float4 result) {
result.w = (float)(w);
}
+ @Translatable
public Double4 convertDouble4() {
return new Double4((double)(x), (double)(y), (double)(z), (double)(w));
}
@@ -205,6 +241,7 @@ public void convertDouble4(Double4 result) {
result.w = (double)(w);
}
+ @Translatable
public Short2 asShort2() {
return new Short2(x, y);
}
@@ -214,6 +251,7 @@ public void asShort2(Short2 result) {
result.y = y;
}
+ @Translatable
public Short3 asShort3() {
return new Short3(x, y, z);
}
@@ -224,6 +262,7 @@ public void asShort3(Short3 result) {
result.z = z;
}
+ @Translatable
public static Int4 isEqual(Short4 a, Short4 b) {
return new Int4(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0);
}
@@ -235,6 +274,7 @@ public static void isEqual(Short4 a, Short4 b, Int4 result) {
result.w = a.w == b.w? 1 : 0;
}
+ @Translatable
public static Int4 isNotEqual(Short4 a, Short4 b) {
return new Int4(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0);
}
@@ -246,6 +286,7 @@ public static void isNotEqual(Short4 a, Short4 b, Int4 result) {
result.w = a.w != b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreater(Short4 a, Short4 b) {
return new Int4(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0);
}
@@ -257,6 +298,7 @@ public static void isGreater(Short4 a, Short4 b, Int4 result) {
result.w = a.w > b.w? 1 : 0;
}
+ @Translatable
public static Int4 isGreaterEqual(Short4 a, Short4 b) {
return new Int4(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0);
}
@@ -268,6 +310,7 @@ public static void isGreaterEqual(Short4 a, Short4 b, Int4 result) {
result.w = a.w >= b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLess(Short4 a, Short4 b) {
return new Int4(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0);
}
@@ -279,6 +322,7 @@ public static void isLess(Short4 a, Short4 b, Int4 result) {
result.w = a.w < b.w? 1 : 0;
}
+ @Translatable
public static Int4 isLessEqual(Short4 a, Short4 b) {
return new Int4(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0);
}
@@ -290,6 +334,7 @@ public static void isLessEqual(Short4 a, Short4 b, Int4 result) {
result.w = a.w <= b.w? 1 : 0;
}
+ @Translatable
public static Short4 select(Short4 a, Short4 b, Int4 c) {
return new Short4(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w));
}
@@ -301,14 +346,17 @@ public static void select(Short4 a, Short4 b, Int4 c, Short4 result) {
result.w = Math.select(a.w, b.w, c.w);
}
+ @Translatable
public static int any(Short4 a) {
return (a.x != (short) 0 || a.y != (short) 0 || a.z != (short) 0 || a.w != (short) 0)? 1 : 0;
}
+ @Translatable
public static int all(Short4 a) {
return (a.x == (short) 0 || a.y == (short) 0 || a.z == (short) 0 || a.w == (short) 0)? 0 : 1;
}
+ @Translatable
public static Short4 neg(Short4 a) {
return new Short4((short)(-a.x), (short)(-a.y), (short)(-a.z), (short)(-a.w));
}
@@ -320,6 +368,7 @@ public static void neg(Short4 a, Short4 result) {
result.w = (short)(-a.w);
}
+ @Translatable
public static Short4 add(Short4 a, Short4 b) {
return new Short4((short)(a.x + b.x), (short)(a.y + b.y), (short)(a.z + b.z), (short)(a.w + b.w));
}
@@ -331,6 +380,7 @@ public static void add(Short4 a, Short4 b, Short4 result) {
result.w = (short)(a.w + b.w);
}
+ @Translatable
public static Short4 sub(Short4 a, Short4 b) {
return new Short4((short)(a.x - b.x), (short)(a.y - b.y), (short)(a.z - b.z), (short)(a.w - b.w));
}
@@ -342,6 +392,7 @@ public static void sub(Short4 a, Short4 b, Short4 result) {
result.w = (short)(a.w - b.w);
}
+ @Translatable
public static Double4 mul(Short4 a, Double4 b) {
return new Double4((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w));
}
@@ -353,6 +404,7 @@ public static void mul(Short4 a, Double4 b, Double4 result) {
result.w = (double)(a.w * b.w);
}
+ @Translatable
public static Double4 mul(Short4 a, double k) {
return new Double4((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k));
}
@@ -364,6 +416,7 @@ public static void mul(Short4 a, double k, Double4 result) {
result.w = (double)(a.w * k);
}
+ @Translatable
public static Float4 mul(Short4 a, Float4 b) {
return new Float4((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w));
}
@@ -375,6 +428,7 @@ public static void mul(Short4 a, Float4 b, Float4 result) {
result.w = (float)(a.w * b.w);
}
+ @Translatable
public static Float4 mul(Short4 a, float k) {
return new Float4((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k));
}
@@ -386,6 +440,7 @@ public static void mul(Short4 a, float k, Float4 result) {
result.w = (float)(a.w * k);
}
+ @Translatable
public static Short4 mul(Short4 a, Short4 b) {
return new Short4((short)(a.x * b.x), (short)(a.y * b.y), (short)(a.z * b.z), (short)(a.w * b.w));
}
@@ -397,6 +452,7 @@ public static void mul(Short4 a, Short4 b, Short4 result) {
result.w = (short)(a.w * b.w);
}
+ @Translatable
public static Short4 mul(Short4 a, short k) {
return new Short4((short)(a.x * k), (short)(a.y * k), (short)(a.z * k), (short)(a.w * k));
}
@@ -408,6 +464,7 @@ public static void mul(Short4 a, short k, Short4 result) {
result.w = (short)(a.w * k);
}
+ @Translatable
public static Double4 div(Short4 a, Double4 b) {
return new Double4((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w));
}
@@ -419,6 +476,7 @@ public static void div(Short4 a, Double4 b, Double4 result) {
result.w = (double)(a.w / b.w);
}
+ @Translatable
public static Double4 div(Short4 a, double k) {
return new Double4((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k));
}
@@ -430,6 +488,7 @@ public static void div(Short4 a, double k, Double4 result) {
result.w = (double)(a.w / k);
}
+ @Translatable
public static Float4 div(Short4 a, Float4 b) {
return new Float4((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w));
}
@@ -441,6 +500,7 @@ public static void div(Short4 a, Float4 b, Float4 result) {
result.w = (float)(a.w / b.w);
}
+ @Translatable
public static Float4 div(Short4 a, float k) {
return new Float4((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k));
}
@@ -452,6 +512,7 @@ public static void div(Short4 a, float k, Float4 result) {
result.w = (float)(a.w / k);
}
+ @Translatable
public static Short4 div(Short4 a, Short4 b) {
return new Short4((short)(a.x / b.x), (short)(a.y / b.y), (short)(a.z / b.z), (short)(a.w / b.w));
}
@@ -463,6 +524,7 @@ public static void div(Short4 a, Short4 b, Short4 result) {
result.w = (short)(a.w / b.w);
}
+ @Translatable
public static Short4 div(Short4 a, short k) {
return new Short4((short)(a.x / k), (short)(a.y / k), (short)(a.z / k), (short)(a.w / k));
}
@@ -474,6 +536,7 @@ public static void div(Short4 a, short k, Short4 result) {
result.w = (short)(a.w / k);
}
+ @Translatable
public static Short4 mod(Short4 a, Short4 b) {
return new Short4((short)(a.x % b.x), (short)(a.y % b.y), (short)(a.z % b.z), (short)(a.w % b.w));
}
@@ -485,6 +548,7 @@ public static void mod(Short4 a, Short4 b, Short4 result) {
result.w = (short)(a.w % b.w);
}
+ @Translatable
public static Short4 mod(Short4 a, short k) {
return new Short4((short)(a.x % k), (short)(a.y % k), (short)(a.z % k), (short)(a.w % k));
}
@@ -496,6 +560,7 @@ public static void mod(Short4 a, short k, Short4 result) {
result.w = (short)(a.w % k);
}
+ @Translatable
public static Short4 bitAnd(Short4 a, Short4 b) {
return new Short4((short)(a.x & b.x), (short)(a.y & b.y), (short)(a.z & b.z), (short)(a.w & b.w));
}
@@ -507,6 +572,7 @@ public static void bitAnd(Short4 a, Short4 b, Short4 result) {
result.w = (short)(a.w & b.w);
}
+ @Translatable
public static Short4 bitOr(Short4 a, Short4 b) {
return new Short4((short)(a.x | b.x), (short)(a.y | b.y), (short)(a.z | b.z), (short)(a.w | b.w));
}
@@ -518,6 +584,7 @@ public static void bitOr(Short4 a, Short4 b, Short4 result) {
result.w = (short)(a.w | b.w);
}
+ @Translatable
public static Short4 bitXor(Short4 a, Short4 b) {
return new Short4((short)(a.x ^ b.x), (short)(a.y ^ b.y), (short)(a.z ^ b.z), (short)(a.w ^ b.w));
}
@@ -529,6 +596,7 @@ public static void bitXor(Short4 a, Short4 b, Short4 result) {
result.w = (short)(a.w ^ b.w);
}
+ @Translatable
public static Short4 bitNot(Short4 a) {
return new Short4((short)(~a.x), (short)(~a.y), (short)(~a.z), (short)(~a.w));
}
@@ -540,6 +608,7 @@ public static void bitNot(Short4 a, Short4 result) {
result.w = (short)(~a.w);
}
+ @Translatable
public static Short4 abs(Short4 a) {
return new Short4(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w));
}
@@ -551,6 +620,7 @@ public static void abs(Short4 a, Short4 result) {
result.w = Math.abs(a.w);
}
+ @Translatable
public static Short4 clamp(Short4 a, Short4 b, Short4 c) {
return new Short4(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w));
}
@@ -562,6 +632,7 @@ public static void clamp(Short4 a, Short4 b, Short4 c, Short4 result) {
result.w = Math.clamp(a.w, b.w, c.w);
}
+ @Translatable
public static Short4 max(Short4 a, Short4 b) {
return new Short4(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w));
}
@@ -573,6 +644,7 @@ public static void max(Short4 a, Short4 b, Short4 result) {
result.w = Math.max(a.w, b.w);
}
+ @Translatable
public static Short4 maxMag(Short4 a, Short4 b) {
return new Short4(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w));
}
@@ -584,6 +656,7 @@ public static void maxMag(Short4 a, Short4 b, Short4 result) {
result.w = Math.maxMag(a.w, b.w);
}
+ @Translatable
public static Short4 min(Short4 a, Short4 b) {
return new Short4(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w));
}
@@ -595,6 +668,7 @@ public static void min(Short4 a, Short4 b, Short4 result) {
result.w = Math.min(a.w, b.w);
}
+ @Translatable
public static Short4 minMag(Short4 a, Short4 b) {
return new Short4(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w));
}
@@ -606,6 +680,7 @@ public static void minMag(Short4 a, Short4 b, Short4 result) {
result.w = Math.minMag(a.w, b.w);
}
+ @Translatable
public static Short4 mix(Short4 a, Short4 b, Short4 c) {
return new Short4(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w));
}
@@ -617,6 +692,7 @@ public static void mix(Short4 a, Short4 b, Short4 c, Short4 result) {
result.w = Math.mix(a.w, b.w, c.w);
}
+ @Translatable
public static Short4 clamp(Short4 v, short min, short max) {
return new Short4(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max));
}
@@ -628,6 +704,7 @@ public static void clamp(Short4 v, short min, short max, Short4 result) {
result.w = Math.clamp(v.w, min, max);
}
+ @Translatable
public static Short4 max(Short4 x, short y) {
return new Short4(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y));
}
@@ -639,6 +716,7 @@ public static void max(Short4 x, short y, Short4 result) {
result.w = Math.max(x.w, y);
}
+ @Translatable
public static Short4 min(Short4 x, short y) {
return new Short4(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y));
}
@@ -650,6 +728,7 @@ public static void min(Short4 x, short y, Short4 result) {
result.w = Math.min(x.w, y);
}
+ @Translatable
public static Short4 mix(Short4 x, Short4 y, short a) {
return new Short4(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a));
}
@@ -661,6 +740,7 @@ public static void mix(Short4 x, Short4 y, short a, Short4 result) {
result.w = Math.mix(x.w, y.w, a);
}
+ @Translatable
public static Short4 absDiff(Short4 a, Short4 b) {
return new Short4(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z), Math.absDiff(a.w, b.w));
}
@@ -672,6 +752,7 @@ public static void absDiff(Short4 a, Short4 b, Short4 result) {
result.w = Math.absDiff(a.w, b.w);
}
+ @Translatable
public static Short4 addSat(Short4 a, Short4 b) {
return new Short4(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z), Math.addSat(a.w, b.w));
}
@@ -683,6 +764,7 @@ public static void addSat(Short4 a, Short4 b, Short4 result) {
result.w = Math.addSat(a.w, b.w);
}
+ @Translatable
public static Short4 clz(Short4 a) {
return new Short4(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z), Math.clz(a.w));
}
@@ -694,6 +776,7 @@ public static void clz(Short4 a, Short4 result) {
result.w = Math.clz(a.w);
}
+ @Translatable
public static Short4 hadd(Short4 a, Short4 b) {
return new Short4(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z), Math.hadd(a.w, b.w));
}
@@ -705,6 +788,7 @@ public static void hadd(Short4 a, Short4 b, Short4 result) {
result.w = Math.hadd(a.w, b.w);
}
+ @Translatable
public static Short4 madHi(Short4 a, Short4 b, Short4 c) {
return new Short4(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z), Math.madHi(a.w, b.w, c.w));
}
@@ -716,6 +800,7 @@ public static void madHi(Short4 a, Short4 b, Short4 c, Short4 result) {
result.w = Math.madHi(a.w, b.w, c.w);
}
+ @Translatable
public static Short4 madSat(Short4 a, Short4 b, Short4 c) {
return new Short4(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z), Math.madSat(a.w, b.w, c.w));
}
@@ -727,6 +812,7 @@ public static void madSat(Short4 a, Short4 b, Short4 c, Short4 result) {
result.w = Math.madSat(a.w, b.w, c.w);
}
+ @Translatable
public static Short4 mulHi(Short4 a, Short4 b) {
return new Short4(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z), Math.mulHi(a.w, b.w));
}
@@ -738,6 +824,7 @@ public static void mulHi(Short4 a, Short4 b, Short4 result) {
result.w = Math.mulHi(a.w, b.w);
}
+ @Translatable
public static Short4 rhadd(Short4 a, Short4 b) {
return new Short4(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z), Math.rhadd(a.w, b.w));
}
@@ -749,6 +836,7 @@ public static void rhadd(Short4 a, Short4 b, Short4 result) {
result.w = Math.rhadd(a.w, b.w);
}
+ @Translatable
public static Short4 rotate(Short4 a, Short4 b) {
return new Short4(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z), Math.rotate(a.w, b.w));
}
@@ -760,6 +848,7 @@ public static void rotate(Short4 a, Short4 b, Short4 result) {
result.w = Math.rotate(a.w, b.w);
}
+ @Translatable
public static Short4 subSat(Short4 a, Short4 b) {
return new Short4(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z), Math.subSat(a.w, b.w));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short8.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short8.java
index 64953d1..a569887 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short8.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/Short8.java
@@ -27,19 +27,30 @@
import es.ull.pcg.hpc.fancier.Math;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Short8 {
+ @Translatable
public short x;
+ @Translatable
public short y;
+ @Translatable
public short z;
+ @Translatable
public short w;
+ @Translatable
public short[] s = new short[4];
+ @Translatable
public Short8() {}
+ @Translatable
public Short8(short x, short y, short z, short w, short s0, short s1, short s2, short s3) {
set(x, y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(short x, short y, short z, short w, short s0, short s1, short s2, short s3) {
this.x = x;
this.y = y;
@@ -51,882 +62,1102 @@ public void set(short x, short y, short z, short w, short s0, short s1, short s2
this.s[3] = s3;
}
+ @Translatable
public Short8(short v) {
this(v, v, v, v, v, v, v, v);
}
+ @Translatable
public void set(short v) {
set(v, v, v, v, v, v, v, v);
}
+ @Translatable
public Short8(short x, short y, short z, short w, short s0, short s1, Short2 vec1) {
this(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public void set(short x, short y, short z, short w, short s0, short s1, Short2 vec1) {
set(x, y, z, w, s0, s1, vec1.x, vec1.y);
}
+ @Translatable
public Short8(short x, short y, short z, short w, short s0, Short2 vec1, short s3) {
this(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public void set(short x, short y, short z, short w, short s0, Short2 vec1, short s3) {
set(x, y, z, w, s0, vec1.x, vec1.y, s3);
}
+ @Translatable
public Short8(short x, short y, short z, short w, short s0, Short3 vec1) {
this(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public void set(short x, short y, short z, short w, short s0, Short3 vec1) {
set(x, y, z, w, s0, vec1.x, vec1.y, vec1.z);
}
+ @Translatable
public Short8(short x, short y, short z, short w, Short2 vec1, short s2, short s3) {
this(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public void set(short x, short y, short z, short w, Short2 vec1, short s2, short s3) {
set(x, y, z, w, vec1.x, vec1.y, s2, s3);
}
+ @Translatable
public Short8(short x, short y, short z, short w, Short2 vec1, Short2 vec2) {
this(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, short y, short z, short w, Short2 vec1, Short2 vec2) {
set(x, y, z, w, vec1.x, vec1.y, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, short y, short z, short w, Short3 vec1, short s3) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public void set(short x, short y, short z, short w, Short3 vec1, short s3) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, s3);
}
+ @Translatable
public Short8(short x, short y, short z, short w, Short4 vec1) {
this(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public void set(short x, short y, short z, short w, Short4 vec1) {
set(x, y, z, w, vec1.x, vec1.y, vec1.z, vec1.w);
}
+ @Translatable
public Short8(short x, short y, short z, Short2 vec1, short s1, short s2, short s3) {
this(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public void set(short x, short y, short z, Short2 vec1, short s1, short s2, short s3) {
set(x, y, z, vec1.x, vec1.y, s1, s2, s3);
}
+ @Translatable
public Short8(short x, short y, short z, Short2 vec1, short s1, Short2 vec2) {
this(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, short y, short z, Short2 vec1, short s1, Short2 vec2) {
set(x, y, z, vec1.x, vec1.y, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, short y, short z, Short2 vec1, Short2 vec2, short s3) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(short x, short y, short z, Short2 vec1, Short2 vec2, short s3) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(short x, short y, short z, Short2 vec1, Short3 vec2) {
this(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(short x, short y, short z, Short2 vec1, Short3 vec2) {
set(x, y, z, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(short x, short y, short z, Short3 vec1, short s2, short s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public void set(short x, short y, short z, Short3 vec1, short s2, short s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, s2, s3);
}
+ @Translatable
public Short8(short x, short y, short z, Short3 vec1, Short2 vec2) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, short y, short z, Short3 vec1, Short2 vec2) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, short y, short z, Short4 vec1, short s3) {
this(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public void set(short x, short y, short z, Short4 vec1, short s3) {
set(x, y, z, vec1.x, vec1.y, vec1.z, vec1.w, s3);
}
+ @Translatable
public Short8(short x, short y, Short2 vec1, short s0, short s1, short s2, short s3) {
this(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(short x, short y, Short2 vec1, short s0, short s1, short s2, short s3) {
set(x, y, vec1.x, vec1.y, s0, s1, s2, s3);
}
+ @Translatable
public Short8(short x, short y, Short2 vec1, short s0, short s1, Short2 vec2) {
this(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, short y, Short2 vec1, short s0, short s1, Short2 vec2) {
set(x, y, vec1.x, vec1.y, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, short y, Short2 vec1, short s0, Short2 vec2, short s3) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(short x, short y, Short2 vec1, short s0, Short2 vec2, short s3) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(short x, short y, Short2 vec1, short s0, Short3 vec2) {
this(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(short x, short y, Short2 vec1, short s0, Short3 vec2) {
set(x, y, vec1.x, vec1.y, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(short x, short y, Short2 vec1, Short2 vec2, short s2, short s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(short x, short y, Short2 vec1, Short2 vec2, short s2, short s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Short8(short x, short y, Short2 vec1, Short2 vec2, Short2 vec3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(short x, short y, Short2 vec1, Short2 vec2, Short2 vec3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Short8(short x, short y, Short2 vec1, Short3 vec2, short s3) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(short x, short y, Short2 vec1, Short3 vec2, short s3) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Short8(short x, short y, Short2 vec1, Short4 vec2) {
this(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(short x, short y, Short2 vec1, Short4 vec2) {
set(x, y, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Short8(short x, short y, Short3 vec1, short s1, short s2, short s3) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public void set(short x, short y, Short3 vec1, short s1, short s2, short s3) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, s2, s3);
}
+ @Translatable
public Short8(short x, short y, Short3 vec1, short s1, Short2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, short y, Short3 vec1, short s1, Short2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, short y, Short3 vec1, Short2 vec2, short s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(short x, short y, Short3 vec1, Short2 vec2, short s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(short x, short y, Short3 vec1, Short3 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(short x, short y, Short3 vec1, Short3 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(short x, short y, Short4 vec1, short s2, short s3) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public void set(short x, short y, Short4 vec1, short s2, short s3) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, s2, s3);
}
+ @Translatable
public Short8(short x, short y, Short4 vec1, Short2 vec2) {
this(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, short y, Short4 vec1, Short2 vec2) {
set(x, y, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, Short2 vec1, short w, short s0, short s1, short s2, short s3) {
this(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(short x, Short2 vec1, short w, short s0, short s1, short s2, short s3) {
set(x, vec1.x, vec1.y, w, s0, s1, s2, s3);
}
+ @Translatable
public Short8(short x, Short2 vec1, short w, short s0, short s1, Short2 vec2) {
this(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, Short2 vec1, short w, short s0, short s1, Short2 vec2) {
set(x, vec1.x, vec1.y, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, Short2 vec1, short w, short s0, Short2 vec2, short s3) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(short x, Short2 vec1, short w, short s0, Short2 vec2, short s3) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(short x, Short2 vec1, short w, short s0, Short3 vec2) {
this(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(short x, Short2 vec1, short w, short s0, Short3 vec2) {
set(x, vec1.x, vec1.y, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(short x, Short2 vec1, short w, Short2 vec2, short s2, short s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(short x, Short2 vec1, short w, Short2 vec2, short s2, short s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Short8(short x, Short2 vec1, short w, Short2 vec2, Short2 vec3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(short x, Short2 vec1, short w, Short2 vec2, Short2 vec3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Short8(short x, Short2 vec1, short w, Short3 vec2, short s3) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(short x, Short2 vec1, short w, Short3 vec2, short s3) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Short8(short x, Short2 vec1, short w, Short4 vec2) {
this(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(short x, Short2 vec1, short w, Short4 vec2) {
set(x, vec1.x, vec1.y, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Short8(short x, Short2 vec1, Short2 vec2, short s1, short s2, short s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(short x, Short2 vec1, Short2 vec2, short s1, short s2, short s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Short8(short x, Short2 vec1, Short2 vec2, short s1, Short2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(short x, Short2 vec1, Short2 vec2, short s1, Short2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Short8(short x, Short2 vec1, Short2 vec2, Short2 vec3, short s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(short x, Short2 vec1, Short2 vec2, Short2 vec3, short s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Short8(short x, Short2 vec1, Short2 vec2, Short3 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(short x, Short2 vec1, Short2 vec2, Short3 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Short8(short x, Short2 vec1, Short3 vec2, short s2, short s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(short x, Short2 vec1, Short3 vec2, short s2, short s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Short8(short x, Short2 vec1, Short3 vec2, Short2 vec3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(short x, Short2 vec1, Short3 vec2, Short2 vec3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Short8(short x, Short2 vec1, Short4 vec2, short s3) {
this(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(short x, Short2 vec1, Short4 vec2, short s3) {
set(x, vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Short8(short x, Short3 vec1, short s0, short s1, short s2, short s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public void set(short x, Short3 vec1, short s0, short s1, short s2, short s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, s2, s3);
}
+ @Translatable
public Short8(short x, Short3 vec1, short s0, short s1, Short2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, Short3 vec1, short s0, short s1, Short2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, Short3 vec1, short s0, Short2 vec2, short s3) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(short x, Short3 vec1, short s0, Short2 vec2, short s3) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(short x, Short3 vec1, short s0, Short3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(short x, Short3 vec1, short s0, Short3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(short x, Short3 vec1, Short2 vec2, short s2, short s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(short x, Short3 vec1, Short2 vec2, short s2, short s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Short8(short x, Short3 vec1, Short2 vec2, Short2 vec3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(short x, Short3 vec1, Short2 vec2, Short2 vec3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Short8(short x, Short3 vec1, Short3 vec2, short s3) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(short x, Short3 vec1, Short3 vec2, short s3) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Short8(short x, Short3 vec1, Short4 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(short x, Short3 vec1, Short4 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Short8(short x, Short4 vec1, short s1, short s2, short s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public void set(short x, Short4 vec1, short s1, short s2, short s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, s2, s3);
}
+ @Translatable
public Short8(short x, Short4 vec1, short s1, Short2 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(short x, Short4 vec1, short s1, Short2 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(short x, Short4 vec1, Short2 vec2, short s3) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(short x, Short4 vec1, Short2 vec2, short s3) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(short x, Short4 vec1, Short3 vec2) {
this(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(short x, Short4 vec1, Short3 vec2) {
set(x, vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(Short2 vec1, short z, short w, short s0, short s1, short s2, short s3) {
this(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Short2 vec1, short z, short w, short s0, short s1, short s2, short s3) {
set(vec1.x, vec1.y, z, w, s0, s1, s2, s3);
}
+ @Translatable
public Short8(Short2 vec1, short z, short w, short s0, short s1, Short2 vec2) {
this(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Short2 vec1, short z, short w, short s0, short s1, Short2 vec2) {
set(vec1.x, vec1.y, z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(Short2 vec1, short z, short w, short s0, Short2 vec2, short s3) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Short2 vec1, short z, short w, short s0, Short2 vec2, short s3) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(Short2 vec1, short z, short w, short s0, Short3 vec2) {
this(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Short2 vec1, short z, short w, short s0, Short3 vec2) {
set(vec1.x, vec1.y, z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(Short2 vec1, short z, short w, Short2 vec2, short s2, short s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Short2 vec1, short z, short w, Short2 vec2, short s2, short s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Short8(Short2 vec1, short z, short w, Short2 vec2, Short2 vec3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short2 vec1, short z, short w, Short2 vec2, Short2 vec3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short2 vec1, short z, short w, Short3 vec2, short s3) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Short2 vec1, short z, short w, Short3 vec2, short s3) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Short8(Short2 vec1, short z, short w, Short4 vec2) {
this(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Short2 vec1, short z, short w, Short4 vec2) {
set(vec1.x, vec1.y, z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Short8(Short2 vec1, short z, Short2 vec2, short s1, short s2, short s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Short2 vec1, short z, Short2 vec2, short s1, short s2, short s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Short8(Short2 vec1, short z, Short2 vec2, short s1, Short2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short2 vec1, short z, Short2 vec2, short s1, Short2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short2 vec1, short z, Short2 vec2, Short2 vec3, short s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Short2 vec1, short z, Short2 vec2, Short2 vec3, short s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Short8(Short2 vec1, short z, Short2 vec2, Short3 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Short2 vec1, short z, Short2 vec2, Short3 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Short8(Short2 vec1, short z, Short3 vec2, short s2, short s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Short2 vec1, short z, Short3 vec2, short s2, short s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Short8(Short2 vec1, short z, Short3 vec2, Short2 vec3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short2 vec1, short z, Short3 vec2, Short2 vec3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short2 vec1, short z, Short4 vec2, short s3) {
this(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Short2 vec1, short z, Short4 vec2, short s3) {
set(vec1.x, vec1.y, z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Short8(Short2 vec1, Short2 vec2, short s0, short s1, short s2, short s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2, short s0, short s1, short s2, short s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, s2, s3);
}
+ @Translatable
public Short8(Short2 vec1, Short2 vec2, short s0, short s1, Short2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2, short s0, short s1, Short2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, s1, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short2 vec1, Short2 vec2, short s0, Short2 vec3, short s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2, short s0, Short2 vec3, short s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, s3);
}
+ @Translatable
public Short8(Short2 vec1, Short2 vec2, short s0, Short3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2, short s0, Short3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, s0, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Short8(Short2 vec1, Short2 vec2, Short2 vec3, short s2, short s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2, Short2 vec3, short s2, short s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, s2, s3);
}
+ @Translatable
public Short8(Short2 vec1, Short2 vec2, Short2 vec3, Short2 vec4) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2, Short2 vec3, Short2 vec4) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec4.x, vec4.y);
}
+ @Translatable
public Short8(Short2 vec1, Short2 vec2, Short3 vec3, short s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2, Short3 vec3, short s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, s3);
}
+ @Translatable
public Short8(Short2 vec1, Short2 vec2, Short4 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public void set(Short2 vec1, Short2 vec2, Short4 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z, vec3.w);
}
+ @Translatable
public Short8(Short2 vec1, Short3 vec2, short s1, short s2, short s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public void set(Short2 vec1, Short3 vec2, short s1, short s2, short s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, s2, s3);
}
+ @Translatable
public Short8(Short2 vec1, Short3 vec2, short s1, Short2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short2 vec1, Short3 vec2, short s1, Short2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, s1, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short2 vec1, Short3 vec2, Short2 vec3, short s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Short2 vec1, Short3 vec2, Short2 vec3, short s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, s3);
}
+ @Translatable
public Short8(Short2 vec1, Short3 vec2, Short3 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Short2 vec1, Short3 vec2, Short3 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Short8(Short2 vec1, Short4 vec2, short s2, short s3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public void set(Short2 vec1, Short4 vec2, short s2, short s3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, s2, s3);
}
+ @Translatable
public Short8(Short2 vec1, Short4 vec2, Short2 vec3) {
this(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short2 vec1, Short4 vec2, Short2 vec3) {
set(vec1.x, vec1.y, vec2.x, vec2.y, vec2.z, vec2.w, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short3 vec1, short w, short s0, short s1, short s2, short s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Short3 vec1, short w, short s0, short s1, short s2, short s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, s2, s3);
}
+ @Translatable
public Short8(Short3 vec1, short w, short s0, short s1, Short2 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Short3 vec1, short w, short s0, short s1, Short2 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(Short3 vec1, short w, short s0, Short2 vec2, short s3) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Short3 vec1, short w, short s0, Short2 vec2, short s3) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(Short3 vec1, short w, short s0, Short3 vec2) {
this(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Short3 vec1, short w, short s0, Short3 vec2) {
set(vec1.x, vec1.y, vec1.z, w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(Short3 vec1, short w, Short2 vec2, short s2, short s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Short3 vec1, short w, Short2 vec2, short s2, short s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Short8(Short3 vec1, short w, Short2 vec2, Short2 vec3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short3 vec1, short w, Short2 vec2, Short2 vec3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short3 vec1, short w, Short3 vec2, short s3) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Short3 vec1, short w, Short3 vec2, short s3) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Short8(Short3 vec1, short w, Short4 vec2) {
this(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Short3 vec1, short w, Short4 vec2) {
set(vec1.x, vec1.y, vec1.z, w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Short8(Short3 vec1, Short2 vec2, short s1, short s2, short s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public void set(Short3 vec1, Short2 vec2, short s1, short s2, short s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, s2, s3);
}
+ @Translatable
public Short8(Short3 vec1, Short2 vec2, short s1, Short2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short3 vec1, Short2 vec2, short s1, Short2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, s1, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short3 vec1, Short2 vec2, Short2 vec3, short s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public void set(Short3 vec1, Short2 vec2, Short2 vec3, short s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, s3);
}
+ @Translatable
public Short8(Short3 vec1, Short2 vec2, Short3 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public void set(Short3 vec1, Short2 vec2, Short3 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec3.x, vec3.y, vec3.z);
}
+ @Translatable
public Short8(Short3 vec1, Short3 vec2, short s2, short s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public void set(Short3 vec1, Short3 vec2, short s2, short s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, s2, s3);
}
+ @Translatable
public Short8(Short3 vec1, Short3 vec2, Short2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short3 vec1, Short3 vec2, Short2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short3 vec1, Short4 vec2, short s3) {
this(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public void set(Short3 vec1, Short4 vec2, short s3) {
set(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z, vec2.w, s3);
}
+ @Translatable
public Short8(Short4 vec1, short s0, short s1, short s2, short s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public void set(Short4 vec1, short s0, short s1, short s2, short s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, s2, s3);
}
+ @Translatable
public Short8(Short4 vec1, short s0, short s1, Short2 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public void set(Short4 vec1, short s0, short s1, Short2 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, s1, vec2.x, vec2.y);
}
+ @Translatable
public Short8(Short4 vec1, short s0, Short2 vec2, short s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public void set(Short4 vec1, short s0, Short2 vec2, short s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, s3);
}
+ @Translatable
public Short8(Short4 vec1, short s0, Short3 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public void set(Short4 vec1, short s0, Short3 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, s0, vec2.x, vec2.y, vec2.z);
}
+ @Translatable
public Short8(Short4 vec1, Short2 vec2, short s2, short s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public void set(Short4 vec1, Short2 vec2, short s2, short s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, s2, s3);
}
+ @Translatable
public Short8(Short4 vec1, Short2 vec2, Short2 vec3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public void set(Short4 vec1, Short2 vec2, Short2 vec3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec3.x, vec3.y);
}
+ @Translatable
public Short8(Short4 vec1, Short3 vec2, short s3) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public void set(Short4 vec1, Short3 vec2, short s3) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, s3);
}
+ @Translatable
public Short8(Short4 vec1, Short4 vec2) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public void set(Short4 vec1, Short4 vec2) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec2.x, vec2.y, vec2.z, vec2.w);
}
+ @Translatable
public Short8(Short8 vec1) {
this(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public void set(Short8 vec1) {
set(vec1.x, vec1.y, vec1.z, vec1.w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
}
+ @Translatable
public Short8 value() {
return new Short8(this);
}
+ @Translatable
public Short4 lo() {
return new Short4(x, y, z, w);
}
@@ -938,6 +1169,7 @@ public void lo(Short4 result) {
result.w = w;
}
+ @Translatable
public Short4 hi() {
return new Short4(s[0], s[1], s[2], s[3]);
}
@@ -949,6 +1181,7 @@ public void hi(Short4 result) {
result.w = s[3];
}
+ @Translatable
public Short4 odd() {
return new Short4(y, w, s[1], s[3]);
}
@@ -960,6 +1193,7 @@ public void odd(Short4 result) {
result.w = s[3];
}
+ @Translatable
public Short4 even() {
return new Short4(x, z, s[0], s[2]);
}
@@ -971,6 +1205,7 @@ public void even(Short4 result) {
result.w = s[2];
}
+ @Translatable
public Byte8 convertByte8() {
return new Byte8((byte)(x), (byte)(y), (byte)(z), (byte)(w), (byte)(s[0]), (byte)(s[1]), (byte)(s[2]), (byte)(s[3]));
}
@@ -986,6 +1221,7 @@ public void convertByte8(Byte8 result) {
result.s[3] = (byte)(s[3]);
}
+ @Translatable
public Int8 convertInt8() {
return new Int8((int)(x), (int)(y), (int)(z), (int)(w), (int)(s[0]), (int)(s[1]), (int)(s[2]), (int)(s[3]));
}
@@ -1001,6 +1237,7 @@ public void convertInt8(Int8 result) {
result.s[3] = (int)(s[3]);
}
+ @Translatable
public Long8 convertLong8() {
return new Long8((long)(x), (long)(y), (long)(z), (long)(w), (long)(s[0]), (long)(s[1]), (long)(s[2]), (long)(s[3]));
}
@@ -1016,6 +1253,7 @@ public void convertLong8(Long8 result) {
result.s[3] = (long)(s[3]);
}
+ @Translatable
public Float8 convertFloat8() {
return new Float8((float)(x), (float)(y), (float)(z), (float)(w), (float)(s[0]), (float)(s[1]), (float)(s[2]), (float)(s[3]));
}
@@ -1031,6 +1269,7 @@ public void convertFloat8(Float8 result) {
result.s[3] = (float)(s[3]);
}
+ @Translatable
public Double8 convertDouble8() {
return new Double8((double)(x), (double)(y), (double)(z), (double)(w), (double)(s[0]), (double)(s[1]), (double)(s[2]), (double)(s[3]));
}
@@ -1046,6 +1285,7 @@ public void convertDouble8(Double8 result) {
result.s[3] = (double)(s[3]);
}
+ @Translatable
public Short2 asShort2() {
return new Short2(x, y);
}
@@ -1055,6 +1295,7 @@ public void asShort2(Short2 result) {
result.y = y;
}
+ @Translatable
public Short3 asShort3() {
return new Short3(x, y, z);
}
@@ -1065,6 +1306,7 @@ public void asShort3(Short3 result) {
result.z = z;
}
+ @Translatable
public Short4 asShort4() {
return new Short4(x, y, z, w);
}
@@ -1076,6 +1318,7 @@ public void asShort4(Short4 result) {
result.w = w;
}
+ @Translatable
public static Int8 isEqual(Short8 a, Short8 b) {
return new Int8(a.x == b.x? 1 : 0, a.y == b.y? 1 : 0, a.z == b.z? 1 : 0, a.w == b.w? 1 : 0, a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
}
@@ -1091,6 +1334,7 @@ public static void isEqual(Short8 a, Short8 b, Int8 result) {
result.s[3] = a.s[3] == b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isNotEqual(Short8 a, Short8 b) {
return new Int8(a.x != b.x? 1 : 0, a.y != b.y? 1 : 0, a.z != b.z? 1 : 0, a.w != b.w? 1 : 0, a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
}
@@ -1106,6 +1350,7 @@ public static void isNotEqual(Short8 a, Short8 b, Int8 result) {
result.s[3] = a.s[3] != b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreater(Short8 a, Short8 b) {
return new Int8(a.x > b.x? 1 : 0, a.y > b.y? 1 : 0, a.z > b.z? 1 : 0, a.w > b.w? 1 : 0, a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
}
@@ -1121,6 +1366,7 @@ public static void isGreater(Short8 a, Short8 b, Int8 result) {
result.s[3] = a.s[3] > b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isGreaterEqual(Short8 a, Short8 b) {
return new Int8(a.x >= b.x? 1 : 0, a.y >= b.y? 1 : 0, a.z >= b.z? 1 : 0, a.w >= b.w? 1 : 0, a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
}
@@ -1136,6 +1382,7 @@ public static void isGreaterEqual(Short8 a, Short8 b, Int8 result) {
result.s[3] = a.s[3] >= b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLess(Short8 a, Short8 b) {
return new Int8(a.x < b.x? 1 : 0, a.y < b.y? 1 : 0, a.z < b.z? 1 : 0, a.w < b.w? 1 : 0, a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
}
@@ -1151,6 +1398,7 @@ public static void isLess(Short8 a, Short8 b, Int8 result) {
result.s[3] = a.s[3] < b.s[3]? 1 : 0;
}
+ @Translatable
public static Int8 isLessEqual(Short8 a, Short8 b) {
return new Int8(a.x <= b.x? 1 : 0, a.y <= b.y? 1 : 0, a.z <= b.z? 1 : 0, a.w <= b.w? 1 : 0, a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
}
@@ -1166,6 +1414,7 @@ public static void isLessEqual(Short8 a, Short8 b, Int8 result) {
result.s[3] = a.s[3] <= b.s[3]? 1 : 0;
}
+ @Translatable
public static Short8 select(Short8 a, Short8 b, Int8 c) {
return new Short8(Math.select(a.x, b.x, c.x), Math.select(a.y, b.y, c.y), Math.select(a.z, b.z, c.z), Math.select(a.w, b.w, c.w), Math.select(a.s[0], b.s[0], c.s[0]), Math.select(a.s[1], b.s[1], c.s[1]), Math.select(a.s[2], b.s[2], c.s[2]), Math.select(a.s[3], b.s[3], c.s[3]));
}
@@ -1181,14 +1430,17 @@ public static void select(Short8 a, Short8 b, Int8 c, Short8 result) {
result.s[3] = Math.select(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static int any(Short8 a) {
return (a.x != (short) 0 || a.y != (short) 0 || a.z != (short) 0 || a.w != (short) 0 || a.s[0] != (short) 0 || a.s[1] != (short) 0 || a.s[2] != (short) 0 || a.s[3] != (short) 0)? 1 : 0;
}
+ @Translatable
public static int all(Short8 a) {
return (a.x == (short) 0 || a.y == (short) 0 || a.z == (short) 0 || a.w == (short) 0 || a.s[0] == (short) 0 || a.s[1] == (short) 0 || a.s[2] == (short) 0 || a.s[3] == (short) 0)? 0 : 1;
}
+ @Translatable
public static Short8 neg(Short8 a) {
return new Short8((short)(-a.x), (short)(-a.y), (short)(-a.z), (short)(-a.w), (short)(-a.s[0]), (short)(-a.s[1]), (short)(-a.s[2]), (short)(-a.s[3]));
}
@@ -1204,6 +1456,7 @@ public static void neg(Short8 a, Short8 result) {
result.s[3] = (short)(-a.s[3]);
}
+ @Translatable
public static Short8 add(Short8 a, Short8 b) {
return new Short8((short)(a.x + b.x), (short)(a.y + b.y), (short)(a.z + b.z), (short)(a.w + b.w), (short)(a.s[0] + b.s[0]), (short)(a.s[1] + b.s[1]), (short)(a.s[2] + b.s[2]), (short)(a.s[3] + b.s[3]));
}
@@ -1219,6 +1472,7 @@ public static void add(Short8 a, Short8 b, Short8 result) {
result.s[3] = (short)(a.s[3] + b.s[3]);
}
+ @Translatable
public static Short8 sub(Short8 a, Short8 b) {
return new Short8((short)(a.x - b.x), (short)(a.y - b.y), (short)(a.z - b.z), (short)(a.w - b.w), (short)(a.s[0] - b.s[0]), (short)(a.s[1] - b.s[1]), (short)(a.s[2] - b.s[2]), (short)(a.s[3] - b.s[3]));
}
@@ -1234,6 +1488,7 @@ public static void sub(Short8 a, Short8 b, Short8 result) {
result.s[3] = (short)(a.s[3] - b.s[3]);
}
+ @Translatable
public static Double8 mul(Short8 a, Double8 b) {
return new Double8((double)(a.x * b.x), (double)(a.y * b.y), (double)(a.z * b.z), (double)(a.w * b.w), (double)(a.s[0] * b.s[0]), (double)(a.s[1] * b.s[1]), (double)(a.s[2] * b.s[2]), (double)(a.s[3] * b.s[3]));
}
@@ -1249,6 +1504,7 @@ public static void mul(Short8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Double8 mul(Short8 a, double k) {
return new Double8((double)(a.x * k), (double)(a.y * k), (double)(a.z * k), (double)(a.w * k), (double)(a.s[0] * k), (double)(a.s[1] * k), (double)(a.s[2] * k), (double)(a.s[3] * k));
}
@@ -1264,6 +1520,7 @@ public static void mul(Short8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] * k);
}
+ @Translatable
public static Float8 mul(Short8 a, Float8 b) {
return new Float8((float)(a.x * b.x), (float)(a.y * b.y), (float)(a.z * b.z), (float)(a.w * b.w), (float)(a.s[0] * b.s[0]), (float)(a.s[1] * b.s[1]), (float)(a.s[2] * b.s[2]), (float)(a.s[3] * b.s[3]));
}
@@ -1279,6 +1536,7 @@ public static void mul(Short8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Float8 mul(Short8 a, float k) {
return new Float8((float)(a.x * k), (float)(a.y * k), (float)(a.z * k), (float)(a.w * k), (float)(a.s[0] * k), (float)(a.s[1] * k), (float)(a.s[2] * k), (float)(a.s[3] * k));
}
@@ -1294,6 +1552,7 @@ public static void mul(Short8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] * k);
}
+ @Translatable
public static Short8 mul(Short8 a, Short8 b) {
return new Short8((short)(a.x * b.x), (short)(a.y * b.y), (short)(a.z * b.z), (short)(a.w * b.w), (short)(a.s[0] * b.s[0]), (short)(a.s[1] * b.s[1]), (short)(a.s[2] * b.s[2]), (short)(a.s[3] * b.s[3]));
}
@@ -1309,6 +1568,7 @@ public static void mul(Short8 a, Short8 b, Short8 result) {
result.s[3] = (short)(a.s[3] * b.s[3]);
}
+ @Translatable
public static Short8 mul(Short8 a, short k) {
return new Short8((short)(a.x * k), (short)(a.y * k), (short)(a.z * k), (short)(a.w * k), (short)(a.s[0] * k), (short)(a.s[1] * k), (short)(a.s[2] * k), (short)(a.s[3] * k));
}
@@ -1324,6 +1584,7 @@ public static void mul(Short8 a, short k, Short8 result) {
result.s[3] = (short)(a.s[3] * k);
}
+ @Translatable
public static Double8 div(Short8 a, Double8 b) {
return new Double8((double)(a.x / b.x), (double)(a.y / b.y), (double)(a.z / b.z), (double)(a.w / b.w), (double)(a.s[0] / b.s[0]), (double)(a.s[1] / b.s[1]), (double)(a.s[2] / b.s[2]), (double)(a.s[3] / b.s[3]));
}
@@ -1339,6 +1600,7 @@ public static void div(Short8 a, Double8 b, Double8 result) {
result.s[3] = (double)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Double8 div(Short8 a, double k) {
return new Double8((double)(a.x / k), (double)(a.y / k), (double)(a.z / k), (double)(a.w / k), (double)(a.s[0] / k), (double)(a.s[1] / k), (double)(a.s[2] / k), (double)(a.s[3] / k));
}
@@ -1354,6 +1616,7 @@ public static void div(Short8 a, double k, Double8 result) {
result.s[3] = (double)(a.s[3] / k);
}
+ @Translatable
public static Float8 div(Short8 a, Float8 b) {
return new Float8((float)(a.x / b.x), (float)(a.y / b.y), (float)(a.z / b.z), (float)(a.w / b.w), (float)(a.s[0] / b.s[0]), (float)(a.s[1] / b.s[1]), (float)(a.s[2] / b.s[2]), (float)(a.s[3] / b.s[3]));
}
@@ -1369,6 +1632,7 @@ public static void div(Short8 a, Float8 b, Float8 result) {
result.s[3] = (float)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Float8 div(Short8 a, float k) {
return new Float8((float)(a.x / k), (float)(a.y / k), (float)(a.z / k), (float)(a.w / k), (float)(a.s[0] / k), (float)(a.s[1] / k), (float)(a.s[2] / k), (float)(a.s[3] / k));
}
@@ -1384,6 +1648,7 @@ public static void div(Short8 a, float k, Float8 result) {
result.s[3] = (float)(a.s[3] / k);
}
+ @Translatable
public static Short8 div(Short8 a, Short8 b) {
return new Short8((short)(a.x / b.x), (short)(a.y / b.y), (short)(a.z / b.z), (short)(a.w / b.w), (short)(a.s[0] / b.s[0]), (short)(a.s[1] / b.s[1]), (short)(a.s[2] / b.s[2]), (short)(a.s[3] / b.s[3]));
}
@@ -1399,6 +1664,7 @@ public static void div(Short8 a, Short8 b, Short8 result) {
result.s[3] = (short)(a.s[3] / b.s[3]);
}
+ @Translatable
public static Short8 div(Short8 a, short k) {
return new Short8((short)(a.x / k), (short)(a.y / k), (short)(a.z / k), (short)(a.w / k), (short)(a.s[0] / k), (short)(a.s[1] / k), (short)(a.s[2] / k), (short)(a.s[3] / k));
}
@@ -1414,6 +1680,7 @@ public static void div(Short8 a, short k, Short8 result) {
result.s[3] = (short)(a.s[3] / k);
}
+ @Translatable
public static Short8 mod(Short8 a, Short8 b) {
return new Short8((short)(a.x % b.x), (short)(a.y % b.y), (short)(a.z % b.z), (short)(a.w % b.w), (short)(a.s[0] % b.s[0]), (short)(a.s[1] % b.s[1]), (short)(a.s[2] % b.s[2]), (short)(a.s[3] % b.s[3]));
}
@@ -1429,6 +1696,7 @@ public static void mod(Short8 a, Short8 b, Short8 result) {
result.s[3] = (short)(a.s[3] % b.s[3]);
}
+ @Translatable
public static Short8 mod(Short8 a, short k) {
return new Short8((short)(a.x % k), (short)(a.y % k), (short)(a.z % k), (short)(a.w % k), (short)(a.s[0] % k), (short)(a.s[1] % k), (short)(a.s[2] % k), (short)(a.s[3] % k));
}
@@ -1444,6 +1712,7 @@ public static void mod(Short8 a, short k, Short8 result) {
result.s[3] = (short)(a.s[3] % k);
}
+ @Translatable
public static Short8 bitAnd(Short8 a, Short8 b) {
return new Short8((short)(a.x & b.x), (short)(a.y & b.y), (short)(a.z & b.z), (short)(a.w & b.w), (short)(a.s[0] & b.s[0]), (short)(a.s[1] & b.s[1]), (short)(a.s[2] & b.s[2]), (short)(a.s[3] & b.s[3]));
}
@@ -1459,6 +1728,7 @@ public static void bitAnd(Short8 a, Short8 b, Short8 result) {
result.s[3] = (short)(a.s[3] & b.s[3]);
}
+ @Translatable
public static Short8 bitOr(Short8 a, Short8 b) {
return new Short8((short)(a.x | b.x), (short)(a.y | b.y), (short)(a.z | b.z), (short)(a.w | b.w), (short)(a.s[0] | b.s[0]), (short)(a.s[1] | b.s[1]), (short)(a.s[2] | b.s[2]), (short)(a.s[3] | b.s[3]));
}
@@ -1474,6 +1744,7 @@ public static void bitOr(Short8 a, Short8 b, Short8 result) {
result.s[3] = (short)(a.s[3] | b.s[3]);
}
+ @Translatable
public static Short8 bitXor(Short8 a, Short8 b) {
return new Short8((short)(a.x ^ b.x), (short)(a.y ^ b.y), (short)(a.z ^ b.z), (short)(a.w ^ b.w), (short)(a.s[0] ^ b.s[0]), (short)(a.s[1] ^ b.s[1]), (short)(a.s[2] ^ b.s[2]), (short)(a.s[3] ^ b.s[3]));
}
@@ -1489,6 +1760,7 @@ public static void bitXor(Short8 a, Short8 b, Short8 result) {
result.s[3] = (short)(a.s[3] ^ b.s[3]);
}
+ @Translatable
public static Short8 bitNot(Short8 a) {
return new Short8((short)(~a.x), (short)(~a.y), (short)(~a.z), (short)(~a.w), (short)(~a.s[0]), (short)(~a.s[1]), (short)(~a.s[2]), (short)(~a.s[3]));
}
@@ -1504,6 +1776,7 @@ public static void bitNot(Short8 a, Short8 result) {
result.s[3] = (short)(~a.s[3]);
}
+ @Translatable
public static Short8 abs(Short8 a) {
return new Short8(Math.abs(a.x), Math.abs(a.y), Math.abs(a.z), Math.abs(a.w), Math.abs(a.s[0]), Math.abs(a.s[1]), Math.abs(a.s[2]), Math.abs(a.s[3]));
}
@@ -1519,6 +1792,7 @@ public static void abs(Short8 a, Short8 result) {
result.s[3] = Math.abs(a.s[3]);
}
+ @Translatable
public static Short8 clamp(Short8 a, Short8 b, Short8 c) {
return new Short8(Math.clamp(a.x, b.x, c.x), Math.clamp(a.y, b.y, c.y), Math.clamp(a.z, b.z, c.z), Math.clamp(a.w, b.w, c.w), Math.clamp(a.s[0], b.s[0], c.s[0]), Math.clamp(a.s[1], b.s[1], c.s[1]), Math.clamp(a.s[2], b.s[2], c.s[2]), Math.clamp(a.s[3], b.s[3], c.s[3]));
}
@@ -1534,6 +1808,7 @@ public static void clamp(Short8 a, Short8 b, Short8 c, Short8 result) {
result.s[3] = Math.clamp(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Short8 max(Short8 a, Short8 b) {
return new Short8(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z), Math.max(a.w, b.w), Math.max(a.s[0], b.s[0]), Math.max(a.s[1], b.s[1]), Math.max(a.s[2], b.s[2]), Math.max(a.s[3], b.s[3]));
}
@@ -1549,6 +1824,7 @@ public static void max(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.max(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 maxMag(Short8 a, Short8 b) {
return new Short8(Math.maxMag(a.x, b.x), Math.maxMag(a.y, b.y), Math.maxMag(a.z, b.z), Math.maxMag(a.w, b.w), Math.maxMag(a.s[0], b.s[0]), Math.maxMag(a.s[1], b.s[1]), Math.maxMag(a.s[2], b.s[2]), Math.maxMag(a.s[3], b.s[3]));
}
@@ -1564,6 +1840,7 @@ public static void maxMag(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.maxMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 min(Short8 a, Short8 b) {
return new Short8(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z), Math.min(a.w, b.w), Math.min(a.s[0], b.s[0]), Math.min(a.s[1], b.s[1]), Math.min(a.s[2], b.s[2]), Math.min(a.s[3], b.s[3]));
}
@@ -1579,6 +1856,7 @@ public static void min(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.min(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 minMag(Short8 a, Short8 b) {
return new Short8(Math.minMag(a.x, b.x), Math.minMag(a.y, b.y), Math.minMag(a.z, b.z), Math.minMag(a.w, b.w), Math.minMag(a.s[0], b.s[0]), Math.minMag(a.s[1], b.s[1]), Math.minMag(a.s[2], b.s[2]), Math.minMag(a.s[3], b.s[3]));
}
@@ -1594,6 +1872,7 @@ public static void minMag(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.minMag(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 mix(Short8 a, Short8 b, Short8 c) {
return new Short8(Math.mix(a.x, b.x, c.x), Math.mix(a.y, b.y, c.y), Math.mix(a.z, b.z, c.z), Math.mix(a.w, b.w, c.w), Math.mix(a.s[0], b.s[0], c.s[0]), Math.mix(a.s[1], b.s[1], c.s[1]), Math.mix(a.s[2], b.s[2], c.s[2]), Math.mix(a.s[3], b.s[3], c.s[3]));
}
@@ -1609,6 +1888,7 @@ public static void mix(Short8 a, Short8 b, Short8 c, Short8 result) {
result.s[3] = Math.mix(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Short8 clamp(Short8 v, short min, short max) {
return new Short8(Math.clamp(v.x, min, max), Math.clamp(v.y, min, max), Math.clamp(v.z, min, max), Math.clamp(v.w, min, max), Math.clamp(v.s[0], min, max), Math.clamp(v.s[1], min, max), Math.clamp(v.s[2], min, max), Math.clamp(v.s[3], min, max));
}
@@ -1624,6 +1904,7 @@ public static void clamp(Short8 v, short min, short max, Short8 result) {
result.s[3] = Math.clamp(v.s[3], min, max);
}
+ @Translatable
public static Short8 max(Short8 x, short y) {
return new Short8(Math.max(x.x, y), Math.max(x.y, y), Math.max(x.z, y), Math.max(x.w, y), Math.max(x.s[0], y), Math.max(x.s[1], y), Math.max(x.s[2], y), Math.max(x.s[3], y));
}
@@ -1639,6 +1920,7 @@ public static void max(Short8 x, short y, Short8 result) {
result.s[3] = Math.max(x.s[3], y);
}
+ @Translatable
public static Short8 min(Short8 x, short y) {
return new Short8(Math.min(x.x, y), Math.min(x.y, y), Math.min(x.z, y), Math.min(x.w, y), Math.min(x.s[0], y), Math.min(x.s[1], y), Math.min(x.s[2], y), Math.min(x.s[3], y));
}
@@ -1654,6 +1936,7 @@ public static void min(Short8 x, short y, Short8 result) {
result.s[3] = Math.min(x.s[3], y);
}
+ @Translatable
public static Short8 mix(Short8 x, Short8 y, short a) {
return new Short8(Math.mix(x.x, y.x, a), Math.mix(x.y, y.y, a), Math.mix(x.z, y.z, a), Math.mix(x.w, y.w, a), Math.mix(x.s[0], y.s[0], a), Math.mix(x.s[1], y.s[1], a), Math.mix(x.s[2], y.s[2], a), Math.mix(x.s[3], y.s[3], a));
}
@@ -1669,6 +1952,7 @@ public static void mix(Short8 x, Short8 y, short a, Short8 result) {
result.s[3] = Math.mix(x.s[3], y.s[3], a);
}
+ @Translatable
public static Short8 absDiff(Short8 a, Short8 b) {
return new Short8(Math.absDiff(a.x, b.x), Math.absDiff(a.y, b.y), Math.absDiff(a.z, b.z), Math.absDiff(a.w, b.w), Math.absDiff(a.s[0], b.s[0]), Math.absDiff(a.s[1], b.s[1]), Math.absDiff(a.s[2], b.s[2]), Math.absDiff(a.s[3], b.s[3]));
}
@@ -1684,6 +1968,7 @@ public static void absDiff(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.absDiff(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 addSat(Short8 a, Short8 b) {
return new Short8(Math.addSat(a.x, b.x), Math.addSat(a.y, b.y), Math.addSat(a.z, b.z), Math.addSat(a.w, b.w), Math.addSat(a.s[0], b.s[0]), Math.addSat(a.s[1], b.s[1]), Math.addSat(a.s[2], b.s[2]), Math.addSat(a.s[3], b.s[3]));
}
@@ -1699,6 +1984,7 @@ public static void addSat(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.addSat(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 clz(Short8 a) {
return new Short8(Math.clz(a.x), Math.clz(a.y), Math.clz(a.z), Math.clz(a.w), Math.clz(a.s[0]), Math.clz(a.s[1]), Math.clz(a.s[2]), Math.clz(a.s[3]));
}
@@ -1714,6 +2000,7 @@ public static void clz(Short8 a, Short8 result) {
result.s[3] = Math.clz(a.s[3]);
}
+ @Translatable
public static Short8 hadd(Short8 a, Short8 b) {
return new Short8(Math.hadd(a.x, b.x), Math.hadd(a.y, b.y), Math.hadd(a.z, b.z), Math.hadd(a.w, b.w), Math.hadd(a.s[0], b.s[0]), Math.hadd(a.s[1], b.s[1]), Math.hadd(a.s[2], b.s[2]), Math.hadd(a.s[3], b.s[3]));
}
@@ -1729,6 +2016,7 @@ public static void hadd(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.hadd(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 madHi(Short8 a, Short8 b, Short8 c) {
return new Short8(Math.madHi(a.x, b.x, c.x), Math.madHi(a.y, b.y, c.y), Math.madHi(a.z, b.z, c.z), Math.madHi(a.w, b.w, c.w), Math.madHi(a.s[0], b.s[0], c.s[0]), Math.madHi(a.s[1], b.s[1], c.s[1]), Math.madHi(a.s[2], b.s[2], c.s[2]), Math.madHi(a.s[3], b.s[3], c.s[3]));
}
@@ -1744,6 +2032,7 @@ public static void madHi(Short8 a, Short8 b, Short8 c, Short8 result) {
result.s[3] = Math.madHi(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Short8 madSat(Short8 a, Short8 b, Short8 c) {
return new Short8(Math.madSat(a.x, b.x, c.x), Math.madSat(a.y, b.y, c.y), Math.madSat(a.z, b.z, c.z), Math.madSat(a.w, b.w, c.w), Math.madSat(a.s[0], b.s[0], c.s[0]), Math.madSat(a.s[1], b.s[1], c.s[1]), Math.madSat(a.s[2], b.s[2], c.s[2]), Math.madSat(a.s[3], b.s[3], c.s[3]));
}
@@ -1759,6 +2048,7 @@ public static void madSat(Short8 a, Short8 b, Short8 c, Short8 result) {
result.s[3] = Math.madSat(a.s[3], b.s[3], c.s[3]);
}
+ @Translatable
public static Short8 mulHi(Short8 a, Short8 b) {
return new Short8(Math.mulHi(a.x, b.x), Math.mulHi(a.y, b.y), Math.mulHi(a.z, b.z), Math.mulHi(a.w, b.w), Math.mulHi(a.s[0], b.s[0]), Math.mulHi(a.s[1], b.s[1]), Math.mulHi(a.s[2], b.s[2]), Math.mulHi(a.s[3], b.s[3]));
}
@@ -1774,6 +2064,7 @@ public static void mulHi(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.mulHi(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 rhadd(Short8 a, Short8 b) {
return new Short8(Math.rhadd(a.x, b.x), Math.rhadd(a.y, b.y), Math.rhadd(a.z, b.z), Math.rhadd(a.w, b.w), Math.rhadd(a.s[0], b.s[0]), Math.rhadd(a.s[1], b.s[1]), Math.rhadd(a.s[2], b.s[2]), Math.rhadd(a.s[3], b.s[3]));
}
@@ -1789,6 +2080,7 @@ public static void rhadd(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.rhadd(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 rotate(Short8 a, Short8 b) {
return new Short8(Math.rotate(a.x, b.x), Math.rotate(a.y, b.y), Math.rotate(a.z, b.z), Math.rotate(a.w, b.w), Math.rotate(a.s[0], b.s[0]), Math.rotate(a.s[1], b.s[1]), Math.rotate(a.s[2], b.s[2]), Math.rotate(a.s[3], b.s[3]));
}
@@ -1804,6 +2096,7 @@ public static void rotate(Short8 a, Short8 b, Short8 result) {
result.s[3] = Math.rotate(a.s[3], b.s[3]);
}
+ @Translatable
public static Short8 subSat(Short8 a, Short8 b) {
return new Short8(Math.subSat(a.x, b.x), Math.subSat(a.y, b.y), Math.subSat(a.z, b.z), Math.subSat(a.w, b.w), Math.subSat(a.s[0], b.s[0]), Math.subSat(a.s[1], b.s[1]), Math.subSat(a.s[2], b.s[2]), Math.subSat(a.s[3], b.s[3]));
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte2Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte2Array.java
index 87fcd6a..a87f70a 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte2Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte2Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Byte2Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -101,8 +104,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Byte2 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Byte2 get(int i);
+ @Translatable
public native void set(int i, Byte2 x);
+ @Translatable
public native long length();
public native byte[] getArray();
@@ -111,6 +117,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Byte2 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte3Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte3Array.java
index 0d39477..849e131 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte3Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte3Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Byte3Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -103,8 +106,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Byte3 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Byte3 get(int i);
+ @Translatable
public native void set(int i, Byte3 x);
+ @Translatable
public native long length();
public native byte[] getArray();
@@ -113,6 +119,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Byte3 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte4Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte4Array.java
index 889f8aa..85d69a8 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte4Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte4Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Byte4Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -105,8 +108,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Byte4 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Byte4 get(int i);
+ @Translatable
public native void set(int i, Byte4 x);
+ @Translatable
public native long length();
public native byte[] getArray();
@@ -115,6 +121,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Byte4 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte8Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte8Array.java
index 349074e..f3650ec 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte8Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Byte8Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Byte8Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -113,8 +116,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Byte8 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Byte8 get(int i);
+ @Translatable
public native void set(int i, Byte8 x);
+ @Translatable
public native long length();
public native byte[] getArray();
@@ -123,6 +129,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Byte8 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double2Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double2Array.java
index a25172b..abb4c6e 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double2Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double2Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Double2Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -101,8 +104,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Double2 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Double2 get(int i);
+ @Translatable
public native void set(int i, Double2 x);
+ @Translatable
public native long length();
public native double[] getArray();
@@ -111,6 +117,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Double2 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double3Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double3Array.java
index df795e5..e46457f 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double3Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double3Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Double3Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -103,8 +106,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Double3 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Double3 get(int i);
+ @Translatable
public native void set(int i, Double3 x);
+ @Translatable
public native long length();
public native double[] getArray();
@@ -113,6 +119,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Double3 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double4Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double4Array.java
index 19f84b1..916b110 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double4Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double4Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Double4Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -105,8 +108,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Double4 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Double4 get(int i);
+ @Translatable
public native void set(int i, Double4 x);
+ @Translatable
public native long length();
public native double[] getArray();
@@ -115,6 +121,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Double4 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double8Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double8Array.java
index 10f7415..8c17ed6 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double8Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Double8Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Double8Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -113,8 +116,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Double8 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Double8 get(int i);
+ @Translatable
public native void set(int i, Double8 x);
+ @Translatable
public native long length();
public native double[] getArray();
@@ -123,6 +129,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Double8 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float2Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float2Array.java
index 34480be..45b56a4 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float2Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float2Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Float2Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -101,8 +104,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Float2 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Float2 get(int i);
+ @Translatable
public native void set(int i, Float2 x);
+ @Translatable
public native long length();
public native float[] getArray();
@@ -111,6 +117,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Float2 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float3Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float3Array.java
index 5c135f0..f1bf961 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float3Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float3Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Float3Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -103,8 +106,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Float3 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Float3 get(int i);
+ @Translatable
public native void set(int i, Float3 x);
+ @Translatable
public native long length();
public native float[] getArray();
@@ -113,6 +119,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Float3 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float4Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float4Array.java
index d0574a4..4cfa063 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float4Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float4Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Float4Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -105,8 +108,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Float4 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Float4 get(int i);
+ @Translatable
public native void set(int i, Float4 x);
+ @Translatable
public native long length();
public native float[] getArray();
@@ -115,6 +121,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Float4 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float8Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float8Array.java
index ba572bd..e6c4960 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float8Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Float8Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Float8Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -113,8 +116,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Float8 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Float8 get(int i);
+ @Translatable
public native void set(int i, Float8 x);
+ @Translatable
public native long length();
public native float[] getArray();
@@ -123,6 +129,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Float8 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int2Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int2Array.java
index 32641a2..b986c73 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int2Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int2Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Int2Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -101,8 +104,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Int2 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Int2 get(int i);
+ @Translatable
public native void set(int i, Int2 x);
+ @Translatable
public native long length();
public native int[] getArray();
@@ -111,6 +117,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Int2 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int3Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int3Array.java
index 4efc80d..8ccdb07 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int3Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int3Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Int3Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -103,8 +106,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Int3 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Int3 get(int i);
+ @Translatable
public native void set(int i, Int3 x);
+ @Translatable
public native long length();
public native int[] getArray();
@@ -113,6 +119,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Int3 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int4Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int4Array.java
index aaf6fcb..058786c 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int4Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int4Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Int4Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -105,8 +108,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Int4 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Int4 get(int i);
+ @Translatable
public native void set(int i, Int4 x);
+ @Translatable
public native long length();
public native int[] getArray();
@@ -115,6 +121,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Int4 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int8Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int8Array.java
index e650555..354208a 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int8Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Int8Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Int8Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -113,8 +116,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Int8 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Int8 get(int i);
+ @Translatable
public native void set(int i, Int8 x);
+ @Translatable
public native long length();
public native int[] getArray();
@@ -123,6 +129,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Int8 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long2Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long2Array.java
index b38dcce..e4fb95b 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long2Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long2Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Long2Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -101,8 +104,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Long2 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Long2 get(int i);
+ @Translatable
public native void set(int i, Long2 x);
+ @Translatable
public native long length();
public native long[] getArray();
@@ -111,6 +117,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Long2 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long3Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long3Array.java
index 0f96ecf..24d9cd9 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long3Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long3Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Long3Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -103,8 +106,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Long3 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Long3 get(int i);
+ @Translatable
public native void set(int i, Long3 x);
+ @Translatable
public native long length();
public native long[] getArray();
@@ -113,6 +119,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Long3 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long4Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long4Array.java
index 06a2454..eee4fa3 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long4Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long4Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Long4Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -105,8 +108,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Long4 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Long4 get(int i);
+ @Translatable
public native void set(int i, Long4 x);
+ @Translatable
public native long length();
public native long[] getArray();
@@ -115,6 +121,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Long4 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long8Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long8Array.java
index 03b00b4..d5819f8 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long8Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Long8Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Long8Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -113,8 +116,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Long8 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Long8 get(int i);
+ @Translatable
public native void set(int i, Long8 x);
+ @Translatable
public native long length();
public native long[] getArray();
@@ -123,6 +129,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Long8 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short2Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short2Array.java
index f60c47e..2426496 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short2Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short2Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Short2Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -101,8 +104,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Short2 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Short2 get(int i);
+ @Translatable
public native void set(int i, Short2 x);
+ @Translatable
public native long length();
public native short[] getArray();
@@ -111,6 +117,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Short2 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short3Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short3Array.java
index 8a96ef5..ce23365 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short3Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short3Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Short3Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -103,8 +106,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Short3 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Short3 get(int i);
+ @Translatable
public native void set(int i, Short3 x);
+ @Translatable
public native long length();
public native short[] getArray();
@@ -113,6 +119,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Short3 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short4Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short4Array.java
index e4b36fa..69f7a8f 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short4Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short4Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Short4Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -105,8 +108,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Short4 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Short4 get(int i);
+ @Translatable
public native void set(int i, Short4 x);
+ @Translatable
public native long length();
public native short[] getArray();
@@ -115,6 +121,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Short4 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short8Array.java b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short8Array.java
index d33eb4d..01e61b6 100644
--- a/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short8Array.java
+++ b/java/project/core/src/main/java/es/ull/pcg/hpc/fancier/vector/array/Short8Array.java
@@ -30,6 +30,9 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+import es.ull.pcg.hpc.fancier.Translatable;
+
+
public class Short8Array implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -113,8 +116,11 @@ public static void setBuffer(ByteBuffer buffer, int index, Short8 a) {
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public native Short8 get(int i);
+ @Translatable
public native void set(int i, Short8 x);
+ @Translatable
public native long length();
public native short[] getArray();
@@ -123,6 +129,6 @@ public static void setBuffer(ByteBuffer buffer, int index, Short8 a) {
private native ByteBuffer getBufferImpl();
public native void setBuffer(ByteBuffer v);
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/java/project/jre/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAImage.java b/java/project/jre/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAImage.java
index 543e37d..3c321ec 100644
--- a/java/project/jre/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAImage.java
+++ b/java/project/jre/src/main/java/es/ull/pcg/hpc/fancier/image/RGBAImage.java
@@ -26,11 +26,15 @@
package es.ull.pcg.hpc.fancier.image;
import java.nio.ByteBuffer;
+import java.awt.image.BufferedImage;
+import java.awt.image.DataBufferInt;
import es.ull.pcg.hpc.fancier.vector.Byte4;
import es.ull.pcg.hpc.fancier.vector.Int2;
import es.ull.pcg.hpc.fancier.vector.array.Byte4Array;
+import es.ull.pcg.hpc.fancier.Translatable;
+
public class RGBAImage implements AutoCloseable {
private long nativeInstancePtr = 0L;
@@ -48,13 +52,17 @@ public RGBAImage(int width, int height) {
}
public RGBAImage(int[] pixels, int width) {
- initNative(pixels, width);
+ initNative(pixels, width, false);
}
public RGBAImage(RGBAImage image) {
initNative(image);
}
+ public RGBAImage(BufferedImage image) {
+ initNative(((DataBufferInt) image.getRaster().getDataBuffer()).getData(), image.getWidth(), true);
+ }
+
public void release() {
if (nativeInstancePtr != 0L)
@@ -76,15 +84,17 @@ public void finalize() throws Throwable {
private native void initNative(long nativePtr);
private native void initNative(int width, int height);
- private native void initNative(int[] pixels, int width);
private native void initNative(RGBAImage image);
+ private native void initNative(int[] pixels, int width, boolean changeFromBGRA);
private native void releaseNative();
private native void releaseNativeRef();
+ @Translatable
public Byte4 get(Int2 coords) {
return get(coords.x, coords.y);
}
+ @Translatable
public void set(Int2 coords, Byte4 rgba) {
set(coords.x, coords.y, rgba);
}
@@ -105,17 +115,35 @@ public void setBuffer(ByteBuffer buffer, int x, int y, Byte4 rgba) {
Byte4Array.setBuffer(buffer, y * getWidth() + x, rgba);
}
+ public void setPixels (int[] pixels, int width) {
+ setPixels(pixels, width, false);
+ }
+
+ public void setPixels(BufferedImage image) {
+ setPixels(((DataBufferInt) image.getRaster().getDataBuffer()).getData(), image.getWidth(), true);
+ }
+
+ public void updateImage(BufferedImage image) {
+ updateArray(((DataBufferInt) image.getRaster().getDataBuffer()).getData(), true);
+ }
+
+ @Translatable
public native Byte4 get(int x, int y);
+ @Translatable
public native void set(int x, int y, Byte4 rgba);
public native Byte4Array getPixels();
- public native void setPixels(int[] pixels, int width);
+ private native void setPixels(int[] pixels, int width, boolean changeFromBGRA);
public native void setPixels(RGBAImage image);
+ private native void updateArray(int[] array, boolean changeFromBGRA);
+ @Translatable
public native Int2 getDims();
+ @Translatable
public native int getWidth();
+ @Translatable
public native int getHeight();
- public native void syncToNative();
- public native void syncToOCL();
+ public native void syncToHost();
+ public native void syncToDevice();
}
diff --git a/native/.gitignore b/native/.gitignore
old mode 100755
new mode 100644
diff --git a/native/.vscode/c_cpp_properties.json b/native/.vscode/c_cpp_properties.json
old mode 100755
new mode 100644
diff --git a/native/Doxyfile b/native/Doxyfile
old mode 100755
new mode 100644
diff --git a/native/Makefile b/native/Makefile
old mode 100755
new mode 100644
index 050e1d1..db01967
--- a/native/Makefile
+++ b/native/Makefile
@@ -25,9 +25,9 @@ DOC_DIR=docs
CC?=gcc
CXX?=g++
-CPPFLAGS=-O2 -g -Wall -Wno-dangling-else -Wno-unused-function -I$(INCLUDE_DIR) -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -fPIC
+CPPFLAGS=-O2 -g -Wall -Wno-dangling-else -Wno-unused-function -I$(INCLUDE_DIR) -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux -fPIC -std=gnu11
CXXFLAGS=-fno-rtti -fno-exceptions -std=c++11
-LDFLAGS=-L$(BUILD_DIR) -lOpenCL -ldl -lm
+LDFLAGS=-L$(BUILD_DIR) -lOpenCL -ldl -lm -lstdc++
PLUGIN_LDLFLAGS=$(LDFLAGS) -lfancier
LIB_FLAGS=-shared
diff --git a/native/core/include/CL/cl.h b/native/core/include/CL/cl.h
old mode 100755
new mode 100644
diff --git a/native/core/include/CL/cl_ext.h b/native/core/include/CL/cl_ext.h
old mode 100755
new mode 100644
diff --git a/native/core/include/CL/cl_gl.h b/native/core/include/CL/cl_gl.h
old mode 100755
new mode 100644
diff --git a/native/core/include/CL/cl_gl_ext.h b/native/core/include/CL/cl_gl_ext.h
old mode 100755
new mode 100644
diff --git a/native/core/include/CL/cl_platform.h b/native/core/include/CL/cl_platform.h
old mode 100755
new mode 100644
diff --git a/native/core/include/CL/opencl.h b/native/core/include/CL/opencl.h
old mode 100755
new mode 100644
diff --git a/native/core/include/fancier/array.h b/native/core/include/fancier/array.h
index 1c48681..0678efa 100644
--- a/native/core/include/fancier/array.h
+++ b/native/core/include/fancier/array.h
@@ -209,8 +209,8 @@ FANCIER_API fcError fcByteArray_setArray(fcByteArray* self, fcInt len, const fcB
FANCIER_API fcError fcByteArray_setCopy(fcByteArray* self, const fcByteArray* array);
FANCIER_API fcError fcByteArray_setBuffer(fcByteArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcByteArray_syncToNative(fcByteArray* self);
-FANCIER_API fcError fcByteArray_syncToOCL(fcByteArray* self);
+FANCIER_API fcError fcByteArray_syncToHost(fcByteArray* self);
+FANCIER_API fcError fcByteArray_syncToDevice(fcByteArray* self);
FANCIER_API fcBool fcByteArray_valid(const fcByteArray* self);
FANCIER_API fcShortArray* fcShortArray_getJava(JNIEnv* env, jobject obj);
@@ -230,8 +230,8 @@ FANCIER_API fcError fcShortArray_setArray(fcShortArray* self, fcInt len, const f
FANCIER_API fcError fcShortArray_setCopy(fcShortArray* self, const fcShortArray* array);
FANCIER_API fcError fcShortArray_setBuffer(fcShortArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcShortArray_syncToNative(fcShortArray* self);
-FANCIER_API fcError fcShortArray_syncToOCL(fcShortArray* self);
+FANCIER_API fcError fcShortArray_syncToHost(fcShortArray* self);
+FANCIER_API fcError fcShortArray_syncToDevice(fcShortArray* self);
FANCIER_API fcBool fcShortArray_valid(const fcShortArray* self);
FANCIER_API fcIntArray* fcIntArray_getJava(JNIEnv* env, jobject obj);
@@ -251,8 +251,8 @@ FANCIER_API fcError fcIntArray_setArray(fcIntArray* self, fcInt len, const fcInt
FANCIER_API fcError fcIntArray_setCopy(fcIntArray* self, const fcIntArray* array);
FANCIER_API fcError fcIntArray_setBuffer(fcIntArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcIntArray_syncToNative(fcIntArray* self);
-FANCIER_API fcError fcIntArray_syncToOCL(fcIntArray* self);
+FANCIER_API fcError fcIntArray_syncToHost(fcIntArray* self);
+FANCIER_API fcError fcIntArray_syncToDevice(fcIntArray* self);
FANCIER_API fcBool fcIntArray_valid(const fcIntArray* self);
FANCIER_API fcLongArray* fcLongArray_getJava(JNIEnv* env, jobject obj);
@@ -272,8 +272,8 @@ FANCIER_API fcError fcLongArray_setArray(fcLongArray* self, fcInt len, const fcL
FANCIER_API fcError fcLongArray_setCopy(fcLongArray* self, const fcLongArray* array);
FANCIER_API fcError fcLongArray_setBuffer(fcLongArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcLongArray_syncToNative(fcLongArray* self);
-FANCIER_API fcError fcLongArray_syncToOCL(fcLongArray* self);
+FANCIER_API fcError fcLongArray_syncToHost(fcLongArray* self);
+FANCIER_API fcError fcLongArray_syncToDevice(fcLongArray* self);
FANCIER_API fcBool fcLongArray_valid(const fcLongArray* self);
FANCIER_API fcFloatArray* fcFloatArray_getJava(JNIEnv* env, jobject obj);
@@ -293,8 +293,8 @@ FANCIER_API fcError fcFloatArray_setArray(fcFloatArray* self, fcInt len, const f
FANCIER_API fcError fcFloatArray_setCopy(fcFloatArray* self, const fcFloatArray* array);
FANCIER_API fcError fcFloatArray_setBuffer(fcFloatArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloatArray_syncToNative(fcFloatArray* self);
-FANCIER_API fcError fcFloatArray_syncToOCL(fcFloatArray* self);
+FANCIER_API fcError fcFloatArray_syncToHost(fcFloatArray* self);
+FANCIER_API fcError fcFloatArray_syncToDevice(fcFloatArray* self);
FANCIER_API fcBool fcFloatArray_valid(const fcFloatArray* self);
FANCIER_API fcDoubleArray* fcDoubleArray_getJava(JNIEnv* env, jobject obj);
@@ -314,8 +314,8 @@ FANCIER_API fcError fcDoubleArray_setArray(fcDoubleArray* self, fcInt len, const
FANCIER_API fcError fcDoubleArray_setCopy(fcDoubleArray* self, const fcDoubleArray* array);
FANCIER_API fcError fcDoubleArray_setBuffer(fcDoubleArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcDoubleArray_syncToNative(fcDoubleArray* self);
-FANCIER_API fcError fcDoubleArray_syncToOCL(fcDoubleArray* self);
+FANCIER_API fcError fcDoubleArray_syncToHost(fcDoubleArray* self);
+FANCIER_API fcError fcDoubleArray_syncToDevice(fcDoubleArray* self);
FANCIER_API fcBool fcDoubleArray_valid(const fcDoubleArray* self);
#endif // _FANCIER_ARRAY_H_
diff --git a/native/core/include/fancier/color.h b/native/core/include/fancier/color.h
old mode 100755
new mode 100644
diff --git a/native/core/include/fancier/exception.h b/native/core/include/fancier/exception.h
index 1fbea7f..39f53be 100644
--- a/native/core/include/fancier/exception.h
+++ b/native/core/include/fancier/exception.h
@@ -82,6 +82,11 @@ typedef enum {
FC_EXCEPTION_BITMAP_UNLOCK_PIXELS,
FC_EXCEPTION_BITMAP_BAD_DIMENSIONS,
+ // BufferedImage exceptions
+ FC_EXCEPTION_BUFFEREDIMAGE_INFO,
+ FC_EXCEPTION_BUFFEREDIMAGE_UNSOPPORTED_FORMAT,
+ FC_EXCEPTION_BUFFEREDIMAGE_BAD_DIMENSIONS,
+
FC_EXCEPTION_OTHER
} fcNativeExceptionCode;
// clang-format on
diff --git a/native/core/include/fancier/image.h b/native/core/include/fancier/image.h
old mode 100755
new mode 100644
index 3b54ce1..467ea1b
--- a/native/core/include/fancier/image.h
+++ b/native/core/include/fancier/image.h
@@ -51,6 +51,12 @@ FANCIER_API fcError fcRGBAImage_initDims(fcRGBAImage* self, fcInt2 dims);
FANCIER_API fcError fcRGBAImage_initSize(fcRGBAImage* self, fcInt width, fcInt height);
FANCIER_API fcError fcRGBAImage_initPixels(fcRGBAImage* self, fcInt width, fcInt height,
const fcInt* pixels);
+
+FANCIER_API fcError fcRGBAImage_initPixelsBGRA(fcRGBAImage* self, fcInt width, fcInt height,
+ const fcInt* pixels);
+FANCIER_API fcError fcRGBAImage_initArrayColorComponentsBGRA(fcRGBAImage* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcRGBAImage_setArrayColorComponentsBGRA(fcRGBAImage* self, fcInt len, const fcByte* v);
+
FANCIER_API fcError fcRGBAImage_initCopy(fcRGBAImage* self, const fcRGBAImage* image);
FANCIER_API fcError fcRGBAImage_release(fcRGBAImage* self);
@@ -61,10 +67,11 @@ FANCIER_API fcError fcRGBAImage_set(fcRGBAImage* self, fcInt x, fcInt y, fcByte4
FANCIER_API fcError fcRGBAImage_setPixels(fcRGBAImage* self, fcInt width, fcInt height,
const fcInt* pixels);
+FANCIER_API fcError fcRGBAImage_setPixelsChangeBGRA(fcRGBAImage* self, fcInt width, fcInt height, fcInt* pixels);
FANCIER_API fcError fcRGBAImage_setPixelsCopy(fcRGBAImage* self, const fcRGBAImage* image);
-FANCIER_API fcError fcRGBAImage_syncToNative(fcRGBAImage* self);
-FANCIER_API fcError fcRGBAImage_syncToOCL(fcRGBAImage* self);
+FANCIER_API fcError fcRGBAImage_syncToHost(fcRGBAImage* self);
+FANCIER_API fcError fcRGBAImage_syncToDevice(fcRGBAImage* self);
FANCIER_API fcBool fcRGBAImage_valid(const fcRGBAImage* self);
#ifdef __ANDROID__
@@ -78,4 +85,6 @@ FANCIER_API fcError fcRGBAImage_updateBitmap(fcRGBAImage* self, AndroidBitmapInf
void* pixels);
#endif // __ANDROID__
+FANCIER_API fcError fcRGBAImage_updateArray(fcRGBAImage* self, jint** __tmp_pixels, jint pixels_size, jboolean changeFromBGRA);
+
#endif // _FANCIER_IMAGE_H_
diff --git a/native/core/include/fancier/internal/snippets.inc b/native/core/include/fancier/internal/snippets.inc
old mode 100755
new mode 100644
diff --git a/native/core/include/fancier/java.h b/native/core/include/fancier/java.h
old mode 100755
new mode 100644
index feb4a26..9ea83e5
--- a/native/core/include/fancier/java.h
+++ b/native/core/include/fancier/java.h
@@ -23,7 +23,6 @@
#include
-
#define FC_JAVA_INSTANCE_HANDLERS(_classname) \
static jfieldID _classname##_nativePtrField = NULL; \
_classname* _classname##_allocJava(JNIEnv* env, jobject obj) { \
diff --git a/native/core/include/fancier/math.h b/native/core/include/fancier/math.h
old mode 100755
new mode 100644
diff --git a/native/core/include/fancier/ocl.h b/native/core/include/fancier/ocl.h
old mode 100755
new mode 100644
diff --git a/native/core/include/fancier/platform.h b/native/core/include/fancier/platform.h
old mode 100755
new mode 100644
diff --git a/native/core/include/fancier/vector.h b/native/core/include/fancier/vector.h
old mode 100755
new mode 100644
index 1da1fee..b8aa796
--- a/native/core/include/fancier/vector.h
+++ b/native/core/include/fancier/vector.h
@@ -127,99 +127,75 @@ FANCIER_API void fcVector_releaseJNI(JNIEnv* env);
// Java interface
-FANCIER_API fcByte2* fcByte2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcByte2_wrap(JNIEnv* env, fcByte2 vec);
FANCIER_API fcByte2 fcByte2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcByte3* fcByte3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcByte3_wrap(JNIEnv* env, fcByte3 vec);
FANCIER_API fcByte3 fcByte3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcByte4* fcByte4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcByte4_wrap(JNIEnv* env, fcByte4 vec);
FANCIER_API fcByte4 fcByte4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcByte8* fcByte8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcByte8_wrap(JNIEnv* env, fcByte8 vec);
FANCIER_API fcByte8 fcByte8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcShort2* fcShort2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcShort2_wrap(JNIEnv* env, fcShort2 vec);
FANCIER_API fcShort2 fcShort2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcShort3* fcShort3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcShort3_wrap(JNIEnv* env, fcShort3 vec);
FANCIER_API fcShort3 fcShort3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcShort4* fcShort4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcShort4_wrap(JNIEnv* env, fcShort4 vec);
FANCIER_API fcShort4 fcShort4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcShort8* fcShort8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcShort8_wrap(JNIEnv* env, fcShort8 vec);
FANCIER_API fcShort8 fcShort8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcInt2* fcInt2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcInt2_wrap(JNIEnv* env, fcInt2 vec);
FANCIER_API fcInt2 fcInt2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcInt3* fcInt3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcInt3_wrap(JNIEnv* env, fcInt3 vec);
FANCIER_API fcInt3 fcInt3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcInt4* fcInt4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcInt4_wrap(JNIEnv* env, fcInt4 vec);
FANCIER_API fcInt4 fcInt4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcInt8* fcInt8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcInt8_wrap(JNIEnv* env, fcInt8 vec);
FANCIER_API fcInt8 fcInt8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcLong2* fcLong2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcLong2_wrap(JNIEnv* env, fcLong2 vec);
FANCIER_API fcLong2 fcLong2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcLong3* fcLong3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcLong3_wrap(JNIEnv* env, fcLong3 vec);
FANCIER_API fcLong3 fcLong3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcLong4* fcLong4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcLong4_wrap(JNIEnv* env, fcLong4 vec);
FANCIER_API fcLong4 fcLong4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcLong8* fcLong8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcLong8_wrap(JNIEnv* env, fcLong8 vec);
FANCIER_API fcLong8 fcLong8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcFloat2* fcFloat2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcFloat2_wrap(JNIEnv* env, fcFloat2 vec);
FANCIER_API fcFloat2 fcFloat2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcFloat3* fcFloat3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcFloat3_wrap(JNIEnv* env, fcFloat3 vec);
FANCIER_API fcFloat3 fcFloat3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcFloat4* fcFloat4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcFloat4_wrap(JNIEnv* env, fcFloat4 vec);
FANCIER_API fcFloat4 fcFloat4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcFloat8* fcFloat8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcFloat8_wrap(JNIEnv* env, fcFloat8 vec);
FANCIER_API fcFloat8 fcFloat8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcDouble2* fcDouble2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcDouble2_wrap(JNIEnv* env, fcDouble2 vec);
FANCIER_API fcDouble2 fcDouble2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcDouble3* fcDouble3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcDouble3_wrap(JNIEnv* env, fcDouble3 vec);
FANCIER_API fcDouble3 fcDouble3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcDouble4* fcDouble4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcDouble4_wrap(JNIEnv* env, fcDouble4 vec);
FANCIER_API fcDouble4 fcDouble4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcDouble8* fcDouble8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcDouble8_wrap(JNIEnv* env, fcDouble8 vec);
FANCIER_API fcDouble8 fcDouble8_unwrap(JNIEnv* env, jobject vec, fcError* err);
diff --git a/native/core/include/fancier/vector_array.h b/native/core/include/fancier/vector_array.h
old mode 100755
new mode 100644
index 89b9001..bcf0c40
--- a/native/core/include/fancier/vector_array.h
+++ b/native/core/include/fancier/vector_array.h
@@ -617,8 +617,8 @@ FANCIER_API fcError fcByte2Array_setArray(fcByte2Array* self, fcInt len, const f
FANCIER_API fcError fcByte2Array_setCopy(fcByte2Array* self, const fcByte2Array* array);
FANCIER_API fcError fcByte2Array_setBuffer(fcByte2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcByte2Array_syncToNative(fcByte2Array* self);
-FANCIER_API fcError fcByte2Array_syncToOCL(fcByte2Array* self);
+FANCIER_API fcError fcByte2Array_syncToHost(fcByte2Array* self);
+FANCIER_API fcError fcByte2Array_syncToDevice(fcByte2Array* self);
FANCIER_API fcBool fcByte2Array_valid(const fcByte2Array* self);
FANCIER_API fcByte3Array* fcByte3Array_getJava(JNIEnv* env, jobject obj);
@@ -638,8 +638,8 @@ FANCIER_API fcError fcByte3Array_setArray(fcByte3Array* self, fcInt len, const f
FANCIER_API fcError fcByte3Array_setCopy(fcByte3Array* self, const fcByte3Array* array);
FANCIER_API fcError fcByte3Array_setBuffer(fcByte3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcByte3Array_syncToNative(fcByte3Array* self);
-FANCIER_API fcError fcByte3Array_syncToOCL(fcByte3Array* self);
+FANCIER_API fcError fcByte3Array_syncToHost(fcByte3Array* self);
+FANCIER_API fcError fcByte3Array_syncToDevice(fcByte3Array* self);
FANCIER_API fcBool fcByte3Array_valid(const fcByte3Array* self);
FANCIER_API fcByte4Array* fcByte4Array_getJava(JNIEnv* env, jobject obj);
@@ -659,8 +659,8 @@ FANCIER_API fcError fcByte4Array_setArray(fcByte4Array* self, fcInt len, const f
FANCIER_API fcError fcByte4Array_setCopy(fcByte4Array* self, const fcByte4Array* array);
FANCIER_API fcError fcByte4Array_setBuffer(fcByte4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcByte4Array_syncToNative(fcByte4Array* self);
-FANCIER_API fcError fcByte4Array_syncToOCL(fcByte4Array* self);
+FANCIER_API fcError fcByte4Array_syncToHost(fcByte4Array* self);
+FANCIER_API fcError fcByte4Array_syncToDevice(fcByte4Array* self);
FANCIER_API fcBool fcByte4Array_valid(const fcByte4Array* self);
FANCIER_API fcByte8Array* fcByte8Array_getJava(JNIEnv* env, jobject obj);
@@ -680,8 +680,8 @@ FANCIER_API fcError fcByte8Array_setArray(fcByte8Array* self, fcInt len, const f
FANCIER_API fcError fcByte8Array_setCopy(fcByte8Array* self, const fcByte8Array* array);
FANCIER_API fcError fcByte8Array_setBuffer(fcByte8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcByte8Array_syncToNative(fcByte8Array* self);
-FANCIER_API fcError fcByte8Array_syncToOCL(fcByte8Array* self);
+FANCIER_API fcError fcByte8Array_syncToHost(fcByte8Array* self);
+FANCIER_API fcError fcByte8Array_syncToDevice(fcByte8Array* self);
FANCIER_API fcBool fcByte8Array_valid(const fcByte8Array* self);
FANCIER_API fcShort2Array* fcShort2Array_getJava(JNIEnv* env, jobject obj);
@@ -701,8 +701,8 @@ FANCIER_API fcError fcShort2Array_setArray(fcShort2Array* self, fcInt len, const
FANCIER_API fcError fcShort2Array_setCopy(fcShort2Array* self, const fcShort2Array* array);
FANCIER_API fcError fcShort2Array_setBuffer(fcShort2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcShort2Array_syncToNative(fcShort2Array* self);
-FANCIER_API fcError fcShort2Array_syncToOCL(fcShort2Array* self);
+FANCIER_API fcError fcShort2Array_syncToHost(fcShort2Array* self);
+FANCIER_API fcError fcShort2Array_syncToDevice(fcShort2Array* self);
FANCIER_API fcBool fcShort2Array_valid(const fcShort2Array* self);
FANCIER_API fcShort3Array* fcShort3Array_getJava(JNIEnv* env, jobject obj);
@@ -722,8 +722,8 @@ FANCIER_API fcError fcShort3Array_setArray(fcShort3Array* self, fcInt len, const
FANCIER_API fcError fcShort3Array_setCopy(fcShort3Array* self, const fcShort3Array* array);
FANCIER_API fcError fcShort3Array_setBuffer(fcShort3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcShort3Array_syncToNative(fcShort3Array* self);
-FANCIER_API fcError fcShort3Array_syncToOCL(fcShort3Array* self);
+FANCIER_API fcError fcShort3Array_syncToHost(fcShort3Array* self);
+FANCIER_API fcError fcShort3Array_syncToDevice(fcShort3Array* self);
FANCIER_API fcBool fcShort3Array_valid(const fcShort3Array* self);
FANCIER_API fcShort4Array* fcShort4Array_getJava(JNIEnv* env, jobject obj);
@@ -743,8 +743,8 @@ FANCIER_API fcError fcShort4Array_setArray(fcShort4Array* self, fcInt len, const
FANCIER_API fcError fcShort4Array_setCopy(fcShort4Array* self, const fcShort4Array* array);
FANCIER_API fcError fcShort4Array_setBuffer(fcShort4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcShort4Array_syncToNative(fcShort4Array* self);
-FANCIER_API fcError fcShort4Array_syncToOCL(fcShort4Array* self);
+FANCIER_API fcError fcShort4Array_syncToHost(fcShort4Array* self);
+FANCIER_API fcError fcShort4Array_syncToDevice(fcShort4Array* self);
FANCIER_API fcBool fcShort4Array_valid(const fcShort4Array* self);
FANCIER_API fcShort8Array* fcShort8Array_getJava(JNIEnv* env, jobject obj);
@@ -764,8 +764,8 @@ FANCIER_API fcError fcShort8Array_setArray(fcShort8Array* self, fcInt len, const
FANCIER_API fcError fcShort8Array_setCopy(fcShort8Array* self, const fcShort8Array* array);
FANCIER_API fcError fcShort8Array_setBuffer(fcShort8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcShort8Array_syncToNative(fcShort8Array* self);
-FANCIER_API fcError fcShort8Array_syncToOCL(fcShort8Array* self);
+FANCIER_API fcError fcShort8Array_syncToHost(fcShort8Array* self);
+FANCIER_API fcError fcShort8Array_syncToDevice(fcShort8Array* self);
FANCIER_API fcBool fcShort8Array_valid(const fcShort8Array* self);
FANCIER_API fcInt2Array* fcInt2Array_getJava(JNIEnv* env, jobject obj);
@@ -785,8 +785,8 @@ FANCIER_API fcError fcInt2Array_setArray(fcInt2Array* self, fcInt len, const fcI
FANCIER_API fcError fcInt2Array_setCopy(fcInt2Array* self, const fcInt2Array* array);
FANCIER_API fcError fcInt2Array_setBuffer(fcInt2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcInt2Array_syncToNative(fcInt2Array* self);
-FANCIER_API fcError fcInt2Array_syncToOCL(fcInt2Array* self);
+FANCIER_API fcError fcInt2Array_syncToHost(fcInt2Array* self);
+FANCIER_API fcError fcInt2Array_syncToDevice(fcInt2Array* self);
FANCIER_API fcBool fcInt2Array_valid(const fcInt2Array* self);
FANCIER_API fcInt3Array* fcInt3Array_getJava(JNIEnv* env, jobject obj);
@@ -806,8 +806,8 @@ FANCIER_API fcError fcInt3Array_setArray(fcInt3Array* self, fcInt len, const fcI
FANCIER_API fcError fcInt3Array_setCopy(fcInt3Array* self, const fcInt3Array* array);
FANCIER_API fcError fcInt3Array_setBuffer(fcInt3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcInt3Array_syncToNative(fcInt3Array* self);
-FANCIER_API fcError fcInt3Array_syncToOCL(fcInt3Array* self);
+FANCIER_API fcError fcInt3Array_syncToHost(fcInt3Array* self);
+FANCIER_API fcError fcInt3Array_syncToDevice(fcInt3Array* self);
FANCIER_API fcBool fcInt3Array_valid(const fcInt3Array* self);
FANCIER_API fcInt4Array* fcInt4Array_getJava(JNIEnv* env, jobject obj);
@@ -827,8 +827,8 @@ FANCIER_API fcError fcInt4Array_setArray(fcInt4Array* self, fcInt len, const fcI
FANCIER_API fcError fcInt4Array_setCopy(fcInt4Array* self, const fcInt4Array* array);
FANCIER_API fcError fcInt4Array_setBuffer(fcInt4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcInt4Array_syncToNative(fcInt4Array* self);
-FANCIER_API fcError fcInt4Array_syncToOCL(fcInt4Array* self);
+FANCIER_API fcError fcInt4Array_syncToHost(fcInt4Array* self);
+FANCIER_API fcError fcInt4Array_syncToDevice(fcInt4Array* self);
FANCIER_API fcBool fcInt4Array_valid(const fcInt4Array* self);
FANCIER_API fcInt8Array* fcInt8Array_getJava(JNIEnv* env, jobject obj);
@@ -848,8 +848,8 @@ FANCIER_API fcError fcInt8Array_setArray(fcInt8Array* self, fcInt len, const fcI
FANCIER_API fcError fcInt8Array_setCopy(fcInt8Array* self, const fcInt8Array* array);
FANCIER_API fcError fcInt8Array_setBuffer(fcInt8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcInt8Array_syncToNative(fcInt8Array* self);
-FANCIER_API fcError fcInt8Array_syncToOCL(fcInt8Array* self);
+FANCIER_API fcError fcInt8Array_syncToHost(fcInt8Array* self);
+FANCIER_API fcError fcInt8Array_syncToDevice(fcInt8Array* self);
FANCIER_API fcBool fcInt8Array_valid(const fcInt8Array* self);
FANCIER_API fcLong2Array* fcLong2Array_getJava(JNIEnv* env, jobject obj);
@@ -869,8 +869,8 @@ FANCIER_API fcError fcLong2Array_setArray(fcLong2Array* self, fcInt len, const f
FANCIER_API fcError fcLong2Array_setCopy(fcLong2Array* self, const fcLong2Array* array);
FANCIER_API fcError fcLong2Array_setBuffer(fcLong2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcLong2Array_syncToNative(fcLong2Array* self);
-FANCIER_API fcError fcLong2Array_syncToOCL(fcLong2Array* self);
+FANCIER_API fcError fcLong2Array_syncToHost(fcLong2Array* self);
+FANCIER_API fcError fcLong2Array_syncToDevice(fcLong2Array* self);
FANCIER_API fcBool fcLong2Array_valid(const fcLong2Array* self);
FANCIER_API fcLong3Array* fcLong3Array_getJava(JNIEnv* env, jobject obj);
@@ -890,8 +890,8 @@ FANCIER_API fcError fcLong3Array_setArray(fcLong3Array* self, fcInt len, const f
FANCIER_API fcError fcLong3Array_setCopy(fcLong3Array* self, const fcLong3Array* array);
FANCIER_API fcError fcLong3Array_setBuffer(fcLong3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcLong3Array_syncToNative(fcLong3Array* self);
-FANCIER_API fcError fcLong3Array_syncToOCL(fcLong3Array* self);
+FANCIER_API fcError fcLong3Array_syncToHost(fcLong3Array* self);
+FANCIER_API fcError fcLong3Array_syncToDevice(fcLong3Array* self);
FANCIER_API fcBool fcLong3Array_valid(const fcLong3Array* self);
FANCIER_API fcLong4Array* fcLong4Array_getJava(JNIEnv* env, jobject obj);
@@ -911,8 +911,8 @@ FANCIER_API fcError fcLong4Array_setArray(fcLong4Array* self, fcInt len, const f
FANCIER_API fcError fcLong4Array_setCopy(fcLong4Array* self, const fcLong4Array* array);
FANCIER_API fcError fcLong4Array_setBuffer(fcLong4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcLong4Array_syncToNative(fcLong4Array* self);
-FANCIER_API fcError fcLong4Array_syncToOCL(fcLong4Array* self);
+FANCIER_API fcError fcLong4Array_syncToHost(fcLong4Array* self);
+FANCIER_API fcError fcLong4Array_syncToDevice(fcLong4Array* self);
FANCIER_API fcBool fcLong4Array_valid(const fcLong4Array* self);
FANCIER_API fcLong8Array* fcLong8Array_getJava(JNIEnv* env, jobject obj);
@@ -932,8 +932,8 @@ FANCIER_API fcError fcLong8Array_setArray(fcLong8Array* self, fcInt len, const f
FANCIER_API fcError fcLong8Array_setCopy(fcLong8Array* self, const fcLong8Array* array);
FANCIER_API fcError fcLong8Array_setBuffer(fcLong8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcLong8Array_syncToNative(fcLong8Array* self);
-FANCIER_API fcError fcLong8Array_syncToOCL(fcLong8Array* self);
+FANCIER_API fcError fcLong8Array_syncToHost(fcLong8Array* self);
+FANCIER_API fcError fcLong8Array_syncToDevice(fcLong8Array* self);
FANCIER_API fcBool fcLong8Array_valid(const fcLong8Array* self);
FANCIER_API fcFloat2Array* fcFloat2Array_getJava(JNIEnv* env, jobject obj);
@@ -953,8 +953,8 @@ FANCIER_API fcError fcFloat2Array_setArray(fcFloat2Array* self, fcInt len, const
FANCIER_API fcError fcFloat2Array_setCopy(fcFloat2Array* self, const fcFloat2Array* array);
FANCIER_API fcError fcFloat2Array_setBuffer(fcFloat2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloat2Array_syncToNative(fcFloat2Array* self);
-FANCIER_API fcError fcFloat2Array_syncToOCL(fcFloat2Array* self);
+FANCIER_API fcError fcFloat2Array_syncToHost(fcFloat2Array* self);
+FANCIER_API fcError fcFloat2Array_syncToDevice(fcFloat2Array* self);
FANCIER_API fcBool fcFloat2Array_valid(const fcFloat2Array* self);
FANCIER_API fcFloat3Array* fcFloat3Array_getJava(JNIEnv* env, jobject obj);
@@ -974,8 +974,8 @@ FANCIER_API fcError fcFloat3Array_setArray(fcFloat3Array* self, fcInt len, const
FANCIER_API fcError fcFloat3Array_setCopy(fcFloat3Array* self, const fcFloat3Array* array);
FANCIER_API fcError fcFloat3Array_setBuffer(fcFloat3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloat3Array_syncToNative(fcFloat3Array* self);
-FANCIER_API fcError fcFloat3Array_syncToOCL(fcFloat3Array* self);
+FANCIER_API fcError fcFloat3Array_syncToHost(fcFloat3Array* self);
+FANCIER_API fcError fcFloat3Array_syncToDevice(fcFloat3Array* self);
FANCIER_API fcBool fcFloat3Array_valid(const fcFloat3Array* self);
FANCIER_API fcFloat4Array* fcFloat4Array_getJava(JNIEnv* env, jobject obj);
@@ -995,8 +995,8 @@ FANCIER_API fcError fcFloat4Array_setArray(fcFloat4Array* self, fcInt len, const
FANCIER_API fcError fcFloat4Array_setCopy(fcFloat4Array* self, const fcFloat4Array* array);
FANCIER_API fcError fcFloat4Array_setBuffer(fcFloat4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloat4Array_syncToNative(fcFloat4Array* self);
-FANCIER_API fcError fcFloat4Array_syncToOCL(fcFloat4Array* self);
+FANCIER_API fcError fcFloat4Array_syncToHost(fcFloat4Array* self);
+FANCIER_API fcError fcFloat4Array_syncToDevice(fcFloat4Array* self);
FANCIER_API fcBool fcFloat4Array_valid(const fcFloat4Array* self);
FANCIER_API fcFloat8Array* fcFloat8Array_getJava(JNIEnv* env, jobject obj);
@@ -1016,8 +1016,8 @@ FANCIER_API fcError fcFloat8Array_setArray(fcFloat8Array* self, fcInt len, const
FANCIER_API fcError fcFloat8Array_setCopy(fcFloat8Array* self, const fcFloat8Array* array);
FANCIER_API fcError fcFloat8Array_setBuffer(fcFloat8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloat8Array_syncToNative(fcFloat8Array* self);
-FANCIER_API fcError fcFloat8Array_syncToOCL(fcFloat8Array* self);
+FANCIER_API fcError fcFloat8Array_syncToHost(fcFloat8Array* self);
+FANCIER_API fcError fcFloat8Array_syncToDevice(fcFloat8Array* self);
FANCIER_API fcBool fcFloat8Array_valid(const fcFloat8Array* self);
FANCIER_API fcDouble2Array* fcDouble2Array_getJava(JNIEnv* env, jobject obj);
@@ -1037,8 +1037,8 @@ FANCIER_API fcError fcDouble2Array_setArray(fcDouble2Array* self, fcInt len, con
FANCIER_API fcError fcDouble2Array_setCopy(fcDouble2Array* self, const fcDouble2Array* array);
FANCIER_API fcError fcDouble2Array_setBuffer(fcDouble2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcDouble2Array_syncToNative(fcDouble2Array* self);
-FANCIER_API fcError fcDouble2Array_syncToOCL(fcDouble2Array* self);
+FANCIER_API fcError fcDouble2Array_syncToHost(fcDouble2Array* self);
+FANCIER_API fcError fcDouble2Array_syncToDevice(fcDouble2Array* self);
FANCIER_API fcBool fcDouble2Array_valid(const fcDouble2Array* self);
FANCIER_API fcDouble3Array* fcDouble3Array_getJava(JNIEnv* env, jobject obj);
@@ -1058,8 +1058,8 @@ FANCIER_API fcError fcDouble3Array_setArray(fcDouble3Array* self, fcInt len, con
FANCIER_API fcError fcDouble3Array_setCopy(fcDouble3Array* self, const fcDouble3Array* array);
FANCIER_API fcError fcDouble3Array_setBuffer(fcDouble3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcDouble3Array_syncToNative(fcDouble3Array* self);
-FANCIER_API fcError fcDouble3Array_syncToOCL(fcDouble3Array* self);
+FANCIER_API fcError fcDouble3Array_syncToHost(fcDouble3Array* self);
+FANCIER_API fcError fcDouble3Array_syncToDevice(fcDouble3Array* self);
FANCIER_API fcBool fcDouble3Array_valid(const fcDouble3Array* self);
FANCIER_API fcDouble4Array* fcDouble4Array_getJava(JNIEnv* env, jobject obj);
@@ -1079,8 +1079,8 @@ FANCIER_API fcError fcDouble4Array_setArray(fcDouble4Array* self, fcInt len, con
FANCIER_API fcError fcDouble4Array_setCopy(fcDouble4Array* self, const fcDouble4Array* array);
FANCIER_API fcError fcDouble4Array_setBuffer(fcDouble4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcDouble4Array_syncToNative(fcDouble4Array* self);
-FANCIER_API fcError fcDouble4Array_syncToOCL(fcDouble4Array* self);
+FANCIER_API fcError fcDouble4Array_syncToHost(fcDouble4Array* self);
+FANCIER_API fcError fcDouble4Array_syncToDevice(fcDouble4Array* self);
FANCIER_API fcBool fcDouble4Array_valid(const fcDouble4Array* self);
FANCIER_API fcDouble8Array* fcDouble8Array_getJava(JNIEnv* env, jobject obj);
@@ -1100,8 +1100,8 @@ FANCIER_API fcError fcDouble8Array_setArray(fcDouble8Array* self, fcInt len, con
FANCIER_API fcError fcDouble8Array_setCopy(fcDouble8Array* self, const fcDouble8Array* array);
FANCIER_API fcError fcDouble8Array_setBuffer(fcDouble8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcDouble8Array_syncToNative(fcDouble8Array* self);
-FANCIER_API fcError fcDouble8Array_syncToOCL(fcDouble8Array* self);
+FANCIER_API fcError fcDouble8Array_syncToHost(fcDouble8Array* self);
+FANCIER_API fcError fcDouble8Array_syncToDevice(fcDouble8Array* self);
FANCIER_API fcBool fcDouble8Array_valid(const fcDouble8Array* self);
#endif // _FANCIER_VECTOR_ARRAY_H_
diff --git a/native/core/src/CL/cl.c b/native/core/src/CL/cl.c
old mode 100755
new mode 100644
diff --git a/native/core/src/CL/cl_ext.c b/native/core/src/CL/cl_ext.c
old mode 100755
new mode 100644
diff --git a/native/core/src/array.c b/native/core/src/array.c
old mode 100755
new mode 100644
index 342ceb5..c8b9321
--- a/native/core/src/array.c
+++ b/native/core/src/array.c
@@ -231,8 +231,8 @@ Java_es_ull_pcg_hpc_fancier_array_ByteArray_getArray(JNIEnv* env, jobject obj) {
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByteArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcByteArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByteArray_syncToNative", NULL);
+ jint err = fcByteArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByteArray_syncToHost", NULL);
// Create Java array and populate it
jbyteArray __tmp_ret = FC_JNI_CALL(env, NewByteArray, self->len);
@@ -284,8 +284,8 @@ Java_es_ull_pcg_hpc_fancier_array_ByteArray_getBufferImpl(JNIEnv* env, jobject o
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByteArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcByteArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByteArray_syncToNative", NULL);
+ jint err = fcByteArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByteArray_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcByte));
@@ -308,21 +308,21 @@ Java_es_ull_pcg_hpc_fancier_array_ByteArray_setBuffer(JNIEnv* env, jobject obj,
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_ByteArray_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_ByteArray_syncToHost(JNIEnv* env, jobject obj) {
fcByteArray* self = fcByteArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByteArray_getJava", FC_VOID_EXPR);
- jint err = fcByteArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByteArray_syncToNative", FC_VOID_EXPR);
+ jint err = fcByteArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByteArray_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_ByteArray_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_ByteArray_syncToDevice(JNIEnv* env, jobject obj) {
fcByteArray* self = fcByteArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByteArray_getJava", FC_VOID_EXPR);
- jint err = fcByteArray_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByteArray_syncToOCL", FC_VOID_EXPR);
+ jint err = fcByteArray_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByteArray_syncToDevice", FC_VOID_EXPR);
}
//
@@ -501,7 +501,7 @@ fcByte fcByteArray_get(fcByteArray* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcByteArray_syncToNative(self);
+ *err = fcByteArray_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -512,7 +512,7 @@ fcError fcByteArray_set(fcByteArray* self, fcInt i, fcByte x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcByteArray_syncToNative(self);
+ fcError err = fcByteArray_syncToHost(self);
if (err)
return err;
@@ -577,7 +577,7 @@ fcError fcByteArray_setBuffer(fcByteArray* self, fcLong len, const void* v) {
return FC_EXCEPTION_SUCCESS;
}
-fcError fcByteArray_syncToNative(fcByteArray* self) {
+fcError fcByteArray_syncToHost(fcByteArray* self) {
if (!fcByteArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -592,7 +592,7 @@ fcError fcByteArray_syncToNative(fcByteArray* self) {
return err;
}
-fcError fcByteArray_syncToOCL(fcByteArray* self) {
+fcError fcByteArray_syncToDevice(fcByteArray* self) {
if (!fcByteArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -745,8 +745,8 @@ Java_es_ull_pcg_hpc_fancier_array_ShortArray_getArray(JNIEnv* env, jobject obj)
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShortArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcShortArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", NULL);
+ jint err = fcShortArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToHost", NULL);
// Create Java array and populate it
jshortArray __tmp_ret = FC_JNI_CALL(env, NewShortArray, self->len);
@@ -798,8 +798,8 @@ Java_es_ull_pcg_hpc_fancier_array_ShortArray_getBufferImpl(JNIEnv* env, jobject
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShortArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcShortArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", NULL);
+ jint err = fcShortArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcShort));
@@ -822,21 +822,21 @@ Java_es_ull_pcg_hpc_fancier_array_ShortArray_setBuffer(JNIEnv* env, jobject obj,
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_ShortArray_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_ShortArray_syncToHost(JNIEnv* env, jobject obj) {
fcShortArray* self = fcShortArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShortArray_getJava", FC_VOID_EXPR);
- jint err = fcShortArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", FC_VOID_EXPR);
+ jint err = fcShortArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_ShortArray_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_ShortArray_syncToDevice(JNIEnv* env, jobject obj) {
fcShortArray* self = fcShortArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShortArray_getJava", FC_VOID_EXPR);
- jint err = fcShortArray_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToOCL", FC_VOID_EXPR);
+ jint err = fcShortArray_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToDevice", FC_VOID_EXPR);
}
//
@@ -1015,7 +1015,7 @@ fcShort fcShortArray_get(fcShortArray* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcShortArray_syncToNative(self);
+ *err = fcShortArray_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -1026,7 +1026,7 @@ fcError fcShortArray_set(fcShortArray* self, fcInt i, fcShort x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcShortArray_syncToNative(self);
+ fcError err = fcShortArray_syncToHost(self);
if (err)
return err;
@@ -1091,7 +1091,7 @@ fcError fcShortArray_setBuffer(fcShortArray* self, fcLong len, const void* v) {
return FC_EXCEPTION_SUCCESS;
}
-fcError fcShortArray_syncToNative(fcShortArray* self) {
+fcError fcShortArray_syncToHost(fcShortArray* self) {
if (!fcShortArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -1106,7 +1106,7 @@ fcError fcShortArray_syncToNative(fcShortArray* self) {
return err;
}
-fcError fcShortArray_syncToOCL(fcShortArray* self) {
+fcError fcShortArray_syncToDevice(fcShortArray* self) {
if (!fcShortArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -1259,8 +1259,8 @@ Java_es_ull_pcg_hpc_fancier_array_IntArray_getArray(JNIEnv* env, jobject obj) {
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcIntArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcIntArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcIntArray_syncToNative", NULL);
+ jint err = fcIntArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcIntArray_syncToHost", NULL);
// Create Java array and populate it
jintArray __tmp_ret = FC_JNI_CALL(env, NewIntArray, self->len);
@@ -1312,8 +1312,8 @@ Java_es_ull_pcg_hpc_fancier_array_IntArray_getBufferImpl(JNIEnv* env, jobject ob
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcIntArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcIntArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcIntArray_syncToNative", NULL);
+ jint err = fcIntArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcIntArray_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcInt));
@@ -1336,21 +1336,21 @@ Java_es_ull_pcg_hpc_fancier_array_IntArray_setBuffer(JNIEnv* env, jobject obj, j
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_IntArray_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_IntArray_syncToHost(JNIEnv* env, jobject obj) {
fcIntArray* self = fcIntArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcIntArray_getJava", FC_VOID_EXPR);
- jint err = fcIntArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcIntArray_syncToNative", FC_VOID_EXPR);
+ jint err = fcIntArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcIntArray_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_IntArray_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_IntArray_syncToDevice(JNIEnv* env, jobject obj) {
fcIntArray* self = fcIntArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcIntArray_getJava", FC_VOID_EXPR);
- jint err = fcIntArray_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcIntArray_syncToOCL", FC_VOID_EXPR);
+ jint err = fcIntArray_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcIntArray_syncToDevice", FC_VOID_EXPR);
}
//
@@ -1529,7 +1529,7 @@ fcInt fcIntArray_get(fcIntArray* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcIntArray_syncToNative(self);
+ *err = fcIntArray_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -1540,7 +1540,7 @@ fcError fcIntArray_set(fcIntArray* self, fcInt i, fcInt x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcIntArray_syncToNative(self);
+ fcError err = fcIntArray_syncToHost(self);
if (err)
return err;
@@ -1605,7 +1605,7 @@ fcError fcIntArray_setBuffer(fcIntArray* self, fcLong len, const void* v) {
return FC_EXCEPTION_SUCCESS;
}
-fcError fcIntArray_syncToNative(fcIntArray* self) {
+fcError fcIntArray_syncToHost(fcIntArray* self) {
if (!fcIntArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -1620,7 +1620,7 @@ fcError fcIntArray_syncToNative(fcIntArray* self) {
return err;
}
-fcError fcIntArray_syncToOCL(fcIntArray* self) {
+fcError fcIntArray_syncToDevice(fcIntArray* self) {
if (!fcIntArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -1773,8 +1773,8 @@ Java_es_ull_pcg_hpc_fancier_array_LongArray_getArray(JNIEnv* env, jobject obj) {
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLongArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcLongArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLongArray_syncToNative", NULL);
+ jint err = fcLongArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLongArray_syncToHost", NULL);
// Create Java array and populate it
jlongArray __tmp_ret = FC_JNI_CALL(env, NewLongArray, self->len);
@@ -1826,8 +1826,8 @@ Java_es_ull_pcg_hpc_fancier_array_LongArray_getBufferImpl(JNIEnv* env, jobject o
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLongArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcLongArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLongArray_syncToNative", NULL);
+ jint err = fcLongArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLongArray_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcLong));
@@ -1850,21 +1850,21 @@ Java_es_ull_pcg_hpc_fancier_array_LongArray_setBuffer(JNIEnv* env, jobject obj,
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_LongArray_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_LongArray_syncToHost(JNIEnv* env, jobject obj) {
fcLongArray* self = fcLongArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLongArray_getJava", FC_VOID_EXPR);
- jint err = fcLongArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLongArray_syncToNative", FC_VOID_EXPR);
+ jint err = fcLongArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLongArray_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_LongArray_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_LongArray_syncToDevice(JNIEnv* env, jobject obj) {
fcLongArray* self = fcLongArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLongArray_getJava", FC_VOID_EXPR);
- jint err = fcLongArray_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLongArray_syncToOCL", FC_VOID_EXPR);
+ jint err = fcLongArray_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLongArray_syncToDevice", FC_VOID_EXPR);
}
//
@@ -2043,7 +2043,7 @@ fcLong fcLongArray_get(fcLongArray* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcLongArray_syncToNative(self);
+ *err = fcLongArray_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -2054,7 +2054,7 @@ fcError fcLongArray_set(fcLongArray* self, fcInt i, fcLong x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcLongArray_syncToNative(self);
+ fcError err = fcLongArray_syncToHost(self);
if (err)
return err;
@@ -2119,7 +2119,7 @@ fcError fcLongArray_setBuffer(fcLongArray* self, fcLong len, const void* v) {
return FC_EXCEPTION_SUCCESS;
}
-fcError fcLongArray_syncToNative(fcLongArray* self) {
+fcError fcLongArray_syncToHost(fcLongArray* self) {
if (!fcLongArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -2134,7 +2134,7 @@ fcError fcLongArray_syncToNative(fcLongArray* self) {
return err;
}
-fcError fcLongArray_syncToOCL(fcLongArray* self) {
+fcError fcLongArray_syncToDevice(fcLongArray* self) {
if (!fcLongArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -2287,8 +2287,8 @@ Java_es_ull_pcg_hpc_fancier_array_FloatArray_getArray(JNIEnv* env, jobject obj)
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloatArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloatArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloatArray_syncToNative", NULL);
+ jint err = fcFloatArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloatArray_syncToHost", NULL);
// Create Java array and populate it
jfloatArray __tmp_ret = FC_JNI_CALL(env, NewFloatArray, self->len);
@@ -2340,8 +2340,8 @@ Java_es_ull_pcg_hpc_fancier_array_FloatArray_getBufferImpl(JNIEnv* env, jobject
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloatArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloatArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloatArray_syncToNative", NULL);
+ jint err = fcFloatArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloatArray_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcFloat));
@@ -2364,21 +2364,21 @@ Java_es_ull_pcg_hpc_fancier_array_FloatArray_setBuffer(JNIEnv* env, jobject obj,
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_FloatArray_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_FloatArray_syncToHost(JNIEnv* env, jobject obj) {
fcFloatArray* self = fcFloatArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloatArray_getJava", FC_VOID_EXPR);
- jint err = fcFloatArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloatArray_syncToNative", FC_VOID_EXPR);
+ jint err = fcFloatArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloatArray_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_FloatArray_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_FloatArray_syncToDevice(JNIEnv* env, jobject obj) {
fcFloatArray* self = fcFloatArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloatArray_getJava", FC_VOID_EXPR);
- jint err = fcFloatArray_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloatArray_syncToOCL", FC_VOID_EXPR);
+ jint err = fcFloatArray_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloatArray_syncToDevice", FC_VOID_EXPR);
}
//
@@ -2557,7 +2557,7 @@ fcFloat fcFloatArray_get(fcFloatArray* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcFloatArray_syncToNative(self);
+ *err = fcFloatArray_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -2568,7 +2568,7 @@ fcError fcFloatArray_set(fcFloatArray* self, fcInt i, fcFloat x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcFloatArray_syncToNative(self);
+ fcError err = fcFloatArray_syncToHost(self);
if (err)
return err;
@@ -2633,7 +2633,7 @@ fcError fcFloatArray_setBuffer(fcFloatArray* self, fcLong len, const void* v) {
return FC_EXCEPTION_SUCCESS;
}
-fcError fcFloatArray_syncToNative(fcFloatArray* self) {
+fcError fcFloatArray_syncToHost(fcFloatArray* self) {
if (!fcFloatArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -2648,7 +2648,7 @@ fcError fcFloatArray_syncToNative(fcFloatArray* self) {
return err;
}
-fcError fcFloatArray_syncToOCL(fcFloatArray* self) {
+fcError fcFloatArray_syncToDevice(fcFloatArray* self) {
if (!fcFloatArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -2801,8 +2801,8 @@ Java_es_ull_pcg_hpc_fancier_array_DoubleArray_getArray(JNIEnv* env, jobject obj)
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDoubleArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcDoubleArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", NULL);
+ jint err = fcDoubleArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToHost", NULL);
// Create Java array and populate it
jdoubleArray __tmp_ret = FC_JNI_CALL(env, NewDoubleArray, self->len);
@@ -2854,8 +2854,8 @@ Java_es_ull_pcg_hpc_fancier_array_DoubleArray_getBufferImpl(JNIEnv* env, jobject
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDoubleArray_getJava", NULL);
// Ensure native array is synced
- jint err = fcDoubleArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", NULL);
+ jint err = fcDoubleArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcDouble));
@@ -2878,21 +2878,21 @@ Java_es_ull_pcg_hpc_fancier_array_DoubleArray_setBuffer(JNIEnv* env, jobject obj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_DoubleArray_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_DoubleArray_syncToHost(JNIEnv* env, jobject obj) {
fcDoubleArray* self = fcDoubleArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDoubleArray_getJava", FC_VOID_EXPR);
- jint err = fcDoubleArray_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", FC_VOID_EXPR);
+ jint err = fcDoubleArray_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_array_DoubleArray_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_array_DoubleArray_syncToDevice(JNIEnv* env, jobject obj) {
fcDoubleArray* self = fcDoubleArray_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDoubleArray_getJava", FC_VOID_EXPR);
- jint err = fcDoubleArray_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToOCL", FC_VOID_EXPR);
+ jint err = fcDoubleArray_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToDevice", FC_VOID_EXPR);
}
//
@@ -3071,7 +3071,7 @@ fcDouble fcDoubleArray_get(fcDoubleArray* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcDoubleArray_syncToNative(self);
+ *err = fcDoubleArray_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -3082,7 +3082,7 @@ fcError fcDoubleArray_set(fcDoubleArray* self, fcInt i, fcDouble x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcDoubleArray_syncToNative(self);
+ fcError err = fcDoubleArray_syncToHost(self);
if (err)
return err;
@@ -3147,7 +3147,7 @@ fcError fcDoubleArray_setBuffer(fcDoubleArray* self, fcLong len, const void* v)
return FC_EXCEPTION_SUCCESS;
}
-fcError fcDoubleArray_syncToNative(fcDoubleArray* self) {
+fcError fcDoubleArray_syncToHost(fcDoubleArray* self) {
if (!fcDoubleArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -3162,7 +3162,7 @@ fcError fcDoubleArray_syncToNative(fcDoubleArray* self) {
return err;
}
-fcError fcDoubleArray_syncToOCL(fcDoubleArray* self) {
+fcError fcDoubleArray_syncToDevice(fcDoubleArray* self) {
if (!fcDoubleArray_valid(self))
return FC_EXCEPTION_INVALID_STATE;
diff --git a/native/core/src/color.c b/native/core/src/color.c
old mode 100755
new mode 100644
diff --git a/native/core/src/exception.c b/native/core/src/exception.c
old mode 100755
new mode 100644
diff --git a/native/core/src/fancier.cpp b/native/core/src/fancier.cpp
index 8098f9d..f98bd85 100644
--- a/native/core/src/fancier.cpp
+++ b/native/core/src/fancier.cpp
@@ -30,6 +30,9 @@
#include
+#include
+
+
/// The name of the directory where the last update time of each generated
/// class is stored, allowing the detection of outdated cached data
#define UPDATE_SUBDIR_NAME "es.ull.pcg.fancier.update"
@@ -42,7 +45,7 @@ typedef jint (*SetupFunc)(JNIEnv* env);
//
const char* FC_CACHE_BASE_PATH = NULL;
-std::string FC_CACHE_BASE_PATH_STR;
+char* FC_CACHE_BASE_PATH_STR;
static fcInt initCount = 0;
@@ -107,16 +110,34 @@ bool setupPrivateFancierDirs() {
//
// Java Interface Implementation
//
+char* appendCharToCharArray(const char* array, char a){
+ size_t len = strlen(array);
+ char* ret = new char[len+2];
+ strcpy(ret, array);
+ ret[len] = a;
+ ret[len+1] = '\0';
+ return ret;
+}
FANCIER_API JNIEXPORT jboolean JNICALL
Java_es_ull_pcg_hpc_fancier_Fancier_initNative__Ljava_lang_String_2(JNIEnv* env, jclass cls,
jstring basePath) {
+
+ const char *str = env->GetStringUTFChars(basePath, NULL);
+ env->ReleaseStringUTFChars(basePath, str);
+
FC_CACHE_BASE_PATH = env->GetStringUTFChars(basePath, NULL);
- FC_CACHE_BASE_PATH_STR = FC_CACHE_BASE_PATH;
+
+ char* TMP_FC_CACHE_BASE_PATH_STR = new char[strlen(FC_CACHE_BASE_PATH) + 1];
+ strcpy(TMP_FC_CACHE_BASE_PATH_STR, FC_CACHE_BASE_PATH);
+ TMP_FC_CACHE_BASE_PATH_STR[strlen(FC_CACHE_BASE_PATH)] = '\0';
+
env->ReleaseStringUTFChars(basePath, FC_CACHE_BASE_PATH);
- FC_CACHE_BASE_PATH_STR += "/";
- FC_CACHE_BASE_PATH = FC_CACHE_BASE_PATH_STR.c_str();
+ FC_CACHE_BASE_PATH_STR = appendCharToCharArray(TMP_FC_CACHE_BASE_PATH_STR, '/');
+ FC_CACHE_BASE_PATH = FC_CACHE_BASE_PATH_STR;
+
+ free(TMP_FC_CACHE_BASE_PATH_STR);
jint err = fcFancier_initJNI(env);
FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFancier_initJNI", JNI_TRUE);
@@ -221,6 +242,7 @@ void fcFancier_releaseJNI(JNIEnv* env) {
fcArray_releaseJNI(env);
fcVector_releaseJNI(env);
fcException_releaseJNI(env);
+ free(FC_CACHE_BASE_PATH_STR);
}
if (--initCount < 0)
diff --git a/native/core/src/image.c b/native/core/src/image.c
old mode 100755
new mode 100644
index 6567a17..9a3dd39
--- a/native/core/src/image.c
+++ b/native/core/src/image.c
@@ -19,12 +19,12 @@
#include
#include
#include
+#include
#include
#include
-
//
// Global Java References
//
@@ -81,8 +81,10 @@ JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_initNative__I
FC_EXCEPTION_HANDLE_ERROR(env, err, "fcRGBAImage_initSize", FC_VOID_EXPR);
}
-JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_initNative___3II(
- JNIEnv* env, jobject obj, jintArray pixels, jint width) {
+
+JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_initNative___3IIZ(
+ JNIEnv* env, jobject obj, jintArray pixels, jint width, jboolean changeFromBGRA) {
+
// Allocate instance
fcRGBAImage* self = fcRGBAImage_allocJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcRGBAImage_allocJava",
@@ -100,8 +102,12 @@ JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_initNative___
jint* __tmp_elems_pixels = FC_JNI_CALL(env, GetIntArrayElements, pixels, NULL);
FC_EXCEPTION_HANDLE_NULL(env, __tmp_elems_pixels, FC_EXCEPTION_ARRAY_GET_ELEMENTS,
"RGBAImage_initNative__[II:pixels", FC_VOID_EXPR);
-
- jint err = fcRGBAImage_initPixels(self, width, __tmp_len / width, __tmp_elems_pixels);
+
+ fcError err;
+ if (changeFromBGRA)
+ err = fcRGBAImage_initPixelsBGRA(self, width, __tmp_len / width, __tmp_elems_pixels);
+ else
+ err = fcRGBAImage_initPixels(self, width, __tmp_len / width, __tmp_elems_pixels);
// Free temporary native array reference
FC_JNI_CALL(env, ReleaseIntArrayElements, pixels, __tmp_elems_pixels, JNI_ABORT);
@@ -195,10 +201,11 @@ JNIEXPORT jobject JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_getPixels(
(jlong) self->pixels);
}
-JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_setPixels__3II(JNIEnv* env,
+JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_setPixels___3IIZ(JNIEnv* env,
jobject obj,
jintArray pixels,
- jint width) {
+ jint width,
+ jboolean changeFromBGRA) {
fcRGBAImage* self = fcRGBAImage_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcRGBAImage_getJava",
FC_VOID_EXPR);
@@ -216,7 +223,11 @@ JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_setPixels__3I
FC_EXCEPTION_HANDLE_NULL(env, __tmp_elems_pixels, FC_EXCEPTION_ARRAY_GET_ELEMENTS,
"RGBAImage_setPixels:pixels", FC_VOID_EXPR);
- jint err = fcRGBAImage_setPixels(self, width, __tmp_len / width, __tmp_elems_pixels);
+ jint err;
+ if (changeFromBGRA == true)
+ err = fcRGBAImage_setPixelsChangeBGRA(self, width, __tmp_len / width, __tmp_elems_pixels);
+ else
+ err = fcRGBAImage_setPixels(self, width, __tmp_len / width, __tmp_elems_pixels);
// Free temporary native array reference
FC_JNI_CALL(env, ReleaseIntArrayElements, pixels, __tmp_elems_pixels, JNI_ABORT);
@@ -263,24 +274,24 @@ JNIEXPORT jint JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_getHeight(JNI
return self->dims.y;
}
-JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_syncToNative(JNIEnv* env,
+JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_syncToHost(JNIEnv* env,
jobject obj) {
fcRGBAImage* self = fcRGBAImage_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcRGBAImage_getJava",
FC_VOID_EXPR);
- jint err = fcRGBAImage_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcRGBAImage_syncToNative", FC_VOID_EXPR);
+ jint err = fcRGBAImage_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcRGBAImage_syncToHost", FC_VOID_EXPR);
}
-JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_syncToOCL(JNIEnv* env,
+JNIEXPORT void JNICALL Java_es_ull_pcg_hpc_fancier_image_RGBAImage_syncToDevice(JNIEnv* env,
jobject obj) {
fcRGBAImage* self = fcRGBAImage_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcRGBAImage_getJava",
FC_VOID_EXPR);
- jint err = fcRGBAImage_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcRGBAImage_syncToOCL", FC_VOID_EXPR);
+ jint err = fcRGBAImage_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcRGBAImage_syncToDevice", FC_VOID_EXPR);
}
#ifdef __ANDROID__
@@ -389,7 +400,32 @@ Java_es_ull_pcg_hpc_fancier_image_RGBAImage_updateBitmap__Landroid_graphics_Bitm
FC_EXCEPTION_HANDLE_ERROR(env, err, "freeBitmap", FC_VOID_EXPR);
}
-#endif // __ANDROID__
+#endif // __ANDROID__
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_image_RGBAImage_updateArray___3IZ(JNIEnv* env,
+ jobject obj,
+ jintArray pixels,
+ jboolean changeFromBGRA) {
+ jint err;
+
+ // Get instance
+ fcRGBAImage* self = fcRGBAImage_getJava(env, obj);
+ FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcRGBAImage_getJava",
+ FC_VOID_EXPR);
+
+ FC_EXCEPTION_HANDLE_NULL(env, pixels, FC_EXCEPTION_BAD_PARAMETER,
+ "RGBAImage_updateBufferedImage__Ljava_awt_image_BufferedImage_2", FC_VOID_EXPR);
+
+ jint* __tmp_pixels = (*env)->GetIntArrayElements(env, pixels, NULL);
+ jint len = (*env)->GetArrayLength(env, pixels);
+
+ err = fcRGBAImage_updateArray(self, &__tmp_pixels, len, changeFromBGRA);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcRGBAImage_updateArray", FC_VOID_EXPR);
+
+ (*env)->ReleaseIntArrayElements(env, pixels, __tmp_pixels, JNI_COMMIT);
+}
+
//
// Native Interface Implementation
@@ -484,6 +520,97 @@ fcError fcRGBAImage_initPixels(fcRGBAImage* self, fcInt width, fcInt height, con
return FC_EXCEPTION_SUCCESS;
}
+fcError fcRGBAImage_initPixelsBGRA(fcRGBAImage* self, fcInt width, fcInt height, const fcInt* pixels) {
+ fcError err;
+
+ // Check parameters
+ if (pixels == NULL)
+ return FC_EXCEPTION_BAD_PARAMETER;
+
+ if (width <= 0 || height <= 0)
+ return FC_EXCEPTION_BITMAP_BAD_DIMENSIONS;
+
+ err = fcRGBAImage_init(self);
+ if (err)
+ return err;
+
+ // Initialize dimensions
+ self->dims.x = width;
+ self->dims.y = height;
+
+ // Allocate array
+ self->pixels = calloc(1, sizeof(fcByte4Array));
+ err =
+ fcRGBAImage_initArrayColorComponentsBGRA(self, self->dims.x * self->dims.y * 4, (const fcByte*) pixels);
+ if (err) {
+ fcByte4Array_release(self->pixels);
+ self->pixels = NULL;
+ return err;
+ }
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
+fcError fcRGBAImage_initArrayColorComponentsBGRA(fcRGBAImage* self, fcInt len, const fcByte* v) {
+ fcError err;
+
+ // Check parameters
+ if (len <= 0 || len % 4 != 0)
+ return FC_EXCEPTION_ARRAY_BAD_LENGTH;
+
+ if (v == NULL)
+ return FC_EXCEPTION_BAD_PARAMETER;
+
+ err = fcByte4Array_init(self->pixels);
+ if (err) return err;
+
+ // Initialize number of elements according to vector length
+ self->pixels->len = len / 4;
+
+ // Allocate array
+ self->pixels->ocl = clCreateBuffer(fcOpenCL_rt.context, CL_MEM_READ_WRITE | CL_MEM_ALLOC_HOST_PTR, self->pixels->len * sizeof(fcByte4), NULL, &err);
+ if (err) return err;
+
+ // Initialize array
+ self->pixels->location = FC_ARRAY_LOCATION_OPENCL;
+ err = fcRGBAImage_setArrayColorComponentsBGRA(self, len, v);
+
+ if (err) {
+ self->pixels->location = FC_ARRAY_LOCATION_NONE;
+ clReleaseMemObject(self->pixels->ocl);
+ self->pixels->ocl = NULL;
+ return err;
+ }
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
+fcError fcRGBAImage_setArrayColorComponentsBGRA(fcRGBAImage* self, fcInt len, const fcByte* v) {
+ fcError err;
+
+ // Check parameters
+ if (len % 4 != 0 || len / 4 != self->pixels->len)
+ return FC_EXCEPTION_ARRAY_BAD_LENGTH;
+
+ if (v == NULL)
+ return FC_EXCEPTION_BAD_PARAMETER;
+
+ // TODO If not unified memory, don't sync and just set native data and update location
+ // Initialize array
+ // Map to host, and write data considering alignment
+ err = fcByte4Array_syncToHost(self->pixels);
+ if (err) return err;
+
+ for (fcLong i = 0; i < self->pixels->len; i++) {
+ // Change R and B components order in little endian arquitectures
+ fcByte4 v_tmp = {{ (int)v[i * 4 + 2], (int)v[i * 4 + 1], (int)v[i * 4], (int)v[i * 4 + 3] }};
+ if (!memcpy(&self->pixels->c[i].s, &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
fcError fcRGBAImage_initCopy(fcRGBAImage* self, const fcRGBAImage* other) {
fcError err;
@@ -583,6 +710,23 @@ fcError fcRGBAImage_setPixels(fcRGBAImage* self, fcInt width, fcInt height, cons
(const fcByte*) pixels);
}
+fcError fcRGBAImage_setPixelsChangeBGRA(fcRGBAImage* self, fcInt width, fcInt height, fcInt* pixels) {
+
+ if (!fcRGBAImage_valid(self))
+ return FC_EXCEPTION_INVALID_STATE;
+
+ // Check parameters
+ if (pixels == NULL)
+ return FC_EXCEPTION_BAD_PARAMETER;
+
+ if (self->dims.x != width || self->dims.y != height)
+ return FC_EXCEPTION_BITMAP_BAD_DIMENSIONS;
+
+ // Set data
+ return fcRGBAImage_setArrayColorComponentsBGRA(self, self->dims.x * self->dims.y * 4,
+ (const fcByte*) pixels);
+}
+
fcError fcRGBAImage_setPixelsCopy(fcRGBAImage* self, const fcRGBAImage* image) {
if (!fcRGBAImage_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -598,18 +742,18 @@ fcError fcRGBAImage_setPixelsCopy(fcRGBAImage* self, const fcRGBAImage* image) {
return fcByte4Array_setCopy(self->pixels, image->pixels);
}
-fcError fcRGBAImage_syncToNative(fcRGBAImage* self) {
+fcError fcRGBAImage_syncToHost(fcRGBAImage* self) {
if (!fcRGBAImage_valid(self))
return FC_EXCEPTION_INVALID_STATE;
- return fcByte4Array_syncToNative(self->pixels);
+ return fcByte4Array_syncToHost(self->pixels);
}
-fcError fcRGBAImage_syncToOCL(fcRGBAImage* self) {
+fcError fcRGBAImage_syncToDevice(fcRGBAImage* self) {
if (!fcRGBAImage_valid(self))
return FC_EXCEPTION_INVALID_STATE;
- return fcByte4Array_syncToOCL(self->pixels);
+ return fcByte4Array_syncToDevice(self->pixels);
}
fcBool fcRGBAImage_valid(const fcRGBAImage* self) {
@@ -652,7 +796,7 @@ fcError fcRGBAImage_updateBitmap(fcRGBAImage* self, AndroidBitmapInfo info, void
if (info.width != self->dims.x || info.height != self->dims.y)
return FC_EXCEPTION_BITMAP_BAD_DIMENSIONS;
- fcError err = fcByte4Array_syncToNative(self->pixels);
+ fcError err = fcByte4Array_syncToHost(self->pixels);
if (err)
return err;
@@ -661,4 +805,24 @@ fcError fcRGBAImage_updateBitmap(fcRGBAImage* self, AndroidBitmapInfo info, void
FC_EXCEPTION_FAILED_COPY;
}
-#endif // __ANDROID__
+#endif // __ANDROID__
+
+fcError fcRGBAImage_updateArray(fcRGBAImage* self, jint** __tmp_pixels, jint pixels_size, jboolean changeFromBGRA) {
+
+ fcError err = fcByte4Array_syncToHost(self->pixels);
+
+ if (changeFromBGRA) {
+ for (fcLong i = 0; i < pixels_size; i++) {
+ fcByte4 v_tmp = {{ self->pixels->c[i].z, self->pixels->c[i].y, self->pixels->c[i].x, self->pixels->c[i].w }};
+
+ if (!memcpy(((fcByte4*)(*__tmp_pixels) + i ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+ else {
+ if (!memcpy(__tmp_pixels, self->pixels->c, self->pixels->len * sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+
+ return FC_EXCEPTION_SUCCESS;
+}
diff --git a/native/core/src/java.c b/native/core/src/java.c
old mode 100755
new mode 100644
diff --git a/native/core/src/log.c b/native/core/src/log.c
old mode 100755
new mode 100644
diff --git a/native/core/src/ocl.c b/native/core/src/ocl.c
old mode 100755
new mode 100644
index e0dffa8..36597a4
--- a/native/core/src/ocl.c
+++ b/native/core/src/ocl.c
@@ -28,7 +28,8 @@
#define BUFFER_SIZE 1024 * 8 // 8K buffer
-#define MATH_LIB_NAME "math_lib.cl"
+#define MATH_LIB_NAME "fc_math.cl"
+#define IMAGE_LIB_NAME "fc_image.cl"
// Public global variables
@@ -214,8 +215,8 @@ static void logOpenCLPlatformInfo(cl_platform_id platformId) {
FC_LOGINFO_FMT(" - Vendor: %s", buffer);
FC_LOGINFO_FMT(" - Number of devices: %u", numDevices);
- for (i = 0; i < numDevices; ++i)
- logOpenCLDeviceInfo(devices[i]);
+// for (i = 0; i < numDevices; ++i)
+// logOpenCLDeviceInfo(devices[i]);
if (devices)
free(devices);
@@ -255,7 +256,7 @@ jint fcOpenCL_initJNI(JNIEnv* env) {
fcOpenCL_logInfo();
fcOpenCL_rt.context = clCreateContext(NULL, 1, &fcOpenCL_rt.device, NULL, NULL, &err);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcOpenCL_initJNI", FC_EXCEPTION_OTHER);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcOpenCL_initJNI", FC_EXCEPTION_OTHER);
fcOpenCL_rt.queue = clCreateCommandQueue(fcOpenCL_rt.context, fcOpenCL_rt.device,
CL_QUEUE_PROFILING_ENABLE, &err);
@@ -280,11 +281,11 @@ void fcOpenCL_releaseJNI(JNIEnv* env) {
void fcOpenCL_logInfo() {
cl_uint numPlatforms, i;
cl_platform_id* platforms = getPlatformIDs(&numPlatforms, NULL);
-
+
FC_LOGINFO_FMT("- Number of platforms: %u", numPlatforms);
- for (i = 0; i < numPlatforms; ++i)
- logOpenCLPlatformInfo(platforms[i]);
-
+ //for (i = 0; i < numPlatforms; ++i)
+ // logOpenCLPlatformInfo(platforms[i]);
+
if (platforms)
free(platforms);
}
@@ -307,25 +308,33 @@ cl_program fcOpenCL_compileKernelFile(const char* kernel_dir, const char* file_n
if (err == NULL)
err = &__tmp_err;
- size_t lengths[2];
- char* src[2];
+ size_t lengths[3];
+ char* src[3];
- // Read Fancier OpenCL library
+ // Read Fancier OpenCL libraries
*err = fcUtils_readFile(kernel_dir, MATH_LIB_NAME, &lengths[0], &src[0]);
if (*err)
return NULL;
+ *err = fcUtils_readFile(kernel_dir, IMAGE_LIB_NAME, &lengths[1], &src[1]);
+ if (*err) {
+ free(src[0]);
+ return NULL;
+ }
+
// Read program
- *err = fcUtils_readFile(kernel_dir, file_name, &lengths[1], &src[1]);
+ *err = fcUtils_readFile(kernel_dir, file_name, &lengths[2], &src[2]);
if (*err) {
free(src[0]);
+ free(src[1]);
return NULL;
}
// Compile and return program
- cl_program program = fcOpenCL_compileKernel(2, (const char**) src, err);
+ cl_program program = fcOpenCL_compileKernel(3, (const char**) src, err);
free(src[0]);
free(src[1]);
+ free(src[2]);
return program;
}
@@ -337,25 +346,33 @@ cl_program fcOpenCL_compileKernelAsset(JNIEnv* env, jobject asset_manager, const
if (err == NULL)
err = &__tmp_err;
- size_t lengths[2];
- char* src[2];
+ size_t lengths[3];
+ char* src[3];
- // Read Fancier OpenCL library
+ // Read Fancier OpenCL libraries
*err = fcUtils_readAsset(env, asset_manager, kernel_dir, MATH_LIB_NAME, &lengths[0], &src[0]);
if (*err)
return NULL;
+ *err = fcUtils_readAsset(env, asset_manager, kernel_dir, IMAGE_LIB_NAME, &lengths[1], &src[1]);
+ if (*err) {
+ free(src[0]);
+ return NULL;
+ }
+
// Read program
- *err = fcUtils_readAsset(env, asset_manager, kernel_dir, file_name, &lengths[1], &src[1]);
+ *err = fcUtils_readAsset(env, asset_manager, kernel_dir, file_name, &lengths[2], &src[2]);
if (*err) {
free(src[0]);
+ free(src[1]);
return NULL;
}
// Compile and return program
- cl_program program = fcOpenCL_compileKernel(2, (const char**) src, err);
+ cl_program program = fcOpenCL_compileKernel(3, (const char**) src, err);
free(src[0]);
free(src[1]);
+ free(src[2]);
return program;
}
diff --git a/native/core/src/vector_array.c b/native/core/src/vector_array.c
index 1519730..ddfb9b4 100644
--- a/native/core/src/vector_array.c
+++ b/native/core/src/vector_array.c
@@ -392,8 +392,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte2Array_getArray(JNIEnv* env, jobjec
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcByte2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte2Array_syncToNative", NULL);
+ jint err = fcByte2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte2Array_syncToHost", NULL);
// Create Java array and populate it
jbyteArray __tmp_ret = FC_JNI_CALL(env, NewByteArray, self->len * 2);
@@ -456,8 +456,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte2Array_getBufferImpl(JNIEnv* env, j
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcByte2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte2Array_syncToNative", NULL);
+ jint err = fcByte2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte2Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcByte2));
@@ -480,21 +480,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte2Array_setBuffer(JNIEnv* env, jobje
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Byte2Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Byte2Array_syncToHost(JNIEnv* env, jobject obj) {
fcByte2Array* self = fcByte2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte2Array_getJava", FC_VOID_EXPR);
- jint err = fcByte2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte2Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcByte2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte2Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Byte2Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Byte2Array_syncToDevice(JNIEnv* env, jobject obj) {
fcByte2Array* self = fcByte2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte2Array_getJava", FC_VOID_EXPR);
- jint err = fcByte2Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte2Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcByte2Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte2Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -673,7 +673,7 @@ fcByte2 fcByte2Array_get(fcByte2Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcByte2Array_syncToNative(self);
+ *err = fcByte2Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -684,7 +684,7 @@ fcError fcByte2Array_set(fcByte2Array* self, fcInt i, fcByte2 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcByte2Array_syncToNative(self);
+ fcError err = fcByte2Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -704,7 +704,7 @@ fcError fcByte2Array_setArray(fcByte2Array* self, fcInt len, const fcByte* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcByte2Array_syncToNative(self);
+ err = fcByte2Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -753,13 +753,13 @@ fcError fcByte2Array_setBuffer(fcByte2Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcByte2Array_syncToNative(self);
+ fcError err = fcByte2Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcByte2Array_syncToNative(fcByte2Array* self) {
+fcError fcByte2Array_syncToHost(fcByte2Array* self) {
if (!fcByte2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -774,7 +774,7 @@ fcError fcByte2Array_syncToNative(fcByte2Array* self) {
return err;
}
-fcError fcByte2Array_syncToOCL(fcByte2Array* self) {
+fcError fcByte2Array_syncToDevice(fcByte2Array* self) {
if (!fcByte2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -932,8 +932,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte3Array_getArray(JNIEnv* env, jobjec
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcByte3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte3Array_syncToNative", NULL);
+ jint err = fcByte3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte3Array_syncToHost", NULL);
// Create Java array and populate it
jbyteArray __tmp_ret = FC_JNI_CALL(env, NewByteArray, self->len * 3);
@@ -996,8 +996,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte3Array_getBufferImpl(JNIEnv* env, j
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcByte3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte3Array_syncToNative", NULL);
+ jint err = fcByte3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte3Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcByte3));
@@ -1020,21 +1020,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte3Array_setBuffer(JNIEnv* env, jobje
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Byte3Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Byte3Array_syncToHost(JNIEnv* env, jobject obj) {
fcByte3Array* self = fcByte3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte3Array_getJava", FC_VOID_EXPR);
- jint err = fcByte3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte3Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcByte3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte3Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Byte3Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Byte3Array_syncToDevice(JNIEnv* env, jobject obj) {
fcByte3Array* self = fcByte3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte3Array_getJava", FC_VOID_EXPR);
- jint err = fcByte3Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte3Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcByte3Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte3Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -1213,7 +1213,7 @@ fcByte3 fcByte3Array_get(fcByte3Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcByte3Array_syncToNative(self);
+ *err = fcByte3Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -1224,7 +1224,7 @@ fcError fcByte3Array_set(fcByte3Array* self, fcInt i, fcByte3 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcByte3Array_syncToNative(self);
+ fcError err = fcByte3Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -1244,7 +1244,7 @@ fcError fcByte3Array_setArray(fcByte3Array* self, fcInt len, const fcByte* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcByte3Array_syncToNative(self);
+ err = fcByte3Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -1293,13 +1293,13 @@ fcError fcByte3Array_setBuffer(fcByte3Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcByte3Array_syncToNative(self);
+ fcError err = fcByte3Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcByte3Array_syncToNative(fcByte3Array* self) {
+fcError fcByte3Array_syncToHost(fcByte3Array* self) {
if (!fcByte3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -1314,7 +1314,7 @@ fcError fcByte3Array_syncToNative(fcByte3Array* self) {
return err;
}
-fcError fcByte3Array_syncToOCL(fcByte3Array* self) {
+fcError fcByte3Array_syncToDevice(fcByte3Array* self) {
if (!fcByte3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -1472,8 +1472,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte4Array_getArray(JNIEnv* env, jobjec
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcByte4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative", NULL);
+ jint err = fcByte4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToHost", NULL);
// Create Java array and populate it
jbyteArray __tmp_ret = FC_JNI_CALL(env, NewByteArray, self->len * 4);
@@ -1536,8 +1536,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte4Array_getBufferImpl(JNIEnv* env, j
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcByte4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative", NULL);
+ jint err = fcByte4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcByte4));
@@ -1560,21 +1560,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte4Array_setBuffer(JNIEnv* env, jobje
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Byte4Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Byte4Array_syncToHost(JNIEnv* env, jobject obj) {
fcByte4Array* self = fcByte4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte4Array_getJava", FC_VOID_EXPR);
- jint err = fcByte4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcByte4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Byte4Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Byte4Array_syncToDevice(JNIEnv* env, jobject obj) {
fcByte4Array* self = fcByte4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte4Array_getJava", FC_VOID_EXPR);
- jint err = fcByte4Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcByte4Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -1753,7 +1753,7 @@ fcByte4 fcByte4Array_get(fcByte4Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcByte4Array_syncToNative(self);
+ *err = fcByte4Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -1764,7 +1764,7 @@ fcError fcByte4Array_set(fcByte4Array* self, fcInt i, fcByte4 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcByte4Array_syncToNative(self);
+ fcError err = fcByte4Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -1784,7 +1784,7 @@ fcError fcByte4Array_setArray(fcByte4Array* self, fcInt len, const fcByte* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcByte4Array_syncToNative(self);
+ err = fcByte4Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -1833,13 +1833,13 @@ fcError fcByte4Array_setBuffer(fcByte4Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcByte4Array_syncToNative(self);
+ fcError err = fcByte4Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcByte4Array_syncToNative(fcByte4Array* self) {
+fcError fcByte4Array_syncToHost(fcByte4Array* self) {
if (!fcByte4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -1854,7 +1854,7 @@ fcError fcByte4Array_syncToNative(fcByte4Array* self) {
return err;
}
-fcError fcByte4Array_syncToOCL(fcByte4Array* self) {
+fcError fcByte4Array_syncToDevice(fcByte4Array* self) {
if (!fcByte4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -2012,8 +2012,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte8Array_getArray(JNIEnv* env, jobjec
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcByte8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte8Array_syncToNative", NULL);
+ jint err = fcByte8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte8Array_syncToHost", NULL);
// Create Java array and populate it
jbyteArray __tmp_ret = FC_JNI_CALL(env, NewByteArray, self->len * 8);
@@ -2076,8 +2076,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte8Array_getBufferImpl(JNIEnv* env, j
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcByte8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte8Array_syncToNative", NULL);
+ jint err = fcByte8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte8Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcByte8));
@@ -2100,21 +2100,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Byte8Array_setBuffer(JNIEnv* env, jobje
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Byte8Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Byte8Array_syncToHost(JNIEnv* env, jobject obj) {
fcByte8Array* self = fcByte8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte8Array_getJava", FC_VOID_EXPR);
- jint err = fcByte8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte8Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcByte8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte8Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Byte8Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Byte8Array_syncToDevice(JNIEnv* env, jobject obj) {
fcByte8Array* self = fcByte8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcByte8Array_getJava", FC_VOID_EXPR);
- jint err = fcByte8Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte8Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcByte8Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte8Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -2293,7 +2293,7 @@ fcByte8 fcByte8Array_get(fcByte8Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcByte8Array_syncToNative(self);
+ *err = fcByte8Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -2304,7 +2304,7 @@ fcError fcByte8Array_set(fcByte8Array* self, fcInt i, fcByte8 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcByte8Array_syncToNative(self);
+ fcError err = fcByte8Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -2324,7 +2324,7 @@ fcError fcByte8Array_setArray(fcByte8Array* self, fcInt len, const fcByte* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcByte8Array_syncToNative(self);
+ err = fcByte8Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -2373,13 +2373,13 @@ fcError fcByte8Array_setBuffer(fcByte8Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcByte8Array_syncToNative(self);
+ fcError err = fcByte8Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcByte8Array_syncToNative(fcByte8Array* self) {
+fcError fcByte8Array_syncToHost(fcByte8Array* self) {
if (!fcByte8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -2394,7 +2394,7 @@ fcError fcByte8Array_syncToNative(fcByte8Array* self) {
return err;
}
-fcError fcByte8Array_syncToOCL(fcByte8Array* self) {
+fcError fcByte8Array_syncToDevice(fcByte8Array* self) {
if (!fcByte8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -2552,8 +2552,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short2Array_getArray(JNIEnv* env, jobje
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcShort2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort2Array_syncToNative", NULL);
+ jint err = fcShort2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort2Array_syncToHost", NULL);
// Create Java array and populate it
jshortArray __tmp_ret = FC_JNI_CALL(env, NewShortArray, self->len * 2);
@@ -2616,8 +2616,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short2Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcShort2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort2Array_syncToNative", NULL);
+ jint err = fcShort2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort2Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcShort2));
@@ -2640,21 +2640,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short2Array_setBuffer(JNIEnv* env, jobj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Short2Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Short2Array_syncToHost(JNIEnv* env, jobject obj) {
fcShort2Array* self = fcShort2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort2Array_getJava", FC_VOID_EXPR);
- jint err = fcShort2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort2Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcShort2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort2Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Short2Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Short2Array_syncToDevice(JNIEnv* env, jobject obj) {
fcShort2Array* self = fcShort2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort2Array_getJava", FC_VOID_EXPR);
- jint err = fcShort2Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort2Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcShort2Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort2Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -2833,7 +2833,7 @@ fcShort2 fcShort2Array_get(fcShort2Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcShort2Array_syncToNative(self);
+ *err = fcShort2Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -2844,7 +2844,7 @@ fcError fcShort2Array_set(fcShort2Array* self, fcInt i, fcShort2 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcShort2Array_syncToNative(self);
+ fcError err = fcShort2Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -2864,7 +2864,7 @@ fcError fcShort2Array_setArray(fcShort2Array* self, fcInt len, const fcShort* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcShort2Array_syncToNative(self);
+ err = fcShort2Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -2913,13 +2913,13 @@ fcError fcShort2Array_setBuffer(fcShort2Array* self, fcLong len, const void* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcShort2Array_syncToNative(self);
+ fcError err = fcShort2Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcShort2Array_syncToNative(fcShort2Array* self) {
+fcError fcShort2Array_syncToHost(fcShort2Array* self) {
if (!fcShort2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -2934,7 +2934,7 @@ fcError fcShort2Array_syncToNative(fcShort2Array* self) {
return err;
}
-fcError fcShort2Array_syncToOCL(fcShort2Array* self) {
+fcError fcShort2Array_syncToDevice(fcShort2Array* self) {
if (!fcShort2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -3092,8 +3092,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short3Array_getArray(JNIEnv* env, jobje
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcShort3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort3Array_syncToNative", NULL);
+ jint err = fcShort3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort3Array_syncToHost", NULL);
// Create Java array and populate it
jshortArray __tmp_ret = FC_JNI_CALL(env, NewShortArray, self->len * 3);
@@ -3156,8 +3156,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short3Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcShort3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort3Array_syncToNative", NULL);
+ jint err = fcShort3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort3Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcShort3));
@@ -3180,21 +3180,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short3Array_setBuffer(JNIEnv* env, jobj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Short3Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Short3Array_syncToHost(JNIEnv* env, jobject obj) {
fcShort3Array* self = fcShort3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort3Array_getJava", FC_VOID_EXPR);
- jint err = fcShort3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort3Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcShort3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort3Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Short3Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Short3Array_syncToDevice(JNIEnv* env, jobject obj) {
fcShort3Array* self = fcShort3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort3Array_getJava", FC_VOID_EXPR);
- jint err = fcShort3Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort3Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcShort3Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort3Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -3373,7 +3373,7 @@ fcShort3 fcShort3Array_get(fcShort3Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcShort3Array_syncToNative(self);
+ *err = fcShort3Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -3384,7 +3384,7 @@ fcError fcShort3Array_set(fcShort3Array* self, fcInt i, fcShort3 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcShort3Array_syncToNative(self);
+ fcError err = fcShort3Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -3404,7 +3404,7 @@ fcError fcShort3Array_setArray(fcShort3Array* self, fcInt len, const fcShort* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcShort3Array_syncToNative(self);
+ err = fcShort3Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -3453,13 +3453,13 @@ fcError fcShort3Array_setBuffer(fcShort3Array* self, fcLong len, const void* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcShort3Array_syncToNative(self);
+ fcError err = fcShort3Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcShort3Array_syncToNative(fcShort3Array* self) {
+fcError fcShort3Array_syncToHost(fcShort3Array* self) {
if (!fcShort3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -3474,7 +3474,7 @@ fcError fcShort3Array_syncToNative(fcShort3Array* self) {
return err;
}
-fcError fcShort3Array_syncToOCL(fcShort3Array* self) {
+fcError fcShort3Array_syncToDevice(fcShort3Array* self) {
if (!fcShort3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -3632,8 +3632,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short4Array_getArray(JNIEnv* env, jobje
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcShort4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort4Array_syncToNative", NULL);
+ jint err = fcShort4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort4Array_syncToHost", NULL);
// Create Java array and populate it
jshortArray __tmp_ret = FC_JNI_CALL(env, NewShortArray, self->len * 4);
@@ -3696,8 +3696,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short4Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcShort4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort4Array_syncToNative", NULL);
+ jint err = fcShort4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort4Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcShort4));
@@ -3720,21 +3720,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short4Array_setBuffer(JNIEnv* env, jobj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Short4Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Short4Array_syncToHost(JNIEnv* env, jobject obj) {
fcShort4Array* self = fcShort4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort4Array_getJava", FC_VOID_EXPR);
- jint err = fcShort4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort4Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcShort4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort4Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Short4Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Short4Array_syncToDevice(JNIEnv* env, jobject obj) {
fcShort4Array* self = fcShort4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort4Array_getJava", FC_VOID_EXPR);
- jint err = fcShort4Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort4Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcShort4Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort4Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -3913,7 +3913,7 @@ fcShort4 fcShort4Array_get(fcShort4Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcShort4Array_syncToNative(self);
+ *err = fcShort4Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -3924,7 +3924,7 @@ fcError fcShort4Array_set(fcShort4Array* self, fcInt i, fcShort4 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcShort4Array_syncToNative(self);
+ fcError err = fcShort4Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -3944,7 +3944,7 @@ fcError fcShort4Array_setArray(fcShort4Array* self, fcInt len, const fcShort* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcShort4Array_syncToNative(self);
+ err = fcShort4Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -3993,13 +3993,13 @@ fcError fcShort4Array_setBuffer(fcShort4Array* self, fcLong len, const void* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcShort4Array_syncToNative(self);
+ fcError err = fcShort4Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcShort4Array_syncToNative(fcShort4Array* self) {
+fcError fcShort4Array_syncToHost(fcShort4Array* self) {
if (!fcShort4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -4014,7 +4014,7 @@ fcError fcShort4Array_syncToNative(fcShort4Array* self) {
return err;
}
-fcError fcShort4Array_syncToOCL(fcShort4Array* self) {
+fcError fcShort4Array_syncToDevice(fcShort4Array* self) {
if (!fcShort4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -4172,8 +4172,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short8Array_getArray(JNIEnv* env, jobje
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcShort8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort8Array_syncToNative", NULL);
+ jint err = fcShort8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort8Array_syncToHost", NULL);
// Create Java array and populate it
jshortArray __tmp_ret = FC_JNI_CALL(env, NewShortArray, self->len * 8);
@@ -4236,8 +4236,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short8Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcShort8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort8Array_syncToNative", NULL);
+ jint err = fcShort8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort8Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcShort8));
@@ -4260,21 +4260,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Short8Array_setBuffer(JNIEnv* env, jobj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Short8Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Short8Array_syncToHost(JNIEnv* env, jobject obj) {
fcShort8Array* self = fcShort8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort8Array_getJava", FC_VOID_EXPR);
- jint err = fcShort8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort8Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcShort8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort8Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Short8Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Short8Array_syncToDevice(JNIEnv* env, jobject obj) {
fcShort8Array* self = fcShort8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcShort8Array_getJava", FC_VOID_EXPR);
- jint err = fcShort8Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort8Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcShort8Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShort8Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -4453,7 +4453,7 @@ fcShort8 fcShort8Array_get(fcShort8Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcShort8Array_syncToNative(self);
+ *err = fcShort8Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -4464,7 +4464,7 @@ fcError fcShort8Array_set(fcShort8Array* self, fcInt i, fcShort8 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcShort8Array_syncToNative(self);
+ fcError err = fcShort8Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -4484,7 +4484,7 @@ fcError fcShort8Array_setArray(fcShort8Array* self, fcInt len, const fcShort* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcShort8Array_syncToNative(self);
+ err = fcShort8Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -4533,13 +4533,13 @@ fcError fcShort8Array_setBuffer(fcShort8Array* self, fcLong len, const void* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcShort8Array_syncToNative(self);
+ fcError err = fcShort8Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcShort8Array_syncToNative(fcShort8Array* self) {
+fcError fcShort8Array_syncToHost(fcShort8Array* self) {
if (!fcShort8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -4554,7 +4554,7 @@ fcError fcShort8Array_syncToNative(fcShort8Array* self) {
return err;
}
-fcError fcShort8Array_syncToOCL(fcShort8Array* self) {
+fcError fcShort8Array_syncToDevice(fcShort8Array* self) {
if (!fcShort8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -4712,8 +4712,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int2Array_getArray(JNIEnv* env, jobject
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcInt2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt2Array_syncToNative", NULL);
+ jint err = fcInt2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt2Array_syncToHost", NULL);
// Create Java array and populate it
jintArray __tmp_ret = FC_JNI_CALL(env, NewIntArray, self->len * 2);
@@ -4776,8 +4776,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int2Array_getBufferImpl(JNIEnv* env, jo
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcInt2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt2Array_syncToNative", NULL);
+ jint err = fcInt2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt2Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcInt2));
@@ -4800,21 +4800,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int2Array_setBuffer(JNIEnv* env, jobjec
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Int2Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Int2Array_syncToHost(JNIEnv* env, jobject obj) {
fcInt2Array* self = fcInt2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt2Array_getJava", FC_VOID_EXPR);
- jint err = fcInt2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt2Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcInt2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt2Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Int2Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Int2Array_syncToDevice(JNIEnv* env, jobject obj) {
fcInt2Array* self = fcInt2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt2Array_getJava", FC_VOID_EXPR);
- jint err = fcInt2Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt2Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcInt2Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt2Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -4993,7 +4993,7 @@ fcInt2 fcInt2Array_get(fcInt2Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcInt2Array_syncToNative(self);
+ *err = fcInt2Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -5004,7 +5004,7 @@ fcError fcInt2Array_set(fcInt2Array* self, fcInt i, fcInt2 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcInt2Array_syncToNative(self);
+ fcError err = fcInt2Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -5024,7 +5024,7 @@ fcError fcInt2Array_setArray(fcInt2Array* self, fcInt len, const fcInt* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcInt2Array_syncToNative(self);
+ err = fcInt2Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -5073,13 +5073,13 @@ fcError fcInt2Array_setBuffer(fcInt2Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcInt2Array_syncToNative(self);
+ fcError err = fcInt2Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcInt2Array_syncToNative(fcInt2Array* self) {
+fcError fcInt2Array_syncToHost(fcInt2Array* self) {
if (!fcInt2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -5094,7 +5094,7 @@ fcError fcInt2Array_syncToNative(fcInt2Array* self) {
return err;
}
-fcError fcInt2Array_syncToOCL(fcInt2Array* self) {
+fcError fcInt2Array_syncToDevice(fcInt2Array* self) {
if (!fcInt2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -5252,8 +5252,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int3Array_getArray(JNIEnv* env, jobject
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcInt3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt3Array_syncToNative", NULL);
+ jint err = fcInt3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt3Array_syncToHost", NULL);
// Create Java array and populate it
jintArray __tmp_ret = FC_JNI_CALL(env, NewIntArray, self->len * 3);
@@ -5316,8 +5316,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int3Array_getBufferImpl(JNIEnv* env, jo
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcInt3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt3Array_syncToNative", NULL);
+ jint err = fcInt3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt3Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcInt3));
@@ -5340,21 +5340,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int3Array_setBuffer(JNIEnv* env, jobjec
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Int3Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Int3Array_syncToHost(JNIEnv* env, jobject obj) {
fcInt3Array* self = fcInt3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt3Array_getJava", FC_VOID_EXPR);
- jint err = fcInt3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt3Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcInt3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt3Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Int3Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Int3Array_syncToDevice(JNIEnv* env, jobject obj) {
fcInt3Array* self = fcInt3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt3Array_getJava", FC_VOID_EXPR);
- jint err = fcInt3Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt3Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcInt3Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt3Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -5533,7 +5533,7 @@ fcInt3 fcInt3Array_get(fcInt3Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcInt3Array_syncToNative(self);
+ *err = fcInt3Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -5544,7 +5544,7 @@ fcError fcInt3Array_set(fcInt3Array* self, fcInt i, fcInt3 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcInt3Array_syncToNative(self);
+ fcError err = fcInt3Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -5564,7 +5564,7 @@ fcError fcInt3Array_setArray(fcInt3Array* self, fcInt len, const fcInt* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcInt3Array_syncToNative(self);
+ err = fcInt3Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -5613,13 +5613,13 @@ fcError fcInt3Array_setBuffer(fcInt3Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcInt3Array_syncToNative(self);
+ fcError err = fcInt3Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcInt3Array_syncToNative(fcInt3Array* self) {
+fcError fcInt3Array_syncToHost(fcInt3Array* self) {
if (!fcInt3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -5634,7 +5634,7 @@ fcError fcInt3Array_syncToNative(fcInt3Array* self) {
return err;
}
-fcError fcInt3Array_syncToOCL(fcInt3Array* self) {
+fcError fcInt3Array_syncToDevice(fcInt3Array* self) {
if (!fcInt3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -5792,8 +5792,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int4Array_getArray(JNIEnv* env, jobject
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcInt4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt4Array_syncToNative", NULL);
+ jint err = fcInt4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt4Array_syncToHost", NULL);
// Create Java array and populate it
jintArray __tmp_ret = FC_JNI_CALL(env, NewIntArray, self->len * 4);
@@ -5856,8 +5856,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int4Array_getBufferImpl(JNIEnv* env, jo
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcInt4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt4Array_syncToNative", NULL);
+ jint err = fcInt4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt4Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcInt4));
@@ -5880,21 +5880,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int4Array_setBuffer(JNIEnv* env, jobjec
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Int4Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Int4Array_syncToHost(JNIEnv* env, jobject obj) {
fcInt4Array* self = fcInt4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt4Array_getJava", FC_VOID_EXPR);
- jint err = fcInt4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt4Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcInt4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt4Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Int4Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Int4Array_syncToDevice(JNIEnv* env, jobject obj) {
fcInt4Array* self = fcInt4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt4Array_getJava", FC_VOID_EXPR);
- jint err = fcInt4Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt4Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcInt4Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt4Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -6073,7 +6073,7 @@ fcInt4 fcInt4Array_get(fcInt4Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcInt4Array_syncToNative(self);
+ *err = fcInt4Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -6084,7 +6084,7 @@ fcError fcInt4Array_set(fcInt4Array* self, fcInt i, fcInt4 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcInt4Array_syncToNative(self);
+ fcError err = fcInt4Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -6104,7 +6104,7 @@ fcError fcInt4Array_setArray(fcInt4Array* self, fcInt len, const fcInt* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcInt4Array_syncToNative(self);
+ err = fcInt4Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -6153,13 +6153,13 @@ fcError fcInt4Array_setBuffer(fcInt4Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcInt4Array_syncToNative(self);
+ fcError err = fcInt4Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcInt4Array_syncToNative(fcInt4Array* self) {
+fcError fcInt4Array_syncToHost(fcInt4Array* self) {
if (!fcInt4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -6174,7 +6174,7 @@ fcError fcInt4Array_syncToNative(fcInt4Array* self) {
return err;
}
-fcError fcInt4Array_syncToOCL(fcInt4Array* self) {
+fcError fcInt4Array_syncToDevice(fcInt4Array* self) {
if (!fcInt4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -6332,8 +6332,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int8Array_getArray(JNIEnv* env, jobject
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcInt8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt8Array_syncToNative", NULL);
+ jint err = fcInt8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt8Array_syncToHost", NULL);
// Create Java array and populate it
jintArray __tmp_ret = FC_JNI_CALL(env, NewIntArray, self->len * 8);
@@ -6396,8 +6396,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int8Array_getBufferImpl(JNIEnv* env, jo
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcInt8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt8Array_syncToNative", NULL);
+ jint err = fcInt8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt8Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcInt8));
@@ -6420,21 +6420,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Int8Array_setBuffer(JNIEnv* env, jobjec
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Int8Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Int8Array_syncToHost(JNIEnv* env, jobject obj) {
fcInt8Array* self = fcInt8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt8Array_getJava", FC_VOID_EXPR);
- jint err = fcInt8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt8Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcInt8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt8Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Int8Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Int8Array_syncToDevice(JNIEnv* env, jobject obj) {
fcInt8Array* self = fcInt8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcInt8Array_getJava", FC_VOID_EXPR);
- jint err = fcInt8Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt8Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcInt8Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcInt8Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -6613,7 +6613,7 @@ fcInt8 fcInt8Array_get(fcInt8Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcInt8Array_syncToNative(self);
+ *err = fcInt8Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -6624,7 +6624,7 @@ fcError fcInt8Array_set(fcInt8Array* self, fcInt i, fcInt8 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcInt8Array_syncToNative(self);
+ fcError err = fcInt8Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -6644,7 +6644,7 @@ fcError fcInt8Array_setArray(fcInt8Array* self, fcInt len, const fcInt* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcInt8Array_syncToNative(self);
+ err = fcInt8Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -6693,13 +6693,13 @@ fcError fcInt8Array_setBuffer(fcInt8Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcInt8Array_syncToNative(self);
+ fcError err = fcInt8Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcInt8Array_syncToNative(fcInt8Array* self) {
+fcError fcInt8Array_syncToHost(fcInt8Array* self) {
if (!fcInt8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -6714,7 +6714,7 @@ fcError fcInt8Array_syncToNative(fcInt8Array* self) {
return err;
}
-fcError fcInt8Array_syncToOCL(fcInt8Array* self) {
+fcError fcInt8Array_syncToDevice(fcInt8Array* self) {
if (!fcInt8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -6872,8 +6872,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long2Array_getArray(JNIEnv* env, jobjec
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcLong2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong2Array_syncToNative", NULL);
+ jint err = fcLong2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong2Array_syncToHost", NULL);
// Create Java array and populate it
jlongArray __tmp_ret = FC_JNI_CALL(env, NewLongArray, self->len * 2);
@@ -6936,8 +6936,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long2Array_getBufferImpl(JNIEnv* env, j
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcLong2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong2Array_syncToNative", NULL);
+ jint err = fcLong2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong2Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcLong2));
@@ -6960,21 +6960,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long2Array_setBuffer(JNIEnv* env, jobje
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Long2Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Long2Array_syncToHost(JNIEnv* env, jobject obj) {
fcLong2Array* self = fcLong2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong2Array_getJava", FC_VOID_EXPR);
- jint err = fcLong2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong2Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcLong2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong2Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Long2Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Long2Array_syncToDevice(JNIEnv* env, jobject obj) {
fcLong2Array* self = fcLong2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong2Array_getJava", FC_VOID_EXPR);
- jint err = fcLong2Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong2Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcLong2Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong2Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -7153,7 +7153,7 @@ fcLong2 fcLong2Array_get(fcLong2Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcLong2Array_syncToNative(self);
+ *err = fcLong2Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -7164,7 +7164,7 @@ fcError fcLong2Array_set(fcLong2Array* self, fcInt i, fcLong2 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcLong2Array_syncToNative(self);
+ fcError err = fcLong2Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -7184,7 +7184,7 @@ fcError fcLong2Array_setArray(fcLong2Array* self, fcInt len, const fcLong* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcLong2Array_syncToNative(self);
+ err = fcLong2Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -7233,13 +7233,13 @@ fcError fcLong2Array_setBuffer(fcLong2Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcLong2Array_syncToNative(self);
+ fcError err = fcLong2Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcLong2Array_syncToNative(fcLong2Array* self) {
+fcError fcLong2Array_syncToHost(fcLong2Array* self) {
if (!fcLong2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -7254,7 +7254,7 @@ fcError fcLong2Array_syncToNative(fcLong2Array* self) {
return err;
}
-fcError fcLong2Array_syncToOCL(fcLong2Array* self) {
+fcError fcLong2Array_syncToDevice(fcLong2Array* self) {
if (!fcLong2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -7412,8 +7412,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long3Array_getArray(JNIEnv* env, jobjec
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcLong3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong3Array_syncToNative", NULL);
+ jint err = fcLong3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong3Array_syncToHost", NULL);
// Create Java array and populate it
jlongArray __tmp_ret = FC_JNI_CALL(env, NewLongArray, self->len * 3);
@@ -7476,8 +7476,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long3Array_getBufferImpl(JNIEnv* env, j
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcLong3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong3Array_syncToNative", NULL);
+ jint err = fcLong3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong3Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcLong3));
@@ -7500,21 +7500,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long3Array_setBuffer(JNIEnv* env, jobje
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Long3Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Long3Array_syncToHost(JNIEnv* env, jobject obj) {
fcLong3Array* self = fcLong3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong3Array_getJava", FC_VOID_EXPR);
- jint err = fcLong3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong3Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcLong3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong3Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Long3Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Long3Array_syncToDevice(JNIEnv* env, jobject obj) {
fcLong3Array* self = fcLong3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong3Array_getJava", FC_VOID_EXPR);
- jint err = fcLong3Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong3Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcLong3Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong3Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -7693,7 +7693,7 @@ fcLong3 fcLong3Array_get(fcLong3Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcLong3Array_syncToNative(self);
+ *err = fcLong3Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -7704,7 +7704,7 @@ fcError fcLong3Array_set(fcLong3Array* self, fcInt i, fcLong3 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcLong3Array_syncToNative(self);
+ fcError err = fcLong3Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -7724,7 +7724,7 @@ fcError fcLong3Array_setArray(fcLong3Array* self, fcInt len, const fcLong* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcLong3Array_syncToNative(self);
+ err = fcLong3Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -7773,13 +7773,13 @@ fcError fcLong3Array_setBuffer(fcLong3Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcLong3Array_syncToNative(self);
+ fcError err = fcLong3Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcLong3Array_syncToNative(fcLong3Array* self) {
+fcError fcLong3Array_syncToHost(fcLong3Array* self) {
if (!fcLong3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -7794,7 +7794,7 @@ fcError fcLong3Array_syncToNative(fcLong3Array* self) {
return err;
}
-fcError fcLong3Array_syncToOCL(fcLong3Array* self) {
+fcError fcLong3Array_syncToDevice(fcLong3Array* self) {
if (!fcLong3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -7952,8 +7952,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long4Array_getArray(JNIEnv* env, jobjec
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcLong4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong4Array_syncToNative", NULL);
+ jint err = fcLong4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong4Array_syncToHost", NULL);
// Create Java array and populate it
jlongArray __tmp_ret = FC_JNI_CALL(env, NewLongArray, self->len * 4);
@@ -8016,8 +8016,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long4Array_getBufferImpl(JNIEnv* env, j
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcLong4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong4Array_syncToNative", NULL);
+ jint err = fcLong4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong4Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcLong4));
@@ -8040,21 +8040,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long4Array_setBuffer(JNIEnv* env, jobje
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Long4Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Long4Array_syncToHost(JNIEnv* env, jobject obj) {
fcLong4Array* self = fcLong4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong4Array_getJava", FC_VOID_EXPR);
- jint err = fcLong4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong4Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcLong4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong4Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Long4Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Long4Array_syncToDevice(JNIEnv* env, jobject obj) {
fcLong4Array* self = fcLong4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong4Array_getJava", FC_VOID_EXPR);
- jint err = fcLong4Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong4Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcLong4Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong4Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -8233,7 +8233,7 @@ fcLong4 fcLong4Array_get(fcLong4Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcLong4Array_syncToNative(self);
+ *err = fcLong4Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -8244,7 +8244,7 @@ fcError fcLong4Array_set(fcLong4Array* self, fcInt i, fcLong4 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcLong4Array_syncToNative(self);
+ fcError err = fcLong4Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -8264,7 +8264,7 @@ fcError fcLong4Array_setArray(fcLong4Array* self, fcInt len, const fcLong* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcLong4Array_syncToNative(self);
+ err = fcLong4Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -8313,13 +8313,13 @@ fcError fcLong4Array_setBuffer(fcLong4Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcLong4Array_syncToNative(self);
+ fcError err = fcLong4Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcLong4Array_syncToNative(fcLong4Array* self) {
+fcError fcLong4Array_syncToHost(fcLong4Array* self) {
if (!fcLong4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -8334,7 +8334,7 @@ fcError fcLong4Array_syncToNative(fcLong4Array* self) {
return err;
}
-fcError fcLong4Array_syncToOCL(fcLong4Array* self) {
+fcError fcLong4Array_syncToDevice(fcLong4Array* self) {
if (!fcLong4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -8492,8 +8492,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long8Array_getArray(JNIEnv* env, jobjec
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcLong8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong8Array_syncToNative", NULL);
+ jint err = fcLong8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong8Array_syncToHost", NULL);
// Create Java array and populate it
jlongArray __tmp_ret = FC_JNI_CALL(env, NewLongArray, self->len * 8);
@@ -8556,8 +8556,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long8Array_getBufferImpl(JNIEnv* env, j
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcLong8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong8Array_syncToNative", NULL);
+ jint err = fcLong8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong8Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcLong8));
@@ -8580,21 +8580,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Long8Array_setBuffer(JNIEnv* env, jobje
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Long8Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Long8Array_syncToHost(JNIEnv* env, jobject obj) {
fcLong8Array* self = fcLong8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong8Array_getJava", FC_VOID_EXPR);
- jint err = fcLong8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong8Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcLong8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong8Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Long8Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Long8Array_syncToDevice(JNIEnv* env, jobject obj) {
fcLong8Array* self = fcLong8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcLong8Array_getJava", FC_VOID_EXPR);
- jint err = fcLong8Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong8Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcLong8Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcLong8Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -8773,7 +8773,7 @@ fcLong8 fcLong8Array_get(fcLong8Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcLong8Array_syncToNative(self);
+ *err = fcLong8Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -8784,7 +8784,7 @@ fcError fcLong8Array_set(fcLong8Array* self, fcInt i, fcLong8 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcLong8Array_syncToNative(self);
+ fcError err = fcLong8Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -8804,7 +8804,7 @@ fcError fcLong8Array_setArray(fcLong8Array* self, fcInt len, const fcLong* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcLong8Array_syncToNative(self);
+ err = fcLong8Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -8853,13 +8853,13 @@ fcError fcLong8Array_setBuffer(fcLong8Array* self, fcLong len, const void* v) {
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcLong8Array_syncToNative(self);
+ fcError err = fcLong8Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcLong8Array_syncToNative(fcLong8Array* self) {
+fcError fcLong8Array_syncToHost(fcLong8Array* self) {
if (!fcLong8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -8874,7 +8874,7 @@ fcError fcLong8Array_syncToNative(fcLong8Array* self) {
return err;
}
-fcError fcLong8Array_syncToOCL(fcLong8Array* self) {
+fcError fcLong8Array_syncToDevice(fcLong8Array* self) {
if (!fcLong8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -9032,8 +9032,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float2Array_getArray(JNIEnv* env, jobje
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloat2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat2Array_syncToNative", NULL);
+ jint err = fcFloat2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat2Array_syncToHost", NULL);
// Create Java array and populate it
jfloatArray __tmp_ret = FC_JNI_CALL(env, NewFloatArray, self->len * 2);
@@ -9096,8 +9096,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float2Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloat2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat2Array_syncToNative", NULL);
+ jint err = fcFloat2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat2Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcFloat2));
@@ -9120,21 +9120,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float2Array_setBuffer(JNIEnv* env, jobj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Float2Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Float2Array_syncToHost(JNIEnv* env, jobject obj) {
fcFloat2Array* self = fcFloat2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat2Array_getJava", FC_VOID_EXPR);
- jint err = fcFloat2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat2Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcFloat2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat2Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Float2Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Float2Array_syncToDevice(JNIEnv* env, jobject obj) {
fcFloat2Array* self = fcFloat2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat2Array_getJava", FC_VOID_EXPR);
- jint err = fcFloat2Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat2Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcFloat2Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat2Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -9313,7 +9313,7 @@ fcFloat2 fcFloat2Array_get(fcFloat2Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcFloat2Array_syncToNative(self);
+ *err = fcFloat2Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -9324,7 +9324,7 @@ fcError fcFloat2Array_set(fcFloat2Array* self, fcInt i, fcFloat2 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcFloat2Array_syncToNative(self);
+ fcError err = fcFloat2Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -9344,7 +9344,7 @@ fcError fcFloat2Array_setArray(fcFloat2Array* self, fcInt len, const fcFloat* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcFloat2Array_syncToNative(self);
+ err = fcFloat2Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -9393,13 +9393,13 @@ fcError fcFloat2Array_setBuffer(fcFloat2Array* self, fcLong len, const void* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcFloat2Array_syncToNative(self);
+ fcError err = fcFloat2Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcFloat2Array_syncToNative(fcFloat2Array* self) {
+fcError fcFloat2Array_syncToHost(fcFloat2Array* self) {
if (!fcFloat2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -9414,7 +9414,7 @@ fcError fcFloat2Array_syncToNative(fcFloat2Array* self) {
return err;
}
-fcError fcFloat2Array_syncToOCL(fcFloat2Array* self) {
+fcError fcFloat2Array_syncToDevice(fcFloat2Array* self) {
if (!fcFloat2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -9572,8 +9572,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float3Array_getArray(JNIEnv* env, jobje
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloat3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToNative", NULL);
+ jint err = fcFloat3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToHost", NULL);
// Create Java array and populate it
jfloatArray __tmp_ret = FC_JNI_CALL(env, NewFloatArray, self->len * 3);
@@ -9636,8 +9636,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float3Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloat3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToNative", NULL);
+ jint err = fcFloat3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcFloat3));
@@ -9660,21 +9660,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float3Array_setBuffer(JNIEnv* env, jobj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Float3Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Float3Array_syncToHost(JNIEnv* env, jobject obj) {
fcFloat3Array* self = fcFloat3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat3Array_getJava", FC_VOID_EXPR);
- jint err = fcFloat3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcFloat3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Float3Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Float3Array_syncToDevice(JNIEnv* env, jobject obj) {
fcFloat3Array* self = fcFloat3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat3Array_getJava", FC_VOID_EXPR);
- jint err = fcFloat3Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcFloat3Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -9853,7 +9853,7 @@ fcFloat3 fcFloat3Array_get(fcFloat3Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcFloat3Array_syncToNative(self);
+ *err = fcFloat3Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -9864,7 +9864,7 @@ fcError fcFloat3Array_set(fcFloat3Array* self, fcInt i, fcFloat3 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcFloat3Array_syncToNative(self);
+ fcError err = fcFloat3Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -9884,7 +9884,7 @@ fcError fcFloat3Array_setArray(fcFloat3Array* self, fcInt len, const fcFloat* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcFloat3Array_syncToNative(self);
+ err = fcFloat3Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -9933,13 +9933,13 @@ fcError fcFloat3Array_setBuffer(fcFloat3Array* self, fcLong len, const void* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcFloat3Array_syncToNative(self);
+ fcError err = fcFloat3Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcFloat3Array_syncToNative(fcFloat3Array* self) {
+fcError fcFloat3Array_syncToHost(fcFloat3Array* self) {
if (!fcFloat3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -9954,7 +9954,7 @@ fcError fcFloat3Array_syncToNative(fcFloat3Array* self) {
return err;
}
-fcError fcFloat3Array_syncToOCL(fcFloat3Array* self) {
+fcError fcFloat3Array_syncToDevice(fcFloat3Array* self) {
if (!fcFloat3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -10112,8 +10112,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float4Array_getArray(JNIEnv* env, jobje
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloat4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat4Array_syncToNative", NULL);
+ jint err = fcFloat4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat4Array_syncToHost", NULL);
// Create Java array and populate it
jfloatArray __tmp_ret = FC_JNI_CALL(env, NewFloatArray, self->len * 4);
@@ -10176,8 +10176,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float4Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloat4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat4Array_syncToNative", NULL);
+ jint err = fcFloat4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat4Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcFloat4));
@@ -10200,21 +10200,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float4Array_setBuffer(JNIEnv* env, jobj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Float4Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Float4Array_syncToHost(JNIEnv* env, jobject obj) {
fcFloat4Array* self = fcFloat4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat4Array_getJava", FC_VOID_EXPR);
- jint err = fcFloat4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat4Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcFloat4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat4Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Float4Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Float4Array_syncToDevice(JNIEnv* env, jobject obj) {
fcFloat4Array* self = fcFloat4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat4Array_getJava", FC_VOID_EXPR);
- jint err = fcFloat4Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat4Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcFloat4Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat4Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -10393,7 +10393,7 @@ fcFloat4 fcFloat4Array_get(fcFloat4Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcFloat4Array_syncToNative(self);
+ *err = fcFloat4Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -10404,7 +10404,7 @@ fcError fcFloat4Array_set(fcFloat4Array* self, fcInt i, fcFloat4 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcFloat4Array_syncToNative(self);
+ fcError err = fcFloat4Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -10424,7 +10424,7 @@ fcError fcFloat4Array_setArray(fcFloat4Array* self, fcInt len, const fcFloat* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcFloat4Array_syncToNative(self);
+ err = fcFloat4Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -10473,13 +10473,13 @@ fcError fcFloat4Array_setBuffer(fcFloat4Array* self, fcLong len, const void* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcFloat4Array_syncToNative(self);
+ fcError err = fcFloat4Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcFloat4Array_syncToNative(fcFloat4Array* self) {
+fcError fcFloat4Array_syncToHost(fcFloat4Array* self) {
if (!fcFloat4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -10494,7 +10494,7 @@ fcError fcFloat4Array_syncToNative(fcFloat4Array* self) {
return err;
}
-fcError fcFloat4Array_syncToOCL(fcFloat4Array* self) {
+fcError fcFloat4Array_syncToDevice(fcFloat4Array* self) {
if (!fcFloat4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -10652,8 +10652,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float8Array_getArray(JNIEnv* env, jobje
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloat8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat8Array_syncToNative", NULL);
+ jint err = fcFloat8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat8Array_syncToHost", NULL);
// Create Java array and populate it
jfloatArray __tmp_ret = FC_JNI_CALL(env, NewFloatArray, self->len * 8);
@@ -10716,8 +10716,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float8Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcFloat8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat8Array_syncToNative", NULL);
+ jint err = fcFloat8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat8Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcFloat8));
@@ -10740,21 +10740,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Float8Array_setBuffer(JNIEnv* env, jobj
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Float8Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Float8Array_syncToHost(JNIEnv* env, jobject obj) {
fcFloat8Array* self = fcFloat8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat8Array_getJava", FC_VOID_EXPR);
- jint err = fcFloat8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat8Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcFloat8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat8Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Float8Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Float8Array_syncToDevice(JNIEnv* env, jobject obj) {
fcFloat8Array* self = fcFloat8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcFloat8Array_getJava", FC_VOID_EXPR);
- jint err = fcFloat8Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat8Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcFloat8Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat8Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -10933,7 +10933,7 @@ fcFloat8 fcFloat8Array_get(fcFloat8Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcFloat8Array_syncToNative(self);
+ *err = fcFloat8Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -10944,7 +10944,7 @@ fcError fcFloat8Array_set(fcFloat8Array* self, fcInt i, fcFloat8 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcFloat8Array_syncToNative(self);
+ fcError err = fcFloat8Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -10964,7 +10964,7 @@ fcError fcFloat8Array_setArray(fcFloat8Array* self, fcInt len, const fcFloat* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcFloat8Array_syncToNative(self);
+ err = fcFloat8Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -11013,13 +11013,13 @@ fcError fcFloat8Array_setBuffer(fcFloat8Array* self, fcLong len, const void* v)
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcFloat8Array_syncToNative(self);
+ fcError err = fcFloat8Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcFloat8Array_syncToNative(fcFloat8Array* self) {
+fcError fcFloat8Array_syncToHost(fcFloat8Array* self) {
if (!fcFloat8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -11034,7 +11034,7 @@ fcError fcFloat8Array_syncToNative(fcFloat8Array* self) {
return err;
}
-fcError fcFloat8Array_syncToOCL(fcFloat8Array* self) {
+fcError fcFloat8Array_syncToDevice(fcFloat8Array* self) {
if (!fcFloat8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -11192,8 +11192,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double2Array_getArray(JNIEnv* env, jobj
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcDouble2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble2Array_syncToNative", NULL);
+ jint err = fcDouble2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble2Array_syncToHost", NULL);
// Create Java array and populate it
jdoubleArray __tmp_ret = FC_JNI_CALL(env, NewDoubleArray, self->len * 2);
@@ -11256,8 +11256,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double2Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble2Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcDouble2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble2Array_syncToNative", NULL);
+ jint err = fcDouble2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble2Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcDouble2));
@@ -11280,21 +11280,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double2Array_setBuffer(JNIEnv* env, job
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Double2Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Double2Array_syncToHost(JNIEnv* env, jobject obj) {
fcDouble2Array* self = fcDouble2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble2Array_getJava", FC_VOID_EXPR);
- jint err = fcDouble2Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble2Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcDouble2Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble2Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Double2Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Double2Array_syncToDevice(JNIEnv* env, jobject obj) {
fcDouble2Array* self = fcDouble2Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble2Array_getJava", FC_VOID_EXPR);
- jint err = fcDouble2Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble2Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcDouble2Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble2Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -11473,7 +11473,7 @@ fcDouble2 fcDouble2Array_get(fcDouble2Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcDouble2Array_syncToNative(self);
+ *err = fcDouble2Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -11484,7 +11484,7 @@ fcError fcDouble2Array_set(fcDouble2Array* self, fcInt i, fcDouble2 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcDouble2Array_syncToNative(self);
+ fcError err = fcDouble2Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -11504,7 +11504,7 @@ fcError fcDouble2Array_setArray(fcDouble2Array* self, fcInt len, const fcDouble*
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcDouble2Array_syncToNative(self);
+ err = fcDouble2Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -11553,13 +11553,13 @@ fcError fcDouble2Array_setBuffer(fcDouble2Array* self, fcLong len, const void* v
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcDouble2Array_syncToNative(self);
+ fcError err = fcDouble2Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcDouble2Array_syncToNative(fcDouble2Array* self) {
+fcError fcDouble2Array_syncToHost(fcDouble2Array* self) {
if (!fcDouble2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -11574,7 +11574,7 @@ fcError fcDouble2Array_syncToNative(fcDouble2Array* self) {
return err;
}
-fcError fcDouble2Array_syncToOCL(fcDouble2Array* self) {
+fcError fcDouble2Array_syncToDevice(fcDouble2Array* self) {
if (!fcDouble2Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -11732,8 +11732,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double3Array_getArray(JNIEnv* env, jobj
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcDouble3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble3Array_syncToNative", NULL);
+ jint err = fcDouble3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble3Array_syncToHost", NULL);
// Create Java array and populate it
jdoubleArray __tmp_ret = FC_JNI_CALL(env, NewDoubleArray, self->len * 3);
@@ -11796,8 +11796,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double3Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble3Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcDouble3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble3Array_syncToNative", NULL);
+ jint err = fcDouble3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble3Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcDouble3));
@@ -11820,21 +11820,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double3Array_setBuffer(JNIEnv* env, job
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Double3Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Double3Array_syncToHost(JNIEnv* env, jobject obj) {
fcDouble3Array* self = fcDouble3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble3Array_getJava", FC_VOID_EXPR);
- jint err = fcDouble3Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble3Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcDouble3Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble3Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Double3Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Double3Array_syncToDevice(JNIEnv* env, jobject obj) {
fcDouble3Array* self = fcDouble3Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble3Array_getJava", FC_VOID_EXPR);
- jint err = fcDouble3Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble3Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcDouble3Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble3Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -12013,7 +12013,7 @@ fcDouble3 fcDouble3Array_get(fcDouble3Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcDouble3Array_syncToNative(self);
+ *err = fcDouble3Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -12024,7 +12024,7 @@ fcError fcDouble3Array_set(fcDouble3Array* self, fcInt i, fcDouble3 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcDouble3Array_syncToNative(self);
+ fcError err = fcDouble3Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -12044,7 +12044,7 @@ fcError fcDouble3Array_setArray(fcDouble3Array* self, fcInt len, const fcDouble*
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcDouble3Array_syncToNative(self);
+ err = fcDouble3Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -12093,13 +12093,13 @@ fcError fcDouble3Array_setBuffer(fcDouble3Array* self, fcLong len, const void* v
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcDouble3Array_syncToNative(self);
+ fcError err = fcDouble3Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcDouble3Array_syncToNative(fcDouble3Array* self) {
+fcError fcDouble3Array_syncToHost(fcDouble3Array* self) {
if (!fcDouble3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -12114,7 +12114,7 @@ fcError fcDouble3Array_syncToNative(fcDouble3Array* self) {
return err;
}
-fcError fcDouble3Array_syncToOCL(fcDouble3Array* self) {
+fcError fcDouble3Array_syncToDevice(fcDouble3Array* self) {
if (!fcDouble3Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -12272,8 +12272,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double4Array_getArray(JNIEnv* env, jobj
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcDouble4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4Array_syncToNative", NULL);
+ jint err = fcDouble4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4Array_syncToHost", NULL);
// Create Java array and populate it
jdoubleArray __tmp_ret = FC_JNI_CALL(env, NewDoubleArray, self->len * 4);
@@ -12336,8 +12336,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double4Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble4Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcDouble4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4Array_syncToNative", NULL);
+ jint err = fcDouble4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcDouble4));
@@ -12360,21 +12360,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double4Array_setBuffer(JNIEnv* env, job
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Double4Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Double4Array_syncToHost(JNIEnv* env, jobject obj) {
fcDouble4Array* self = fcDouble4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble4Array_getJava", FC_VOID_EXPR);
- jint err = fcDouble4Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcDouble4Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Double4Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Double4Array_syncToDevice(JNIEnv* env, jobject obj) {
fcDouble4Array* self = fcDouble4Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble4Array_getJava", FC_VOID_EXPR);
- jint err = fcDouble4Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcDouble4Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -12553,7 +12553,7 @@ fcDouble4 fcDouble4Array_get(fcDouble4Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcDouble4Array_syncToNative(self);
+ *err = fcDouble4Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -12564,7 +12564,7 @@ fcError fcDouble4Array_set(fcDouble4Array* self, fcInt i, fcDouble4 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcDouble4Array_syncToNative(self);
+ fcError err = fcDouble4Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -12584,7 +12584,7 @@ fcError fcDouble4Array_setArray(fcDouble4Array* self, fcInt len, const fcDouble*
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcDouble4Array_syncToNative(self);
+ err = fcDouble4Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -12633,13 +12633,13 @@ fcError fcDouble4Array_setBuffer(fcDouble4Array* self, fcLong len, const void* v
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcDouble4Array_syncToNative(self);
+ fcError err = fcDouble4Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcDouble4Array_syncToNative(fcDouble4Array* self) {
+fcError fcDouble4Array_syncToHost(fcDouble4Array* self) {
if (!fcDouble4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -12654,7 +12654,7 @@ fcError fcDouble4Array_syncToNative(fcDouble4Array* self) {
return err;
}
-fcError fcDouble4Array_syncToOCL(fcDouble4Array* self) {
+fcError fcDouble4Array_syncToDevice(fcDouble4Array* self) {
if (!fcDouble4Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -12812,8 +12812,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double8Array_getArray(JNIEnv* env, jobj
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcDouble8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble8Array_syncToNative", NULL);
+ jint err = fcDouble8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble8Array_syncToHost", NULL);
// Create Java array and populate it
jdoubleArray __tmp_ret = FC_JNI_CALL(env, NewDoubleArray, self->len * 8);
@@ -12876,8 +12876,8 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double8Array_getBufferImpl(JNIEnv* env,
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble8Array_getJava", NULL);
// Ensure native array is synced
- jint err = fcDouble8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble8Array_syncToNative", NULL);
+ jint err = fcDouble8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble8Array_syncToHost", NULL);
// Create and return direct byte buffer pointing to the native data
return FC_JNI_CALL(env, NewDirectByteBuffer, self->c, self->len * sizeof(fcDouble8));
@@ -12900,21 +12900,21 @@ Java_es_ull_pcg_hpc_fancier_vector_array_Double8Array_setBuffer(JNIEnv* env, job
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Double8Array_syncToNative(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Double8Array_syncToHost(JNIEnv* env, jobject obj) {
fcDouble8Array* self = fcDouble8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble8Array_getJava", FC_VOID_EXPR);
- jint err = fcDouble8Array_syncToNative(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble8Array_syncToNative", FC_VOID_EXPR);
+ jint err = fcDouble8Array_syncToHost(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble8Array_syncToHost", FC_VOID_EXPR);
}
JNIEXPORT void JNICALL
-Java_es_ull_pcg_hpc_fancier_vector_array_Double8Array_syncToOCL(JNIEnv* env, jobject obj) {
+Java_es_ull_pcg_hpc_fancier_vector_array_Double8Array_syncToDevice(JNIEnv* env, jobject obj) {
fcDouble8Array* self = fcDouble8Array_getJava(env, obj);
FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "fcDouble8Array_getJava", FC_VOID_EXPR);
- jint err = fcDouble8Array_syncToOCL(self);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble8Array_syncToOCL", FC_VOID_EXPR);
+ jint err = fcDouble8Array_syncToDevice(self);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble8Array_syncToDevice", FC_VOID_EXPR);
}
//
@@ -13093,7 +13093,7 @@ fcDouble8 fcDouble8Array_get(fcDouble8Array* self, fcInt i, fcError* err) {
}
// Set location to native in order to access the array data
- *err = fcDouble8Array_syncToNative(self);
+ *err = fcDouble8Array_syncToHost(self);
if (*err) return __tmp_ret;
return self->c[i];
@@ -13104,7 +13104,7 @@ fcError fcDouble8Array_set(fcDouble8Array* self, fcInt i, fcDouble8 x) {
if (i < 0 || i >= self->len) return FC_EXCEPTION_BAD_PARAMETER;
// Set location to native in order to access the array data
- fcError err = fcDouble8Array_syncToNative(self);
+ fcError err = fcDouble8Array_syncToHost(self);
if (err) return err;
self->c[i] = x;
@@ -13124,7 +13124,7 @@ fcError fcDouble8Array_setArray(fcDouble8Array* self, fcInt len, const fcDouble*
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- err = fcDouble8Array_syncToNative(self);
+ err = fcDouble8Array_syncToHost(self);
if (err) return err;
for (fcLong i = 0; i < self->len; ++i) {
@@ -13173,13 +13173,13 @@ fcError fcDouble8Array_setBuffer(fcDouble8Array* self, fcLong len, const void* v
// TODO If not unified memory, don't sync and just set native data and update location
// Initialize array
// Map to host, and write data considering alignment
- fcError err = fcDouble8Array_syncToNative(self);
+ fcError err = fcDouble8Array_syncToHost(self);
if (err) return err;
return memcpy(self->c, v, len)? FC_EXCEPTION_SUCCESS : FC_EXCEPTION_FAILED_COPY;
}
-fcError fcDouble8Array_syncToNative(fcDouble8Array* self) {
+fcError fcDouble8Array_syncToHost(fcDouble8Array* self) {
if (!fcDouble8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
@@ -13194,7 +13194,7 @@ fcError fcDouble8Array_syncToNative(fcDouble8Array* self) {
return err;
}
-fcError fcDouble8Array_syncToOCL(fcDouble8Array* self) {
+fcError fcDouble8Array_syncToDevice(fcDouble8Array* self) {
if (!fcDouble8Array_valid(self))
return FC_EXCEPTION_INVALID_STATE;
diff --git a/native/plugin/tiling/include/fancier/plugin/tiling.h b/native/plugin/tiling/include/fancier/plugin/tiling.h
old mode 100755
new mode 100644
diff --git a/native/plugin/tiling/include/fancier/plugin/tiling/class_tiling_data.h b/native/plugin/tiling/include/fancier/plugin/tiling/class_tiling_data.h
old mode 100755
new mode 100644
diff --git a/native/plugin/tiling/include/fancier/plugin/tiling/data_entry.h b/native/plugin/tiling/include/fancier/plugin/tiling/data_entry.h
old mode 100755
new mode 100644
diff --git a/native/plugin/tiling/include/fancier/plugin/tiling/unique_ptr_content_comp.h b/native/plugin/tiling/include/fancier/plugin/tiling/unique_ptr_content_comp.h
old mode 100755
new mode 100644
diff --git a/native/test/.gitignore b/native/test/.gitignore
old mode 100755
new mode 100644
diff --git a/native/test/Makefile b/native/test/Makefile
old mode 100755
new mode 100644
diff --git a/native/test/include/minunit.h b/native/test/include/minunit.h
old mode 100755
new mode 100644
diff --git a/native/test/tiling_test.cpp b/native/test/tiling_test.cpp
old mode 100755
new mode 100644
diff --git a/native/test/utils_test.cpp b/native/test/utils_test.cpp
old mode 100755
new mode 100644
diff --git a/opencl/fc_image.cl b/opencl/fc_image.cl
new file mode 100644
index 0000000..de50053
--- /dev/null
+++ b/opencl/fc_image.cl
@@ -0,0 +1,45 @@
+
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/*
+ * DO NOT MANUALLY EDIT THIS FILE!
+ * This file has been automatically generated, any modifications will be lost
+ * when generating the Fancier library. Any modifications to this file must be
+ * done via the corresponding template.
+ */
+
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#endif // cl_khr_fp64
+
+#if defined(__EMBEDDED_PROFILE__) && defined(cles_khr_int64)
+#pragma OPENCL EXTENSION cles_khr_int64 : enable
+#endif // __EMBEDDED_PROFILE__ && cles_khr_int64
+
+uint index_img (uint2 dims, uint x, uint y) {
+ return y * dims.x + x;
+}
+
+int toRgba (uchar4 color) {
+ return ((color.x & 0xff) << 24) | ((color.y & 0xff) << 16) | ((color.z & 0xff) << 8) | ((color.w & 0xff) << 0);
+}
+
+uchar4 fromRgba (int rgba) {
+ return (uchar4)((uchar)((rgba >> 24) & 0xff), (uchar)((rgba >> 16) & 0xff), (uchar)((rgba >> 8) & 0xff), (uchar)((rgba >> 0) & 0xff));
+}
diff --git a/test/android/app/src/main/assets/math_lib.cl b/opencl/fc_math.cl
similarity index 58%
rename from test/android/app/src/main/assets/math_lib.cl
rename to opencl/fc_math.cl
index 9eae34a..8460397 100644
--- a/test/android/app/src/main/assets/math_lib.cl
+++ b/opencl/fc_math.cl
@@ -38,19 +38,29 @@ float scalbf(float a, int scaleFactor) {
float2 float2_scalb(float2 a, int2 scaleFactor) {
return (float2)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y));
}
-
float3 float3_scalb(float3 a, int3 scaleFactor) {
return (float3)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z));
}
-
float4 float4_scalb(float4 a, int4 scaleFactor) {
return (float4)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z), scalbf(a.w, scaleFactor.w));
}
-
float8 float8_scalb(float8 a, int8 scaleFactor) {
return (float8)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z), scalbf(a.w, scaleFactor.w), scalbf(a.s4, scaleFactor.s4), scalbf(a.s5, scaleFactor.s5), scalbf(a.s6, scaleFactor.s6), scalbf(a.s7, scaleFactor.s7));
}
+float2 float2_smoothstep(float2 a, float2 b, float c) {
+ return (float2)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c));
+}
+float3 float3_smoothstep(float3 a, float3 b, float c) {
+ return (float3)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c));
+}
+float4 float4_smoothstep(float4 a, float4 b, float c) {
+ return (float4)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c));
+}
+float8 float8_smoothstep(float8 a, float8 b, float c) {
+ return (float8)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c), smoothstep(a.s4, b.s4, c), smoothstep(a.s5, b.s5, c), smoothstep(a.s6, b.s6, c), smoothstep(a.s7, b.s7, c));
+}
+
#ifdef cl_khr_fp64
double scalb(double a, int scaleFactor) {
@@ -60,19 +70,29 @@ double scalb(double a, int scaleFactor) {
double2 double2_scalb(double2 a, int2 scaleFactor) {
return (double2)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y));
}
-
double3 double3_scalb(double3 a, int3 scaleFactor) {
return (double3)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z));
}
-
double4 double4_scalb(double4 a, int4 scaleFactor) {
return (double4)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z), scalb(a.w, scaleFactor.w));
}
-
double8 double8_scalb(double8 a, int8 scaleFactor) {
return (double8)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z), scalb(a.w, scaleFactor.w), scalb(a.s4, scaleFactor.s4), scalb(a.s5, scaleFactor.s5), scalb(a.s6, scaleFactor.s6), scalb(a.s7, scaleFactor.s7));
}
+double2 double2_smoothstep(double2 a, double2 b, double c) {
+ return (double2)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c));
+}
+double3 double3_smoothstep(double3 a, double3 b, double c) {
+ return (double3)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c));
+}
+double4 double4_smoothstep(double4 a, double4 b, double c) {
+ return (double4)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c));
+}
+double8 double8_smoothstep(double8 a, double8 b, double c) {
+ return (double8)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c), smoothstep(a.s4, b.s4, c), smoothstep(a.s5, b.s5, c), smoothstep(a.s6, b.s6, c), smoothstep(a.s7, b.s7, c));
+}
+
#endif // cl_khr_fp64
char clampc(char a, char min, char max) {
@@ -83,6 +103,14 @@ char mixc(char x, char y, char a) {
return x + (y - x) * a;
}
+char maxmagc(char a, char b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+char minmagc(char a, char b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
char2 char2_clamp(char2 a, char2 min, char2 max) {
return (char2)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y));
}
@@ -91,6 +119,14 @@ char2 char2_mix(char2 x, char2 y, char2 a) {
return (char2)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y));
}
+char2 char2_maxmag(char2 a, char2 b) {
+ return (char2)(maxmagc(a.x, b.x), maxmagc(a.y, b.y));
+}
+
+char2 char2_minmag(char2 a, char2 b) {
+ return (char2)(minmagc(a.x, b.x), minmagc(a.y, b.y));
+}
+
char3 char3_clamp(char3 a, char3 min, char3 max) {
return (char3)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z));
}
@@ -99,6 +135,14 @@ char3 char3_mix(char3 x, char3 y, char3 a) {
return (char3)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z));
}
+char3 char3_maxmag(char3 a, char3 b) {
+ return (char3)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z));
+}
+
+char3 char3_minmag(char3 a, char3 b) {
+ return (char3)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z));
+}
+
char4 char4_clamp(char4 a, char4 min, char4 max) {
return (char4)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z), clampc(a.w, min.w, max.w));
}
@@ -107,6 +151,14 @@ char4 char4_mix(char4 x, char4 y, char4 a) {
return (char4)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z), mixc(x.w, y.w, a.w));
}
+char4 char4_maxmag(char4 a, char4 b) {
+ return (char4)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z), maxmagc(a.w, b.w));
+}
+
+char4 char4_minmag(char4 a, char4 b) {
+ return (char4)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z), minmagc(a.w, b.w));
+}
+
char8 char8_clamp(char8 a, char8 min, char8 max) {
return (char8)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z), clampc(a.w, min.w, max.w), clampc(a.s4, min.s4, max.s4), clampc(a.s5, min.s5, max.s5), clampc(a.s6, min.s6, max.s6), clampc(a.s7, min.s7, max.s7));
}
@@ -115,6 +167,14 @@ char8 char8_mix(char8 x, char8 y, char8 a) {
return (char8)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z), mixc(x.w, y.w, a.w), mixc(x.s4, y.s4, a.s4), mixc(x.s5, y.s5, a.s5), mixc(x.s6, y.s6, a.s6), mixc(x.s7, y.s7, a.s7));
}
+char8 char8_maxmag(char8 a, char8 b) {
+ return (char8)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z), maxmagc(a.w, b.w), maxmagc(a.s4, b.s4), maxmagc(a.s5, b.s5), maxmagc(a.s6, b.s6), maxmagc(a.s7, b.s7));
+}
+
+char8 char8_minmag(char8 a, char8 b) {
+ return (char8)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z), minmagc(a.w, b.w), minmagc(a.s4, b.s4), minmagc(a.s5, b.s5), minmagc(a.s6, b.s6), minmagc(a.s7, b.s7));
+}
+
short clamps(short a, short min, short max) {
return a < min? min : (a > max? max : a);
}
@@ -123,6 +183,14 @@ short mixs(short x, short y, short a) {
return x + (y - x) * a;
}
+short maxmags(short a, short b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+short minmags(short a, short b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
short2 short2_clamp(short2 a, short2 min, short2 max) {
return (short2)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y));
}
@@ -131,6 +199,14 @@ short2 short2_mix(short2 x, short2 y, short2 a) {
return (short2)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y));
}
+short2 short2_maxmag(short2 a, short2 b) {
+ return (short2)(maxmags(a.x, b.x), maxmags(a.y, b.y));
+}
+
+short2 short2_minmag(short2 a, short2 b) {
+ return (short2)(minmags(a.x, b.x), minmags(a.y, b.y));
+}
+
short3 short3_clamp(short3 a, short3 min, short3 max) {
return (short3)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z));
}
@@ -139,6 +215,14 @@ short3 short3_mix(short3 x, short3 y, short3 a) {
return (short3)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z));
}
+short3 short3_maxmag(short3 a, short3 b) {
+ return (short3)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z));
+}
+
+short3 short3_minmag(short3 a, short3 b) {
+ return (short3)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z));
+}
+
short4 short4_clamp(short4 a, short4 min, short4 max) {
return (short4)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z), clamps(a.w, min.w, max.w));
}
@@ -147,6 +231,14 @@ short4 short4_mix(short4 x, short4 y, short4 a) {
return (short4)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z), mixs(x.w, y.w, a.w));
}
+short4 short4_maxmag(short4 a, short4 b) {
+ return (short4)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z), maxmags(a.w, b.w));
+}
+
+short4 short4_minmag(short4 a, short4 b) {
+ return (short4)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z), minmags(a.w, b.w));
+}
+
short8 short8_clamp(short8 a, short8 min, short8 max) {
return (short8)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z), clamps(a.w, min.w, max.w), clamps(a.s4, min.s4, max.s4), clamps(a.s5, min.s5, max.s5), clamps(a.s6, min.s6, max.s6), clamps(a.s7, min.s7, max.s7));
}
@@ -155,6 +247,14 @@ short8 short8_mix(short8 x, short8 y, short8 a) {
return (short8)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z), mixs(x.w, y.w, a.w), mixs(x.s4, y.s4, a.s4), mixs(x.s5, y.s5, a.s5), mixs(x.s6, y.s6, a.s6), mixs(x.s7, y.s7, a.s7));
}
+short8 short8_maxmag(short8 a, short8 b) {
+ return (short8)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z), maxmags(a.w, b.w), maxmags(a.s4, b.s4), maxmags(a.s5, b.s5), maxmags(a.s6, b.s6), maxmags(a.s7, b.s7));
+}
+
+short8 short8_minmag(short8 a, short8 b) {
+ return (short8)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z), minmags(a.w, b.w), minmags(a.s4, b.s4), minmags(a.s5, b.s5), minmags(a.s6, b.s6), minmags(a.s7, b.s7));
+}
+
int clampi(int a, int min, int max) {
return a < min? min : (a > max? max : a);
}
@@ -163,6 +263,14 @@ int mixi(int x, int y, int a) {
return x + (y - x) * a;
}
+int maxmagi(int a, int b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+int minmagi(int a, int b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
int2 int2_clamp(int2 a, int2 min, int2 max) {
return (int2)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y));
}
@@ -171,6 +279,14 @@ int2 int2_mix(int2 x, int2 y, int2 a) {
return (int2)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y));
}
+int2 int2_maxmag(int2 a, int2 b) {
+ return (int2)(maxmagi(a.x, b.x), maxmagi(a.y, b.y));
+}
+
+int2 int2_minmag(int2 a, int2 b) {
+ return (int2)(minmagi(a.x, b.x), minmagi(a.y, b.y));
+}
+
int3 int3_clamp(int3 a, int3 min, int3 max) {
return (int3)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z));
}
@@ -179,6 +295,14 @@ int3 int3_mix(int3 x, int3 y, int3 a) {
return (int3)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z));
}
+int3 int3_maxmag(int3 a, int3 b) {
+ return (int3)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z));
+}
+
+int3 int3_minmag(int3 a, int3 b) {
+ return (int3)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z));
+}
+
int4 int4_clamp(int4 a, int4 min, int4 max) {
return (int4)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z), clampi(a.w, min.w, max.w));
}
@@ -187,6 +311,14 @@ int4 int4_mix(int4 x, int4 y, int4 a) {
return (int4)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z), mixi(x.w, y.w, a.w));
}
+int4 int4_maxmag(int4 a, int4 b) {
+ return (int4)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z), maxmagi(a.w, b.w));
+}
+
+int4 int4_minmag(int4 a, int4 b) {
+ return (int4)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z), minmagi(a.w, b.w));
+}
+
int8 int8_clamp(int8 a, int8 min, int8 max) {
return (int8)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z), clampi(a.w, min.w, max.w), clampi(a.s4, min.s4, max.s4), clampi(a.s5, min.s5, max.s5), clampi(a.s6, min.s6, max.s6), clampi(a.s7, min.s7, max.s7));
}
@@ -195,6 +327,14 @@ int8 int8_mix(int8 x, int8 y, int8 a) {
return (int8)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z), mixi(x.w, y.w, a.w), mixi(x.s4, y.s4, a.s4), mixi(x.s5, y.s5, a.s5), mixi(x.s6, y.s6, a.s6), mixi(x.s7, y.s7, a.s7));
}
+int8 int8_maxmag(int8 a, int8 b) {
+ return (int8)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z), maxmagi(a.w, b.w), maxmagi(a.s4, b.s4), maxmagi(a.s5, b.s5), maxmagi(a.s6, b.s6), maxmagi(a.s7, b.s7));
+}
+
+int8 int8_minmag(int8 a, int8 b) {
+ return (int8)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z), minmagi(a.w, b.w), minmagi(a.s4, b.s4), minmagi(a.s5, b.s5), minmagi(a.s6, b.s6), minmagi(a.s7, b.s7));
+}
+
#if !defined(__EMBEDDED_PROFILE__) || defined(cles_khr_int64)
long clampl(long a, long min, long max) {
return a < min? min : (a > max? max : a);
@@ -204,6 +344,14 @@ long mixl(long x, long y, long a) {
return x + (y - x) * a;
}
+long maxmagl(long a, long b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+long minmagl(long a, long b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
long2 long2_clamp(long2 a, long2 min, long2 max) {
return (long2)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y));
}
@@ -212,6 +360,14 @@ long2 long2_mix(long2 x, long2 y, long2 a) {
return (long2)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y));
}
+long2 long2_maxmag(long2 a, long2 b) {
+ return (long2)(maxmagl(a.x, b.x), maxmagl(a.y, b.y));
+}
+
+long2 long2_minmag(long2 a, long2 b) {
+ return (long2)(minmagl(a.x, b.x), minmagl(a.y, b.y));
+}
+
long3 long3_clamp(long3 a, long3 min, long3 max) {
return (long3)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z));
}
@@ -220,6 +376,14 @@ long3 long3_mix(long3 x, long3 y, long3 a) {
return (long3)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z));
}
+long3 long3_maxmag(long3 a, long3 b) {
+ return (long3)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z));
+}
+
+long3 long3_minmag(long3 a, long3 b) {
+ return (long3)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z));
+}
+
long4 long4_clamp(long4 a, long4 min, long4 max) {
return (long4)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z), clampl(a.w, min.w, max.w));
}
@@ -228,6 +392,14 @@ long4 long4_mix(long4 x, long4 y, long4 a) {
return (long4)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z), mixl(x.w, y.w, a.w));
}
+long4 long4_maxmag(long4 a, long4 b) {
+ return (long4)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z), maxmagl(a.w, b.w));
+}
+
+long4 long4_minmag(long4 a, long4 b) {
+ return (long4)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z), minmagl(a.w, b.w));
+}
+
long8 long8_clamp(long8 a, long8 min, long8 max) {
return (long8)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z), clampl(a.w, min.w, max.w), clampl(a.s4, min.s4, max.s4), clampl(a.s5, min.s5, max.s5), clampl(a.s6, min.s6, max.s6), clampl(a.s7, min.s7, max.s7));
}
@@ -236,4 +408,12 @@ long8 long8_mix(long8 x, long8 y, long8 a) {
return (long8)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z), mixl(x.w, y.w, a.w), mixl(x.s4, y.s4, a.s4), mixl(x.s5, y.s5, a.s5), mixl(x.s6, y.s6, a.s6), mixl(x.s7, y.s7, a.s7));
}
+long8 long8_maxmag(long8 a, long8 b) {
+ return (long8)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z), maxmagl(a.w, b.w), maxmagl(a.s4, b.s4), maxmagl(a.s5, b.s5), maxmagl(a.s6, b.s6), maxmagl(a.s7, b.s7));
+}
+
+long8 long8_minmag(long8 a, long8 b) {
+ return (long8)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z), minmagl(a.w, b.w), minmagl(a.s4, b.s4), minmagl(a.s5, b.s5), minmagl(a.s6, b.s6), minmagl(a.s7, b.s7));
+}
+
#endif // !__EMBEDDED_PROFILE__ || cles_khr_int64
diff --git a/test/android/.idea/compiler.xml b/test/android/.idea/compiler.xml
index 61a9130..fb7f4a8 100644
--- a/test/android/.idea/compiler.xml
+++ b/test/android/.idea/compiler.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/test/android/.idea/deploymentTargetDropDown.xml b/test/android/.idea/deploymentTargetDropDown.xml
new file mode 100644
index 0000000..6cdca38
--- /dev/null
+++ b/test/android/.idea/deploymentTargetDropDown.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/android/.idea/gradle.xml b/test/android/.idea/gradle.xml
index 9d38be2..ce86a83 100644
--- a/test/android/.idea/gradle.xml
+++ b/test/android/.idea/gradle.xml
@@ -4,18 +4,16 @@
diff --git a/test/android/.idea/jarRepositories.xml b/test/android/.idea/jarRepositories.xml
index a5f05cd..e34606c 100644
--- a/test/android/.idea/jarRepositories.xml
+++ b/test/android/.idea/jarRepositories.xml
@@ -21,5 +21,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/test/android/.idea/misc.xml b/test/android/.idea/misc.xml
index 9fc235f..4ce5b10 100644
--- a/test/android/.idea/misc.xml
+++ b/test/android/.idea/misc.xml
@@ -5,7 +5,14 @@
-
+
+
+
+
+
+
diff --git a/test/android/.idea/runConfigurations.xml b/test/android/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/test/android/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/android/app/.gitignore b/test/android/app/.gitignore
index cdc3954..df91fcc 100644
--- a/test/android/app/.gitignore
+++ b/test/android/app/.gitignore
@@ -1,4 +1,4 @@
/build
/libs/fancier-android*
-/jni-libs
+/cmake-libs
/.settings
\ No newline at end of file
diff --git a/test/android/app/CMakeLists.txt b/test/android/app/CMakeLists.txt
index 278a896..4eea0ce 100644
--- a/test/android/app/CMakeLists.txt
+++ b/test/android/app/CMakeLists.txt
@@ -20,7 +20,7 @@ cmake_minimum_required( VERSION 3.10.2 )
# Paths
set( libs-dir
- "${CMAKE_SOURCE_DIR}/jni-libs/core" )
+ "${CMAKE_SOURCE_DIR}/cmake-libs/core" )
set( root-dir
"${CMAKE_SOURCE_DIR}/src/main/jni" )
diff --git a/test/android/app/build.gradle b/test/android/app/build.gradle
index 5a704a8..c93280e 100644
--- a/test/android/app/build.gradle
+++ b/test/android/app/build.gradle
@@ -19,14 +19,6 @@
apply plugin: 'com.android.application'
android {
- signingConfigs {
- 'release-sign' {
- storeFile file('./release-key.jks')
- storePassword 'fancier'
- keyPassword 'fancier'
- keyAlias 'release-key'
- }
- }
compileSdkVersion 29
defaultConfig {
@@ -47,31 +39,8 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
- buildTypes {
- release {
- // minifyEnable MUST be false or otherwise it won't be able to load JNI libraries
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- signingConfig signingConfigs.'release-sign'
- debuggable false
- jniDebuggable false
- renderscriptDebuggable false
- }
- debug {
- jniDebuggable true
- debuggable true
- renderscriptDebuggable true
- renderscriptOptimLevel 0
- minifyEnabled false
- }
- }
- splits {
- abi {
- enable false
- universalApk true
- }
- }
+
packagingOptions {
// List here all non-standard system library stubs needed for linking, but which should be
@@ -93,6 +62,7 @@ android {
path 'CMakeLists.txt'
}
}
+ ndkVersion '23.1.7779620'
}
dependencies {
diff --git a/test/android/app/release/FancierTest_XU3_2022_05_03_13_46_19.xml b/test/android/app/release/FancierTest_XU3_2022_05_03_13_46_19.xml
new file mode 100644
index 0000000..25a77be
--- /dev/null
+++ b/test/android/app/release/FancierTest_XU3_2022_05_03_13_46_19.xml
@@ -0,0 +1,696 @@
+
+
+
+ POSTERIZE
+
+
+ JAVA PERFORMANCE NAIVE
+
+
+ 01 VGA (640x480)
+
+
+ CPUFREQ0
+
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+
+
+
+ CPUFREQ1
+
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+
+
+
+ CPUFREQ2
+
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+
+
+
+ CPUFREQ3
+
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+
+
+
+ CPUFREQ4
+
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+
+
+
+ CPUFREQ5
+
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+
+
+
+ CPUFREQ6
+
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+
+
+
+ CPUFREQ7
+
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+
+
+
+ Execution Time
+
+ 2935666750
+ 2876957542
+ 2972395208
+ 2864011459
+ 2836477042
+ 2865927792
+ 2841689042
+ 2836885542
+ 2852243959
+ 2851141208
+
+
+
+ Execution Time Arithmetic Avg
+ 2.8733395544E9
+
+
+ Execution Time Histogram
+
+ 3
+ 2
+ 3
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+
+ Execution Time Max
+ 2972395208
+
+
+ Execution Time Min
+ 2836477042
+
+
+ Execution Time Std Dev
+ 4.531252554976152E7
+
+
+ GPUFREQ
+
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ THERM1
+
+ 66000
+ 67000
+ 67000
+ 68000
+ 68000
+ 68000
+ 68000
+ 68000
+ 67000
+ 67000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ Window CPUFREQ0 Max
+ 1000000
+
+
+ Window CPUFREQ0 Min
+ 1000000
+
+
+ Window CPUFREQ4 Histogram
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ Window CPUFREQ4 Max
+ 2000000
+
+
+ Window CPUFREQ4 Min
+ 2000000
+
+
+ Window Execution Time Histogram
+
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+
+
+
+ Window Execution Time Max
+ 2852243959
+
+
+ Window Execution Time Min
+ 2836885542
+
+
+ Window GPUFREQ Histogram
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ Window GPUFREQ Max
+ 177
+
+
+ Window GPUFREQ Min
+ 177
+
+
+ Window THERM1 Histogram
+
+ 2
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+
+
+
+ Window THERM1 Max
+ 68000
+
+
+ Window THERM1 Min
+ 67000
+
+
+
+
+
+
+ JAVA PERFORMANCE RELIABLE
+
+
+ 01 VGA (640x480)
+
+
+ CPUFREQ0
+
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+
+
+
+ CPUFREQ1
+
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+
+
+
+ CPUFREQ2
+
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+
+
+
+ CPUFREQ3
+
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+ 1000000
+
+
+
+ CPUFREQ4
+
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+
+
+
+ CPUFREQ5
+
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+
+
+
+ CPUFREQ6
+
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+
+
+
+ CPUFREQ7
+
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+ 2000000
+
+
+
+ Execution Time
+
+ 2925168542
+ 2922970292
+ 2902173208
+ 2884712042
+ 2913056875
+ 2909658750
+ 2924820792
+ 2895859417
+ 2871994750
+ 2892047042
+
+
+
+ Execution Time Arithmetic Avg
+ 2.904246171E9
+
+
+ Execution Time Histogram
+
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 2
+ 0
+ 3
+
+
+
+ Execution Time Max
+ 2925168542
+
+
+ Execution Time Min
+ 2871994750
+
+
+ Execution Time Std Dev
+ 1.814683253692007E7
+
+
+ GPUFREQ
+
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+ 177
+
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ THERM1
+
+ 61000
+ 63000
+ 68000
+ 73000
+ 72000
+ 71000
+ 62000
+ 64000
+ 64000
+ 68000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ Window CPUFREQ0 Max
+ 1000000
+
+
+ Window CPUFREQ0 Min
+ 1000000
+
+
+ Window CPUFREQ4 Histogram
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ Window CPUFREQ4 Max
+ 2000000
+
+
+ Window CPUFREQ4 Min
+ 2000000
+
+
+ Window Execution Time Histogram
+
+ 1
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window Execution Time Max
+ 2924820792
+
+
+ Window Execution Time Min
+ 2871994750
+
+
+ Window GPUFREQ Histogram
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ Window GPUFREQ Max
+ 177
+
+
+ Window GPUFREQ Min
+ 177
+
+
+ Window THERM1 Histogram
+
+ 1
+ 0
+ 0
+ 2
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window THERM1 Max
+ 68000
+
+
+ Window THERM1 Min
+ 62000
+
+
+
+
+
+
+
+
diff --git a/test/android/app/release/app-release.apk b/test/android/app/release/app-release.apk
new file mode 100644
index 0000000..da36ffb
Binary files /dev/null and b/test/android/app/release/app-release.apk differ
diff --git a/test/android/app/release/output-metadata.json b/test/android/app/release/output-metadata.json
new file mode 100644
index 0000000..38679c2
--- /dev/null
+++ b/test/android/app/release/output-metadata.json
@@ -0,0 +1,18 @@
+{
+ "version": 2,
+ "artifactType": {
+ "type": "APK",
+ "kind": "Directory"
+ },
+ "applicationId": "es.ull.pcg.hpc.fancier.androidtest",
+ "variantName": "processReleaseResources",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "versionCode": 1,
+ "versionName": "1.0",
+ "outputFile": "app-release.apk"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/android/app/src/main/AndroidManifest.xml b/test/android/app/src/main/AndroidManifest.xml
index 368d57f..6132b42 100644
--- a/test/android/app/src/main/AndroidManifest.xml
+++ b/test/android/app/src/main/AndroidManifest.xml
@@ -5,6 +5,9 @@
+
+
+
.
+ */
+
+/*
+ * DO NOT MANUALLY EDIT THIS FILE!
+ * This file has been automatically generated, any modifications will be lost
+ * when generating the Fancier library. Any modifications to this file must be
+ * done via the corresponding template.
+ */
+
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#endif // cl_khr_fp64
+
+#if defined(__EMBEDDED_PROFILE__) && defined(cles_khr_int64)
+#pragma OPENCL EXTENSION cles_khr_int64 : enable
+#endif // __EMBEDDED_PROFILE__ && cles_khr_int64
+
+uint index_img (uint2 dims, uint x, uint y) {
+ return y * dims.x + x;
+}
+
+int toRgba (uchar4 color) {
+ return ((color.x & 0xff) << 24) | ((color.y & 0xff) << 16) | ((color.z & 0xff) << 8) | ((color.w & 0xff) << 0);
+}
+
+uchar4 fromRgba (int rgba) {
+ return (uchar4)((uchar)((rgba >> 24) & 0xff), (uchar)((rgba >> 16) & 0xff), (uchar)((rgba >> 8) & 0xff), (uchar)((rgba >> 0) & 0xff));
+}
diff --git a/opencl/math_lib.cl b/test/android/app/src/main/assets/fc_math.cl
similarity index 58%
rename from opencl/math_lib.cl
rename to test/android/app/src/main/assets/fc_math.cl
index 9eae34a..8460397 100644
--- a/opencl/math_lib.cl
+++ b/test/android/app/src/main/assets/fc_math.cl
@@ -38,19 +38,29 @@ float scalbf(float a, int scaleFactor) {
float2 float2_scalb(float2 a, int2 scaleFactor) {
return (float2)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y));
}
-
float3 float3_scalb(float3 a, int3 scaleFactor) {
return (float3)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z));
}
-
float4 float4_scalb(float4 a, int4 scaleFactor) {
return (float4)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z), scalbf(a.w, scaleFactor.w));
}
-
float8 float8_scalb(float8 a, int8 scaleFactor) {
return (float8)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z), scalbf(a.w, scaleFactor.w), scalbf(a.s4, scaleFactor.s4), scalbf(a.s5, scaleFactor.s5), scalbf(a.s6, scaleFactor.s6), scalbf(a.s7, scaleFactor.s7));
}
+float2 float2_smoothstep(float2 a, float2 b, float c) {
+ return (float2)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c));
+}
+float3 float3_smoothstep(float3 a, float3 b, float c) {
+ return (float3)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c));
+}
+float4 float4_smoothstep(float4 a, float4 b, float c) {
+ return (float4)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c));
+}
+float8 float8_smoothstep(float8 a, float8 b, float c) {
+ return (float8)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c), smoothstep(a.s4, b.s4, c), smoothstep(a.s5, b.s5, c), smoothstep(a.s6, b.s6, c), smoothstep(a.s7, b.s7, c));
+}
+
#ifdef cl_khr_fp64
double scalb(double a, int scaleFactor) {
@@ -60,19 +70,29 @@ double scalb(double a, int scaleFactor) {
double2 double2_scalb(double2 a, int2 scaleFactor) {
return (double2)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y));
}
-
double3 double3_scalb(double3 a, int3 scaleFactor) {
return (double3)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z));
}
-
double4 double4_scalb(double4 a, int4 scaleFactor) {
return (double4)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z), scalb(a.w, scaleFactor.w));
}
-
double8 double8_scalb(double8 a, int8 scaleFactor) {
return (double8)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z), scalb(a.w, scaleFactor.w), scalb(a.s4, scaleFactor.s4), scalb(a.s5, scaleFactor.s5), scalb(a.s6, scaleFactor.s6), scalb(a.s7, scaleFactor.s7));
}
+double2 double2_smoothstep(double2 a, double2 b, double c) {
+ return (double2)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c));
+}
+double3 double3_smoothstep(double3 a, double3 b, double c) {
+ return (double3)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c));
+}
+double4 double4_smoothstep(double4 a, double4 b, double c) {
+ return (double4)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c));
+}
+double8 double8_smoothstep(double8 a, double8 b, double c) {
+ return (double8)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c), smoothstep(a.s4, b.s4, c), smoothstep(a.s5, b.s5, c), smoothstep(a.s6, b.s6, c), smoothstep(a.s7, b.s7, c));
+}
+
#endif // cl_khr_fp64
char clampc(char a, char min, char max) {
@@ -83,6 +103,14 @@ char mixc(char x, char y, char a) {
return x + (y - x) * a;
}
+char maxmagc(char a, char b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+char minmagc(char a, char b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
char2 char2_clamp(char2 a, char2 min, char2 max) {
return (char2)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y));
}
@@ -91,6 +119,14 @@ char2 char2_mix(char2 x, char2 y, char2 a) {
return (char2)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y));
}
+char2 char2_maxmag(char2 a, char2 b) {
+ return (char2)(maxmagc(a.x, b.x), maxmagc(a.y, b.y));
+}
+
+char2 char2_minmag(char2 a, char2 b) {
+ return (char2)(minmagc(a.x, b.x), minmagc(a.y, b.y));
+}
+
char3 char3_clamp(char3 a, char3 min, char3 max) {
return (char3)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z));
}
@@ -99,6 +135,14 @@ char3 char3_mix(char3 x, char3 y, char3 a) {
return (char3)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z));
}
+char3 char3_maxmag(char3 a, char3 b) {
+ return (char3)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z));
+}
+
+char3 char3_minmag(char3 a, char3 b) {
+ return (char3)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z));
+}
+
char4 char4_clamp(char4 a, char4 min, char4 max) {
return (char4)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z), clampc(a.w, min.w, max.w));
}
@@ -107,6 +151,14 @@ char4 char4_mix(char4 x, char4 y, char4 a) {
return (char4)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z), mixc(x.w, y.w, a.w));
}
+char4 char4_maxmag(char4 a, char4 b) {
+ return (char4)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z), maxmagc(a.w, b.w));
+}
+
+char4 char4_minmag(char4 a, char4 b) {
+ return (char4)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z), minmagc(a.w, b.w));
+}
+
char8 char8_clamp(char8 a, char8 min, char8 max) {
return (char8)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z), clampc(a.w, min.w, max.w), clampc(a.s4, min.s4, max.s4), clampc(a.s5, min.s5, max.s5), clampc(a.s6, min.s6, max.s6), clampc(a.s7, min.s7, max.s7));
}
@@ -115,6 +167,14 @@ char8 char8_mix(char8 x, char8 y, char8 a) {
return (char8)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z), mixc(x.w, y.w, a.w), mixc(x.s4, y.s4, a.s4), mixc(x.s5, y.s5, a.s5), mixc(x.s6, y.s6, a.s6), mixc(x.s7, y.s7, a.s7));
}
+char8 char8_maxmag(char8 a, char8 b) {
+ return (char8)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z), maxmagc(a.w, b.w), maxmagc(a.s4, b.s4), maxmagc(a.s5, b.s5), maxmagc(a.s6, b.s6), maxmagc(a.s7, b.s7));
+}
+
+char8 char8_minmag(char8 a, char8 b) {
+ return (char8)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z), minmagc(a.w, b.w), minmagc(a.s4, b.s4), minmagc(a.s5, b.s5), minmagc(a.s6, b.s6), minmagc(a.s7, b.s7));
+}
+
short clamps(short a, short min, short max) {
return a < min? min : (a > max? max : a);
}
@@ -123,6 +183,14 @@ short mixs(short x, short y, short a) {
return x + (y - x) * a;
}
+short maxmags(short a, short b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+short minmags(short a, short b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
short2 short2_clamp(short2 a, short2 min, short2 max) {
return (short2)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y));
}
@@ -131,6 +199,14 @@ short2 short2_mix(short2 x, short2 y, short2 a) {
return (short2)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y));
}
+short2 short2_maxmag(short2 a, short2 b) {
+ return (short2)(maxmags(a.x, b.x), maxmags(a.y, b.y));
+}
+
+short2 short2_minmag(short2 a, short2 b) {
+ return (short2)(minmags(a.x, b.x), minmags(a.y, b.y));
+}
+
short3 short3_clamp(short3 a, short3 min, short3 max) {
return (short3)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z));
}
@@ -139,6 +215,14 @@ short3 short3_mix(short3 x, short3 y, short3 a) {
return (short3)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z));
}
+short3 short3_maxmag(short3 a, short3 b) {
+ return (short3)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z));
+}
+
+short3 short3_minmag(short3 a, short3 b) {
+ return (short3)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z));
+}
+
short4 short4_clamp(short4 a, short4 min, short4 max) {
return (short4)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z), clamps(a.w, min.w, max.w));
}
@@ -147,6 +231,14 @@ short4 short4_mix(short4 x, short4 y, short4 a) {
return (short4)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z), mixs(x.w, y.w, a.w));
}
+short4 short4_maxmag(short4 a, short4 b) {
+ return (short4)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z), maxmags(a.w, b.w));
+}
+
+short4 short4_minmag(short4 a, short4 b) {
+ return (short4)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z), minmags(a.w, b.w));
+}
+
short8 short8_clamp(short8 a, short8 min, short8 max) {
return (short8)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z), clamps(a.w, min.w, max.w), clamps(a.s4, min.s4, max.s4), clamps(a.s5, min.s5, max.s5), clamps(a.s6, min.s6, max.s6), clamps(a.s7, min.s7, max.s7));
}
@@ -155,6 +247,14 @@ short8 short8_mix(short8 x, short8 y, short8 a) {
return (short8)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z), mixs(x.w, y.w, a.w), mixs(x.s4, y.s4, a.s4), mixs(x.s5, y.s5, a.s5), mixs(x.s6, y.s6, a.s6), mixs(x.s7, y.s7, a.s7));
}
+short8 short8_maxmag(short8 a, short8 b) {
+ return (short8)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z), maxmags(a.w, b.w), maxmags(a.s4, b.s4), maxmags(a.s5, b.s5), maxmags(a.s6, b.s6), maxmags(a.s7, b.s7));
+}
+
+short8 short8_minmag(short8 a, short8 b) {
+ return (short8)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z), minmags(a.w, b.w), minmags(a.s4, b.s4), minmags(a.s5, b.s5), minmags(a.s6, b.s6), minmags(a.s7, b.s7));
+}
+
int clampi(int a, int min, int max) {
return a < min? min : (a > max? max : a);
}
@@ -163,6 +263,14 @@ int mixi(int x, int y, int a) {
return x + (y - x) * a;
}
+int maxmagi(int a, int b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+int minmagi(int a, int b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
int2 int2_clamp(int2 a, int2 min, int2 max) {
return (int2)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y));
}
@@ -171,6 +279,14 @@ int2 int2_mix(int2 x, int2 y, int2 a) {
return (int2)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y));
}
+int2 int2_maxmag(int2 a, int2 b) {
+ return (int2)(maxmagi(a.x, b.x), maxmagi(a.y, b.y));
+}
+
+int2 int2_minmag(int2 a, int2 b) {
+ return (int2)(minmagi(a.x, b.x), minmagi(a.y, b.y));
+}
+
int3 int3_clamp(int3 a, int3 min, int3 max) {
return (int3)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z));
}
@@ -179,6 +295,14 @@ int3 int3_mix(int3 x, int3 y, int3 a) {
return (int3)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z));
}
+int3 int3_maxmag(int3 a, int3 b) {
+ return (int3)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z));
+}
+
+int3 int3_minmag(int3 a, int3 b) {
+ return (int3)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z));
+}
+
int4 int4_clamp(int4 a, int4 min, int4 max) {
return (int4)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z), clampi(a.w, min.w, max.w));
}
@@ -187,6 +311,14 @@ int4 int4_mix(int4 x, int4 y, int4 a) {
return (int4)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z), mixi(x.w, y.w, a.w));
}
+int4 int4_maxmag(int4 a, int4 b) {
+ return (int4)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z), maxmagi(a.w, b.w));
+}
+
+int4 int4_minmag(int4 a, int4 b) {
+ return (int4)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z), minmagi(a.w, b.w));
+}
+
int8 int8_clamp(int8 a, int8 min, int8 max) {
return (int8)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z), clampi(a.w, min.w, max.w), clampi(a.s4, min.s4, max.s4), clampi(a.s5, min.s5, max.s5), clampi(a.s6, min.s6, max.s6), clampi(a.s7, min.s7, max.s7));
}
@@ -195,6 +327,14 @@ int8 int8_mix(int8 x, int8 y, int8 a) {
return (int8)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z), mixi(x.w, y.w, a.w), mixi(x.s4, y.s4, a.s4), mixi(x.s5, y.s5, a.s5), mixi(x.s6, y.s6, a.s6), mixi(x.s7, y.s7, a.s7));
}
+int8 int8_maxmag(int8 a, int8 b) {
+ return (int8)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z), maxmagi(a.w, b.w), maxmagi(a.s4, b.s4), maxmagi(a.s5, b.s5), maxmagi(a.s6, b.s6), maxmagi(a.s7, b.s7));
+}
+
+int8 int8_minmag(int8 a, int8 b) {
+ return (int8)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z), minmagi(a.w, b.w), minmagi(a.s4, b.s4), minmagi(a.s5, b.s5), minmagi(a.s6, b.s6), minmagi(a.s7, b.s7));
+}
+
#if !defined(__EMBEDDED_PROFILE__) || defined(cles_khr_int64)
long clampl(long a, long min, long max) {
return a < min? min : (a > max? max : a);
@@ -204,6 +344,14 @@ long mixl(long x, long y, long a) {
return x + (y - x) * a;
}
+long maxmagl(long a, long b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+long minmagl(long a, long b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
long2 long2_clamp(long2 a, long2 min, long2 max) {
return (long2)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y));
}
@@ -212,6 +360,14 @@ long2 long2_mix(long2 x, long2 y, long2 a) {
return (long2)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y));
}
+long2 long2_maxmag(long2 a, long2 b) {
+ return (long2)(maxmagl(a.x, b.x), maxmagl(a.y, b.y));
+}
+
+long2 long2_minmag(long2 a, long2 b) {
+ return (long2)(minmagl(a.x, b.x), minmagl(a.y, b.y));
+}
+
long3 long3_clamp(long3 a, long3 min, long3 max) {
return (long3)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z));
}
@@ -220,6 +376,14 @@ long3 long3_mix(long3 x, long3 y, long3 a) {
return (long3)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z));
}
+long3 long3_maxmag(long3 a, long3 b) {
+ return (long3)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z));
+}
+
+long3 long3_minmag(long3 a, long3 b) {
+ return (long3)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z));
+}
+
long4 long4_clamp(long4 a, long4 min, long4 max) {
return (long4)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z), clampl(a.w, min.w, max.w));
}
@@ -228,6 +392,14 @@ long4 long4_mix(long4 x, long4 y, long4 a) {
return (long4)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z), mixl(x.w, y.w, a.w));
}
+long4 long4_maxmag(long4 a, long4 b) {
+ return (long4)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z), maxmagl(a.w, b.w));
+}
+
+long4 long4_minmag(long4 a, long4 b) {
+ return (long4)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z), minmagl(a.w, b.w));
+}
+
long8 long8_clamp(long8 a, long8 min, long8 max) {
return (long8)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z), clampl(a.w, min.w, max.w), clampl(a.s4, min.s4, max.s4), clampl(a.s5, min.s5, max.s5), clampl(a.s6, min.s6, max.s6), clampl(a.s7, min.s7, max.s7));
}
@@ -236,4 +408,12 @@ long8 long8_mix(long8 x, long8 y, long8 a) {
return (long8)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z), mixl(x.w, y.w, a.w), mixl(x.s4, y.s4, a.s4), mixl(x.s5, y.s5, a.s5), mixl(x.s6, y.s6, a.s6), mixl(x.s7, y.s7, a.s7));
}
+long8 long8_maxmag(long8 a, long8 b) {
+ return (long8)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z), maxmagl(a.w, b.w), maxmagl(a.s4, b.s4), maxmagl(a.s5, b.s5), maxmagl(a.s6, b.s6), maxmagl(a.s7, b.s7));
+}
+
+long8 long8_minmag(long8 a, long8 b) {
+ return (long8)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z), minmagl(a.w, b.w), minmagl(a.s4, b.s4), minmagl(a.s5, b.s5), minmagl(a.s6, b.s6), minmagl(a.s7, b.s7));
+}
+
#endif // !__EMBEDDED_PROFILE__ || cles_khr_int64
diff --git a/test/android/app/src/main/assets/filters.cl b/test/android/app/src/main/assets/filters.cl
index de3a0af..c779964 100644
--- a/test/android/app/src/main/assets/filters.cl
+++ b/test/android/app/src/main/assets/filters.cl
@@ -18,11 +18,6 @@
#define GS_WEIGHTS ((float3)(0.299f, 0.587f, 0.114f))
-// Helper functions
-
-inline uint index_img(uint2 dims, uint x, uint y) {
- return y * dims.x + x;
-}
uchar4 bilinear_interp(global const uchar4* img, uint2 dims, float2 coord) {
const float2 pos_coord = fmax(coord, 0.0f);
diff --git a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/activity/MainActivity.java b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/activity/MainActivity.java
index cef7582..78f849d 100644
--- a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/activity/MainActivity.java
+++ b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/activity/MainActivity.java
@@ -63,7 +63,7 @@ private enum ExecutionMode {
// Run each benchmark multiple times, so that each app execution is shorter and crashes are less
// likely
- private final ExecutionMode mMode = ExecutionMode.TEST;
+ private final ExecutionMode mMode = ExecutionMode.BENCHMARK;
private static final int BENCHMARK_REPETITIONS = 10;
private static final boolean EXECUTE_FILTERED = true;
private static final boolean BENCHMARK_ONLY_RELIABLE = false;
@@ -181,7 +181,12 @@ private void doBenchmarks() {
if (EXECUTE_FILTERED) {
kernels = new BenchmarkTask.Benchmarks[]{
- BenchmarkTask.Benchmarks.BENCHMARK_NATIVE_FISHEYE
+// BenchmarkTask.Benchmarks.BENCHMARK_OCL_POSTERIZE,
+// BenchmarkTask.Benchmarks.BENCHMARK_NATIVE_POSTERIZE,
+// BenchmarkTask.Benchmarks.BENCHMARK_NATIVE_REF_POSTERIZE,
+// BenchmarkTask.Benchmarks.BENCHMARK_JAVA_REF_POSTERIZE,
+ BenchmarkTask.Benchmarks.BENCHMARK_OCL_POSTERIZE,
+// BenchmarkTask.Benchmarks.BENCHMARK_JAVA_BMP_POSTERIZE,
};
}
else {
diff --git a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/benchmark/BenchmarkTask.java b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/benchmark/BenchmarkTask.java
index d1bbe63..b99d94e 100644
--- a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/benchmark/BenchmarkTask.java
+++ b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/benchmark/BenchmarkTask.java
@@ -258,7 +258,7 @@ public void addConfiguration(Benchmarks selectedBenchmark, boolean reliable) {
public void run() {
// File loggers are added here because the results of each run belong in a separate file
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss", Locale.US);
- File outputFile = new File(mMain.getFilesDir(), "FancierTest_" + mDevice.name() + "_" +
+ File outputFile = new File(mMain.getExternalFilesDir(null), "FancierTest_" + mDevice.name() + "_" +
dateFormat.format(new Date()) + ".xml");
try (PrintStream outputStream = new PrintStream(outputFile)) {
diff --git a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/model/JavaImageFilter.java b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/model/JavaImageFilter.java
index 8150896..f94be3d 100644
--- a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/model/JavaImageFilter.java
+++ b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/model/JavaImageFilter.java
@@ -61,8 +61,8 @@ public Version getVersion() {
@Override
public void setup() {
- mInput.syncToNative();
- mOutput.syncToNative();
+ mInput.syncToHost();
+ mOutput.syncToHost();
}
@Override
@@ -294,7 +294,7 @@ private static void runBlurRef(RGBAImage input, RGBAImage output) {
blurBuildMask(gaussKernel, BLUR_RADIUS);
try (RGBAImage buffer = new RGBAImage(input.getDims())) {
- buffer.syncToNative();
+ buffer.syncToHost();
// Horizontal (input -> buffer)
for (int y = 0; y < height; ++y) {
@@ -366,7 +366,7 @@ private static void runBlurPerf(RGBAImage input, RGBAImage output) {
Byte4 outB = new Byte4();
try (RGBAImage buffer = new RGBAImage(input.getDims())) {
- buffer.syncToNative();
+ buffer.syncToHost();
ByteBuffer bBuffer = buffer.getBuffer();
// Horizontal (input -> buffer)
diff --git a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/model/NativeImageFilter.java b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/model/NativeImageFilter.java
index 2152bd1..a827280 100644
--- a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/model/NativeImageFilter.java
+++ b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/model/NativeImageFilter.java
@@ -58,12 +58,12 @@ public void setup() {
switch (mVersion) {
case CPU:
- mInput.syncToNative();
- mOutput.syncToNative();
+ mInput.syncToHost();
+ mOutput.syncToHost();
break;
case GPU:
- mInput.syncToOCL();
- mOutput.syncToOCL();
+ mInput.syncToDevice();
+ mOutput.syncToDevice();
break;
}
}
@@ -83,7 +83,7 @@ public void process(Bitmap output) {
case GPU:
processGpu(mInput, mOutput);
// Force to wait for the execution to finish, only needed if updateBitmap is not called
- mOutput.syncToNative();
+ mOutput.syncToHost();
break;
case REF:
processRef(mBmpIn, output);
diff --git a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/test/ArrayTest.java b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/test/ArrayTest.java
index 040eda4..bbc32dc 100644
--- a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/test/ArrayTest.java
+++ b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/test/ArrayTest.java
@@ -43,7 +43,7 @@ public boolean run() {
for (int i = 0; i < n; ++i)
s0.set(i, (short) (i * 2));
- s0.syncToNative();
+ s0.syncToHost();
for (int i = 0; i < n; ++i) {
if (s0.get(i) != (short) (i * 2))
@@ -51,7 +51,7 @@ public boolean run() {
}
// Automatic sync-to-native test
- s0.syncToOCL();
+ s0.syncToDevice();
short[] s0Array = s0.getArray();
ByteBuffer s0Buffer = s0.getBuffer();
diff --git a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/test/VectorArrayTest.java b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/test/VectorArrayTest.java
index cd111ca..d1e8b55 100644
--- a/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/test/VectorArrayTest.java
+++ b/test/android/app/src/main/java/es/ull/pcg/hpc/fancier/androidtest/test/VectorArrayTest.java
@@ -46,7 +46,7 @@ public boolean run() {
for (int i = 0; i < n; ++i) { f0.set(i, new Float3(1.0f * i, 1.5f * i, 2.0f * i)); }
- f0.syncToNative();
+ f0.syncToHost();
for (int i = 0; i < n; ++i) {
if (Int3.any(Float3.isNotEqual(f0.get(i), new Float3(1.0f * i, 1.5f * i, 2.0f * i))) != 0)
@@ -54,7 +54,7 @@ public boolean run() {
}
// Automatic sync-to-native test
- f0.syncToOCL();
+ f0.syncToDevice();
float[] f0Array = f0.getArray();
ByteBuffer f0Buffer = f0.getBuffer();
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/array.h b/test/android/app/src/main/jni/include/thirdparty/fancier/array.h
index 1c48681..0678efa 100644
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/array.h
+++ b/test/android/app/src/main/jni/include/thirdparty/fancier/array.h
@@ -209,8 +209,8 @@ FANCIER_API fcError fcByteArray_setArray(fcByteArray* self, fcInt len, const fcB
FANCIER_API fcError fcByteArray_setCopy(fcByteArray* self, const fcByteArray* array);
FANCIER_API fcError fcByteArray_setBuffer(fcByteArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcByteArray_syncToNative(fcByteArray* self);
-FANCIER_API fcError fcByteArray_syncToOCL(fcByteArray* self);
+FANCIER_API fcError fcByteArray_syncToHost(fcByteArray* self);
+FANCIER_API fcError fcByteArray_syncToDevice(fcByteArray* self);
FANCIER_API fcBool fcByteArray_valid(const fcByteArray* self);
FANCIER_API fcShortArray* fcShortArray_getJava(JNIEnv* env, jobject obj);
@@ -230,8 +230,8 @@ FANCIER_API fcError fcShortArray_setArray(fcShortArray* self, fcInt len, const f
FANCIER_API fcError fcShortArray_setCopy(fcShortArray* self, const fcShortArray* array);
FANCIER_API fcError fcShortArray_setBuffer(fcShortArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcShortArray_syncToNative(fcShortArray* self);
-FANCIER_API fcError fcShortArray_syncToOCL(fcShortArray* self);
+FANCIER_API fcError fcShortArray_syncToHost(fcShortArray* self);
+FANCIER_API fcError fcShortArray_syncToDevice(fcShortArray* self);
FANCIER_API fcBool fcShortArray_valid(const fcShortArray* self);
FANCIER_API fcIntArray* fcIntArray_getJava(JNIEnv* env, jobject obj);
@@ -251,8 +251,8 @@ FANCIER_API fcError fcIntArray_setArray(fcIntArray* self, fcInt len, const fcInt
FANCIER_API fcError fcIntArray_setCopy(fcIntArray* self, const fcIntArray* array);
FANCIER_API fcError fcIntArray_setBuffer(fcIntArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcIntArray_syncToNative(fcIntArray* self);
-FANCIER_API fcError fcIntArray_syncToOCL(fcIntArray* self);
+FANCIER_API fcError fcIntArray_syncToHost(fcIntArray* self);
+FANCIER_API fcError fcIntArray_syncToDevice(fcIntArray* self);
FANCIER_API fcBool fcIntArray_valid(const fcIntArray* self);
FANCIER_API fcLongArray* fcLongArray_getJava(JNIEnv* env, jobject obj);
@@ -272,8 +272,8 @@ FANCIER_API fcError fcLongArray_setArray(fcLongArray* self, fcInt len, const fcL
FANCIER_API fcError fcLongArray_setCopy(fcLongArray* self, const fcLongArray* array);
FANCIER_API fcError fcLongArray_setBuffer(fcLongArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcLongArray_syncToNative(fcLongArray* self);
-FANCIER_API fcError fcLongArray_syncToOCL(fcLongArray* self);
+FANCIER_API fcError fcLongArray_syncToHost(fcLongArray* self);
+FANCIER_API fcError fcLongArray_syncToDevice(fcLongArray* self);
FANCIER_API fcBool fcLongArray_valid(const fcLongArray* self);
FANCIER_API fcFloatArray* fcFloatArray_getJava(JNIEnv* env, jobject obj);
@@ -293,8 +293,8 @@ FANCIER_API fcError fcFloatArray_setArray(fcFloatArray* self, fcInt len, const f
FANCIER_API fcError fcFloatArray_setCopy(fcFloatArray* self, const fcFloatArray* array);
FANCIER_API fcError fcFloatArray_setBuffer(fcFloatArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloatArray_syncToNative(fcFloatArray* self);
-FANCIER_API fcError fcFloatArray_syncToOCL(fcFloatArray* self);
+FANCIER_API fcError fcFloatArray_syncToHost(fcFloatArray* self);
+FANCIER_API fcError fcFloatArray_syncToDevice(fcFloatArray* self);
FANCIER_API fcBool fcFloatArray_valid(const fcFloatArray* self);
FANCIER_API fcDoubleArray* fcDoubleArray_getJava(JNIEnv* env, jobject obj);
@@ -314,8 +314,8 @@ FANCIER_API fcError fcDoubleArray_setArray(fcDoubleArray* self, fcInt len, const
FANCIER_API fcError fcDoubleArray_setCopy(fcDoubleArray* self, const fcDoubleArray* array);
FANCIER_API fcError fcDoubleArray_setBuffer(fcDoubleArray* self, fcLong len, const void* v);
-FANCIER_API fcError fcDoubleArray_syncToNative(fcDoubleArray* self);
-FANCIER_API fcError fcDoubleArray_syncToOCL(fcDoubleArray* self);
+FANCIER_API fcError fcDoubleArray_syncToHost(fcDoubleArray* self);
+FANCIER_API fcError fcDoubleArray_syncToDevice(fcDoubleArray* self);
FANCIER_API fcBool fcDoubleArray_valid(const fcDoubleArray* self);
#endif // _FANCIER_ARRAY_H_
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/exception.h b/test/android/app/src/main/jni/include/thirdparty/fancier/exception.h
index 1fbea7f..39f53be 100644
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/exception.h
+++ b/test/android/app/src/main/jni/include/thirdparty/fancier/exception.h
@@ -82,6 +82,11 @@ typedef enum {
FC_EXCEPTION_BITMAP_UNLOCK_PIXELS,
FC_EXCEPTION_BITMAP_BAD_DIMENSIONS,
+ // BufferedImage exceptions
+ FC_EXCEPTION_BUFFEREDIMAGE_INFO,
+ FC_EXCEPTION_BUFFEREDIMAGE_UNSOPPORTED_FORMAT,
+ FC_EXCEPTION_BUFFEREDIMAGE_BAD_DIMENSIONS,
+
FC_EXCEPTION_OTHER
} fcNativeExceptionCode;
// clang-format on
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/image.h b/test/android/app/src/main/jni/include/thirdparty/fancier/image.h
index 3b54ce1..467ea1b 100644
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/image.h
+++ b/test/android/app/src/main/jni/include/thirdparty/fancier/image.h
@@ -51,6 +51,12 @@ FANCIER_API fcError fcRGBAImage_initDims(fcRGBAImage* self, fcInt2 dims);
FANCIER_API fcError fcRGBAImage_initSize(fcRGBAImage* self, fcInt width, fcInt height);
FANCIER_API fcError fcRGBAImage_initPixels(fcRGBAImage* self, fcInt width, fcInt height,
const fcInt* pixels);
+
+FANCIER_API fcError fcRGBAImage_initPixelsBGRA(fcRGBAImage* self, fcInt width, fcInt height,
+ const fcInt* pixels);
+FANCIER_API fcError fcRGBAImage_initArrayColorComponentsBGRA(fcRGBAImage* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcRGBAImage_setArrayColorComponentsBGRA(fcRGBAImage* self, fcInt len, const fcByte* v);
+
FANCIER_API fcError fcRGBAImage_initCopy(fcRGBAImage* self, const fcRGBAImage* image);
FANCIER_API fcError fcRGBAImage_release(fcRGBAImage* self);
@@ -61,10 +67,11 @@ FANCIER_API fcError fcRGBAImage_set(fcRGBAImage* self, fcInt x, fcInt y, fcByte4
FANCIER_API fcError fcRGBAImage_setPixels(fcRGBAImage* self, fcInt width, fcInt height,
const fcInt* pixels);
+FANCIER_API fcError fcRGBAImage_setPixelsChangeBGRA(fcRGBAImage* self, fcInt width, fcInt height, fcInt* pixels);
FANCIER_API fcError fcRGBAImage_setPixelsCopy(fcRGBAImage* self, const fcRGBAImage* image);
-FANCIER_API fcError fcRGBAImage_syncToNative(fcRGBAImage* self);
-FANCIER_API fcError fcRGBAImage_syncToOCL(fcRGBAImage* self);
+FANCIER_API fcError fcRGBAImage_syncToHost(fcRGBAImage* self);
+FANCIER_API fcError fcRGBAImage_syncToDevice(fcRGBAImage* self);
FANCIER_API fcBool fcRGBAImage_valid(const fcRGBAImage* self);
#ifdef __ANDROID__
@@ -78,4 +85,6 @@ FANCIER_API fcError fcRGBAImage_updateBitmap(fcRGBAImage* self, AndroidBitmapInf
void* pixels);
#endif // __ANDROID__
+FANCIER_API fcError fcRGBAImage_updateArray(fcRGBAImage* self, jint** __tmp_pixels, jint pixels_size, jboolean changeFromBGRA);
+
#endif // _FANCIER_IMAGE_H_
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/java.h b/test/android/app/src/main/jni/include/thirdparty/fancier/java.h
index feb4a26..9ea83e5 100644
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/java.h
+++ b/test/android/app/src/main/jni/include/thirdparty/fancier/java.h
@@ -23,7 +23,6 @@
#include
-
#define FC_JAVA_INSTANCE_HANDLERS(_classname) \
static jfieldID _classname##_nativePtrField = NULL; \
_classname* _classname##_allocJava(JNIEnv* env, jobject obj) { \
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling.h b/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling.h
deleted file mode 100644
index 08ea780..0000000
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
- * Copyright (C) 2021 Universidad de La Laguna.
- *
- * Fancier is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Fancier is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Fancier. If not, see .
- */
-
-/**
- * @file
- * This file contains functions and data structures used to implement dynamic tiling in native code.
- * @note Concurrent access to these functions exported is not thread-safe.
- */
-
-#ifndef _FANCIER_TILING_H_
-#define _FANCIER_TILING_H_
-
-#include
-
-#include
-#include
-
-
-/// It contains the data representing all dynamic tiling information for a single Java class.
-typedef struct fcpClassTilingData fcpClassTilingData;
-
-/// It represents the set of data entries related to a single kernel.
-typedef struct fcpDataEntrySet fcpDataEntrySet;
-
-/// It contains information about the exploration status of a single input size, for a single kernel
-/// in a single class.
-typedef struct fcpDataEntry fcpDataEntry;
-
-
-/// The name of the directory where dynamic tiling data for each class is stored
-#define FC_PLUGIN_TILING_SUBDIR_NAME "es.ull.pcg.hpc.fancier.tiling"
-
-
-/**
- * @name Application scope functions
- * @{
- */
-
-/**
- * Create the directories that will hold all the dynamic tiling information.
- * @return \c 0 if the operation ended successfully or \c -1 if it failed.
- */
-FANCIER_API jint loadFancierPlugin(JNIEnv* env);
-
-FANCIER_API jint unloadFancierPlugin(JNIEnv* env);
-
-/**
- * @}
- */
-
-/**
- * @name Class scope functions
- * @{
- */
-
-/**
- * Read all the stored dynamic tiling information for a specific class.
- * @param pkgClassName The fully qualified Java package and class name.
- * @return The existing dynamic tiling data for the selected class or \c NULL if the base tiling
- * directory could not be opened.
- * @note The returned object must be released by a call to \c fcPluginTiling_freeClassTilingData to
- * avoid memory leaks.
- */
-FANCIER_API fcpClassTilingData* fcPluginTiling_readClassTilingData(const char* pkgClassName,
- bool reset);
-
-/**
- * Free the memory allocated for dynamic tiling data.
- * @param tilingData The memory object to deallocate.
- */
-FANCIER_API void fcPluginTiling_freeClassTilingData(fcpClassTilingData* tilingData);
-
-/**
- * Retrieves a data entry set, or the set of tiling data entries for a single kernel. If it does
- * not exist, a new empty entry and a new file to hold its data are created.
- * @param tilingData The structure holding all the tiling data for the class.
- * @param kernelName A unique name for the kernel.
- * @param numDims The number of dimensions used for tiling.
- * @return The data entry set corresponding to the selected class and kernel.
- */
-FANCIER_API fcpDataEntrySet* fcPluginTiling_getDataEntrySet(fcpClassTilingData* tilingData,
- const char* kernelName,
- uint8_t numDims);
-
-/**
- * @}
- */
-
-/**
- * @name Kernel scope functions
- * @{
- */
-
-/**
- * Obtain the data entry corresponding to a specific kernel and input size.
- * If it does not exist, the data for the entry with the most similar size for that same kernel will
- * be used to populate a new entry, which will be returned. If a new entry is created, it is added
- * to the corresponding file as well.
- * @param entries The set of data entries for a single kernel.
- * @param idx Used to return the index of the entry ordered by size inside the set.
- * @param ... The input dimensions, of type \c size_t.
- * @return The data entry of the specified kernel and input size.
- */
-FANCIER_API fcpDataEntry* fcPluginTiling_getDataEntry(fcpDataEntrySet* entries, size_t* idx, ...);
-
-/**
- * @}
- */
-
-/**
- * @name Data entry scope functions
- * @{
- */
-
-/**
- * Retrieve the best tile size encountered so far from the specified data entry.
- * @param entry The data entry to query.
- * @param numDims The number of tiling dimensions.
- * @param tiles The output buffer where the sizes will be copied.
- */
-FANCIER_API void fcPluginTiling_getDataEntryBestTile(fcpDataEntry* entry, uint8_t numDims,
- size_t* tiles);
-
-/**
- * Obtain the next tile size to use in the dynamic adaptation process.
- * @param entry The data entry to modify.
- * @param numDims The number of tiling dimensions.
- * @param tiles The output buffer where the next tile size will be stored.
- * @return The direction in which the tile size has been modified.
- */
-FANCIER_API int8_t fcPluginTiling_exploreNextTiles(fcpDataEntry* entry, uint8_t numDims,
- size_t* tiles);
-
-/**
- * Update a data entry with the results of the last execution, in order to continue exploration.
- * If the exploration had not stopped in the previous call to this function
- * @param entries The set of data entries for the kernel.
- * @param entry The data entry to update.
- * @param entryIdx The index of the selected data entry, obtained by calling \c getDataEntry.
- * This index can be invalidated by further calls to \c getDataEntry, because new previous
- * entries might be added.
- * @param dir The direction returned by the latest call to \c exploreNextTiles.
- * @param newTimeUs The latest execution time of the kernel with the input size defined by the
- * specified entry, using the tile size returned by the latest call to \c exploreNextTiles.
- * @return \c 0 if the update can be performed and stored in disk or \c -1 otherwise.
- */
-FANCIER_API int fcPluginTiling_updateDataEntry(fcpDataEntrySet* entries, fcpDataEntry* entry,
- size_t entryIdx, int8_t dir, uint32_t newTimeUs);
-
-/**
- * @}
- */
-
-#endif
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/class_tiling_data.h b/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/class_tiling_data.h
deleted file mode 100644
index 71ccf7d..0000000
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/class_tiling_data.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
- * Copyright (C) 2021 Universidad de La Laguna.
- *
- * Fancier is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Fancier is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Fancier. If not, see .
- */
-
-#ifndef _CLASS_TILING_DATA_H_
-#define _CLASS_TILING_DATA_H_
-
-#include
-#include
-
-#include
-#include
-#include
-
-
-struct fcpClassTilingData {
- std::string pkgClassName;
- std::set, fcpUniquePtrContentComp> entrySets;
-
- fcpClassTilingData(std::string pkgClassName): pkgClassName(pkgClassName) {}
-
- template
- DimDataEntrySet* fcPluginTiling_getDataEntrySet(const char* kernelName) {
- // Find in entrySets the fcpDataEntrySet with the specified name
- std::unique_ptr newEntrySet(new DimDataEntrySet);
- newEntrySet->fullKernelName = pkgClassName + "." + kernelName;
- auto iter = entrySets.find(newEntrySet);
-
- // Create a new DimDataEntrySet if it doesn't exist
- if (iter == entrySets.end()) {
- // Create file and write header
- std::string fileName = FC_CACHE_BASE_PATH;
- fileName.append(FC_PLUGIN_TILING_SUBDIR_NAME "/").append(newEntrySet->fullKernelName);
-
- int fd = fcUtils_createOpenFile(fileName.c_str(), O_RDWR);
- if (fd < 0)
- return NULL;
-
- fcpDataHeader header;
- header.numDims = newEntrySet->dims;
-
- if (fcUtils_writeFileData(fd, (char*) &header, sizeof(fcpDataHeader)) < 0 || close(fd) < 0)
- return NULL;
-
- // Insert the new entry set
- iter = entrySets.insert(std::move(newEntrySet)).first;
- }
-
- return static_cast*>(iter->get());
- }
-};
-
-#endif // _CLASS_TILING_DATA_H_
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/data_entry.h b/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/data_entry.h
deleted file mode 100644
index 305a913..0000000
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/data_entry.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
- * Copyright (C) 2021 Universidad de La Laguna.
- *
- * Fancier is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Fancier is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Fancier. If not, see .
- */
-
-#ifndef _DATA_ENTRY_H_
-#define _DATA_ENTRY_H_
-
-#include
-#include
-
-
-#define DIR_POS(_dim) ((_dim) + 1)
-#define DIR_NEG(_dim) (-(_dim) -1)
-#define DIR_SIGN(_dir) ((_dir) == 0 ? 0 : ((_dir) > 0 ? 1 : -1))
-#define DIR_DIM(_dir) (abs(_dir) - 1)
-
-#define FLAG_EXPL_STOPPED 0x01
-#define FLAG_EXPL_IMPROVED 0x02
-#define FLAG_EXPL_NEG 0x04
-
-#define MIN_TILE_SIZE 1 // 2^1 = 2
-#define MAX_TILE_SIZE 7 // 2^7 = 128
-
-#define TILE_SIZE(_power) ((uint32_t)(1 << (_power)))
-
-
-struct fcpDataHeader {
- uint8_t numDims;
-};
-
-
-struct fcpDataEntry {
- uint32_t bestTimeUs;
- int8_t incDirection;
- uint8_t flags;
-
- virtual ~fcpDataEntry() = default;
-
- virtual const size_t* inputDims() const = 0;
- virtual const uint8_t* bestTiles() const = 0;
-
- virtual int8_t explore() = 0;
- virtual void update(int8_t dir, uint32_t newTimeUs) = 0;
-};
-
-
-template
-struct fcpDimDataEntry: public fcpDataEntry {
- size_t inputDim[N];
- uint8_t bestTile[N];
-
- virtual ~fcpDimDataEntry() = default;
-
- virtual const size_t* inputDims() const {
- return inputDim;
- }
-
- virtual const uint8_t* bestTiles() const {
- return bestTile;
- }
-
- int8_t processDirDimensionBounds(int8_t dir) {
- // Explore smaller values
- if (dir > N && flags & FLAG_EXPL_NEG) {
- flags |= FLAG_EXPL_IMPROVED;
- dir = DIR_NEG(0);
- }
-
- // Last dimension
- if (dir > N || dir < -N) {
- flags |= FLAG_EXPL_STOPPED;
- dir = 0;
- }
-
- return dir;
- }
-
- virtual int8_t explore() {
- if (flags & FLAG_EXPL_STOPPED)
- return 0;
-
- int8_t dir;
-
- if (flags & FLAG_EXPL_IMPROVED) {
- // Reset to first dim
- flags &= ~FLAG_EXPL_IMPROVED;
- dir = DIR_SIGN(incDirection); // +/- X
- }
- else {
- // Increment dimension
- dir = processDirDimensionBounds(incDirection + DIR_SIGN(incDirection));
- }
-
- if (dir == 0)
- return 0;
-
- // Find the next direction that sets a tile size between MIN_TILE_SIZE and MAX_TILE_SIZE
- uint8_t modTile = bestTile[DIR_DIM(dir)] + DIR_SIGN(dir);
-
- while (modTile < MIN_TILE_SIZE || modTile > MAX_TILE_SIZE) {
- // Reset 'improved' flag (processDirDimensionBounds can set it to true)
- flags &= ~FLAG_EXPL_IMPROVED;
-
- // Check next dimension
- dir = processDirDimensionBounds(dir + DIR_SIGN(dir));
-
- // All dimensions checked
- if (dir == 0)
- break;
-
- // Update the size the modified tile would have in the selected dimension
- modTile = bestTile[DIR_DIM(dir)] + DIR_SIGN(dir);
- }
-
- return dir;
- }
-
- virtual void update(int8_t dir, uint32_t newTimeUs) {
- incDirection = dir;
-
- if (dir != 0 && newTimeUs < bestTimeUs) {
- // Don't increase tile size if this was the first iteration (the run used the current
- // bestTile value instead of the next one)
- if (bestTimeUs != UINT32_MAX)
- bestTile[DIR_DIM(dir)] += DIR_SIGN(dir);
-
- bestTimeUs = newTimeUs;
- flags |= FLAG_EXPL_IMPROVED;
- }
- }
-
- size_t getTotalInputDim() const {
- size_t totalInput = 1;
- for (uint8_t i = 0; i < N; ++i)
- totalInput *= inputDim[i];
-
- return totalInput;
- }
-
- bool operator<(const fcpDimDataEntry& other) const {
- size_t totalInput = getTotalInputDim();
- size_t otherTotalInput = other.getTotalInputDim();
-
- if (totalInput != otherTotalInput)
- return totalInput < otherTotalInput;
-
- for (uint8_t i = 0; i < N; ++i) {
- if (inputDim[i] != other.inputDim[i])
- return inputDim[i] < other.inputDim[i];
- }
-
- return false;
- }
-
- bool operator==(const fcpDimDataEntry& other) const {
- for (uint8_t i = 0; i < N; ++i) {
- if (inputDim[i] != other.inputDim[i])
- return false;
- }
-
- return true;
- }
-};
-
-
-int fcPluginTiling_writeEntry(int fd, size_t idx, bool isNewEntry, const void* entry,
- size_t entrySz);
-
-#endif // _DATA_ENTRY_H_
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/data_entry_set.h b/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/data_entry_set.h
deleted file mode 100644
index f1532ca..0000000
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/data_entry_set.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
- * Copyright (C) 2021 Universidad de La Laguna.
- *
- * Fancier is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Fancier is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Fancier. If not, see .
- */
-
-#ifndef _DATA_ENTRY_SET_H_
-#define _DATA_ENTRY_SET_H_
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-#include
-
-
-struct fcpDataEntrySet {
- const uint8_t dims;
- std::string fullKernelName;
-
- fcpDataEntrySet(uint8_t dims): dims(dims) {}
- virtual ~fcpDataEntrySet() = default;
-
- bool operator<(const fcpDataEntrySet& other) const {
- return fullKernelName < other.fullKernelName;
- }
-
- virtual fcpDataEntry* getDataEntry(size_t* idx, va_list args) {
- return NULL;
- }
-
- virtual int readEntries(int fd) {
- return -1;
- }
-};
-
-
-template
-struct DimDataEntrySet: public fcpDataEntrySet {
- std::set> entries;
-
- DimDataEntrySet(): fcpDataEntrySet(N) {}
- virtual ~DimDataEntrySet() = default;
-
- virtual fcpDataEntry* getDataEntry(size_t* idx, va_list args) {
- fcpDimDataEntry elem;
- size_t localIdx;
- bool entryExists = false;
-
- for (uint8_t i = 0; i < N; ++i)
- elem.inputDim[i] = va_arg(args, size_t);
-
- // Find the specified data entry or the most similar, if it doesn't exist
- auto iter = entries.lower_bound(elem);
- if (iter == entries.end()) {
- // Point to the last entry
- if (!entries.empty())
- --iter;
- }
- else {
- if (elem == *iter) {
- entryExists = true;
- }
- else if (iter != entries.begin()) {
- // Decrement if the previous entry is closer
- size_t diff = iter->getTotalInputDim() - elem.getTotalInputDim();
- --iter;
- if (elem.getTotalInputDim() - iter->getTotalInputDim() > diff)
- ++iter;
- }
- }
-
- // Create a new entry
- if (!entryExists) {
- elem.bestTimeUs = UINT32_MAX;
- elem.incDirection = DIR_POS(0);
- elem.flags = FLAG_EXPL_IMPROVED;
-
- // This is the first data entry
- if (iter == entries.end()) {
- for (uint8_t i = 0; i < N; ++i)
- elem.bestTile[i] = MIN_TILE_SIZE;
- }
- // There are other data entries that can be used to populate this one
- else {
- // Signal that smaller values have to be explored
- elem.flags |= FLAG_EXPL_NEG;
-
- // Use the tile size values of the closest entry found
- for (uint8_t i = 0; i < N; ++i)
- elem.bestTile[i] = iter->bestTile[i];
- }
-
- // Insert the new data entry and point iter to it
- iter = entries.insert(elem).first;
- }
-
- // Calculate the index of the specified data entry if needed
- if (idx || !entryExists) {
- auto auxIter = entries.begin();
- localIdx = 0;
- while (auxIter != iter) {
- ++auxIter;
- ++localIdx;
- }
- }
-
- if (!entryExists) {
- // Open the file and add the entry
- std::string fileName = FC_CACHE_BASE_PATH;
- fileName.append(FC_PLUGIN_TILING_SUBDIR_NAME "/").append(fullKernelName);
-
- int fd = fcUtils_createOpenFile(fileName.c_str(), O_RDWR);
- if (fd < 0 ||
- fcPluginTiling_writeEntry(fd, localIdx, true, &elem, sizeof(fcpDimDataEntry)) < 0 ||
- close(fd) < 0) {
- // Close fd in case the call to fcPluginTiling_writeEntry is the one that failed
- close(fd);
-
- // Erase the recently created entry so that the file contents are still consistent with the
- // memory representation
- entries.erase(iter);
- return NULL;
- }
- }
-
- if (idx)
- *idx = localIdx;
-
- // The inputDim member cannot be modified, or else the order will be lost
- return const_cast*>(&(*iter));
- }
-
- virtual int readEntries(int fd) {
- entries.clear();
-
- // Check in the file header if the data is compatible with this class
- fcpDataHeader header;
- if (fcUtils_readFileData(fd, (char*) &header, sizeof(fcpDataHeader)) < 0)
- return -1;
-
- if (header.numDims != N)
- return -2;
-
- // Calculate the number of entries contained in the file
- off_t fileSize = lseek(fd, 0, SEEK_END) - sizeof(fcpDataHeader);
- size_t numEntries = fileSize / sizeof(fcpDimDataEntry);
-
- lseek(fd, sizeof(fcpDataHeader), SEEK_SET);
-
- // Read and insert entries in the set efficiently, taking advantage of the fact that entries
- // must be ordered in the file
- fcpDimDataEntry entry;
- auto lastInsert = entries.begin();
-
- for (size_t i = 0; i < numEntries; ++i) {
- if (fcUtils_readFileData(fd, (char*) &entry, sizeof(fcpDimDataEntry)) < 0)
- return -1;
-
- lastInsert = entries.insert(lastInsert, entry);
- }
-
- return 0;
- }
-};
-
-#endif // _DATA_ENTRY_SET_H_
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/unique_ptr_content_comp.h b/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/unique_ptr_content_comp.h
deleted file mode 100644
index 6710bd3..0000000
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/plugin/tiling/unique_ptr_content_comp.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
- * Copyright (C) 2021 Universidad de La Laguna.
- *
- * Fancier is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Fancier is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Fancier. If not, see .
- */
-
-#ifndef _UNIQUE_PTR_CONTENT_COMP_H_
-#define _UNIQUE_PTR_CONTENT_COMP_H_
-
-#include
-
-
-/**
- * Comparator of the contents of \c std::unique_ptr.
- * @tparam T Data type held by the pointers to compare.
- */
-template
-struct fcpUniquePtrContentComp {
- bool operator()(const std::unique_ptr& a, const std::unique_ptr& b) const {
- return !b || (a && *a < *b);
- }
-};
-
-#endif // _UNIQUE_PTR_CONTENT_COMP_H_
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/vector.h b/test/android/app/src/main/jni/include/thirdparty/fancier/vector.h
index 1da1fee..b8aa796 100644
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/vector.h
+++ b/test/android/app/src/main/jni/include/thirdparty/fancier/vector.h
@@ -127,99 +127,75 @@ FANCIER_API void fcVector_releaseJNI(JNIEnv* env);
// Java interface
-FANCIER_API fcByte2* fcByte2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcByte2_wrap(JNIEnv* env, fcByte2 vec);
FANCIER_API fcByte2 fcByte2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcByte3* fcByte3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcByte3_wrap(JNIEnv* env, fcByte3 vec);
FANCIER_API fcByte3 fcByte3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcByte4* fcByte4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcByte4_wrap(JNIEnv* env, fcByte4 vec);
FANCIER_API fcByte4 fcByte4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcByte8* fcByte8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcByte8_wrap(JNIEnv* env, fcByte8 vec);
FANCIER_API fcByte8 fcByte8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcShort2* fcShort2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcShort2_wrap(JNIEnv* env, fcShort2 vec);
FANCIER_API fcShort2 fcShort2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcShort3* fcShort3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcShort3_wrap(JNIEnv* env, fcShort3 vec);
FANCIER_API fcShort3 fcShort3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcShort4* fcShort4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcShort4_wrap(JNIEnv* env, fcShort4 vec);
FANCIER_API fcShort4 fcShort4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcShort8* fcShort8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcShort8_wrap(JNIEnv* env, fcShort8 vec);
FANCIER_API fcShort8 fcShort8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcInt2* fcInt2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcInt2_wrap(JNIEnv* env, fcInt2 vec);
FANCIER_API fcInt2 fcInt2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcInt3* fcInt3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcInt3_wrap(JNIEnv* env, fcInt3 vec);
FANCIER_API fcInt3 fcInt3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcInt4* fcInt4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcInt4_wrap(JNIEnv* env, fcInt4 vec);
FANCIER_API fcInt4 fcInt4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcInt8* fcInt8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcInt8_wrap(JNIEnv* env, fcInt8 vec);
FANCIER_API fcInt8 fcInt8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcLong2* fcLong2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcLong2_wrap(JNIEnv* env, fcLong2 vec);
FANCIER_API fcLong2 fcLong2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcLong3* fcLong3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcLong3_wrap(JNIEnv* env, fcLong3 vec);
FANCIER_API fcLong3 fcLong3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcLong4* fcLong4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcLong4_wrap(JNIEnv* env, fcLong4 vec);
FANCIER_API fcLong4 fcLong4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcLong8* fcLong8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcLong8_wrap(JNIEnv* env, fcLong8 vec);
FANCIER_API fcLong8 fcLong8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcFloat2* fcFloat2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcFloat2_wrap(JNIEnv* env, fcFloat2 vec);
FANCIER_API fcFloat2 fcFloat2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcFloat3* fcFloat3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcFloat3_wrap(JNIEnv* env, fcFloat3 vec);
FANCIER_API fcFloat3 fcFloat3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcFloat4* fcFloat4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcFloat4_wrap(JNIEnv* env, fcFloat4 vec);
FANCIER_API fcFloat4 fcFloat4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcFloat8* fcFloat8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcFloat8_wrap(JNIEnv* env, fcFloat8 vec);
FANCIER_API fcFloat8 fcFloat8_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcDouble2* fcDouble2_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcDouble2_wrap(JNIEnv* env, fcDouble2 vec);
FANCIER_API fcDouble2 fcDouble2_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcDouble3* fcDouble3_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcDouble3_wrap(JNIEnv* env, fcDouble3 vec);
FANCIER_API fcDouble3 fcDouble3_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcDouble4* fcDouble4_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcDouble4_wrap(JNIEnv* env, fcDouble4 vec);
FANCIER_API fcDouble4 fcDouble4_unwrap(JNIEnv* env, jobject vec, fcError* err);
-FANCIER_API fcDouble8* fcDouble8_getJava(JNIEnv* env, jobject obj);
FANCIER_API jobject fcDouble8_wrap(JNIEnv* env, fcDouble8 vec);
FANCIER_API fcDouble8 fcDouble8_unwrap(JNIEnv* env, jobject vec, fcError* err);
diff --git a/test/android/app/src/main/jni/include/thirdparty/fancier/vector_array.h b/test/android/app/src/main/jni/include/thirdparty/fancier/vector_array.h
index 89b9001..bcf0c40 100644
--- a/test/android/app/src/main/jni/include/thirdparty/fancier/vector_array.h
+++ b/test/android/app/src/main/jni/include/thirdparty/fancier/vector_array.h
@@ -617,8 +617,8 @@ FANCIER_API fcError fcByte2Array_setArray(fcByte2Array* self, fcInt len, const f
FANCIER_API fcError fcByte2Array_setCopy(fcByte2Array* self, const fcByte2Array* array);
FANCIER_API fcError fcByte2Array_setBuffer(fcByte2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcByte2Array_syncToNative(fcByte2Array* self);
-FANCIER_API fcError fcByte2Array_syncToOCL(fcByte2Array* self);
+FANCIER_API fcError fcByte2Array_syncToHost(fcByte2Array* self);
+FANCIER_API fcError fcByte2Array_syncToDevice(fcByte2Array* self);
FANCIER_API fcBool fcByte2Array_valid(const fcByte2Array* self);
FANCIER_API fcByte3Array* fcByte3Array_getJava(JNIEnv* env, jobject obj);
@@ -638,8 +638,8 @@ FANCIER_API fcError fcByte3Array_setArray(fcByte3Array* self, fcInt len, const f
FANCIER_API fcError fcByte3Array_setCopy(fcByte3Array* self, const fcByte3Array* array);
FANCIER_API fcError fcByte3Array_setBuffer(fcByte3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcByte3Array_syncToNative(fcByte3Array* self);
-FANCIER_API fcError fcByte3Array_syncToOCL(fcByte3Array* self);
+FANCIER_API fcError fcByte3Array_syncToHost(fcByte3Array* self);
+FANCIER_API fcError fcByte3Array_syncToDevice(fcByte3Array* self);
FANCIER_API fcBool fcByte3Array_valid(const fcByte3Array* self);
FANCIER_API fcByte4Array* fcByte4Array_getJava(JNIEnv* env, jobject obj);
@@ -659,8 +659,8 @@ FANCIER_API fcError fcByte4Array_setArray(fcByte4Array* self, fcInt len, const f
FANCIER_API fcError fcByte4Array_setCopy(fcByte4Array* self, const fcByte4Array* array);
FANCIER_API fcError fcByte4Array_setBuffer(fcByte4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcByte4Array_syncToNative(fcByte4Array* self);
-FANCIER_API fcError fcByte4Array_syncToOCL(fcByte4Array* self);
+FANCIER_API fcError fcByte4Array_syncToHost(fcByte4Array* self);
+FANCIER_API fcError fcByte4Array_syncToDevice(fcByte4Array* self);
FANCIER_API fcBool fcByte4Array_valid(const fcByte4Array* self);
FANCIER_API fcByte8Array* fcByte8Array_getJava(JNIEnv* env, jobject obj);
@@ -680,8 +680,8 @@ FANCIER_API fcError fcByte8Array_setArray(fcByte8Array* self, fcInt len, const f
FANCIER_API fcError fcByte8Array_setCopy(fcByte8Array* self, const fcByte8Array* array);
FANCIER_API fcError fcByte8Array_setBuffer(fcByte8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcByte8Array_syncToNative(fcByte8Array* self);
-FANCIER_API fcError fcByte8Array_syncToOCL(fcByte8Array* self);
+FANCIER_API fcError fcByte8Array_syncToHost(fcByte8Array* self);
+FANCIER_API fcError fcByte8Array_syncToDevice(fcByte8Array* self);
FANCIER_API fcBool fcByte8Array_valid(const fcByte8Array* self);
FANCIER_API fcShort2Array* fcShort2Array_getJava(JNIEnv* env, jobject obj);
@@ -701,8 +701,8 @@ FANCIER_API fcError fcShort2Array_setArray(fcShort2Array* self, fcInt len, const
FANCIER_API fcError fcShort2Array_setCopy(fcShort2Array* self, const fcShort2Array* array);
FANCIER_API fcError fcShort2Array_setBuffer(fcShort2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcShort2Array_syncToNative(fcShort2Array* self);
-FANCIER_API fcError fcShort2Array_syncToOCL(fcShort2Array* self);
+FANCIER_API fcError fcShort2Array_syncToHost(fcShort2Array* self);
+FANCIER_API fcError fcShort2Array_syncToDevice(fcShort2Array* self);
FANCIER_API fcBool fcShort2Array_valid(const fcShort2Array* self);
FANCIER_API fcShort3Array* fcShort3Array_getJava(JNIEnv* env, jobject obj);
@@ -722,8 +722,8 @@ FANCIER_API fcError fcShort3Array_setArray(fcShort3Array* self, fcInt len, const
FANCIER_API fcError fcShort3Array_setCopy(fcShort3Array* self, const fcShort3Array* array);
FANCIER_API fcError fcShort3Array_setBuffer(fcShort3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcShort3Array_syncToNative(fcShort3Array* self);
-FANCIER_API fcError fcShort3Array_syncToOCL(fcShort3Array* self);
+FANCIER_API fcError fcShort3Array_syncToHost(fcShort3Array* self);
+FANCIER_API fcError fcShort3Array_syncToDevice(fcShort3Array* self);
FANCIER_API fcBool fcShort3Array_valid(const fcShort3Array* self);
FANCIER_API fcShort4Array* fcShort4Array_getJava(JNIEnv* env, jobject obj);
@@ -743,8 +743,8 @@ FANCIER_API fcError fcShort4Array_setArray(fcShort4Array* self, fcInt len, const
FANCIER_API fcError fcShort4Array_setCopy(fcShort4Array* self, const fcShort4Array* array);
FANCIER_API fcError fcShort4Array_setBuffer(fcShort4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcShort4Array_syncToNative(fcShort4Array* self);
-FANCIER_API fcError fcShort4Array_syncToOCL(fcShort4Array* self);
+FANCIER_API fcError fcShort4Array_syncToHost(fcShort4Array* self);
+FANCIER_API fcError fcShort4Array_syncToDevice(fcShort4Array* self);
FANCIER_API fcBool fcShort4Array_valid(const fcShort4Array* self);
FANCIER_API fcShort8Array* fcShort8Array_getJava(JNIEnv* env, jobject obj);
@@ -764,8 +764,8 @@ FANCIER_API fcError fcShort8Array_setArray(fcShort8Array* self, fcInt len, const
FANCIER_API fcError fcShort8Array_setCopy(fcShort8Array* self, const fcShort8Array* array);
FANCIER_API fcError fcShort8Array_setBuffer(fcShort8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcShort8Array_syncToNative(fcShort8Array* self);
-FANCIER_API fcError fcShort8Array_syncToOCL(fcShort8Array* self);
+FANCIER_API fcError fcShort8Array_syncToHost(fcShort8Array* self);
+FANCIER_API fcError fcShort8Array_syncToDevice(fcShort8Array* self);
FANCIER_API fcBool fcShort8Array_valid(const fcShort8Array* self);
FANCIER_API fcInt2Array* fcInt2Array_getJava(JNIEnv* env, jobject obj);
@@ -785,8 +785,8 @@ FANCIER_API fcError fcInt2Array_setArray(fcInt2Array* self, fcInt len, const fcI
FANCIER_API fcError fcInt2Array_setCopy(fcInt2Array* self, const fcInt2Array* array);
FANCIER_API fcError fcInt2Array_setBuffer(fcInt2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcInt2Array_syncToNative(fcInt2Array* self);
-FANCIER_API fcError fcInt2Array_syncToOCL(fcInt2Array* self);
+FANCIER_API fcError fcInt2Array_syncToHost(fcInt2Array* self);
+FANCIER_API fcError fcInt2Array_syncToDevice(fcInt2Array* self);
FANCIER_API fcBool fcInt2Array_valid(const fcInt2Array* self);
FANCIER_API fcInt3Array* fcInt3Array_getJava(JNIEnv* env, jobject obj);
@@ -806,8 +806,8 @@ FANCIER_API fcError fcInt3Array_setArray(fcInt3Array* self, fcInt len, const fcI
FANCIER_API fcError fcInt3Array_setCopy(fcInt3Array* self, const fcInt3Array* array);
FANCIER_API fcError fcInt3Array_setBuffer(fcInt3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcInt3Array_syncToNative(fcInt3Array* self);
-FANCIER_API fcError fcInt3Array_syncToOCL(fcInt3Array* self);
+FANCIER_API fcError fcInt3Array_syncToHost(fcInt3Array* self);
+FANCIER_API fcError fcInt3Array_syncToDevice(fcInt3Array* self);
FANCIER_API fcBool fcInt3Array_valid(const fcInt3Array* self);
FANCIER_API fcInt4Array* fcInt4Array_getJava(JNIEnv* env, jobject obj);
@@ -827,8 +827,8 @@ FANCIER_API fcError fcInt4Array_setArray(fcInt4Array* self, fcInt len, const fcI
FANCIER_API fcError fcInt4Array_setCopy(fcInt4Array* self, const fcInt4Array* array);
FANCIER_API fcError fcInt4Array_setBuffer(fcInt4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcInt4Array_syncToNative(fcInt4Array* self);
-FANCIER_API fcError fcInt4Array_syncToOCL(fcInt4Array* self);
+FANCIER_API fcError fcInt4Array_syncToHost(fcInt4Array* self);
+FANCIER_API fcError fcInt4Array_syncToDevice(fcInt4Array* self);
FANCIER_API fcBool fcInt4Array_valid(const fcInt4Array* self);
FANCIER_API fcInt8Array* fcInt8Array_getJava(JNIEnv* env, jobject obj);
@@ -848,8 +848,8 @@ FANCIER_API fcError fcInt8Array_setArray(fcInt8Array* self, fcInt len, const fcI
FANCIER_API fcError fcInt8Array_setCopy(fcInt8Array* self, const fcInt8Array* array);
FANCIER_API fcError fcInt8Array_setBuffer(fcInt8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcInt8Array_syncToNative(fcInt8Array* self);
-FANCIER_API fcError fcInt8Array_syncToOCL(fcInt8Array* self);
+FANCIER_API fcError fcInt8Array_syncToHost(fcInt8Array* self);
+FANCIER_API fcError fcInt8Array_syncToDevice(fcInt8Array* self);
FANCIER_API fcBool fcInt8Array_valid(const fcInt8Array* self);
FANCIER_API fcLong2Array* fcLong2Array_getJava(JNIEnv* env, jobject obj);
@@ -869,8 +869,8 @@ FANCIER_API fcError fcLong2Array_setArray(fcLong2Array* self, fcInt len, const f
FANCIER_API fcError fcLong2Array_setCopy(fcLong2Array* self, const fcLong2Array* array);
FANCIER_API fcError fcLong2Array_setBuffer(fcLong2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcLong2Array_syncToNative(fcLong2Array* self);
-FANCIER_API fcError fcLong2Array_syncToOCL(fcLong2Array* self);
+FANCIER_API fcError fcLong2Array_syncToHost(fcLong2Array* self);
+FANCIER_API fcError fcLong2Array_syncToDevice(fcLong2Array* self);
FANCIER_API fcBool fcLong2Array_valid(const fcLong2Array* self);
FANCIER_API fcLong3Array* fcLong3Array_getJava(JNIEnv* env, jobject obj);
@@ -890,8 +890,8 @@ FANCIER_API fcError fcLong3Array_setArray(fcLong3Array* self, fcInt len, const f
FANCIER_API fcError fcLong3Array_setCopy(fcLong3Array* self, const fcLong3Array* array);
FANCIER_API fcError fcLong3Array_setBuffer(fcLong3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcLong3Array_syncToNative(fcLong3Array* self);
-FANCIER_API fcError fcLong3Array_syncToOCL(fcLong3Array* self);
+FANCIER_API fcError fcLong3Array_syncToHost(fcLong3Array* self);
+FANCIER_API fcError fcLong3Array_syncToDevice(fcLong3Array* self);
FANCIER_API fcBool fcLong3Array_valid(const fcLong3Array* self);
FANCIER_API fcLong4Array* fcLong4Array_getJava(JNIEnv* env, jobject obj);
@@ -911,8 +911,8 @@ FANCIER_API fcError fcLong4Array_setArray(fcLong4Array* self, fcInt len, const f
FANCIER_API fcError fcLong4Array_setCopy(fcLong4Array* self, const fcLong4Array* array);
FANCIER_API fcError fcLong4Array_setBuffer(fcLong4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcLong4Array_syncToNative(fcLong4Array* self);
-FANCIER_API fcError fcLong4Array_syncToOCL(fcLong4Array* self);
+FANCIER_API fcError fcLong4Array_syncToHost(fcLong4Array* self);
+FANCIER_API fcError fcLong4Array_syncToDevice(fcLong4Array* self);
FANCIER_API fcBool fcLong4Array_valid(const fcLong4Array* self);
FANCIER_API fcLong8Array* fcLong8Array_getJava(JNIEnv* env, jobject obj);
@@ -932,8 +932,8 @@ FANCIER_API fcError fcLong8Array_setArray(fcLong8Array* self, fcInt len, const f
FANCIER_API fcError fcLong8Array_setCopy(fcLong8Array* self, const fcLong8Array* array);
FANCIER_API fcError fcLong8Array_setBuffer(fcLong8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcLong8Array_syncToNative(fcLong8Array* self);
-FANCIER_API fcError fcLong8Array_syncToOCL(fcLong8Array* self);
+FANCIER_API fcError fcLong8Array_syncToHost(fcLong8Array* self);
+FANCIER_API fcError fcLong8Array_syncToDevice(fcLong8Array* self);
FANCIER_API fcBool fcLong8Array_valid(const fcLong8Array* self);
FANCIER_API fcFloat2Array* fcFloat2Array_getJava(JNIEnv* env, jobject obj);
@@ -953,8 +953,8 @@ FANCIER_API fcError fcFloat2Array_setArray(fcFloat2Array* self, fcInt len, const
FANCIER_API fcError fcFloat2Array_setCopy(fcFloat2Array* self, const fcFloat2Array* array);
FANCIER_API fcError fcFloat2Array_setBuffer(fcFloat2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloat2Array_syncToNative(fcFloat2Array* self);
-FANCIER_API fcError fcFloat2Array_syncToOCL(fcFloat2Array* self);
+FANCIER_API fcError fcFloat2Array_syncToHost(fcFloat2Array* self);
+FANCIER_API fcError fcFloat2Array_syncToDevice(fcFloat2Array* self);
FANCIER_API fcBool fcFloat2Array_valid(const fcFloat2Array* self);
FANCIER_API fcFloat3Array* fcFloat3Array_getJava(JNIEnv* env, jobject obj);
@@ -974,8 +974,8 @@ FANCIER_API fcError fcFloat3Array_setArray(fcFloat3Array* self, fcInt len, const
FANCIER_API fcError fcFloat3Array_setCopy(fcFloat3Array* self, const fcFloat3Array* array);
FANCIER_API fcError fcFloat3Array_setBuffer(fcFloat3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloat3Array_syncToNative(fcFloat3Array* self);
-FANCIER_API fcError fcFloat3Array_syncToOCL(fcFloat3Array* self);
+FANCIER_API fcError fcFloat3Array_syncToHost(fcFloat3Array* self);
+FANCIER_API fcError fcFloat3Array_syncToDevice(fcFloat3Array* self);
FANCIER_API fcBool fcFloat3Array_valid(const fcFloat3Array* self);
FANCIER_API fcFloat4Array* fcFloat4Array_getJava(JNIEnv* env, jobject obj);
@@ -995,8 +995,8 @@ FANCIER_API fcError fcFloat4Array_setArray(fcFloat4Array* self, fcInt len, const
FANCIER_API fcError fcFloat4Array_setCopy(fcFloat4Array* self, const fcFloat4Array* array);
FANCIER_API fcError fcFloat4Array_setBuffer(fcFloat4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloat4Array_syncToNative(fcFloat4Array* self);
-FANCIER_API fcError fcFloat4Array_syncToOCL(fcFloat4Array* self);
+FANCIER_API fcError fcFloat4Array_syncToHost(fcFloat4Array* self);
+FANCIER_API fcError fcFloat4Array_syncToDevice(fcFloat4Array* self);
FANCIER_API fcBool fcFloat4Array_valid(const fcFloat4Array* self);
FANCIER_API fcFloat8Array* fcFloat8Array_getJava(JNIEnv* env, jobject obj);
@@ -1016,8 +1016,8 @@ FANCIER_API fcError fcFloat8Array_setArray(fcFloat8Array* self, fcInt len, const
FANCIER_API fcError fcFloat8Array_setCopy(fcFloat8Array* self, const fcFloat8Array* array);
FANCIER_API fcError fcFloat8Array_setBuffer(fcFloat8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcFloat8Array_syncToNative(fcFloat8Array* self);
-FANCIER_API fcError fcFloat8Array_syncToOCL(fcFloat8Array* self);
+FANCIER_API fcError fcFloat8Array_syncToHost(fcFloat8Array* self);
+FANCIER_API fcError fcFloat8Array_syncToDevice(fcFloat8Array* self);
FANCIER_API fcBool fcFloat8Array_valid(const fcFloat8Array* self);
FANCIER_API fcDouble2Array* fcDouble2Array_getJava(JNIEnv* env, jobject obj);
@@ -1037,8 +1037,8 @@ FANCIER_API fcError fcDouble2Array_setArray(fcDouble2Array* self, fcInt len, con
FANCIER_API fcError fcDouble2Array_setCopy(fcDouble2Array* self, const fcDouble2Array* array);
FANCIER_API fcError fcDouble2Array_setBuffer(fcDouble2Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcDouble2Array_syncToNative(fcDouble2Array* self);
-FANCIER_API fcError fcDouble2Array_syncToOCL(fcDouble2Array* self);
+FANCIER_API fcError fcDouble2Array_syncToHost(fcDouble2Array* self);
+FANCIER_API fcError fcDouble2Array_syncToDevice(fcDouble2Array* self);
FANCIER_API fcBool fcDouble2Array_valid(const fcDouble2Array* self);
FANCIER_API fcDouble3Array* fcDouble3Array_getJava(JNIEnv* env, jobject obj);
@@ -1058,8 +1058,8 @@ FANCIER_API fcError fcDouble3Array_setArray(fcDouble3Array* self, fcInt len, con
FANCIER_API fcError fcDouble3Array_setCopy(fcDouble3Array* self, const fcDouble3Array* array);
FANCIER_API fcError fcDouble3Array_setBuffer(fcDouble3Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcDouble3Array_syncToNative(fcDouble3Array* self);
-FANCIER_API fcError fcDouble3Array_syncToOCL(fcDouble3Array* self);
+FANCIER_API fcError fcDouble3Array_syncToHost(fcDouble3Array* self);
+FANCIER_API fcError fcDouble3Array_syncToDevice(fcDouble3Array* self);
FANCIER_API fcBool fcDouble3Array_valid(const fcDouble3Array* self);
FANCIER_API fcDouble4Array* fcDouble4Array_getJava(JNIEnv* env, jobject obj);
@@ -1079,8 +1079,8 @@ FANCIER_API fcError fcDouble4Array_setArray(fcDouble4Array* self, fcInt len, con
FANCIER_API fcError fcDouble4Array_setCopy(fcDouble4Array* self, const fcDouble4Array* array);
FANCIER_API fcError fcDouble4Array_setBuffer(fcDouble4Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcDouble4Array_syncToNative(fcDouble4Array* self);
-FANCIER_API fcError fcDouble4Array_syncToOCL(fcDouble4Array* self);
+FANCIER_API fcError fcDouble4Array_syncToHost(fcDouble4Array* self);
+FANCIER_API fcError fcDouble4Array_syncToDevice(fcDouble4Array* self);
FANCIER_API fcBool fcDouble4Array_valid(const fcDouble4Array* self);
FANCIER_API fcDouble8Array* fcDouble8Array_getJava(JNIEnv* env, jobject obj);
@@ -1100,8 +1100,8 @@ FANCIER_API fcError fcDouble8Array_setArray(fcDouble8Array* self, fcInt len, con
FANCIER_API fcError fcDouble8Array_setCopy(fcDouble8Array* self, const fcDouble8Array* array);
FANCIER_API fcError fcDouble8Array_setBuffer(fcDouble8Array* self, fcLong len, const void* v);
-FANCIER_API fcError fcDouble8Array_syncToNative(fcDouble8Array* self);
-FANCIER_API fcError fcDouble8Array_syncToOCL(fcDouble8Array* self);
+FANCIER_API fcError fcDouble8Array_syncToHost(fcDouble8Array* self);
+FANCIER_API fcError fcDouble8Array_syncToDevice(fcDouble8Array* self);
FANCIER_API fcBool fcDouble8Array_valid(const fcDouble8Array* self);
#endif // _FANCIER_VECTOR_ARRAY_H_
diff --git a/test/android/app/src/main/jni/src/filter/native_filter.c b/test/android/app/src/main/jni/src/filter/native_filter.c
index cb691e1..792c064 100644
--- a/test/android/app/src/main/jni/src/filter/native_filter.c
+++ b/test/android/app/src/main/jni/src/filter/native_filter.c
@@ -278,11 +278,11 @@ Java_es_ull_pcg_hpc_fancier_androidtest_model_NativeImageFilter_processGpu(JNIEn
}
// Ensure data is updated in the target device
- int err = fcRGBAImage_syncToOCL(input);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToOCL:input", FC_VOID_EXPR);
+ int err = fcRGBAImage_syncToDevice(input);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToDevice:input", FC_VOID_EXPR);
- err = fcRGBAImage_syncToOCL(output);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToOCL:output", FC_VOID_EXPR);
+ err = fcRGBAImage_syncToDevice(output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToDevice:output", FC_VOID_EXPR);
// Execute kernel
switch (self->m_filter_id) {
@@ -351,11 +351,11 @@ Java_es_ull_pcg_hpc_fancier_androidtest_model_NativeImageFilter_processCpu(JNIEn
}
// Ensure data is updated in the target device
- int err = fcRGBAImage_syncToNative(input);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToNative:input", FC_VOID_EXPR);
+ int err = fcRGBAImage_syncToHost(input);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToHost:input", FC_VOID_EXPR);
- err = fcRGBAImage_syncToNative(output);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToNative:output", FC_VOID_EXPR);
+ err = fcRGBAImage_syncToHost(output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToHost:output", FC_VOID_EXPR);
// Execute kernel
switch (self->m_filter_id) {
@@ -570,13 +570,13 @@ static int run_blur_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
if (err)
goto mask_cleanup;
- err = fcFloatArray_syncToNative(gauss_kernel);
+ err = fcFloatArray_syncToHost(gauss_kernel);
if (err)
goto mask_cleanup;
blur_build_mask(gauss_kernel->c, BLUR_RADIUS);
- err = fcFloatArray_syncToOCL(gauss_kernel);
+ err = fcFloatArray_syncToDevice(gauss_kernel);
if (err)
goto mask_cleanup;
@@ -586,7 +586,7 @@ static int run_blur_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
if (err)
goto cleanup;
- err = fcRGBAImage_syncToOCL(buffer);
+ err = fcRGBAImage_syncToDevice(buffer);
if (err)
goto cleanup;
@@ -656,7 +656,7 @@ static int run_convolve3_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* outp
if (err)
goto cleanup;
- err = fcFloatArray_syncToNative(mask);
+ err = fcFloatArray_syncToHost(mask);
if (err)
goto cleanup;
@@ -670,7 +670,7 @@ static int run_convolve3_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* outp
mask->c[7] = CONVOLVE3_21;
mask->c[8] = CONVOLVE3_22;
- err = fcFloatArray_syncToOCL(mask);
+ err = fcFloatArray_syncToDevice(mask);
if (err)
goto cleanup;
@@ -708,7 +708,7 @@ static int run_convolve5_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* outp
if (err)
goto cleanup;
- err = fcFloatArray_syncToNative(mask);
+ err = fcFloatArray_syncToHost(mask);
if (err)
goto cleanup;
@@ -738,7 +738,7 @@ static int run_convolve5_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* outp
mask->c[23] = CONVOLVE5_43;
mask->c[24] = CONVOLVE5_44;
- err = fcFloatArray_syncToOCL(mask);
+ err = fcFloatArray_syncToDevice(mask);
if (err)
goto cleanup;
@@ -893,13 +893,13 @@ static int run_levels_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output)
if (err)
goto cleanup;
- err = fcFloat3Array_syncToNative(sat_matrix);
+ err = fcFloat3Array_syncToHost(sat_matrix);
if (err)
goto cleanup;
levels_build_sat_matrix(sat_matrix->c, LEVELS_SATURATION);
- err = fcFloat3Array_syncToOCL(sat_matrix);
+ err = fcFloat3Array_syncToDevice(sat_matrix);
if (err)
goto cleanup;
@@ -1050,7 +1050,7 @@ static void run_blur_cpu(fcRGBAImage* input, fcRGBAImage* output) {
if (err)
goto cleanup;
- err = fcRGBAImage_syncToNative(buffer);
+ err = fcRGBAImage_syncToHost(buffer);
if (err)
goto cleanup;
diff --git a/test/android/app/src/main/jni/src/test/array_test.c b/test/android/app/src/main/jni/src/test/array_test.c
index 36f4799..2874e66 100644
--- a/test/android/app/src/main/jni/src/test/array_test.c
+++ b/test/android/app/src/main/jni/src/test/array_test.c
@@ -32,7 +32,7 @@ static const double x[] = {1.0, 2.5, 4.0};
static int process(fcDoubleArray* array) {
cl_int err;
- err = fcDoubleArray_syncToOCL(array);
+ err = fcDoubleArray_syncToDevice(array);
if (err)
return err;
@@ -73,8 +73,8 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_ArrayTest_nativeRun(JNIEnv* env, jo
if (s0->len != n)
return JNI_FALSE;
- err = fcShortArray_syncToNative(s0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", JNI_FALSE);
+ err = fcShortArray_syncToHost(s0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToHost", JNI_FALSE);
for (int i = 0; i < n; ++i) {
s0->c[i] = (short) (i * 2);
@@ -86,10 +86,10 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_ArrayTest_nativeRun(JNIEnv* env, jo
return JNI_FALSE;
}
- err = fcShortArray_syncToOCL(s0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToOCL", JNI_FALSE);
- err = fcShortArray_syncToNative(s0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", JNI_FALSE);
+ err = fcShortArray_syncToDevice(s0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToDevice", JNI_FALSE);
+ err = fcShortArray_syncToHost(s0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToHost", JNI_FALSE);
short s0_[n];
for (int i = 0; i < n; ++i) {
@@ -98,8 +98,8 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_ArrayTest_nativeRun(JNIEnv* env, jo
err = fcShortArray_setArray(s0, n, s0_);
FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_setContents", JNI_FALSE);
- err = fcShortArray_syncToNative(s0); // Just in case... This doesn't add much overhead
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", JNI_FALSE);
+ err = fcShortArray_syncToHost(s0); // Just in case... This doesn't add much overhead
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToHost", JNI_FALSE);
for (int i = 0; i < n; ++i) {
if (s0->c[i] != s0_[i])
@@ -114,8 +114,8 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_ArrayTest_nativeRun(JNIEnv* env, jo
if (d0->len != d0_len)
return JNI_FALSE;
- err = fcDoubleArray_syncToNative(d0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", JNI_FALSE);
+ err = fcDoubleArray_syncToHost(d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToHost", JNI_FALSE);
for (int i = 0; i < d0->len; ++i) {
if (d0->c[i] != x[i])
@@ -126,8 +126,8 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_ArrayTest_nativeRun(JNIEnv* env, jo
memcpy(d0_, d0->c, d0->len * sizeof(cl_double));
err = process(d0);
FC_EXCEPTION_HANDLE_ERROR(env, err, "process", JNI_FALSE);
- err = fcDoubleArray_syncToNative(d0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", JNI_FALSE);
+ err = fcDoubleArray_syncToHost(d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToHost", JNI_FALSE);
for (int i = 0; i < d0->len; ++i) {
if (d0->c[i] != d0_[i] * 2)
@@ -141,10 +141,10 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_ArrayTest_nativeRun(JNIEnv* env, jo
if (d1->len != d0->len)
return JNI_FALSE;
- err = fcDoubleArray_syncToNative(d0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", JNI_FALSE);
- err = fcDoubleArray_syncToNative(d1);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", JNI_FALSE);
+ err = fcDoubleArray_syncToHost(d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToHost", JNI_FALSE);
+ err = fcDoubleArray_syncToHost(d1);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToHost", JNI_FALSE);
for (int i = 0; i < d0->len; ++i) {
if (d0->c[i] != d1->c[i])
@@ -175,8 +175,8 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_ArrayTest_nativeProcess(JNIEnv* env
FC_EXCEPTION_HANDLE_NULL(env, array, FC_EXCEPTION_BAD_PARAMETER, "fcDoubleArray_getJava",
FC_VOID_EXPR);
- err = fcDoubleArray_syncToOCL(array);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToOCL", FC_VOID_EXPR);
+ err = fcDoubleArray_syncToDevice(array);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToDevice", FC_VOID_EXPR);
// Kernel compilation
cl_program program = fcOpenCL_compileKernel(1, &kernel_src, &err);
@@ -193,7 +193,7 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_ArrayTest_nativeProcess(JNIEnv* env
clEnqueueNDRangeKernel(fcOpenCL_rt.queue, kernel, 1, NULL, &array->len, NULL, 0, NULL, NULL);
FC_EXCEPTION_HANDLE_ERROR(env, err, "clEnqueueNDRangeKernel", FC_VOID_EXPR);
- fcDoubleArray_syncToNative(array);
+ fcDoubleArray_syncToHost(array);
// Memory release
clReleaseKernel(kernel);
diff --git a/test/android/app/src/main/jni/src/test/vector_array_test.c b/test/android/app/src/main/jni/src/test/vector_array_test.c
index 4fbbeb8..dd7dad3 100644
--- a/test/android/app/src/main/jni/src/test/vector_array_test.c
+++ b/test/android/app/src/main/jni/src/test/vector_array_test.c
@@ -33,7 +33,7 @@ static const fcByte x[] = {10, 10, 10, 10, 20, 20, 20, 20, 30, 30, 30, 30, 40, 5
static int process(fcByte4Array* array) {
cl_int err;
- err = fcByte4Array_syncToOCL(array);
+ err = fcByte4Array_syncToDevice(array);
if (err)
return err;
@@ -79,18 +79,18 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_VectorArrayTest_nativeRun(JNIEnv* e
FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_set:f0", JNI_FALSE);
}
- err = fcFloat3Array_syncToNative(f0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToNative:f0", JNI_FALSE);
+ err = fcFloat3Array_syncToHost(f0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToHost:f0", JNI_FALSE);
for (int i = 0; i < n; ++i) {
if (fcInt3_any(fcFloat3_isNotEqual(f0->c[i], fcFloat3_create111(1.0f * i, 1.5f * i, 2.0f * i))))
return JNI_FALSE;
}
- err = fcFloat3Array_syncToOCL(f0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToOCL:f0", JNI_FALSE);
- err = fcFloat3Array_syncToNative(f0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToNative:f0", JNI_FALSE);
+ err = fcFloat3Array_syncToDevice(f0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToDevice:f0", JNI_FALSE);
+ err = fcFloat3Array_syncToHost(f0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToHost:f0", JNI_FALSE);
const int f0_stride = sizeof(fcFloat3) / sizeof(fcFloat);
float f0_[f0->len * f0_stride];
@@ -138,8 +138,8 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_VectorArrayTest_nativeRun(JNIEnv* e
if (b0->len != b0_len / 4)
return JNI_FALSE;
- err = fcByte4Array_syncToNative(b0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative:b0", JNI_FALSE);
+ err = fcByte4Array_syncToHost(b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToHost:b0", JNI_FALSE);
for (int i = 0; i < b0->len; ++i) {
fcByte4 elem = b0->c[i];
@@ -163,8 +163,8 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_VectorArrayTest_nativeRun(JNIEnv* e
err = process(b0);
FC_EXCEPTION_HANDLE_ERROR(env, err, "process", JNI_FALSE);
- err = fcByte4Array_syncToNative(b0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative:b0", JNI_FALSE);
+ err = fcByte4Array_syncToHost(b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToHost:b0", JNI_FALSE);
for (int i = 0; i < b0->len; ++i) {
fcByte4 elem = b0->c[i];
@@ -182,10 +182,10 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_VectorArrayTest_nativeRun(JNIEnv* e
if (b1->len != b0->len)
return JNI_FALSE;
- err = fcByte4Array_syncToNative(b0);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative:b0", JNI_FALSE);
- err = fcByte4Array_syncToNative(b1);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative:b1", JNI_FALSE);
+ err = fcByte4Array_syncToHost(b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToHost:b0", JNI_FALSE);
+ err = fcByte4Array_syncToHost(b1);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToHost:b1", JNI_FALSE);
for (int i = 0; i < b0->len; ++i) {
if (fcInt4_any(fcByte4_isNotEqual(b0->c[i], b1->c[i])))
@@ -218,8 +218,8 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_VectorArrayTest_nativeProcess(JNIEn
FC_EXCEPTION_HANDLE_NULL(env, array, FC_EXCEPTION_BAD_PARAMETER, "fcDoubleArray_getJava",
FC_VOID_EXPR);
- err = fcByte4Array_syncToOCL(array);
- FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToOCL", FC_VOID_EXPR);
+ err = fcByte4Array_syncToDevice(array);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToDevice", FC_VOID_EXPR);
// Kernel compilation
cl_program program = fcOpenCL_compileKernel(1, &kernel_src, &err);
@@ -236,7 +236,7 @@ Java_es_ull_pcg_hpc_fancier_androidtest_test_VectorArrayTest_nativeProcess(JNIEn
err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, kernel, 1, NULL, &sz, NULL, 0, NULL, NULL);
FC_EXCEPTION_HANDLE_ERROR(env, err, "clEnqueueNDRangeKernel", FC_VOID_EXPR);
- fcByte4Array_syncToNative(array);
+ fcByte4Array_syncToHost(array);
// Memory release
clReleaseKernel(kernel);
diff --git a/test/android/app/src/main/res/values/values.xml b/test/android/app/src/main/res/values/values.xml
index dd9a2f8..afb10fb 100644
--- a/test/android/app/src/main/res/values/values.xml
+++ b/test/android/app/src/main/res/values/values.xml
@@ -2,22 +2,22 @@
- @drawable/vga
- - @drawable/xga
- - @drawable/hd1
- - @drawable/hd2
- - @drawable/hdplus
- - @drawable/fullhd
- - @drawable/qhd
- - @drawable/uhd
+
+
+
+
+
+
+
- 01 VGA (640x480)
- - 02 XGA (1024x768)
- - 03 HD1 (1280x720)
- - 04 HD2 (1366x768)
- - 05 HD+ (1600x900)
- - 06 FHD (1920x1080)
- - 07 QHD (2560x1440)
- - 08 UHD (3840x2160)
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/android/gradlew.bat b/test/android/gradlew.bat
old mode 100644
new mode 100755
diff --git a/test/copy_libs.sh b/test/copy_libs.sh
index 16f4db2..c75feec 100644
--- a/test/copy_libs.sh
+++ b/test/copy_libs.sh
@@ -61,10 +61,12 @@ TEST_ANDROID_INCLUDE_DIR="$DIR/android/app/src/main/jni/include/thirdparty"
TEST_ANDROID_OPENCL_DIR="$DIR/android/app/src/main/assets"
# TODO Make JRE test application and update paths
-TEST_JRE_JAR_DIR="$DIR/"
-TEST_JRE_SO_DIR="$DIR/"
-TEST_JRE_INCLUDE_DIR="$DIR/"
-TEST_JRE_OPENCL_DIR="$DIR/"
+TEST_JRE_JAR_DIR="$DIR/linux/java/libs"
+TEST_JRE_SO_DIR="$DIR/linux/jni/libs"
+TEST_JRE_SO_PLUGIN_DIR="$DIR/linux/jni/libs/plugin"
+TEST_JRE_INCLUDE_DIR="$DIR/linux/jni/include/thirdparty"
+TEST_JRE_OPENCL_DIR="$DIR/linux/opencl"
+TEST_JRE_BUILD_DIR="$DIR/linux/jni/build"
# Copy libs to Android application
if [[ "$ACTION" == "all" || "$ACTION" == "android" ]]; then
@@ -90,18 +92,16 @@ fi
# Copy libs to JRE Java application
if [[ "$ACTION" == "all" || "$ACTION" == "jre" ]]; then
- echo "JRE lib copy not implemented"
- exit 1
-
echo "Copying libs to JRE Java application..."
- mkdir -vp "$TEST_JRE_JAR_DIR" "$TEST_JRE_SO_DIR" "$TEST_JRE_OPENCL_DIR" "$TEST_JRE_INCLUDE_DIR" |\
+ mkdir -vp "$TEST_JRE_JAR_DIR" "$TEST_JRE_SO_DIR" "$TEST_JRE_OPENCL_DIR" "$TEST_JRE_INCLUDE_DIR" "$TEST_JRE_SO_PLUGIN_DIR" "$TEST_JRE_BUILD_DIR" |\
sed "s/$SED_DIR[/]//g"
cp -vf "$JRE_JAR_DIR/"*.jar "$TEST_JRE_JAR_DIR/" | sed "s/$SED_DIR[/]//g"
cp -vfr "$LINUX_SO_CORE_DIR/"*.so "$TEST_JRE_SO_DIR/" | sed "s/$SED_DIR[/]//g"
- cp -vfr "$LINUX_SO_PLUGIN_DIR/"*.so "$TEST_JRE_SO_DIR/" | sed "s/$SED_DIR[/]//g"
+ cp -vfr "$LINUX_SO_PLUGIN_DIR/"*.so "$TEST_JRE_SO_PLUGIN_DIR/" | sed "s/$SED_DIR[/]//g"
cp -vf "$OPENCL_DIR/"*.cl "$TEST_JRE_OPENCL_DIR/" | sed "s/$SED_DIR[/]//g"
cp -vfr "$CORE_INCLUDE_DIR/"* "$TEST_JRE_INCLUDE_DIR/" | sed "s/$SED_DIR[/]//g"
+ rm "$TEST_JRE_SO_DIR/libOpenCL.so"
for plugin in $FANCIER_PLUGINS; do
cp -vfr "${PLUGIN_INCLUDE_DIR//$plugin}/"* "$TEST_JRE_INCLUDE_DIR/" | \
diff --git a/test/linux/.gitignore b/test/linux/.gitignore
new file mode 100644
index 0000000..dd43bb7
--- /dev/null
+++ b/test/linux/.gitignore
@@ -0,0 +1,220 @@
+
+# Created by https://www.toptal.com/developers/gitignore/api/java,c,c++,intellij
+# Edit at https://www.toptal.com/developers/gitignore?templates=java,c,c++,intellij
+
+### C ###
+# Prerequisites
+**/*.d
+**/jni/build
+
+# Object files
+**/*.o
+**/*.ko
+**/*.obj
+**/*.elf
+
+# Linker output
+**/*.ilk
+**/*.map
+**/*.exp
+
+# Precompiled Headers
+**/*.gch
+**/*.pch
+
+# Libraries
+**/*.lib
+**/*.a
+**/*.la
+**/*.lo
+
+# Shared objects (inc. Windows DLLs)
+**/*.dll
+**/*.so
+**/*.so.*
+**/*.dylib
+
+# Executables
+**/*.exe
+**/*.out
+**/*.app
+**/*.i*86
+**/*.x86_64
+**/*.hex
+
+# Debug files
+**/*.dSYM/
+**/*.su
+**/*.idb
+**/*.pdb
+
+# Kernel Module Compile Results
+**/*.mod*
+**/*.cmd
+**/.tmp_versions/
+**/modules.order
+**/Module.symvers
+**/Mkfile.old
+**/dkms.conf
+
+### C++ ###
+# Prerequisites
+
+# Compiled Object files
+**/*.slo
+
+# Precompiled Headers
+
+# Compiled Dynamic libraries
+
+# Fortran module files
+**/*.mod
+**/*.smod
+
+# Compiled Static libraries
+**/*.lai
+
+# Executables
+
+### Intellij ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+**/.idea/**/workspace.xml
+**/.idea/**/tasks.xml
+**/.idea/**/usage.statistics.xml
+**/.idea/**/dictionaries
+**/.idea/**/shelf
+
+# AWS User-specific
+**/.idea/**/aws.xml
+
+# Generated files
+**/.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+**/.idea/**/dataSources/
+**/.idea/**/dataSources.ids
+**/.idea/**/dataSources.local.xml
+**/.idea/**/sqlDataSources.xml
+**/.idea/**/dynamic.xml
+**/.idea/**/uiDesigner.xml
+**/.idea/**/dbnavigator.xml
+
+# Gradle
+**/.idea/**/gradle.xml
+**/.idea/**/libraries
+**/.gradle
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# **/.idea/artifacts
+# **/.idea/compiler.xml
+# **/.idea/jarRepositories.xml
+# **/.idea/modules.xml
+# **/.idea/*.iml
+# **/.idea/modules
+# **/*.iml
+# **/*.ipr
+
+# CMake
+**/cmake-build-*/
+
+# Mongo Explorer plugin
+**/.idea/**/mongoSettings.xml
+
+# File-based project format
+**/*.iws
+
+# IntelliJ
+**/out/
+
+# mpeltonen/sbt-idea plugin
+**/.idea_modules/
+
+# JIRA plugin
+**/atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+**/.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+**/com_crashlytics_export_strings.xml
+**/crashlytics.properties
+**/crashlytics-build.properties
+**/fabric.properties
+
+# Editor-based Rest Client
+**/.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+**/.idea/caches/build_file_checksums.ser
+
+### Intellij Patch ###
+# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
+
+# **/*.iml
+# **/modules.xml
+# **/.idea/misc.xml
+# **/*.ipr
+
+# Sonarlint plugin
+# https://plugins.jetbrains.com/plugin/7973-sonarlint
+**/.idea/**/sonarlint/
+
+# SonarQube Plugin
+# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
+**/.idea/**/sonarIssues.xml
+
+# Markdown Navigator plugin
+# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
+**/.idea/**/markdown-navigator.xml
+**/.idea/**/markdown-navigator-enh.xml
+**/.idea/**/markdown-navigator/
+
+# Cache file creation bug
+# See https://youtrack.jetbrains.com/issue/JBR-2257
+**/.idea/$CACHE_FILE$
+
+# CodeStream plugin
+# https://plugins.jetbrains.com/plugin/12206-codestream
+**/.idea/codestream.xml
+
+### Java ###
+# Compiled class file
+**/*.class
+
+# Log file
+**/*.log
+
+# BlueJ files
+**/*.ctxt
+
+# Mobile Tools for Java (J2ME)
+**/.mtj.tmp/
+
+# Package Files #
+**/*.jar
+!**/java/libs/*.jar
+**/fancier*.jar
+**/*.war
+**/*.nar
+**/*.ear
+**/*.zip
+**/*.tar.gz
+**/*.rar
+
+# Build
+**/java/build
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+**/hs_err_pid*
+
+# Results generated files
+**/java/src/main/resources/BenchmarkResults
+
+
+# End of https://www.toptal.com/developers/gitignore/api/java,c,c++,intellij
diff --git a/test/linux/images/fullhd.jpg b/test/linux/images/fullhd.jpg
new file mode 100644
index 0000000..104f080
Binary files /dev/null and b/test/linux/images/fullhd.jpg differ
diff --git a/test/linux/images/hd1.jpg b/test/linux/images/hd1.jpg
new file mode 100644
index 0000000..0152a92
Binary files /dev/null and b/test/linux/images/hd1.jpg differ
diff --git a/test/linux/images/hd2.jpg b/test/linux/images/hd2.jpg
new file mode 100644
index 0000000..138d8ac
Binary files /dev/null and b/test/linux/images/hd2.jpg differ
diff --git a/test/linux/images/hdplus.jpg b/test/linux/images/hdplus.jpg
new file mode 100644
index 0000000..f05c5a0
Binary files /dev/null and b/test/linux/images/hdplus.jpg differ
diff --git a/test/linux/images/qhd.jpg b/test/linux/images/qhd.jpg
new file mode 100644
index 0000000..c6e6fab
Binary files /dev/null and b/test/linux/images/qhd.jpg differ
diff --git a/test/linux/images/test.png b/test/linux/images/test.png
new file mode 100644
index 0000000..10a393a
Binary files /dev/null and b/test/linux/images/test.png differ
diff --git a/test/linux/images/uhd.jpg b/test/linux/images/uhd.jpg
new file mode 100644
index 0000000..3315e06
Binary files /dev/null and b/test/linux/images/uhd.jpg differ
diff --git a/test/linux/images/vga.jpg b/test/linux/images/vga.jpg
new file mode 100644
index 0000000..8c5ef0d
Binary files /dev/null and b/test/linux/images/vga.jpg differ
diff --git a/test/linux/images/xga.jpg b/test/linux/images/xga.jpg
new file mode 100644
index 0000000..985d9b0
Binary files /dev/null and b/test/linux/images/xga.jpg differ
diff --git a/test/linux/java/.idea/.gitignore b/test/linux/java/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/test/linux/java/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/test/linux/java/.idea/compiler.xml b/test/linux/java/.idea/compiler.xml
new file mode 100644
index 0000000..61a9130
--- /dev/null
+++ b/test/linux/java/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/linux/java/.idea/jarRepositories.xml b/test/linux/java/.idea/jarRepositories.xml
new file mode 100644
index 0000000..091d0fe
--- /dev/null
+++ b/test/linux/java/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/linux/java/.idea/misc.xml b/test/linux/java/.idea/misc.xml
new file mode 100644
index 0000000..38167d7
--- /dev/null
+++ b/test/linux/java/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/linux/java/.idea/vcs.xml b/test/linux/java/.idea/vcs.xml
new file mode 100644
index 0000000..c2365ab
--- /dev/null
+++ b/test/linux/java/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/linux/java/build.gradle b/test/linux/java/build.gradle
new file mode 100644
index 0000000..2ede539
--- /dev/null
+++ b/test/linux/java/build.gradle
@@ -0,0 +1,21 @@
+apply plugin: 'java'
+apply plugin: 'application'
+
+mainClassName = 'es.ull.pcg.hpc.fancier.linuxtest.Main'
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation 'junit:junit:4.13.2'
+ implementation(files('libs/rancid-1.1.jar'))
+ implementation(files('libs/rancid-1.1-sources.jar'))
+ implementation(files('libs/fancier-jre-1.0.jar'))
+ implementation(files('libs/commons-cli-1.5.0.jar'))
+// implementation 'commons-cli:commons-cli:1.5.0'
+}
+
+sourceCompatibility = 1.8
+targetCompatibility = 1.8
+
diff --git a/test/linux/java/gradle/wrapper/gradle-wrapper.properties b/test/linux/java/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..69a9715
--- /dev/null
+++ b/test/linux/java/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/test/linux/java/gradlew b/test/linux/java/gradlew
new file mode 100644
index 0000000..744e882
--- /dev/null
+++ b/test/linux/java/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MSYS* | MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/test/linux/java/gradlew.bat b/test/linux/java/gradlew.bat
new file mode 100755
index 0000000..ac1b06f
--- /dev/null
+++ b/test/linux/java/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/test/linux/java/libs/commons-cli-1.5.0.jar b/test/linux/java/libs/commons-cli-1.5.0.jar
new file mode 100644
index 0000000..e036456
Binary files /dev/null and b/test/linux/java/libs/commons-cli-1.5.0.jar differ
diff --git a/test/linux/java/libs/rancid-1.1-sources.jar b/test/linux/java/libs/rancid-1.1-sources.jar
new file mode 100644
index 0000000..998e7e1
Binary files /dev/null and b/test/linux/java/libs/rancid-1.1-sources.jar differ
diff --git a/test/linux/java/libs/rancid-1.1.jar b/test/linux/java/libs/rancid-1.1.jar
new file mode 100644
index 0000000..d204656
Binary files /dev/null and b/test/linux/java/libs/rancid-1.1.jar differ
diff --git a/test/linux/java/run.sh b/test/linux/java/run.sh
new file mode 100755
index 0000000..f16feb6
--- /dev/null
+++ b/test/linux/java/run.sh
@@ -0,0 +1,18 @@
+LD_LIBRARY_PATH=../jni/libs:../jni/build \
+java -Djava.library.path=\
+/usr/java/packages/lib/amd64:\
+/usr/lib/x86_64-linux-gnu/jni:\
+/lib/x86_64-linux-gnu:\
+/usr/lib/x86_64-linux-gnu:\
+/usr/lib/jni:\
+/usr/local/lib:\
+/usr/java/packages/lib/arm:\
+/usr/lib/arm-linux-gnueabihf/jni:\
+/lib/arm-linux-gnueabihf:\
+/usr/lib/arm-linux-gnueabihf:\
+/lib:\
+/usr/lib:\
+../jni/libs:\
+../jni/build \
+-cp libs/*:build/classes/java/main es.ull.pcg.hpc.fancier.linuxtest.Main $@
+
diff --git a/test/linux/java/settings.gradle b/test/linux/java/settings.gradle
new file mode 100644
index 0000000..42bb475
--- /dev/null
+++ b/test/linux/java/settings.gradle
@@ -0,0 +1,2 @@
+rootProject.name = 'java'
+
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/Main.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/Main.java
new file mode 100644
index 0000000..3a088f5
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/Main.java
@@ -0,0 +1,233 @@
+package es.ull.pcg.hpc.fancier.linuxtest;
+
+import es.ull.pcg.hpc.fancier.Fancier;
+import es.ull.pcg.hpc.fancier.linuxtest.benchmark.BenchmarkTask;
+import es.ull.pcg.hpc.fancier.linuxtest.benchmark.DeviceDescriptor;
+import es.ull.pcg.hpc.fancier.linuxtest.benchmark.Devices;
+import es.ull.pcg.hpc.fancier.linuxtest.benchmark.ShellUtils;
+import es.ull.pcg.hpc.fancier.linuxtest.model.FancierTestRunner;
+import org.apache.commons.cli.*;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Scanner;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+public class Main {
+
+ static {
+ System.loadLibrary("test-lib");
+ }
+
+ // Constants
+ public static final String RESOURCES_DIR = "src/main/resources/";
+ public static final String OPC_KERNELS_DIR = "../opencl/";
+
+
+ private enum ExecutionMode {
+ INTERACTIVE, TEST, BENCHMARK, QUICK_TEST
+ }
+
+ // Run each benchmark multiple times, so that each app execution is shorter and crashes are less
+ // likely
+ private ExecutionMode mMode = ExecutionMode.BENCHMARK;
+ private static int executionIndex;
+ private static final int BENCHMARK_REPETITIONS = 10;
+ private static final boolean EXECUTE_FILTERED = true;
+ private static final boolean BENCHMARK_ONLY_RELIABLE = true;
+
+ private static final long RESTART_TIME_MS = 30 * 1000;
+ private final ExecutorService mTaskExecutor = Executors.newSingleThreadExecutor();
+ private int mCurrentTestID = 0;
+
+ public static void main(String[] args) {
+ Main obj = new Main();
+
+ Options options = new Options();
+ Option mode = new Option("m", "mode", true, "set launch mode (default mode is benchmark)");
+ mode.setRequired(false);
+ options.addOption(mode);
+
+ Option index = new Option("i", "index", true, "benchmark execution index");
+ index.setRequired(false);
+ options.addOption(index);
+
+ CommandLineParser parser = new DefaultParser();
+ CommandLine cmd = null;
+ try {
+ cmd = parser.parse(options, args);
+ }
+ catch (ParseException e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
+
+ if (cmd != null && cmd.getOptionValue("mode") != null)
+ obj.mMode = "benchmark".equals(cmd.getOptionValue("mode")) ? ExecutionMode.BENCHMARK : ExecutionMode.TEST;
+
+ if (cmd != null)
+ executionIndex = cmd.getOptionValue("index") == null ? 0 : Integer.parseInt(cmd.getOptionValue("index"));
+
+ switch (obj.mMode) {
+ case TEST:
+ obj.doTests();
+ break;
+ case BENCHMARK:
+ obj.doBenchmarks();
+ break;
+ default: break;
+ }
+ }
+
+ public Executor getTaskExecutor() {
+ return mTaskExecutor;
+ }
+
+ public int getNextTestID() {
+ return ++mCurrentTestID;
+ }
+
+ private void doTests() {
+ BufferedImage inImage;
+ BufferedImage outImage;
+
+ try {
+ String IMAGE_NAME = "vga.jpg";
+// String IMAGE_NAME = "test.png";
+
+ inImage = ImageIO.read(new File(RESOURCES_DIR + IMAGE_NAME));
+ outImage = new BufferedImage(inImage.getWidth(), inImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
+
+ BufferedImage bufImg = ImageIO.read(new File(RESOURCES_DIR + IMAGE_NAME));
+ BufferedImage convertedImg = new BufferedImage(bufImg.getWidth(), bufImg.getHeight(), BufferedImage.TYPE_INT_ARGB);
+ convertedImg.getGraphics().drawImage(bufImg, 0, 0, null);
+
+ Graphics bg = convertedImg.getGraphics();
+ bg.drawImage(inImage, 0, 0, null);
+ bg.dispose();
+
+ inImage = convertedImg;
+
+ FancierTestRunner controller = new FancierTestRunner(this);
+ String[] testNames = getFileContents("TestsNames");
+
+ FancierTestRunner.Tests[] enabledTests;
+
+ if (EXECUTE_FILTERED) {
+ enabledTests = new FancierTestRunner.Tests[]{ FancierTestRunner.Tests.TEST_INIT,
+ FancierTestRunner.Tests.TEST_NATIVE_POSTERIZE,
+ FancierTestRunner.Tests.TEST_RELEASE};
+ }
+ else
+ enabledTests = FancierTestRunner.Tests.values();
+
+ for (FancierTestRunner.Tests selectedTest: enabledTests)
+ controller.runTest(selectedTest, testNames[selectedTest.ordinal()], inImage, outImage);
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void doBenchmarks() {
+ try {
+ final String deviceHostname = InetAddress.getLocalHost().getHostName();
+
+ DeviceDescriptor device = Devices.fromHostname(deviceHostname);
+ BenchmarkTask benchmark = new BenchmarkTask(this, device);
+
+ // Get ID from previous execution, or 0
+ final int benchmarkID = executionIndex;
+
+ // Run the benchmarks corresponding to this execution of the application
+ BenchmarkTask.Benchmarks[] kernels;
+
+ if (EXECUTE_FILTERED) {
+ kernels = new BenchmarkTask.Benchmarks[]{
+ //BenchmarkTask.Benchmarks.BENCHMARK_OCL_POSTERIZE,
+ BenchmarkTask.Benchmarks.BENCHMARK_NATIVE_POSTERIZE, // este falta
+// BenchmarkTask.Benchmarks.BENCHMARK_NATIVE_REF_POSTERIZE,
+// BenchmarkTask.Benchmarks.BENCHMARK_JAVA_REF_POSTERIZE,
+// BenchmarkTask.Benchmarks.BENCHMARK_JAVA_PERF_POSTERIZE,
+// BenchmarkTask.Benchmarks.BENCHMARK_JAVA_BFF_POSTERIZE,
+ };
+ }
+ else {
+ kernels = BenchmarkTask.Benchmarks.values();
+ }
+
+ final int totalBenchmarks = kernels.length * BENCHMARK_REPETITIONS;
+
+ if (benchmarkID < totalBenchmarks) {
+ benchmark.setupManager();
+
+ // Show progress
+ benchmark.setProgressBar();
+
+ BenchmarkTask.Benchmarks kernel = kernels[benchmarkID % kernels.length];
+ System.out.println("EXECUTING BENCHMARK " + (benchmarkID + 1) + "/" + totalBenchmarks + "...");
+ System.out.println("KERNEL " + kernel);
+
+ if (!BENCHMARK_ONLY_RELIABLE)
+ benchmark.addConfiguration(kernel, false);
+
+ benchmark.addConfiguration(kernel, true);
+
+ mTaskExecutor.execute(benchmark);
+
+ mTaskExecutor.execute(() -> {
+ // Restart application after finishing benchmarks
+ System.out.println("RESTARTING...");
+ try {
+ System.out.println("Acabada ejecucion");
+
+ // Wait 2 minutes because at minimun unit is minutes
+ String cmd = "echo '" + System.getProperty("user.dir") + "/run.sh --index " + (executionIndex + 1) + " --mode benchmark >> /home/paula/Documentos/log-test.txt' | at now +2 minutes";
+ ShellUtils.rootExec(Collections.singletonList(cmd));
+ System.exit(0);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ });
+ }
+ else {
+ // Signal end of execution
+ // If the device has screen, show a message in the console
+ // Otherwise, shut it down
+ try {
+ if (device == Devices.XU3)
+ ShellUtils.rootExec(Collections.singletonList("reboot -p"));
+ else
+ System.out.println("ALL BENCHMARKS FINISHED.");
+ } catch (IOException ignored) {}
+ }
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public String[] getFileContents(String filename) {
+ try {
+ Scanner scanner = new Scanner(new File(RESOURCES_DIR + filename));
+ List lines = new ArrayList<>();
+ while (scanner.hasNextLine())
+ lines.add(scanner.nextLine());
+
+ return lines.toArray(new String[0]);
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ return new String[0];
+ }
+ }
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/BenchmarkTask.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/BenchmarkTask.java
new file mode 100644
index 0000000..1e2b4d2
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/BenchmarkTask.java
@@ -0,0 +1,413 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+import es.ull.pcg.hpc.fancier.Fancier;
+import es.ull.pcg.hpc.fancier.linuxtest.Main;
+import es.ull.pcg.hpc.fancier.linuxtest.model.*;
+import es.ull.pcg.hpc.fancier.linuxtest.test.FilterTest;
+import es.ull.pcg.hpc.rancid.Meter;
+import es.ull.pcg.hpc.rancid.Parameters;
+import es.ull.pcg.hpc.rancid.StopCondition;
+import es.ull.pcg.hpc.rancid.analyzers.*;
+import es.ull.pcg.hpc.rancid.benchmark.*;
+import es.ull.pcg.hpc.rancid.filters.WindowIterationsFilter;
+import es.ull.pcg.hpc.rancid.loggers.XmlResultsLogger;
+import es.ull.pcg.hpc.rancid.meters.ExecutionTimeMeter;
+import es.ull.pcg.hpc.rancid.meters.FileContentsMeter;
+import es.ull.pcg.hpc.rancid.meters.SuccessfulRunsMeter;
+import es.ull.pcg.hpc.rancid.printers.PrintStreamOutputPrinter;
+import es.ull.pcg.hpc.rancid.removers.InvalidRunsRemover;
+import es.ull.pcg.hpc.rancid.removers.ResultsRemover;
+import es.ull.pcg.hpc.rancid.results.ResultTypes;
+import es.ull.pcg.hpc.rancid.stopconditions.AndStopCondition;
+import es.ull.pcg.hpc.rancid.stopconditions.ElapsedTimeStopCondition;
+import es.ull.pcg.hpc.rancid.stopconditions.FixedIterationsStopCondition;
+import es.ull.pcg.hpc.rancid.stopconditions.OrStopCondition;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.List;
+
+
+public class BenchmarkTask implements Runnable {
+ // Stop condition: At least WINDOW_SIZE iterations, until MAX_TIME_MS of time have elapsed or
+ // after ITERATIONS iterations, whichever happens first
+ private static final int WINDOW_SIZE = 4;
+ private static final int ITERATIONS = WINDOW_SIZE + 6;
+ private static final
+ long MAX_TIME_MS = 5 * 60 * 1000;
+ private static final StopCondition STOP_CONDITION =
+ new AndStopCondition(new FixedIterationsStopCondition(WINDOW_SIZE),
+ new OrStopCondition(new FixedIterationsStopCondition(ITERATIONS),
+ new ElapsedTimeStopCondition(MAX_TIME_MS)));
+
+ private static final int HISTOGRAM_BINS = 10;
+ private static final Parameters JIT_PARAMS = new Parameters("JIT");
+
+ static {
+ // Assumes the first image is the smallest one (vga.jpg)
+ JIT_PARAMS.addParameter("input", 0);
+ }
+
+ private static class RestrictedConfigs {
+ List configs;
+ int maxParams;
+
+ RestrictedConfigs(List configs, int maxParams) {
+ this.configs = configs;
+ this.maxParams = maxParams;
+ }
+ }
+
+ private final Main mMain;
+ private final DeviceDescriptor mDevice;
+ private final BenchmarkManager mManager;
+ private final Map mConfigs;
+ private final int mNumParameters;
+
+ public BenchmarkTask(Main main, DeviceDescriptor device) {
+ mMain = main;
+ mDevice = device;
+
+ mManager = new BenchmarkManager();
+ mConfigs = new TreeMap<>();
+
+ mNumParameters = main.getFileContents("ImageTitles").length;
+ }
+
+ public void setProgressBar() {
+ mManager.addProgressListener(new JreProgressListener());
+ }
+
+ public void setupManager() {
+ // Meters
+ mManager.addMeter(new SuccessfulRunsMeter());
+
+ for (int i = 0; i < mDevice.cores(); ++i) {
+ mManager.addMeter(new FileContentsMeter(mDevice.cpuCurFreqPath(i), "CPUFREQ" + i));
+ }
+
+ if (mDevice.hasGpu())
+ mManager.addMeter(new FileContentsMeter(mDevice.gpuCurFreqPath(), "GPUFREQ"));
+
+ for (int i = 0; i < mDevice.thermalSensors(); ++i) {
+ mManager.addMeter(new FileContentsMeter(mDevice.thermalSensorPath(i), "THERM" + i));
+ }
+
+ if (mDevice.ddrFreqBasePath() != null)
+ mManager.addMeter(new RootFileContentsMeter(mDevice.ddrCurFreqPath(), "DDRFREQ"));
+
+ mManager.addMeter(new ExecutionTimeMeter());
+
+ // Processors
+ // - Add total number and proportion of successful runs analysis
+ mManager.addRunProcessor(new SumAnalyzer(SuccessfulRunsMeter.TITLE));
+ mManager.addRunProcessor(new ArithmeticAverageAnalyzer(SuccessfulRunsMeter.TITLE));
+
+ // - Remove invalid runs data, and the successful runs metric raw data
+ mManager.addRunProcessor(new InvalidRunsRemover());
+ mManager.addRunProcessor(new ResultsRemover(ResultTypes.Metric, SuccessfulRunsMeter.TITLE));
+
+ // - Calculate histogram, min, max, average and stddev of all successful runs
+ mManager.addRunProcessor(new HistogramAnalyzer(ExecutionTimeMeter.TITLE, HISTOGRAM_BINS));
+ mManager.addRunProcessor(new MinAnalyzer(ExecutionTimeMeter.TITLE));
+ mManager.addRunProcessor(new MaxAnalyzer(ExecutionTimeMeter.TITLE));
+ mManager.addRunProcessor(new ArithmeticAverageAnalyzer(ExecutionTimeMeter.TITLE));
+ mManager.addRunProcessor(new StdDeviationAnalyzer(ExecutionTimeMeter.TITLE));
+
+ // - Filter run data within the window used for the stop condition
+ mManager.addRunProcessor(new WindowIterationsFilter(WINDOW_SIZE));
+
+ // - Calculate histogram, min and max of some metrics of runs inside the window
+ List interestWindowMetrics = new ArrayList<>();
+ interestWindowMetrics.add(ExecutionTimeMeter.TITLE);
+ interestWindowMetrics.add("THERM" + mDevice.referenceThermalSensor());
+
+ int little = mDevice.firstLittleCore();
+ int big = mDevice.firstBigCore();
+
+ if (little >= 0)
+ interestWindowMetrics.add("CPUFREQ" + little);
+
+ if (big >= 0)
+ interestWindowMetrics.add("CPUFREQ" + big);
+
+ if (mDevice.hasGpu())
+ interestWindowMetrics.add("GPUFREQ");
+
+ for (String metricTitle: interestWindowMetrics) {
+ mManager.addRunProcessor(
+ new HistogramAnalyzer(WindowIterationsFilter.processedMetricTitle(metricTitle),
+ HISTOGRAM_BINS));
+ mManager.addRunProcessor(
+ new MinAnalyzer(WindowIterationsFilter.processedMetricTitle(metricTitle)));
+ mManager.addRunProcessor(
+ new MaxAnalyzer(WindowIterationsFilter.processedMetricTitle(metricTitle)));
+ }
+
+ // Remove raw data from the window after doing calculations on it, as it is a subset of the
+ // whole set of measurements, and we don't want any duplicates
+ for (Meter meter: mManager.getMeters()) {
+ mManager.addRunProcessor(new ResultsRemover(ResultTypes.Metric, WindowIterationsFilter
+ .processedMetricTitle(meter.getTitle())));
+ }
+ }
+
+ public void addConfiguration(Benchmarks selectedBenchmark, boolean reliable) {
+ // Build the image filter and get implementation information
+ ImageFilter imageFilter = ImageFilterBuilder.create(selectedBenchmark.filterInfo);
+ if (imageFilter == null) {
+ System.out.println("Image filter for " + selectedBenchmark + " could not be created!");
+ return;
+ }
+
+ FilterInfo filterInfo = selectedBenchmark.filterInfo;
+
+ // Set up the benchmark runner for this configuration
+ BenchmarkRunner runner;
+
+ if (reliable) {
+ // FIXME Maybe use ONE_BIG. Use LITTLE for GPU?
+ boolean usesGpu = filterInfo.nativeVersion == NativeImageFilter.Version.GPU;
+ ReliableLinuxRunner.CoreSelection cores = ReliableLinuxRunner.CoreSelection.BIG;
+ runner = new ReliableLinuxRunner(STOP_CONDITION, mDevice, cores, JIT_PARAMS, usesGpu,
+ filterInfo.isNative());
+ }
+ else {
+ runner = new BenchmarkRunner(STOP_CONDITION);
+ }
+
+ // Create the implementation
+ String title = (filterInfo.isNative() ? "NATIVE " + filterInfo.nativeVersion :
+ "JAVA " + filterInfo.javaVersion) + (reliable ? " RELIABLE" : " NAIVE");
+ BenchmarkImplementation implementation = new FilterBenchmarkImplementation(title, imageFilter);
+
+
+ // Add configuration
+ RestrictedConfigs configs = mConfigs.get(filterInfo.kernel);
+
+ if (configs == null) {
+ List configList = new ArrayList<>();
+ configs = new RestrictedConfigs(configList, mNumParameters);
+
+ mConfigs.put(filterInfo.kernel, configs);
+ }
+
+ configs.configs.add(new BenchmarkConfiguration(runner, implementation));
+ configs.maxParams = Math.min(configs.maxParams, allowedParameters(selectedBenchmark));
+ }
+
+ @Override
+ public void run() {
+ // File loggers are added here because the results of each run belong in a separate file
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss", Locale.US);
+ File outputFile = new File(mMain.RESOURCES_DIR + "BenchmarkResults", "FancierTest_" + mDevice.name() + "_" +
+ dateFormat.format(new Date()) + ".xml");
+
+ try (PrintStream outputStream = new PrintStream(outputFile)) {
+ PrintStreamOutputPrinter printer = new PrintStreamOutputPrinter(outputStream);
+ mManager.addGlobalLogger(new XmlResultsLogger(printer));
+
+ // Create and add benchmarks
+ for (Map.Entry kv: mConfigs.entrySet()) {
+ ImageFilters kernel = kv.getKey();
+ RestrictedConfigs configs = kv.getValue();
+
+ if (configs.maxParams > 0) {
+ Benchmark benchmark = new Benchmark(kernel.toString());
+ addBenchmarkParameters(benchmark, configs.maxParams);
+
+ for (BenchmarkConfiguration config: configs.configs)
+ benchmark.addConfiguration(config);
+
+ mManager.addBenchmark(benchmark);
+ }
+ }
+
+ // Run benchmarks
+ System.out.println("Starting benchmarks. Output: " + outputFile.getAbsolutePath());
+ Fancier.init();
+ NativeImageFilter.compileKernels(Main.OPC_KERNELS_DIR);
+
+ mManager.runBenchmarks();
+
+ NativeImageFilter.releaseKernels();
+ Fancier.release();
+ System.out.println("Benchmarks finished. Output: " + outputFile.getAbsolutePath());
+
+ // Remove the created benchmarks and global loggers, so multiple calls don't add duplicates
+ mManager.getBenchmarks().clear();
+ mManager.getGlobalLoggers().clear();
+ } catch (FileNotFoundException e) {
+ System.out.println("Cannot create output file \"" + outputFile.getAbsolutePath() + "\"");
+ }
+ }
+
+ private int allowedParameters(Benchmarks selectedBenchmark) {
+ // Reference Java versions are way too slow; only test smallest image size
+ if (selectedBenchmark.filterInfo.javaVersion == JavaImageFilter.Version.REFERENCE)
+ return 1;
+
+ // Bilateral and Median filters run slowly on CPU and cause problems on GPU
+ switch (selectedBenchmark.filterInfo.kernel) {
+ case FISHEYE:
+ return mDevice == Devices.XU3? 4 : mNumParameters;
+ case BILATERAL:
+ return 4;
+ }
+
+ return mNumParameters;
+ }
+
+ private void addBenchmarkParameters(Benchmark benchmark, int maxParameters) {
+ String[] imageIDs = mMain.getFileContents("ImageIds");
+ String[] imageTitles = mMain.getFileContents("ImageTitles");
+
+ final int maskedParameters = Math.min(imageTitles.length, maxParameters);
+
+ for (int i = 0; i < maskedParameters; ++i) {
+ if (!new File(Main.RESOURCES_DIR + imageIDs[i]).isFile()) {
+ System.out.println("Resource for " + imageTitles[i] + " not found!");
+ }
+ else {
+ Parameters params = new Parameters(imageTitles[i]);
+ params.addParameter("input", i);
+ benchmark.addParameterSet(params);
+ }
+ }
+ }
+
+ public enum Benchmarks {
+ BENCHMARK_OCL_GRAYSCALE(NativeImageFilter.Version.GPU, ImageFilters.GRAYSCALE),
+ BENCHMARK_OCL_BLUR(NativeImageFilter.Version.GPU, ImageFilters.BLUR),
+ BENCHMARK_OCL_CONVOLVE3(NativeImageFilter.Version.GPU, ImageFilters.CONVOLVE3),
+ BENCHMARK_OCL_CONVOLVE5(NativeImageFilter.Version.GPU, ImageFilters.CONVOLVE5),
+ BENCHMARK_OCL_BILATERAL(NativeImageFilter.Version.GPU, ImageFilters.BILATERAL),
+ BENCHMARK_OCL_MEDIAN(NativeImageFilter.Version.GPU, ImageFilters.MEDIAN),
+ BENCHMARK_OCL_CONTRAST(NativeImageFilter.Version.GPU, ImageFilters.CONTRAST),
+ BENCHMARK_OCL_FISHEYE(NativeImageFilter.Version.GPU, ImageFilters.FISHEYE),
+ BENCHMARK_OCL_LEVELS(NativeImageFilter.Version.GPU, ImageFilters.LEVELS),
+ BENCHMARK_OCL_POSTERIZE(NativeImageFilter.Version.GPU, ImageFilters.POSTERIZE),
+ BENCHMARK_NATIVE_GRAYSCALE(NativeImageFilter.Version.CPU, ImageFilters.GRAYSCALE),
+ BENCHMARK_NATIVE_BLUR(NativeImageFilter.Version.CPU, ImageFilters.BLUR),
+ BENCHMARK_NATIVE_CONVOLVE3(NativeImageFilter.Version.CPU, ImageFilters.CONVOLVE3),
+ BENCHMARK_NATIVE_CONVOLVE5(NativeImageFilter.Version.CPU, ImageFilters.CONVOLVE5),
+ BENCHMARK_NATIVE_BILATERAL(NativeImageFilter.Version.CPU, ImageFilters.BILATERAL),
+ BENCHMARK_NATIVE_MEDIAN(NativeImageFilter.Version.CPU, ImageFilters.MEDIAN),
+ BENCHMARK_NATIVE_CONTRAST(NativeImageFilter.Version.CPU, ImageFilters.CONTRAST),
+ BENCHMARK_NATIVE_FISHEYE(NativeImageFilter.Version.CPU, ImageFilters.FISHEYE),
+ BENCHMARK_NATIVE_LEVELS(NativeImageFilter.Version.CPU, ImageFilters.LEVELS),
+ BENCHMARK_NATIVE_POSTERIZE(NativeImageFilter.Version.CPU, ImageFilters.POSTERIZE),
+ BENCHMARK_NATIVE_REF_GRAYSCALE(NativeImageFilter.Version.REF, ImageFilters.GRAYSCALE),
+ BENCHMARK_NATIVE_REF_BLUR(NativeImageFilter.Version.REF, ImageFilters.BLUR),
+ BENCHMARK_NATIVE_REF_CONVOLVE3(NativeImageFilter.Version.REF, ImageFilters.CONVOLVE3),
+ BENCHMARK_NATIVE_REF_CONVOLVE5(NativeImageFilter.Version.REF, ImageFilters.CONVOLVE5),
+ BENCHMARK_NATIVE_REF_BILATERAL(NativeImageFilter.Version.REF, ImageFilters.BILATERAL),
+ BENCHMARK_NATIVE_REF_MEDIAN(NativeImageFilter.Version.REF, ImageFilters.MEDIAN),
+ BENCHMARK_NATIVE_REF_CONTRAST(NativeImageFilter.Version.REF, ImageFilters.CONTRAST),
+ BENCHMARK_NATIVE_REF_FISHEYE(NativeImageFilter.Version.REF, ImageFilters.FISHEYE),
+ BENCHMARK_NATIVE_REF_LEVELS(NativeImageFilter.Version.REF, ImageFilters.LEVELS),
+ BENCHMARK_NATIVE_REF_POSTERIZE(NativeImageFilter.Version.REF, ImageFilters.POSTERIZE),
+ BENCHMARK_JAVA_REF_GRAYSCALE(JavaImageFilter.Version.REFERENCE, ImageFilters.GRAYSCALE),
+ BENCHMARK_JAVA_REF_BLUR(JavaImageFilter.Version.REFERENCE, ImageFilters.BLUR),
+ BENCHMARK_JAVA_REF_CONVOLVE3(JavaImageFilter.Version.REFERENCE, ImageFilters.CONVOLVE3),
+ BENCHMARK_JAVA_REF_CONVOLVE5(JavaImageFilter.Version.REFERENCE, ImageFilters.CONVOLVE5),
+ BENCHMARK_JAVA_REF_BILATERAL(JavaImageFilter.Version.REFERENCE, ImageFilters.BILATERAL),
+ BENCHMARK_JAVA_REF_MEDIAN(JavaImageFilter.Version.REFERENCE, ImageFilters.MEDIAN),
+ BENCHMARK_JAVA_REF_CONTRAST(JavaImageFilter.Version.REFERENCE, ImageFilters.CONTRAST),
+ BENCHMARK_JAVA_REF_FISHEYE(JavaImageFilter.Version.REFERENCE, ImageFilters.FISHEYE),
+ BENCHMARK_JAVA_REF_LEVELS(JavaImageFilter.Version.REFERENCE, ImageFilters.LEVELS),
+ BENCHMARK_JAVA_REF_POSTERIZE(JavaImageFilter.Version.REFERENCE, ImageFilters.POSTERIZE),
+ BENCHMARK_JAVA_PERF_GRAYSCALE(JavaImageFilter.Version.PERFORMANCE, ImageFilters.GRAYSCALE),
+ BENCHMARK_JAVA_PERF_BLUR(JavaImageFilter.Version.PERFORMANCE, ImageFilters.BLUR),
+ BENCHMARK_JAVA_PERF_CONVOLVE3(JavaImageFilter.Version.PERFORMANCE, ImageFilters.CONVOLVE3),
+ BENCHMARK_JAVA_PERF_CONVOLVE5(JavaImageFilter.Version.PERFORMANCE, ImageFilters.CONVOLVE5),
+ BENCHMARK_JAVA_PERF_BILATERAL(JavaImageFilter.Version.PERFORMANCE, ImageFilters.BILATERAL),
+ BENCHMARK_JAVA_PERF_MEDIAN(JavaImageFilter.Version.PERFORMANCE, ImageFilters.MEDIAN),
+ BENCHMARK_JAVA_PERF_CONTRAST(JavaImageFilter.Version.PERFORMANCE, ImageFilters.CONTRAST),
+ BENCHMARK_JAVA_PERF_FISHEYE(JavaImageFilter.Version.PERFORMANCE, ImageFilters.FISHEYE),
+ BENCHMARK_JAVA_PERF_LEVELS(JavaImageFilter.Version.PERFORMANCE, ImageFilters.LEVELS),
+ BENCHMARK_JAVA_PERF_POSTERIZE(JavaImageFilter.Version.PERFORMANCE, ImageFilters.POSTERIZE),
+ BENCHMARK_JAVA_BFF_GRAYSCALE(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.GRAYSCALE),
+ BENCHMARK_JAVA_BFF_BLUR(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.BLUR),
+ BENCHMARK_JAVA_BFF_CONVOLVE3(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.CONVOLVE3),
+ BENCHMARK_JAVA_BFF_CONVOLVE5(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.CONVOLVE5),
+ BENCHMARK_JAVA_BFF_BILATERAL(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.BILATERAL),
+ BENCHMARK_JAVA_BFF_MEDIAN(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.MEDIAN),
+ BENCHMARK_JAVA_BFF_CONTRAST(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.CONTRAST),
+ BENCHMARK_JAVA_BFF_FISHEYE(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.FISHEYE),
+ BENCHMARK_JAVA_BFF_LEVELS(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.LEVELS),
+ BENCHMARK_JAVA_BFF_POSTERIZE(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.POSTERIZE);
+
+ public final FilterInfo filterInfo;
+
+ Benchmarks(JavaImageFilter.Version version, ImageFilters kernel) {
+ this.filterInfo = new FilterInfo(version, kernel);
+ }
+
+ Benchmarks(NativeImageFilter.Version version, ImageFilters kernel) {
+ this.filterInfo = new FilterInfo(version, kernel);
+ }
+ }
+
+ private class FilterBenchmarkImplementation extends BenchmarkImplementation {
+ private final FilterTest mFilter;
+ private BufferedImage mInput, mOutput;
+
+ public FilterBenchmarkImplementation(String title, ImageFilter filter) {
+ super(title);
+
+ mFilter = new FilterTest();
+ mFilter.setFilter(filter);
+ }
+
+ @Override
+ public void setupBenchmark(Parameters parameters) {
+ // Use resource ID as parameter (all parameter sets exist simultaneously and Bitmaps would
+ // take too much memory)
+ int id = parameters.getParameter("input");
+ String[] files = mMain.getFileContents("ImageIds");
+
+ try {
+ BufferedImage bufImg = ImageIO.read(new File(Main.RESOURCES_DIR + files[id]));
+ BufferedImage convertedImg = new BufferedImage(bufImg.getWidth(), bufImg.getHeight(), BufferedImage.TYPE_INT_ARGB);
+ convertedImg.getGraphics().drawImage(bufImg, 0, 0, null);
+
+ Graphics bg = convertedImg.getGraphics();
+ bg.drawImage(mInput, 0, 0, null);
+ bg.dispose();
+
+ mInput = convertedImg;
+ mOutput = new BufferedImage(mInput.getWidth(), mInput.getHeight(), BufferedImage.TYPE_INT_ARGB);
+
+ mFilter.setInput(mInput);
+ mFilter.setOutput(mOutput);
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public void finalizeBenchmark() {
+ mFilter.teardown();
+ }
+
+ @Override
+ public void initParameters() {
+ mFilter.setup();
+ }
+
+ @Override
+ public void instrumentedRun() {
+ if (!mFilter.run())
+ throw new RuntimeException("Run failed due to invalid state");
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/DeviceDescriptor.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/DeviceDescriptor.java
new file mode 100644
index 0000000..e89f56c
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/DeviceDescriptor.java
@@ -0,0 +1,468 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+public class DeviceDescriptor {
+ public static class Builder {
+ private DeviceDescriptor device = new DeviceDescriptor();
+
+ public static Builder instance() {
+ return new Builder();
+ }
+
+ private Builder() {
+ device.mName = "Default";
+ device.mRoot = false;
+ device.mAndroidVersion = 100;
+
+ device.mActiveCooling = false;
+ device.mNumThermalSensors = 1;
+ device.mReferenceThermalSensor = 0;
+ device.mThermalSensorPath = "/sys/devices/virtual/thermal/thermal_zone%1$d/temp";
+ device.mFanModePath = null;
+ device.mFanModeDefaultValue = null;
+ device.mFanModeManualValue = null;
+ device.mFanSpeedPath = null;
+ device.mFanSpeedMaxValue = -1;
+ device.mFanSpeedMinValue = -1;
+ device.mBaseTemperature = 40;
+ device.mMaxTemperature = 70;
+
+ device.mNumCores = 8;
+ device.mFirstLittleCore = 0;
+ device.mLastLittleCore = 3;
+ device.mFirstBigCore = 4;
+ device.mLastBigCore = 7;
+ device.mCpuFreqBasePath = "/sys/devices/system/cpu/cpu%1$d/cpufreq";
+ device.mCpuCurFreqPath = "scaling_cur_freq";
+ device.mCpuMinFreqPath = "cpuinfo_min_freq";
+ device.mCpuMaxFreqPath = "cpuinfo_max_freq";
+ device.mCpuGovernorPath = "scaling_governor";
+ device.mCpuDefaultGovernor = "ondemand";
+ device.mCpuPerformanceGovernor = "performance";
+
+ device.mDdrFreqBasePath = null;
+ device.mDdrCurFreqPath = null;
+
+ device.mGpu = false;
+ device.mGpuDefaultFreq = 0;
+ device.mGpuMaxFreq = 0;
+ device.mGpuFreqBasePath = null;
+ device.mGpuCurFreqPath = null;
+ device.mGpuMinFreqPath = null;
+ device.mGpuMaxFreqPath = null;
+ device.mGpuGovernorPath = null;
+ device.mGpuDefaultGovernor = "ondemand";
+ device.mGpuPerformanceGovernor = "performance";
+ }
+
+ // MISCELLANEOUS
+ public Builder name(String name) {
+ device.mName = name;
+ return this;
+ }
+
+ public Builder rootEnabled(boolean root) {
+ device.mRoot = root;
+ return this;
+ }
+
+ public Builder androidVersion(int version) {
+ device.mAndroidVersion = version;
+ return this;
+ }
+
+ // THERMALS
+ public Builder thermalSensors(int numSensors) {
+ device.mNumThermalSensors = numSensors;
+ return this;
+ }
+
+ public Builder referenceThermalSensor(int sensor) {
+ device.mReferenceThermalSensor = sensor;
+ return this;
+ }
+
+ public Builder thermalSensorPath(String thermalPath) {
+ device.mThermalSensorPath = thermalPath;
+ return this;
+ }
+
+ public Builder fanModePath(String fanPath) {
+ device.mActiveCooling = fanPath != null && device.mFanSpeedPath != null;
+ device.mFanModePath = fanPath;
+ return this;
+ }
+
+ public Builder fanModeDefaultValue(String value) {
+ device.mFanModeDefaultValue = value;
+ return this;
+ }
+
+ public Builder fanModeManualValue(String value) {
+ device.mFanModeManualValue = value;
+ return this;
+ }
+
+ public Builder fanSpeedPath(String fanPath) {
+ device.mActiveCooling = fanPath != null && device.mFanModePath != null;
+ device.mFanSpeedPath = fanPath;
+ return this;
+ }
+
+ public Builder fanSpeedMaxValue(int value) {
+ device.mFanSpeedMaxValue = value;
+ return this;
+ }
+
+ public Builder fanSpeedMinValue(int value) {
+ device.mFanSpeedMaxValue = value;
+ return this;
+ }
+
+ public Builder baseTemperature(int temp) {
+ device.mBaseTemperature = temp;
+ return this;
+ }
+
+ public Builder maxTemperature(int temp) {
+ device.mMaxTemperature = temp;
+ return this;
+ }
+
+ // CPU
+ public Builder cores(int numCores) {
+ device.mNumCores = numCores;
+ return this;
+ }
+
+ public Builder firstLittleCore(int core) {
+ device.mFirstLittleCore = core;
+ return this;
+ }
+
+ public Builder lastLittleCore(int core) {
+ device.mLastLittleCore = core;
+ return this;
+ }
+
+ public Builder firstBigCore(int core) {
+ device.mFirstBigCore = core;
+ return this;
+ }
+
+ public Builder lastBigCore(int core) {
+ device.mLastBigCore = core;
+ return this;
+ }
+
+ public Builder cpuFreqBasePath(String basePath) {
+ device.mCpuFreqBasePath = basePath;
+ return this;
+ }
+
+ public Builder cpuCurFreqPath(String freqPath) {
+ device.mCpuCurFreqPath = freqPath;
+ return this;
+ }
+
+ public Builder cpuMinFreqPath(String freqPath) {
+ device.mCpuMinFreqPath = freqPath;
+ return this;
+ }
+
+ public Builder cpuMaxFreqPath(String freqPath) {
+ device.mCpuMaxFreqPath = freqPath;
+ return this;
+ }
+
+ public Builder cpuGovernorPath(String governorPath) {
+ device.mCpuGovernorPath = governorPath;
+ return this;
+ }
+
+ public Builder cpuDefaultGovernor(String governor) {
+ device.mCpuDefaultGovernor = governor;
+ return this;
+ }
+
+ public Builder cpuPerformanceGovernor(String governor) {
+ device.mCpuPerformanceGovernor = governor;
+ return this;
+ }
+
+ // MEMORY
+
+ public Builder ddrFreqBasePath(String basePath) {
+ device.mDdrFreqBasePath = basePath;
+ return this;
+ }
+
+ public Builder ddrCurFreqPath(String freqPath) {
+ device.mDdrCurFreqPath = freqPath;
+ return this;
+ }
+
+ // GPU
+
+ public Builder gpuDefaultFreq(int freq) {
+ device.mGpuDefaultFreq = freq;
+ return this;
+ }
+
+ public Builder gpuMaxFreq(int freq) {
+ device.mGpuMaxFreq = freq;
+ return this;
+ }
+
+ public Builder gpuFreqBasePath(String basePath) {
+ device.mGpu = basePath != null;
+ device.mGpuFreqBasePath = basePath;
+ return this;
+ }
+
+ public Builder gpuCurFreqPath(String freqPath) {
+ device.mGpuCurFreqPath = freqPath;
+ return this;
+ }
+
+ public Builder gpuMinFreqPath(String freqPath) {
+ device.mGpuMinFreqPath = freqPath;
+ return this;
+ }
+
+ public Builder gpuMaxFreqPath(String freqPath) {
+ device.mGpuMaxFreqPath = freqPath;
+ return this;
+ }
+
+ public Builder gpuGovernorPath(String governorPath) {
+ device.mGpuGovernorPath = governorPath;
+ return this;
+ }
+
+ public Builder gpuDefaultGovernor(String governor) {
+ device.mGpuDefaultGovernor = governor;
+ return this;
+ }
+
+ public Builder gpuPerformanceGovernor(String governor) {
+ device.mGpuPerformanceGovernor = governor;
+ return this;
+ }
+
+ // BUILD
+ public DeviceDescriptor build() {
+ DeviceDescriptor built = device;
+ device = null;
+ return built;
+ }
+ }
+
+ // MISCELLANEOUS
+ private String mName;
+ private boolean mRoot;
+ private int mAndroidVersion;
+
+ public String name() {
+ return mName;
+ }
+
+ public boolean rootEnabled() {
+ return mRoot;
+ }
+
+ public int androidVersion() {
+ return mAndroidVersion;
+ }
+
+ // THERMALS
+ private boolean mActiveCooling;
+ private int mNumThermalSensors;
+ private int mReferenceThermalSensor;
+ private String mFanModePath;
+ private String mFanModeDefaultValue;
+ private String mFanModeManualValue;
+ private String mFanSpeedPath;
+ private int mFanSpeedMaxValue;
+ private int mFanSpeedMinValue;
+ private String mThermalSensorPath;
+ private int mBaseTemperature;
+ private int mMaxTemperature;
+
+ public boolean hasActiveCooling() {
+ return mActiveCooling;
+ }
+
+ public int thermalSensors() {
+ return mNumThermalSensors;
+ }
+
+ public int referenceThermalSensor() {
+ return mReferenceThermalSensor;
+ }
+
+ public String thermalSensorPath(int zone) {
+ return String.format(mThermalSensorPath, zone);
+ }
+
+ public String referenceThermalSensorPath() {
+ return thermalSensorPath(mReferenceThermalSensor);
+ }
+
+ public String fanModePath() {
+ return mFanModePath;
+ }
+
+ public String fanModeDefaultValue() {
+ return mFanModeDefaultValue;
+ }
+
+ public String fanModeManualValue() {
+ return mFanModeManualValue;
+ }
+
+ public String fanSpeedPath() {
+ return mFanSpeedPath;
+ }
+
+ public int fanSpeedMaxValue() {
+ return mFanSpeedMaxValue;
+ }
+
+ public int fanSpeedMinValue() {
+ return mFanSpeedMinValue;
+ }
+
+ public int baseTemperature() {
+ return mBaseTemperature;
+ }
+
+ public int maxTemperature() {
+ return mMaxTemperature;
+ }
+
+ // CPU
+ private int mNumCores;
+ private int mFirstLittleCore;
+ private int mLastLittleCore;
+ private int mFirstBigCore;
+ private int mLastBigCore;
+ private String mCpuFreqBasePath;
+ private String mCpuCurFreqPath;
+ private String mCpuMinFreqPath;
+ private String mCpuMaxFreqPath;
+ private String mCpuGovernorPath;
+ private String mCpuDefaultGovernor;
+ private String mCpuPerformanceGovernor;
+
+ public int cores() {
+ return mNumCores;
+ }
+
+ public int firstLittleCore() {
+ return mFirstLittleCore;
+ }
+
+ public int lastLittleCore() {
+ return mLastLittleCore;
+ }
+
+ public int firstBigCore() {
+ return mFirstBigCore;
+ }
+
+ public int lastBigCore() {
+ return mLastBigCore;
+ }
+
+ public String cpuFreqBasePath(int core) {
+ return String.format(mCpuFreqBasePath, core);
+ }
+
+ public String cpuCurFreqPath(int core) {
+ return cpuFreqBasePath(core) + "/" + mCpuCurFreqPath;
+ }
+
+ public String cpuMinFreqPath(int core) {
+ return cpuFreqBasePath(core) + "/" + mCpuMinFreqPath;
+ }
+
+ public String cpuMaxFreqPath(int core) {
+ return cpuFreqBasePath(core) + "/" + mCpuMaxFreqPath;
+ }
+
+ public String cpuGovernorPath(int core) {
+ return cpuFreqBasePath(core) + "/" + mCpuGovernorPath;
+ }
+
+ public String cpuDefaultGovernor() {
+ return mCpuDefaultGovernor;
+ }
+
+ public String cpuPerformanceGovernor() {
+ return mCpuPerformanceGovernor;
+ }
+
+ // MEMORY
+ private String mDdrFreqBasePath;
+ private String mDdrCurFreqPath;
+
+ public String ddrFreqBasePath() {
+ return mDdrFreqBasePath;
+ }
+
+ public String ddrCurFreqPath() {
+ return mDdrFreqBasePath + "/" + mDdrCurFreqPath;
+ }
+
+ // GPU
+ private boolean mGpu;
+ private int mGpuDefaultFreq;
+ private int mGpuMaxFreq;
+ private String mGpuFreqBasePath;
+ private String mGpuCurFreqPath;
+ private String mGpuMinFreqPath;
+ private String mGpuMaxFreqPath;
+ private String mGpuGovernorPath;
+ private String mGpuDefaultGovernor;
+ private String mGpuPerformanceGovernor;
+
+ public boolean hasGpu() {
+ return mGpu;
+ }
+
+ public int gpuDefaultFreq() {
+ return mGpuDefaultFreq;
+ }
+
+ public int gpuMaxFreq() {
+ return mGpuMaxFreq;
+ }
+
+ public String gpuFreqBasePath() {
+ return mGpuFreqBasePath;
+ }
+
+ public String gpuCurFreqPath() {
+ return mGpuFreqBasePath + "/" + mGpuCurFreqPath;
+ }
+
+ public String gpuMinFreqPath() {
+ return mGpuFreqBasePath + "/" + mGpuMinFreqPath;
+ }
+
+ public String gpuMaxFreqPath() {
+ return mGpuFreqBasePath + "/" + mGpuMaxFreqPath;
+ }
+
+ public String gpuGovernorPath() {
+ return mGpuFreqBasePath + "/" + mGpuGovernorPath;
+ }
+
+ public String gpuDefaultGovernor() {
+ return mGpuDefaultGovernor;
+ }
+
+ public String gpuPerformanceGovernor() {
+ return mGpuPerformanceGovernor;
+ }
+}
\ No newline at end of file
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/DeviceUtils.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/DeviceUtils.java
new file mode 100644
index 0000000..1c9fce6
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/DeviceUtils.java
@@ -0,0 +1,56 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+import es.ull.pcg.hpc.rancid.utils.FileUtils;
+import es.ull.pcg.hpc.rancid.utils.MathUtils;
+import es.ull.pcg.hpc.rancid.utils.ThreadUtils;
+
+public class DeviceUtils {
+ static {
+ System.loadLibrary("rancid");
+ }
+
+ public static native void init();
+ public static native void release();
+
+ public static void cpuWarmUp() {
+ cpuWarmUpNative();
+ }
+
+ public static void ddrWarmUp() {
+ ddrWarmUpNative();
+ }
+
+ public static void gpuWarmUp() {
+ gpuWarmUpNative();
+ }
+
+ /**
+ * Decrease the temperature of the device, if it is over the maximum temperature set for the
+ * device.
+ *
+ * @param device Description of the device.
+ * @see DeviceUtils#decreaseTemperature(DeviceDescriptor)
+ */
+ public static void controlTemperature(DeviceDescriptor device) {
+ Number currentTemp = FileUtils.readNumberFile(device.referenceThermalSensorPath());
+ if (MathUtils.compare(currentTemp, device.maxTemperature()) > 0)
+ decreaseTemperature(device);
+ }
+
+ /**
+ * Decrease temperature by suspending the execution of this thread until it is under the base
+ * temperature set for the device.
+ *
+ * @param device Description of the device.
+ */
+ public static void decreaseTemperature(DeviceDescriptor device) {
+ while (MathUtils.compare(FileUtils.readNumberFile(device.referenceThermalSensorPath()),
+ device.baseTemperature()) > 0)
+ ThreadUtils.waitMs(1000);
+ }
+
+ private static native float cpuWarmUpNative();
+ private static native float ddrWarmUpNative();
+ private static native void gpuWarmUpNative();
+}
+
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/Devices.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/Devices.java
new file mode 100644
index 0000000..556374f
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/Devices.java
@@ -0,0 +1,54 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+public class Devices {
+ public static final DeviceDescriptor DEFAULT = DeviceDescriptor.Builder.instance().build();
+
+ public static final DeviceDescriptor XU3 =
+ DeviceDescriptor.Builder.instance()
+ .name("XU3")
+ .rootEnabled(true)
+ .androidVersion(0)
+
+ .thermalSensors(2).referenceThermalSensor(0)
+ .fanModePath("/sys/devices/odroid_fan.14/fan_mode")
+ .fanModeDefaultValue("1").fanModeManualValue("0")
+ .fanSpeedPath("/sys/devices/odroid_fan.14/pwm_duty")
+ .fanSpeedMinValue(0).fanSpeedMaxValue(255)
+ .baseTemperature(55000).maxTemperature(70000)
+
+ .cpuDefaultGovernor("interactive")
+
+ .gpuDefaultFreq(-1).gpuMaxFreq(543)
+ .gpuFreqBasePath("/sys/devices/11800000.mali")
+ .gpuCurFreqPath("clock")
+ .gpuMinFreqPath("dvfs_min_lock").gpuMaxFreqPath("dvfs_max_lock")
+ .gpuGovernorPath("dvfs_governor")
+ .gpuDefaultGovernor("0").gpuPerformanceGovernor("1")
+
+ .build();
+
+ public static final DeviceDescriptor IRIS =
+ DeviceDescriptor.Builder.instance()
+ .name("IRIS")
+ .rootEnabled(true)
+ .androidVersion(0)
+
+ .baseTemperature(40000).maxTemperature(70000) // Default temperature (don't found real values)
+
+ .cpuDefaultGovernor("powersafe")
+
+ .build();
+
+
+ public static DeviceDescriptor fromHostname(String hostname) {
+ switch (hostname) {
+ case "odroid":
+ return XU3;
+ case "paula-ThinkPad":
+ return IRIS;
+ default:
+ System.out.println("Device '" + hostname + "' will use default system parameters.");
+ return DEFAULT;
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/JreProgressListener.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/JreProgressListener.java
new file mode 100644
index 0000000..25ccbf1
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/JreProgressListener.java
@@ -0,0 +1,14 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+
+import es.ull.pcg.hpc.rancid.progress.RelativeProgressListener;
+
+public class JreProgressListener extends RelativeProgressListener {
+ public JreProgressListener() {}
+
+ @Override
+ public void updateProgress(final double globalProgress, double benchmarksProgress,
+ double parametersProgress) {
+ System.out.println("Progress: " + globalProgress);
+ }
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/OSUtils.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/OSUtils.java
new file mode 100644
index 0000000..c87a516
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/OSUtils.java
@@ -0,0 +1,83 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class OSUtils {
+ static {
+ System.loadLibrary("rancid");
+ }
+
+ public static void setDefaultFan(DeviceDescriptor device) throws IOException {
+ setFan(device);
+ }
+
+ public static void setMinFan(DeviceDescriptor device) throws IOException {
+ setFan(device, device.fanSpeedMinValue());
+ }
+
+ public static void setMaxFan(DeviceDescriptor device) throws IOException {
+ setFan(device, device.fanSpeedMaxValue());
+ }
+
+ public static void setDefaultCpuGovernor(DeviceDescriptor device, int firstCore, int lastCore) throws IOException {
+ setCpuGovernor(device, device.cpuDefaultGovernor(), firstCore, lastCore);
+ }
+
+ public static void setPerformanceCpuGovernor(DeviceDescriptor device, int firstCore, int lastCore) throws IOException {
+ setCpuGovernor(device, device.cpuPerformanceGovernor(), firstCore, lastCore);
+ }
+
+ public static void setDefaultGpuGovernor(DeviceDescriptor device) throws IOException {
+ setGpuGovernor(device, device.gpuDefaultGovernor(), device.gpuDefaultFreq());
+ }
+
+ public static void setPerformanceGpuGovernor(DeviceDescriptor device) throws IOException {
+ setGpuGovernor(device, device.gpuPerformanceGovernor(), device.gpuMaxFreq());
+ }
+
+ public static native void unpinThreads();
+ public static native void pinThreads(int firstCore, int lastCore);
+ public static native int usedCores();
+
+ public static native void setDefaultScheduler();
+ public static native void setRealtimeScheduler();
+
+ /**
+ * Set default fan.
+ */
+ private static void setFan(DeviceDescriptor device) throws IOException {
+ ShellUtils.rootExec(Collections.singletonList("echo '" + device.fanModeDefaultValue() + "' > '" + device.fanModePath() + "'"));
+ }
+
+ /**
+ * Set manual fan.
+ */
+ private static void setFan(DeviceDescriptor device, int value) throws IOException {
+ ShellUtils.rootExec(Arrays.asList("echo '" + device.fanModeManualValue() + "' > '" + device.fanModePath() + "'",
+ "echo '" + value + "' > '" + device.fanSpeedPath() + "'"));
+ }
+
+ private static void setCpuGovernor(DeviceDescriptor device, String governor, int firstCore, int lastCore) throws IOException {
+ ArrayList cmds = new ArrayList<>((lastCore - firstCore) + 1);
+
+ for (int i = firstCore; i <= lastCore; ++i)
+ cmds.add("echo '" + governor + "' > '" + device.cpuGovernorPath(i) + "'");
+
+ ShellUtils.rootExec(cmds);
+ }
+
+ private static void setGpuGovernor(DeviceDescriptor device, String governor, int minFreq) throws IOException {
+ ArrayList cmds = new ArrayList<>(2);
+
+ if (governor != null)
+ cmds.add("echo '" + governor + "' > '" + device.gpuGovernorPath() + "'");
+
+ if (device.gpuMinFreqPath() != null)
+ cmds.add("echo '" + minFreq + "' > '" + device.gpuMinFreqPath() + "'");
+
+ ShellUtils.rootExec(cmds);
+ }
+}
\ No newline at end of file
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/ReliableLinuxRunner.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/ReliableLinuxRunner.java
new file mode 100644
index 0000000..5ab98e7
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/ReliableLinuxRunner.java
@@ -0,0 +1,216 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+import es.ull.pcg.hpc.rancid.Parameters;
+import es.ull.pcg.hpc.rancid.StopCondition;
+import es.ull.pcg.hpc.rancid.benchmark.BenchmarkRunner;
+import es.ull.pcg.hpc.rancid.utils.FileUtils;
+import es.ull.pcg.hpc.rancid.utils.MathUtils;
+import es.ull.pcg.hpc.rancid.utils.ThreadUtils;
+
+import java.io.IOException;
+
+public class ReliableLinuxRunner extends BenchmarkRunner {
+
+ public enum CoreSelection {
+ ALL, BIG, LITTLE, ONE_BIG
+ }
+
+ private static final int INTER_BENCHMARK_WAIT_MS = 15 * 1000;
+ private static final int WARMUP_TIME_MS = 10 * 1000;
+ private static final int WARMUP_JIT_ITERATIONS = 5;
+
+ private final DeviceDescriptor mDevice;
+ private final CoreSelection mCores;
+ private final Parameters mJitParams;
+ private final boolean mUsesGpu, mNativeExecution;
+
+ private int mRunCounter;
+ private int mFirstCore, mLastCore;
+
+ public static void logError(String description, Throwable cause) {
+ System.out.println("ReliableAndroidRunner: " + description + " " + cause);
+ }
+
+ public ReliableLinuxRunner(StopCondition stop, DeviceDescriptor device, CoreSelection cores,
+ Parameters jitParams, boolean usesGpu, boolean nativeExecution) {
+ super(stop);
+ this.mDevice = device;
+ this.mCores = cores;
+ this.mJitParams = jitParams;
+ this.mUsesGpu = usesGpu;
+ this.mNativeExecution = nativeExecution;
+
+ if ((mDevice.firstLittleCore() < 0 || mDevice.lastLittleCore() < 0) &&
+ mCores == CoreSelection.LITTLE)
+ throw new RuntimeException("No little cores in device!");
+
+ if (!mDevice.hasGpu() && usesGpu)
+ throw new RuntimeException("GPU not available!");
+ }
+
+ @Override
+ protected void preBenchmark() {
+ this.mRunCounter = 0;
+
+ // Java JIT Compilation
+ if (!mNativeExecution) {
+ enforceJITCompile();
+ }
+
+ // Set process scheduler priority (not allowed in Android)
+ if (mDevice.androidVersion() == 0 && mDevice.rootEnabled())
+ OSUtils.setRealtimeScheduler();
+
+ // Prepare benchmark parameters
+ super.preBenchmark();
+
+ // Reduce temperature before starting benchmark, and wait additionally in case some background
+ // apps are restarted, so it doesn't happen while doing an instrumented run
+ try {
+ if (mDevice.hasActiveCooling())
+ OSUtils.setMaxFan(mDevice);
+ } catch (IOException e) {
+ logError("Set Max Fan", e);
+ }
+
+ ThreadUtils.waitMs(INTER_BENCHMARK_WAIT_MS);
+ DeviceUtils.decreaseTemperature(mDevice);
+ }
+
+ @Override
+ protected void preRun() {
+ super.preRun();
+
+ // Thread pinning
+ switch (mCores) {
+ case BIG:
+ mFirstCore = mDevice.firstBigCore();
+ mLastCore = mDevice.lastBigCore();
+ break;
+ case LITTLE:
+ mFirstCore = mDevice.firstLittleCore();
+ mLastCore = mDevice.lastLittleCore();
+ break;
+ case ONE_BIG:
+ // Round-robin
+ int bigCores = 1 + mDevice.lastBigCore() - mDevice.firstBigCore();
+ mFirstCore = mLastCore = mDevice.firstBigCore() + (mRunCounter % bigCores);
+ break;
+ case ALL:
+ mFirstCore = 0;
+ mLastCore = OSUtils.usedCores() - 1;
+ break;
+ }
+
+ OSUtils.pinThreads(mFirstCore, mLastCore);
+
+ // Prepare device temperature to do an instrumented run
+ DeviceUtils.controlTemperature(mDevice);
+
+ // Force a frequency increase, which will increase temperature again if it is achieved through
+ // warm-up (in the case of not having root access)
+ enforceGovernors();
+ }
+
+ @Override
+ protected void postRun() {
+ // Thread unpinning
+ OSUtils.unpinThreads();
+
+ ++mRunCounter;
+ super.postRun();
+ }
+
+ @Override
+ protected void postBenchmark() {
+ // Reset process scheduler priority
+ if (mDevice.androidVersion() == 0 && mDevice.rootEnabled())
+ OSUtils.setDefaultScheduler();
+
+ // Reset frequency governors
+ resetGovernors();
+
+ // Reset fan
+ try {
+ if (mDevice.hasActiveCooling())
+ OSUtils.setDefaultFan(mDevice);
+ } catch (IOException e) {
+ logError("Set Default Fan", e);
+ }
+
+ super.postBenchmark();
+
+ // Hint the VM to run garbage collection
+ System.gc();
+ }
+
+ private static boolean warmUpCondition(long startTimeMs, String freqPath, Number targetFreq) {
+ return System.currentTimeMillis() - startTimeMs < WARMUP_TIME_MS &&
+ MathUtils.compare(FileUtils.readNumberFile(freqPath), targetFreq) < 0;
+ }
+
+ private void enforceJITCompile() {
+ long startTimeMs = System.currentTimeMillis();
+ mCurrentImplementation.setupBenchmark(mJitParams);
+
+ for (int i = 0;
+ i < WARMUP_JIT_ITERATIONS && System.currentTimeMillis() - startTimeMs < WARMUP_TIME_MS; ++i) {
+ mCurrentImplementation.initParameters();
+
+ try {
+ mCurrentImplementation.instrumentedRun();
+ } catch (RuntimeException exception) {
+ if (!mCurrentImplementation.handleException(exception))
+ break;
+ }
+
+ mCurrentImplementation.releaseParameters();
+ }
+
+ mCurrentImplementation.finalizeBenchmark();
+ }
+
+ private void enforceGovernors() {
+ if (mDevice.rootEnabled()) {
+ try {
+ if (mUsesGpu)
+ OSUtils.setPerformanceGpuGovernor(mDevice);
+
+ OSUtils.setPerformanceCpuGovernor(mDevice, mFirstCore, mLastCore);
+ } catch (IOException e) {
+ logError("Set Performance Governor", e);
+ }
+ }
+ else {
+ // Benchmark-independent processor warm-up to induce a frequency increase
+ Number maxFreq = FileUtils.readNumberFile(mDevice.cpuMaxFreqPath(mFirstCore));
+ long startTimeMs = System.currentTimeMillis();
+
+ // Warm-up CPU
+ while (warmUpCondition(startTimeMs, mDevice.cpuCurFreqPath(mFirstCore), maxFreq))
+ DeviceUtils.cpuWarmUp();
+
+ // Warm-up GPU
+ if (mUsesGpu) {
+ maxFreq = FileUtils.readNumberFile(mDevice.gpuMaxFreqPath());
+ startTimeMs = System.currentTimeMillis();
+
+ while (warmUpCondition(startTimeMs, mDevice.gpuCurFreqPath(), maxFreq))
+ DeviceUtils.gpuWarmUp();
+ }
+ }
+ }
+
+ private void resetGovernors() {
+ if (mDevice.rootEnabled()) {
+ try {
+ if (mUsesGpu)
+ OSUtils.setDefaultGpuGovernor(mDevice);
+
+ OSUtils.setDefaultCpuGovernor(mDevice, mFirstCore, mLastCore);
+ } catch (IOException e) {
+ logError("Set Default Governor", e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/RootFileContentsMeter.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/RootFileContentsMeter.java
new file mode 100644
index 0000000..2f9a02c
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/RootFileContentsMeter.java
@@ -0,0 +1,60 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+import es.ull.pcg.hpc.rancid.Meter;
+import es.ull.pcg.hpc.rancid.results.ResultTypes;
+import es.ull.pcg.hpc.rancid.results.ValueResult;
+
+import java.io.IOException;
+import java.text.NumberFormat;
+import java.text.ParseException;
+
+public class RootFileContentsMeter implements Meter {
+ private final String mFileName;
+ private final String mMeterName;
+ private Number mValue;
+
+ public RootFileContentsMeter (String fileName, String meterName) {
+ this.mFileName = fileName;
+ this.mMeterName = meterName;
+ }
+
+ @Override
+ public void start () {
+ this.mValue = Double.NaN;
+ }
+
+ @Override
+ public void stop () {
+ this.mValue = this.readFileValue();
+ }
+
+ @Override
+ public void stopError () {
+ }
+
+ @Override
+ public void reset () {
+ }
+
+ @Override
+ public String getTitle () {
+ return this.mMeterName;
+ }
+
+ @Override
+ public ValueResult getMeasure () {
+ return new ValueResult(this.getTitle(), ResultTypes.Value, mValue);
+ }
+
+ protected Number errorValue () {
+ return Double.NaN;
+ }
+
+ private Number readFileValue () {
+ try {
+ return NumberFormat.getInstance().parse(ShellUtils.rootRead(mFileName));
+ } catch (NumberFormatException | ParseException | IOException e) {
+ return this.errorValue();
+ }
+ }
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/ShellUtils.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/ShellUtils.java
new file mode 100644
index 0000000..8095fd9
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/benchmark/ShellUtils.java
@@ -0,0 +1,73 @@
+package es.ull.pcg.hpc.fancier.linuxtest.benchmark;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Scanner;
+
+public class ShellUtils {
+ public static void exec(Collection cmds) throws IOException {
+ Runtime rt = Runtime.getRuntime();
+
+ for (String cmd: cmds)
+ waitProcess(execProcess(rt, cmd));
+ }
+
+ public static void rootExec(Collection cmds) throws IOException {
+ Runtime rt = Runtime.getRuntime();
+ Process su = execProcess(rt, "su");
+
+ try (DataOutputStream stream = new DataOutputStream(su.getOutputStream())) {
+ for (String cmd: cmds) {
+ stream.writeBytes(cmd);
+ stream.writeBytes("\n");
+ stream.flush();
+ }
+
+ stream.writeBytes("exit\n");
+ stream.flush();
+ waitProcess(su);
+ }
+ }
+
+ public static String rootRead(String fileName) throws IOException {
+ String result = null;
+ Runtime rt = Runtime.getRuntime();
+ Process su = execProcess(rt, "su");
+
+ try (DataOutputStream stream = new DataOutputStream(su.getOutputStream());
+ Scanner scanner = new Scanner(su.getInputStream())) {
+ String cmd = "cat \"" + fileName + "\"";
+
+ stream.writeBytes(cmd);
+ stream.writeBytes("\n");
+ stream.flush();
+
+ stream.writeBytes("exit\n");
+ stream.flush();
+ waitProcess(su);
+
+ scanner.useDelimiter("\\A");
+ if (scanner.hasNext())
+ result = scanner.next();
+ }
+
+ return result;
+ }
+
+ private static Process execProcess(Runtime rt, String cmd) throws IOException {
+ return rt.exec(cmd);
+ }
+
+ private static void waitProcess(Process process) {
+ boolean finished = false;
+ while (!finished) {
+ try {
+ process.waitFor();
+ finished = true;
+ } catch (InterruptedException ignored) {}
+ }
+ }
+
+ private ShellUtils() {}
+}
\ No newline at end of file
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/FancierTestRunner.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/FancierTestRunner.java
new file mode 100644
index 0000000..c9c4cd8
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/FancierTestRunner.java
@@ -0,0 +1,151 @@
+package es.ull.pcg.hpc.fancier.linuxtest.model;
+
+import es.ull.pcg.hpc.fancier.linuxtest.Main;
+import es.ull.pcg.hpc.fancier.linuxtest.test.*;
+
+import java.awt.image.BufferedImage;
+import java.util.concurrent.Executor;
+
+public class FancierTestRunner {
+
+ private final Main mMain;
+
+ public FancierTestRunner(Main mMain) {
+ this.mMain = mMain;
+ }
+
+ public void runTest(Tests selectedTest, String selectedName, BufferedImage inBff, BufferedImage outBff) {
+ RuntimeTest test = null;
+
+ // Create the RuntimeTest instance associated with the selected test
+ // First try to build an image filter
+ ImageFilter filter = ImageFilterBuilder.create(selectedTest.filterInfo);
+
+ if (filter != null) {
+ FilterTest filterTest = new FilterTest();
+ filterTest.setInput(inBff);
+ filterTest.setOutput(outBff);
+ filterTest.setFilter(filter);
+ test = filterTest;
+ }
+ else {
+ switch (selectedTest) {
+ case TEST_INIT:
+ test = new InitTest();
+ break;
+ case TEST_RELEASE:
+ test = new ReleaseTest();
+ break;
+ case TEST_MATH:
+ test = new MathTest();
+ break;
+ case TEST_VECTOR:
+ test = new VectorTest();
+ break;
+ case TEST_ARRAY:
+ test = new ArrayTest();
+ break;
+ case TEST_VECTOR_ARRAY:
+ test = new VectorArrayTest();
+ break;
+ default:
+ printTestNotImplemented(selectedName);
+ break;
+ }
+ }
+
+ // If the selected test is valid, run it
+ if (test != null) {
+
+ int testID = mMain.getNextTestID();
+ System.out.println("Test added to the queue | " + testID + " | " + selectedName);
+
+ // Create tasks for execution
+ Executor executor = mMain.getTaskExecutor();
+
+ boolean isGpuFilter = filter != null && selectedTest.filterInfo.nativeVersion == NativeImageFilter.Version.GPU;
+
+ // Compile GPU kernels, if necessary
+ if (isGpuFilter) {
+ executor.execute(new Runnable() {
+ @Override
+ public void run() {
+ NativeImageFilter.compileKernels(Main.OPC_KERNELS_DIR);
+ }
+ });
+ }
+
+ // Run the actual task
+ executor.execute(
+ new TestTask(mMain, selectedName, test, testID)
+ );
+
+ // Release GPU kernels, if necessary
+ if (isGpuFilter) {
+ executor.execute(NativeImageFilter::releaseKernels);
+ }
+ }
+ }
+
+ private void printTestNotImplemented(String selectedName) {
+ System.out.println("[WARNING]: Test not implemented (" + selectedName + ")");
+ }
+
+ public enum Tests {
+ TEST_INIT,
+
+ TEST_MATH,
+ TEST_VECTOR,
+ TEST_ARRAY, // DON'T WORK
+ TEST_VECTOR_ARRAY, // DON'T WORK
+
+ TEST_OCL_GRAYSCALE(NativeImageFilter.Version.GPU, ImageFilters.GRAYSCALE),
+ TEST_OCL_BLUR(NativeImageFilter.Version.GPU, ImageFilters.BLUR),
+ TEST_OCL_CONVOLVE3(NativeImageFilter.Version.GPU, ImageFilters.CONVOLVE3),
+ TEST_OCL_CONVOLVE5(NativeImageFilter.Version.GPU, ImageFilters.CONVOLVE5),
+ TEST_OCL_BILATERAL(NativeImageFilter.Version.GPU, ImageFilters.BILATERAL),
+ TEST_OCL_MEDIAN(NativeImageFilter.Version.GPU, ImageFilters.MEDIAN),
+ TEST_OCL_CONTRAST(NativeImageFilter.Version.GPU, ImageFilters.CONTRAST),
+ TEST_OCL_FISHEYE(NativeImageFilter.Version.GPU, ImageFilters.FISHEYE),
+ TEST_OCL_LEVELS(NativeImageFilter.Version.GPU, ImageFilters.LEVELS),
+ TEST_OCL_POSTERIZE(NativeImageFilter.Version.GPU, ImageFilters.POSTERIZE),
+
+ TEST_NATIVE_GRAYSCALE(NativeImageFilter.Version.REF, ImageFilters.GRAYSCALE),
+ TEST_NATIVE_BLUR(NativeImageFilter.Version.REF, ImageFilters.BLUR),
+ TEST_NATIVE_CONVOLVE3(NativeImageFilter.Version.REF, ImageFilters.CONVOLVE3),
+ TEST_NATIVE_CONVOLVE5(NativeImageFilter.Version.REF, ImageFilters.CONVOLVE5),
+ TEST_NATIVE_BILATERAL(NativeImageFilter.Version.REF, ImageFilters.BILATERAL),
+ TEST_NATIVE_MEDIAN(NativeImageFilter.Version.REF, ImageFilters.MEDIAN),
+ TEST_NATIVE_CONTRAST(NativeImageFilter.Version.REF, ImageFilters.CONTRAST),
+ TEST_NATIVE_FISHEYE(NativeImageFilter.Version.REF, ImageFilters.FISHEYE),
+ TEST_NATIVE_LEVELS(NativeImageFilter.Version.REF, ImageFilters.LEVELS),
+ TEST_NATIVE_POSTERIZE(NativeImageFilter.Version.REF, ImageFilters.POSTERIZE),
+
+ TEST_JAVA_GRAYSCALE(JavaImageFilter.Version.PERFORMANCE, ImageFilters.GRAYSCALE),
+ TEST_JAVA_BLUR(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.BLUR),
+ TEST_JAVA_CONVOLVE3(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.CONVOLVE3),
+ TEST_JAVA_CONVOLVE5(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.CONVOLVE5),
+ TEST_JAVA_BILATERAL(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.BILATERAL),
+ TEST_JAVA_MEDIAN(JavaImageFilter.Version.PERFORMANCE, ImageFilters.MEDIAN),
+ TEST_JAVA_CONTRAST(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.CONTRAST),
+ TEST_JAVA_FISHEYE(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.FISHEYE),
+ TEST_JAVA_LEVELS(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.LEVELS),
+ TEST_JAVA_POSTERIZE(JavaImageFilter.Version.BUFFEREDIMAGE, ImageFilters.POSTERIZE),
+
+ TEST_RELEASE;
+
+ public final FilterInfo filterInfo;
+
+ Tests() {
+ this.filterInfo = null;
+ }
+
+ Tests(JavaImageFilter.Version version, ImageFilters kernel) {
+ this.filterInfo = new FilterInfo(version, kernel);
+ }
+
+ Tests(NativeImageFilter.Version version, ImageFilters kernel) {
+ this.filterInfo = new FilterInfo(version, kernel);
+ }
+ }
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/FilterInfo.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/FilterInfo.java
new file mode 100644
index 0000000..485326a
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/FilterInfo.java
@@ -0,0 +1,29 @@
+package es.ull.pcg.hpc.fancier.linuxtest.model;
+
+public class FilterInfo {
+
+ public final NativeImageFilter.Version nativeVersion;
+ public final JavaImageFilter.Version javaVersion;
+ public final ImageFilters kernel;
+
+
+ public boolean isJava() {
+ return javaVersion != null;
+ }
+
+ public boolean isNative() {
+ return nativeVersion != null;
+ }
+
+ public FilterInfo(NativeImageFilter.Version nativeVersion, ImageFilters kernel) {
+ this.nativeVersion = nativeVersion;
+ this.javaVersion = null;
+ this.kernel = kernel;
+ }
+
+ public FilterInfo(JavaImageFilter.Version javaVersion, ImageFilters kernel) {
+ this.nativeVersion = null;
+ this.javaVersion = javaVersion;
+ this.kernel = kernel;
+ }
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilter.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilter.java
new file mode 100644
index 0000000..63ec85d
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilter.java
@@ -0,0 +1,64 @@
+package es.ull.pcg.hpc.fancier.linuxtest.model;
+
+import es.ull.pcg.hpc.fancier.image.RGBAImage;
+
+import java.awt.image.BufferedImage;
+
+public abstract class ImageFilter implements AutoCloseable {
+ protected BufferedImage mBffIn;
+ protected RGBAImage mInput, mOutput;
+ protected ImageFilters mKernel;
+
+ public void setInput(BufferedImage input) {
+
+ mBffIn = input;
+
+ if (mInput != null) {
+ if (input.getWidth() == mInput.getWidth() && input.getHeight() == mInput.getHeight()) {
+ mInput.setPixels(input);
+ }
+ else {
+ mInput.release();
+ mInput = null;
+ }
+ }
+
+ if (mInput == null) {
+ mInput = new RGBAImage(input);
+ }
+
+ if (mOutput != null &&
+ (input.getWidth() != mOutput.getWidth() || input.getHeight() != mOutput.getHeight())) {
+ mOutput.release();
+ mOutput = null;
+ }
+
+ if (mOutput == null)
+ mOutput = new RGBAImage(input.getWidth(), input.getHeight());
+ }
+
+ public void release() {
+ if (mInput != null) {
+ mInput.release();
+ mInput = null;
+ }
+
+ if (mOutput != null) {
+ mOutput.release();
+ mOutput = null;
+ }
+ }
+
+ public ImageFilters getKernel() {
+ return mKernel;
+ }
+
+ @Override
+ public void close() {
+ release();
+ }
+
+ public abstract void setup();
+
+ public abstract void process(BufferedImage output);
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilterBuilder.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilterBuilder.java
new file mode 100644
index 0000000..d39ffab
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilterBuilder.java
@@ -0,0 +1,13 @@
+package es.ull.pcg.hpc.fancier.linuxtest.model;
+
+public class ImageFilterBuilder {
+ public static ImageFilter create(FilterInfo info) {
+ if (info == null)
+ return null;
+
+ if (info.isJava())
+ return new JavaImageFilter(info.kernel, info.javaVersion);
+ else
+ return new NativeImageFilter(info.kernel, info.nativeVersion);
+ }
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilters.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilters.java
new file mode 100644
index 0000000..5ddb49b
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/ImageFilters.java
@@ -0,0 +1,14 @@
+package es.ull.pcg.hpc.fancier.linuxtest.model;
+
+public enum ImageFilters {
+ GRAYSCALE,
+ BLUR,
+ CONVOLVE3,
+ CONVOLVE5,
+ BILATERAL,
+ MEDIAN,
+ CONTRAST,
+ FISHEYE,
+ LEVELS,
+ POSTERIZE
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/JavaImageFilter.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/JavaImageFilter.java
new file mode 100644
index 0000000..257a334
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/JavaImageFilter.java
@@ -0,0 +1,2123 @@
+package es.ull.pcg.hpc.fancier.linuxtest.model;
+
+import es.ull.pcg.hpc.fancier.image.RGBAColor;
+import es.ull.pcg.hpc.fancier.image.RGBAImage;
+import es.ull.pcg.hpc.fancier.vector.*;
+import es.ull.pcg.hpc.fancier.vector.array.Byte4Array;
+
+import es.ull.pcg.hpc.fancier.Math;
+
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+
+public class JavaImageFilter extends ImageFilter {
+
+ public enum Version {
+ REFERENCE, PERFORMANCE, BUFFEREDIMAGE
+ }
+
+ private final Version mVersion;
+
+ public JavaImageFilter(ImageFilters kernel, Version version) {
+ mKernel = kernel;
+ mVersion = version;
+ }
+
+ public JavaImageFilter(ImageFilters kernel) {
+ this(kernel, Version.PERFORMANCE);
+ }
+
+ public Version getVersion() {
+ return mVersion;
+ }
+
+ @Override
+ public void setup() {
+ mInput.syncToHost();
+ mOutput.syncToHost();
+ }
+
+ @Override
+ public void process(BufferedImage output) {
+
+ if (output.getWidth() != mOutput.getWidth() || output.getHeight() != mOutput.getHeight())
+ throw new RuntimeException("Input and output dimensions do not match.");
+
+ if (output.getType() != BufferedImage.TYPE_INT_ARGB)
+ System.out.println("Output BufferedImage has an unsupported format.");
+
+
+ switch (mKernel) {
+ case GRAYSCALE:
+ switch (mVersion) {
+ case REFERENCE:
+ runGrayscaleRef(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runGrayscalePerf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runGrayscaleBff(mBffIn, output);
+ break;
+ }
+ break;
+ case BLUR:
+ switch (mVersion) {
+ case REFERENCE:
+ runBlurRef(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runBlurPerf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runBlurBff(mBffIn, output);
+ break;
+ }
+ break;
+ case CONVOLVE3:
+ switch (mVersion) {
+ case REFERENCE:
+ runConvolve3Ref(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runConvolve3Perf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runConvolve3Bff(mBffIn, output);
+ break;
+ }
+ break;
+ case CONVOLVE5:
+ switch (mVersion) {
+ case REFERENCE:
+ runConvolve5Ref(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runConvolve5Perf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runConvolve5Bff(mBffIn, output);
+ break;
+ }
+ break;
+ case BILATERAL:
+ switch (mVersion) {
+ case REFERENCE:
+ runBilateralRef(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runBilateralPerf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runBilateralBff(mBffIn, output);
+ break;
+ }
+ break;
+ case MEDIAN:
+ switch (mVersion) {
+ case REFERENCE:
+ runMedianRef(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runMedianPerf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runMedianBff(mBffIn, output);
+ break;
+ }
+ break;
+ case CONTRAST:
+ switch (mVersion) {
+ case REFERENCE:
+ runContrastRef(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runContrastPerf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runContrastBff(mBffIn, output);
+ break;
+ }
+ break;
+ case FISHEYE:
+ switch (mVersion) {
+ case REFERENCE:
+ runFisheyeRef(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runFisheyePerf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runFisheyeBff(mBffIn, output);
+ break;
+ }
+ break;
+ case LEVELS:
+ switch (mVersion) {
+ case REFERENCE:
+ runLevelsRef(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runLevelsPerf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runLevelsBff(mBffIn, output);
+ break;
+ }
+ break;
+ case POSTERIZE:
+ switch (mVersion) {
+ case REFERENCE:
+ runPosterizeRef(mInput, mOutput);
+ break;
+ case PERFORMANCE:
+ runPosterizePerf(mInput, mOutput);
+ break;
+ case BUFFEREDIMAGE:
+ runPosterizeBff(mBffIn, output);
+ break;
+ }
+ break;
+ }
+
+ if (mVersion != Version.BUFFEREDIMAGE) {
+ mOutput.updateImage(output);
+ }
+ }
+
+
+ // Grayscale
+
+ private static final Float3 GS_WEIGHTS = new Float3(0.299f, 0.587f, 0.114f);
+
+ private static void runGrayscaleRef(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4 pixelIn = input.get(x, y);
+ byte grayValue = (byte) Float3.dot(pixelIn.asByte3().convertFloat3(), GS_WEIGHTS);
+ output.set(x, y, new Byte4(grayValue, grayValue, grayValue, pixelIn.w));
+ }
+ }
+ }
+
+ private static void runGrayscalePerf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Byte4 pixelIn = new Byte4();
+ Byte3 pixelInB3 = new Byte3();
+ Float3 pixelInF3 = new Float3();
+ Byte4 pixelOut = new Byte4();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4Array.getBuffer(iBuffer, y * width + x, pixelIn);
+ pixelIn.asByte3(pixelInB3);
+ pixelInB3.convertFloat3(pixelInF3);
+ byte grayValue = (byte) Float3.dot(pixelInF3, GS_WEIGHTS);
+ pixelOut.set(grayValue, grayValue, grayValue, pixelIn.w);
+ Byte4Array.setBuffer(oBuffer, y * width + x, pixelOut);
+ }
+ }
+ }
+
+ private static void runGrayscaleBff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int pixelIn = input.getRGB(x, y);
+ Color color = new Color(pixelIn, true);
+ int grayValue = (int) (color.getRed() * GS_WEIGHTS.x +
+ color.getGreen() * GS_WEIGHTS.y +
+ color.getBlue() * GS_WEIGHTS.z);
+ int alphaValue = color.getAlpha();
+
+ output.setRGB(x, y, (new Color(grayValue, grayValue, grayValue, alphaValue)).getRGB());
+ }
+ }
+ }
+
+
+ // Blur
+
+ private static final int BLUR_RADIUS = 5;
+
+ private static void blurBuildMask(float[] gaussKernel, int radius) {
+ float sigma = 0.4f * radius + 0.6f;
+ float coeff1 = 1.0f / (Math.sqrt(2.0f * Math.M_PI_F) * sigma);
+ float coeff2 = -1.0f / (2.0f * sigma * sigma);
+
+ float normalize_factor = 0.0f;
+ for (int r = -radius; r <= radius; r++) {
+ gaussKernel[r + radius] = coeff1 * Math.pow(Math.M_E_F, r * r * coeff2);
+ normalize_factor += gaussKernel[r + radius];
+ }
+
+ normalize_factor = 1.0f / normalize_factor;
+ for (int r = -radius; r <= radius; r++) {
+ gaussKernel[r + radius] *= normalize_factor;
+ }
+ }
+
+ private static void runBlurRef(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ float[] gaussKernel = new float[BLUR_RADIUS * 2 + 1];
+ blurBuildMask(gaussKernel, BLUR_RADIUS);
+
+ try (RGBAImage buffer = new RGBAImage(input.getDims())) {
+ buffer.syncToHost();
+
+ // Horizontal (input -> buffer)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Float4 blurredPixel = new Float4(0.0f);
+ int kernelIndex = 0;
+
+ if (x <= BLUR_RADIUS || x >= width - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int x2 = Math.clamp(x + r, 0, width - 1);
+ Float4.add(blurredPixel,
+ Float4.mul(input.get(x2, y).convertFloat4(), gaussKernel[kernelIndex++]),
+ blurredPixel);
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ Float4.add(blurredPixel, Float4
+ .mul(input.get(x + r, y).convertFloat4(), gaussKernel[kernelIndex++]),
+ blurredPixel);
+ }
+ }
+
+ buffer.set(x, y, blurredPixel.convertByte4());
+ }
+ }
+
+ // Vertical (buffer -> output)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Float4 blurredPixel = new Float4(0.0f);
+ int kernelIndex = 0;
+
+ if (y <= BLUR_RADIUS || y >= height - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int y2 = Math.clamp(y + r, 0, height - 1);
+ Float4.add(blurredPixel,
+ Float4.mul(buffer.get(x, y2).convertFloat4(), gaussKernel[kernelIndex++]),
+ blurredPixel);
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ Float4.add(blurredPixel, Float4
+ .mul(buffer.get(x, y + r).convertFloat4(), gaussKernel[kernelIndex++]),
+ blurredPixel);
+ }
+ }
+
+ output.set(x, y, blurredPixel.convertByte4());
+ }
+ }
+ }
+ }
+
+ private static void runBlurPerf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ float[] gaussKernel = new float[BLUR_RADIUS * 2 + 1];
+ blurBuildMask(gaussKernel, BLUR_RADIUS);
+
+ Float4 blurredPixel = new Float4();
+ Byte4 inputB = new Byte4();
+ Float4 inputF = new Float4();
+ Float4 tmpMul = new Float4();
+ Byte4 outB = new Byte4();
+
+ try (RGBAImage buffer = new RGBAImage(input.getDims())) {
+ buffer.syncToHost();
+ ByteBuffer bBuffer = buffer.getBuffer();
+
+ // Horizontal (input -> buffer)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ blurredPixel.set(0.0f);
+ int kernelIndex = 0;
+
+ if (x <= BLUR_RADIUS || x >= width - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int x_2 = Math.clamp(x + r, 0, width - 1);
+ Byte4Array.getBuffer(iBuffer, y * width + x_2, inputB);
+ inputB.convertFloat4(inputF);
+ Float4.mul(inputF, gaussKernel[kernelIndex++], tmpMul);
+ Float4.add(blurredPixel, tmpMul, blurredPixel);
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ Byte4Array.getBuffer(iBuffer, y * width + (x + r), inputB);
+ inputB.convertFloat4(inputF);
+ Float4.mul(inputF, gaussKernel[kernelIndex++], tmpMul);
+ Float4.add(blurredPixel, tmpMul, blurredPixel);
+ }
+ }
+ blurredPixel.convertByte4(outB);
+ Byte4Array.setBuffer(bBuffer, y * width + x, outB);
+ }
+ }
+
+ // Vertical (buffer -> output)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ blurredPixel.set(0.0f);
+ int kernelIndex = 0;
+
+ if (y <= BLUR_RADIUS || y >= height - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int y_2 = Math.clamp(y + r, 0, height - 1);
+ Byte4Array.getBuffer(bBuffer, y_2 * width + x, inputB);
+ inputB.convertFloat4(inputF);
+ Float4.mul(inputF, gaussKernel[kernelIndex++], tmpMul);
+ Float4.add(blurredPixel, tmpMul, blurredPixel);
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ Byte4Array.getBuffer(bBuffer, (y + r) * width + x, inputB);
+ inputB.convertFloat4(inputF);
+ Float4.mul(inputF, gaussKernel[kernelIndex++], tmpMul);
+ Float4.add(blurredPixel, tmpMul, blurredPixel);
+ }
+ }
+ blurredPixel.convertByte4(outB);
+ Byte4Array.setBuffer(oBuffer, y * width + x, outB);
+ }
+ }
+ }
+ }
+
+ private static void runBlurBff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ float[] gaussKernel = new float[BLUR_RADIUS * 2 + 1];
+ blurBuildMask(gaussKernel, BLUR_RADIUS);
+
+ BufferedImage buffer = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+
+ // Horizontal (input -> buffer)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ float blurredPixelA = 0.0f;
+ float blurredPixelR = 0.0f;
+ float blurredPixelG = 0.0f;
+ float blurredPixelB = 0.0f;
+ int kernelIndex = 0;
+
+ if (x <= BLUR_RADIUS || x >= width - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int x2 = x + r;
+ if (x2 < 0) x2 = 0;
+ else if (x2 >= width) x2 = width - 1;
+
+ int pixel = input.getRGB(x2, y);
+ float kernelValue = gaussKernel[kernelIndex++];
+ Color color = new Color(pixel, true);
+ blurredPixelA += color.getAlpha() * kernelValue;
+ blurredPixelR += color.getRed() * kernelValue;
+ blurredPixelG += color.getGreen() * kernelValue;
+ blurredPixelB += color.getBlue() * kernelValue;
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int pixel = input.getRGB(x + r, y);
+ float kernelValue = gaussKernel[kernelIndex++];
+ Color color = new Color(pixel, true);
+ blurredPixelA += color.getAlpha() * kernelValue;
+ blurredPixelR += color.getRed() * kernelValue;
+ blurredPixelG += color.getGreen() * kernelValue;
+ blurredPixelB += color.getBlue() * kernelValue;
+ }
+ }
+ buffer.setRGB(x, y, (new Color((int) blurredPixelR, (int) blurredPixelG,
+ (int) blurredPixelB, (int) blurredPixelA)).getRGB());
+ }
+ }
+
+ // Vertical (buffer -> output)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ float blurredPixelA = 0.0f;
+ float blurredPixelR = 0.0f;
+ float blurredPixelG = 0.0f;
+ float blurredPixelB = 0.0f;
+ int kernelIndex = 0;
+
+ if (y <= BLUR_RADIUS || y >= height - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int y2 = y + r;
+ if (y2 < 0)
+ y2 = 0;
+ else if (y2 >= height)
+ y2 = height - 1;
+
+ int pixel = buffer.getRGB(x, y2);
+ float kernelValue = gaussKernel[kernelIndex++];
+ Color color = new Color(pixel, true);
+ blurredPixelA += color.getAlpha() * kernelValue;
+ blurredPixelR += color.getRed() * kernelValue;
+ blurredPixelG += color.getGreen() * kernelValue;
+ blurredPixelB += color.getBlue() * kernelValue;
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int pixel = buffer.getRGB(x, y + r);
+ float kernelValue = gaussKernel[kernelIndex++];
+ Color color = new Color(pixel, true);
+ blurredPixelA += color.getAlpha() * kernelValue;
+ blurredPixelR += color.getRed() * kernelValue;
+ blurredPixelG += color.getGreen() * kernelValue;
+ blurredPixelB += color.getBlue() * kernelValue;
+ }
+ }
+ output.setRGB(x, y, (new Color((int) blurredPixelR, (int) blurredPixelG,
+ (int) blurredPixelB, (int) blurredPixelA)).getRGB());
+ }
+ }
+ }
+
+
+ // Convolve 3x3
+
+ private static final float[] CONVOLVE3_MASK = {0, -1, 0, -1, 5, -1, 0, -1, 0};
+
+ private static void calculateConvolveElement(int x, int y, int width, float scale,
+ ByteBuffer iBuffer, Byte4 p, Byte3 p3, Float3 p3F,
+ Float3 mul) {
+ Byte4Array.getBuffer(iBuffer, y * width + x, p);
+ p.asByte3(p3);
+ p3.convertFloat3(p3F);
+ Float3.mul(p3F, scale, mul);
+ }
+
+ private static void runConvolve3Ref(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = Math.max(x - 1, 0);
+ int x1 = Math.min(x + 1, width - 1);
+ int y0 = Math.max(y - 1, 0);
+ int y1 = Math.min(y + 1, height - 1);
+
+ Byte4 pixel = input.get(x, y);
+ Float3 sum = new Float3(0.0f);
+
+ Float3.add(sum, Float3.mul(input.get(x0, y0).asByte3().convertFloat3(), CONVOLVE3_MASK[0]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x, y0).asByte3().convertFloat3(), CONVOLVE3_MASK[1]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x1, y0).asByte3().convertFloat3(), CONVOLVE3_MASK[2]),
+ sum);
+
+ Float3.add(sum, Float3.mul(input.get(x0, y).asByte3().convertFloat3(), CONVOLVE3_MASK[3]),
+ sum);
+ Float3.add(sum, Float3.mul(pixel.asByte3().convertFloat3(), CONVOLVE3_MASK[4]), sum);
+ Float3.add(sum, Float3.mul(input.get(x1, y).asByte3().convertFloat3(), CONVOLVE3_MASK[5]),
+ sum);
+
+ Float3.add(sum, Float3.mul(input.get(x0, y1).asByte3().convertFloat3(), CONVOLVE3_MASK[6]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x, y1).asByte3().convertFloat3(), CONVOLVE3_MASK[7]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x1, y1).asByte3().convertFloat3(), CONVOLVE3_MASK[8]),
+ sum);
+
+ output.set(x, y, new Byte4(Float3.clamp(sum, 0.0f, 255.0f).convertByte3(), pixel.w));
+ }
+ }
+ }
+
+ private static void runConvolve3Perf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Byte4 pIn = new Byte4();
+ Byte4 oIn = new Byte4();
+ Byte3 oIn3 = new Byte3();
+ Float3 oIn3F = new Float3();
+
+ Float3 tmpMul = new Float3();
+ Float3 sum = new Float3();
+
+ Byte3 pOut = new Byte3();
+ Byte4 pOut4 = new Byte4();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = Math.max(x - 1, 0);
+ int x1 = Math.min(x + 1, width - 1);
+ int y0 = Math.max(y - 1, 0);
+ int y1 = Math.min(y + 1, height - 1);
+
+ Byte4Array.getBuffer(iBuffer, y * width + x, pIn);
+ sum.set(0.0f);
+
+ calculateConvolveElement(x0, y0, width, CONVOLVE3_MASK[0], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x, y0, width, CONVOLVE3_MASK[1], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x1, y0, width, CONVOLVE3_MASK[2], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+
+ calculateConvolveElement(x0, y, width, CONVOLVE3_MASK[3], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x, y, width, CONVOLVE3_MASK[4], iBuffer, oIn, oIn3, oIn3F, tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x1, y, width, CONVOLVE3_MASK[5], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+
+ calculateConvolveElement(x0, y1, width, CONVOLVE3_MASK[6], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x, y1, width, CONVOLVE3_MASK[7], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x1, y1, width, CONVOLVE3_MASK[8], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+
+ Float3.clamp(sum, 0.0f, 255.0f, sum);
+ sum.convertByte3(pOut);
+ pOut4.set(pOut, pIn.w);
+ Byte4Array.setBuffer(oBuffer, y * width + x, pOut4);
+ }
+ }
+ }
+
+ private static void runConvolve3Bff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = java.lang.Math.max(x - 1, 0);
+ int x1 = java.lang.Math.min(x + 1, width - 1);
+ int y0 = java.lang.Math.max(y - 1, 0);
+ int y1 = java.lang.Math.min(y + 1, height - 1);
+
+ int pixel = input.getRGB(x, y);
+ Color color = new Color(pixel, true);
+ int pixelA = color.getAlpha();
+ int pixelR = color.getRed();
+ int pixelG = color.getGreen();
+ int pixelB = color.getBlue();
+
+ float sumR = 0.0f;
+ float sumG = 0.0f;
+ float sumB = 0.0f;
+
+ int otherPixel = input.getRGB(x0, y0);
+ Color otherColor = new Color(otherPixel, true);
+ sumR += otherColor.getRed() * CONVOLVE3_MASK[0];
+ sumG += otherColor.getGreen() * CONVOLVE3_MASK[0];
+ sumB += otherColor.getBlue() * CONVOLVE3_MASK[0];
+ otherPixel = input.getRGB(x, y0);
+ otherColor = new Color(otherPixel, true);
+ sumR += otherColor.getRed() * CONVOLVE3_MASK[1];
+ sumG += otherColor.getGreen() * CONVOLVE3_MASK[1];
+ sumB += otherColor.getBlue() * CONVOLVE3_MASK[1];
+ otherPixel = input.getRGB(x1, y0);
+ otherColor = new Color(otherPixel, true);
+ sumR += otherColor.getRed() * CONVOLVE3_MASK[2];
+ sumG += otherColor.getGreen() * CONVOLVE3_MASK[2];
+ sumB += otherColor.getBlue() * CONVOLVE3_MASK[2];
+
+ otherPixel = input.getRGB(x0, y);
+ otherColor = new Color(otherPixel, true);
+ sumR += otherColor.getRed() * CONVOLVE3_MASK[3];
+ sumG += otherColor.getGreen() * CONVOLVE3_MASK[3];
+ sumB += otherColor.getBlue() * CONVOLVE3_MASK[3];
+ sumR += pixelR * CONVOLVE3_MASK[4];
+ sumG += pixelG * CONVOLVE3_MASK[4];
+ sumB += pixelB * CONVOLVE3_MASK[4];
+ otherPixel = input.getRGB(x1, y);
+ otherColor = new Color(otherPixel, true);
+ sumR += otherColor.getRed() * CONVOLVE3_MASK[5];
+ sumG += otherColor.getGreen() * CONVOLVE3_MASK[5];
+ sumB += otherColor.getBlue() * CONVOLVE3_MASK[5];
+
+ otherPixel = input.getRGB(x0, y1);
+ otherColor = new Color(otherPixel, true);
+ sumR += otherColor.getRed() * CONVOLVE3_MASK[6];
+ sumG += otherColor.getGreen() * CONVOLVE3_MASK[6];
+ sumB += otherColor.getBlue() * CONVOLVE3_MASK[6];
+ otherPixel = input.getRGB(x, y1);
+ otherColor = new Color(otherPixel, true);
+ sumR += otherColor.getRed() * CONVOLVE3_MASK[7];
+ sumG += otherColor.getGreen() * CONVOLVE3_MASK[7];
+ sumB += otherColor.getBlue() * CONVOLVE3_MASK[7];
+ otherPixel = input.getRGB(x1, y1);
+ otherColor = new Color(otherPixel, true);
+ sumR += otherColor.getRed() * CONVOLVE3_MASK[8];
+ sumG += otherColor.getGreen() * CONVOLVE3_MASK[8];
+ sumB += otherColor.getBlue() * CONVOLVE3_MASK[8];
+
+ if (sumR < 0.0f) sumR = 0.0f;
+ else if (sumR > 255.0f) sumR = 255.0f;
+ if (sumG < 0.0f) sumG = 0.0f;
+ else if (sumG > 255.0f) sumG = 255.0f;
+ if (sumB < 0.0f) sumB = 0.0f;
+ else if (sumB > 255.0f) sumB = 255.0f;
+
+ output.setRGB(x, y,
+ (new Color((int) sumR, (int) sumG, (int) sumB, (int) pixelA )).getRGB());
+ }
+ }
+
+ }
+
+
+ // Convolve 5x5
+
+ private static final float[] CONVOLVE5_MASK =
+ {0, 0, -1, 0, 0, 0, -1, -2, -1, 0, -1, -2, 16, -2, -1, 0, -1, -2, -1, 0, 0, 0, -1, 0, 0};
+
+ private static void runConvolve5Ref(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = Math.max(x - 2, 0);
+ int x1 = Math.max(x - 1, 0);
+ int x2 = Math.min(x + 1, width - 1);
+ int x3 = Math.min(x + 2, width - 1);
+
+ int y0 = Math.max(y - 2, 0);
+ int y1 = Math.max(y - 1, 0);
+ int y2 = Math.min(y + 1, height - 1);
+ int y3 = Math.min(y + 2, height - 1);
+
+ Byte4 pixel = input.get(x, y);
+ Float3 sum = new Float3(0.0f);
+
+ Float3.add(sum, Float3.mul(input.get(x0, y0).asByte3().convertFloat3(), CONVOLVE5_MASK[0]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x1, y0).asByte3().convertFloat3(), CONVOLVE5_MASK[1]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x, y0).asByte3().convertFloat3(), CONVOLVE5_MASK[2]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x2, y0).asByte3().convertFloat3(), CONVOLVE5_MASK[3]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x3, y0).asByte3().convertFloat3(), CONVOLVE5_MASK[4]),
+ sum);
+
+ Float3.add(sum, Float3.mul(input.get(x0, y1).asByte3().convertFloat3(), CONVOLVE5_MASK[5]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x1, y1).asByte3().convertFloat3(), CONVOLVE5_MASK[6]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x, y1).asByte3().convertFloat3(), CONVOLVE5_MASK[7]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x2, y1).asByte3().convertFloat3(), CONVOLVE5_MASK[8]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x3, y1).asByte3().convertFloat3(), CONVOLVE5_MASK[9]),
+ sum);
+
+ Float3.add(sum, Float3.mul(input.get(x0, y).asByte3().convertFloat3(), CONVOLVE5_MASK[10]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x1, y).asByte3().convertFloat3(), CONVOLVE5_MASK[11]),
+ sum);
+ Float3.add(sum, Float3.mul(pixel.asByte3().convertFloat3(), CONVOLVE5_MASK[12]), sum);
+ Float3.add(sum, Float3.mul(input.get(x2, y).asByte3().convertFloat3(), CONVOLVE5_MASK[13]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x3, y).asByte3().convertFloat3(), CONVOLVE5_MASK[14]),
+ sum);
+
+ Float3.add(sum, Float3.mul(input.get(x0, y2).asByte3().convertFloat3(), CONVOLVE5_MASK[15]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x1, y2).asByte3().convertFloat3(), CONVOLVE5_MASK[16]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x, y2).asByte3().convertFloat3(), CONVOLVE5_MASK[17]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x2, y2).asByte3().convertFloat3(), CONVOLVE5_MASK[18]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x3, y2).asByte3().convertFloat3(), CONVOLVE5_MASK[19]),
+ sum);
+
+ Float3.add(sum, Float3.mul(input.get(x0, y3).asByte3().convertFloat3(), CONVOLVE5_MASK[20]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x1, y3).asByte3().convertFloat3(), CONVOLVE5_MASK[21]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x, y3).asByte3().convertFloat3(), CONVOLVE5_MASK[22]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x2, y3).asByte3().convertFloat3(), CONVOLVE5_MASK[23]),
+ sum);
+ Float3.add(sum, Float3.mul(input.get(x3, y3).asByte3().convertFloat3(), CONVOLVE5_MASK[24]),
+ sum);
+
+ output.set(x, y, new Byte4(Float3.clamp(sum, 0.0f, 255.0f).convertByte3(), pixel.w));
+ }
+ }
+ }
+
+ private static void runConvolve5Perf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Byte4 pIn = new Byte4();
+ Byte4 oIn = new Byte4();
+ Byte3 oIn3 = new Byte3();
+ Float3 oIn3F = new Float3();
+
+ Float3 tmpMul = new Float3();
+ Float3 sum = new Float3();
+
+ Byte3 pOut = new Byte3();
+ Byte4 pOut4 = new Byte4();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = Math.max(x - 2, 0);
+ int x1 = Math.max(x - 1, 0);
+ int x2 = Math.min(x + 1, width - 1);
+ int x3 = Math.min(x + 2, width - 1);
+
+ int y0 = Math.max(y - 2, 0);
+ int y1 = Math.max(y - 1, 0);
+ int y2 = Math.min(y + 1, height - 1);
+ int y3 = Math.min(y + 2, height - 1);
+
+ Byte4Array.getBuffer(iBuffer, y * width + x, pIn);
+ sum.set(0.0f);
+
+ calculateConvolveElement(x0, y0, width, CONVOLVE5_MASK[0], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x1, y0, width, CONVOLVE5_MASK[1], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x, y0, width, CONVOLVE5_MASK[2], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x2, y0, width, CONVOLVE5_MASK[3], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x3, y0, width, CONVOLVE5_MASK[4], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+
+ calculateConvolveElement(x0, y1, width, CONVOLVE5_MASK[5], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x1, y1, width, CONVOLVE5_MASK[6], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x, y1, width, CONVOLVE5_MASK[7], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x2, y1, width, CONVOLVE5_MASK[8], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x3, y1, width, CONVOLVE5_MASK[9], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+
+ calculateConvolveElement(x0, y, width, CONVOLVE5_MASK[10], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x1, y, width, CONVOLVE5_MASK[11], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x, y, width, CONVOLVE5_MASK[12], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x2, y, width, CONVOLVE5_MASK[13], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x3, y, width, CONVOLVE5_MASK[14], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+
+ calculateConvolveElement(x0, y2, width, CONVOLVE5_MASK[15], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x1, y2, width, CONVOLVE5_MASK[16], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x, y2, width, CONVOLVE5_MASK[17], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x2, y2, width, CONVOLVE5_MASK[18], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x3, y2, width, CONVOLVE5_MASK[19], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+
+ calculateConvolveElement(x0, y3, width, CONVOLVE5_MASK[20], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x1, y3, width, CONVOLVE5_MASK[21], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x, y3, width, CONVOLVE5_MASK[22], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x2, y3, width, CONVOLVE5_MASK[23], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+ calculateConvolveElement(x3, y3, width, CONVOLVE5_MASK[24], iBuffer, oIn, oIn3, oIn3F,
+ tmpMul);
+ Float3.add(sum, tmpMul, sum);
+
+ Float3.clamp(sum, 0.0f, 255.0f, sum);
+ sum.convertByte3(pOut);
+ pOut4.set(pOut, pIn.w);
+ Byte4Array.setBuffer(oBuffer, y * width + x, pOut4);
+ }
+ }
+ }
+
+ private static void runConvolve5Bff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = java.lang.Math.max(x - 2, 0);
+ int x1 = java.lang.Math.max(x - 1, 0);
+ int x2 = java.lang.Math.min(x + 1, width - 1);
+ int x3 = java.lang.Math.min(x + 2, width - 1);
+
+ int y0 = java.lang.Math.max(y - 2, 0);
+ int y1 = java.lang.Math.max(y - 1, 0);
+ int y2 = java.lang.Math.min(y + 1, height - 1);
+ int y3 = java.lang.Math.min(y + 2, height - 1);
+
+ int pixel = input.getRGB(x, y);
+ Color color = new Color(pixel);
+ int pixelA = color.getAlpha();
+ int pixelR = color.getRed();
+ int pixelG = color.getGreen();
+ int pixelB = color.getBlue();
+
+ float sumR = 0.0f;
+ float sumG = 0.0f;
+ float sumB = 0.0f;
+
+ int otherPixel = input.getRGB(x0, y0);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[0];
+ sumG += color.getGreen() * CONVOLVE5_MASK[0];
+ sumB += color.getBlue() * CONVOLVE5_MASK[0];
+ otherPixel = input.getRGB(x1, y0);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[1];
+ sumG += color.getGreen() * CONVOLVE5_MASK[1];
+ sumB += color.getBlue() * CONVOLVE5_MASK[1];
+ otherPixel = input.getRGB(x, y0);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[2];
+ sumG += color.getGreen() * CONVOLVE5_MASK[2];
+ sumB += color.getBlue() * CONVOLVE5_MASK[2];
+ otherPixel = input.getRGB(x2, y0);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[3];
+ sumG += color.getGreen() * CONVOLVE5_MASK[3];
+ sumB += color.getBlue() * CONVOLVE5_MASK[3];
+ otherPixel = input.getRGB(x3, y0);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[4];
+ sumG += color.getGreen() * CONVOLVE5_MASK[4];
+ sumB += color.getBlue() * CONVOLVE5_MASK[4];
+
+ otherPixel = input.getRGB(x0, y1);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[5];
+ sumG += color.getGreen() * CONVOLVE5_MASK[5];
+ sumB += color.getBlue() * CONVOLVE5_MASK[5];
+ otherPixel = input.getRGB(x1, y1);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[6];
+ sumG += color.getGreen() * CONVOLVE5_MASK[6];
+ sumB += color.getBlue() * CONVOLVE5_MASK[6];
+ otherPixel = input.getRGB(x, y1);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[7];
+ sumG += color.getGreen() * CONVOLVE5_MASK[7];
+ sumB += color.getBlue() * CONVOLVE5_MASK[7];
+ otherPixel = input.getRGB(x2, y1);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[8];
+ sumG += color.getGreen() * CONVOLVE5_MASK[8];
+ sumB += color.getBlue() * CONVOLVE5_MASK[8];
+ otherPixel = input.getRGB(x3, y1);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[9];
+ sumG += color.getGreen() * CONVOLVE5_MASK[9];
+ sumB += color.getBlue() * CONVOLVE5_MASK[9];
+
+ otherPixel = input.getRGB(x0, y);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[10];
+ sumG += color.getGreen() * CONVOLVE5_MASK[10];
+ sumB += color.getBlue() * CONVOLVE5_MASK[10];
+ otherPixel = input.getRGB(x1, y);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[11];
+ sumG += color.getGreen() * CONVOLVE5_MASK[11];
+ sumB += color.getBlue() * CONVOLVE5_MASK[11];
+ sumR += pixelR * CONVOLVE5_MASK[12];
+ sumG += pixelG * CONVOLVE5_MASK[12];
+ sumB += pixelB * CONVOLVE5_MASK[12];
+ otherPixel = input.getRGB(x2, y);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[13];
+ sumG += color.getGreen() * CONVOLVE5_MASK[13];
+ sumB += color.getBlue() * CONVOLVE5_MASK[13];
+ otherPixel = input.getRGB(x3, y);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[14];
+ sumG += color.getGreen() * CONVOLVE5_MASK[14];
+ sumB += color.getBlue() * CONVOLVE5_MASK[14];
+
+ otherPixel = input.getRGB(x0, y2);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[15];
+ sumG += color.getGreen() * CONVOLVE5_MASK[15];
+ sumB += color.getBlue() * CONVOLVE5_MASK[15];
+ otherPixel = input.getRGB(x1, y2);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[16];
+ sumG += color.getGreen() * CONVOLVE5_MASK[16];
+ sumB += color.getBlue() * CONVOLVE5_MASK[16];
+ otherPixel = input.getRGB(x, y2);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[17];
+ sumG += color.getGreen() * CONVOLVE5_MASK[17];
+ sumB += color.getBlue() * CONVOLVE5_MASK[17];
+ otherPixel = input.getRGB(x2, y2);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[18];
+ sumG += color.getGreen() * CONVOLVE5_MASK[18];
+ sumB += color.getBlue() * CONVOLVE5_MASK[18];
+ otherPixel = input.getRGB(x3, y2);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[19];
+ sumG += color.getGreen() * CONVOLVE5_MASK[19];
+ sumB += color.getBlue() * CONVOLVE5_MASK[19];
+
+ otherPixel = input.getRGB(x0, y3);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[20];
+ sumG += color.getGreen() * CONVOLVE5_MASK[20];
+ sumB += color.getBlue() * CONVOLVE5_MASK[20];
+ otherPixel = input.getRGB(x1, y3);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[21];
+ sumG += color.getGreen() * CONVOLVE5_MASK[21];
+ sumB += color.getBlue() * CONVOLVE5_MASK[21];
+ otherPixel = input.getRGB(x, y3);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[22];
+ sumG += color.getGreen() * CONVOLVE5_MASK[22];
+ sumB += color.getBlue() * CONVOLVE5_MASK[22];
+ otherPixel = input.getRGB(x2, y3);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[23];
+ sumG += color.getGreen() * CONVOLVE5_MASK[23];
+ sumB += color.getBlue() * CONVOLVE5_MASK[23];
+ otherPixel = input.getRGB(x3, y3);
+ color = new Color(otherPixel);
+ sumR += color.getRed() * CONVOLVE5_MASK[24];
+ sumG += color.getGreen() * CONVOLVE5_MASK[24];
+ sumB += color.getBlue() * CONVOLVE5_MASK[24];
+
+ if (sumR < 0.0f)
+ sumR = 0.0f;
+ else if (sumR > 255.0f)
+ sumR = 255.0f;
+ if (sumG < 0.0f)
+ sumG = 0.0f;
+ else if (sumG > 255.0f)
+ sumG = 255.0f;
+ if (sumB < 0.0f)
+ sumB = 0.0f;
+ else if (sumB > 255.0f)
+ sumB = 255.0f;
+
+ output.setRGB(x, y,
+ (new Color((int) sumR, (int) sumG, (int) sumB, (int) pixelA )).getRGB());
+ }
+ }
+ }
+
+
+ // Bilateral
+
+ private static final int BILATERAL_RADIUS = 10;
+ private static final float BILATERAL_PRESERVATION = 0.5f;
+
+ private static void runBilateralRef(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4 centerPixel = input.get(x, y);
+ Float3 center = Float3.div(centerPixel.asByte3().convertFloat3(), 0xff);
+
+ Float3 sum = new Float3(0.0f);
+ float totalWeight = 0.0f;
+
+ for (int rx = -BILATERAL_RADIUS; rx <= BILATERAL_RADIUS; ++rx) {
+ for (int ry = -BILATERAL_RADIUS; ry <= BILATERAL_RADIUS; ++ry) {
+ int x2 = Math.clamp(x + rx, 0, width - 1);
+ int y2 = Math.clamp(y + ry, 0, height - 1);
+
+ Float3 pixel = Float3.div(input.get(x2, y2).asByte3().convertFloat3(), 0xff);
+ Float3 diff = Float3.sub(center, pixel);
+ Float3.mul(diff, diff, diff);
+
+ float diffMap = Math.exp(-(diff.x + diff.y + diff.z) * BILATERAL_PRESERVATION * 100.0f);
+ float gaussianWeight =
+ Math.exp(-0.5f * ((rx * rx) + (ry * ry)) / (float) BILATERAL_RADIUS);
+
+ float weight = diffMap * gaussianWeight;
+ Float3.add(sum, Float3.mul(pixel, weight), sum);
+ totalWeight += weight;
+ }
+ }
+
+ output.set(x, y, new Byte4(Float3.mul(Float3.div(sum, totalWeight), 0xff).convertByte3(),
+ centerPixel.w));
+ }
+ }
+ }
+
+ private static void runBilateralPerf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Byte4 centerPixel = new Byte4();
+ Byte3 centerPixel3 = new Byte3();
+ Float3 centerPixel3F = new Float3();
+ Float3 center = new Float3();
+
+ Float3 sum = new Float3();
+
+ Byte4 pixel = new Byte4();
+ Byte3 pixel3 = new Byte3();
+ Float3 pixel3F = new Float3();
+
+ Float3 diff = new Float3();
+ Float3 tmp = new Float3();
+ Byte3 out = new Byte3();
+ Byte4 out4 = new Byte4();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4Array.getBuffer(iBuffer, y * width + x, centerPixel);
+ centerPixel.asByte3(centerPixel3);
+ centerPixel3.convertFloat3(centerPixel3F);
+ Float3.div(centerPixel3F, 0xff, center);
+
+ sum.set(0.0f);
+ float totalWeight = 0.0f;
+
+ for (int rx = -BILATERAL_RADIUS; rx <= BILATERAL_RADIUS; ++rx) {
+ for (int ry = -BILATERAL_RADIUS; ry <= BILATERAL_RADIUS; ++ry) {
+ int x2 = Math.clamp(x + rx, 0, width - 1);
+ int y2 = Math.clamp(y + ry, 0, height - 1);
+
+ Byte4Array.getBuffer(iBuffer, y2 * width + x2, pixel);
+ pixel.asByte3(pixel3);
+ pixel3.convertFloat3(pixel3F);
+ Float3.div(pixel3F, 0xff, pixel3F);
+
+ Float3.sub(center, pixel3F, diff);
+ Float3.mul(diff, diff, diff);
+
+ float diffMap = Math.exp(-(diff.x + diff.y + diff.z) * BILATERAL_PRESERVATION * 100.0f);
+ float gaussianWeight =
+ Math.exp(-0.5f * ((rx * rx) + (ry * ry)) / (float) BILATERAL_RADIUS);
+
+ float weight = diffMap * gaussianWeight;
+ Float3.mul(pixel3F, weight, pixel3F);
+ Float3.add(sum, pixel3F, sum);
+ totalWeight += weight;
+ }
+ }
+
+ Float3.div(sum, totalWeight, tmp);
+ Float3.mul(tmp, 0xff, tmp);
+ tmp.convertByte3(out);
+ out4.set(out, centerPixel.w);
+
+ Byte4Array.setBuffer(oBuffer, y * width + x, out4);
+ }
+ }
+ }
+
+ private static void runBilateralBff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int centerPixel = input.getRGB(x, y);
+ Color color = new Color(centerPixel, true);
+ float centerR = (float) color.getRed()/ 0xff;
+ float centerG = (float) color.getGreen() / 0xff;
+ float centerB = (float) color.getBlue() / 0xff;
+ float outAlpha = color.getAlpha();
+
+ float sumR = 0.0f, sumG = 0.0f, sumB = 0.0f;
+ float totalWeight = 0.0f;
+
+ for (int rx = -BILATERAL_RADIUS; rx <= BILATERAL_RADIUS; ++rx) {
+ for (int ry = -BILATERAL_RADIUS; ry <= BILATERAL_RADIUS; ++ry) {
+ int x2 = x + rx;
+ int y2 = y + ry;
+
+ if (x2 < 0) x2 = 0;
+ else if (x2 >= width) x2 = width - 1;
+ if (y2 < 0) y2 = 0;
+ else if (y2 >= height) y2 = height - 1;
+
+ int otherPixel = input.getRGB(x2, y2);
+ color = new Color(otherPixel);
+ float pixelR = (float) color.getRed() / 0xff;
+ float pixelG = (float) color.getGreen() / 0xff;
+ float pixelB = (float) color.getBlue() / 0xff;
+
+ float diffR = centerR - pixelR;
+ float diffG = centerG - pixelG;
+ float diffB = centerB - pixelB;
+
+ diffR *= diffR;
+ diffG *= diffG;
+ diffB *= diffB;
+
+ float diffMap = (float) java.lang.Math
+ .exp(-(diffR + diffG + diffB) * BILATERAL_PRESERVATION * 100.0f);
+ float gaussianWeight = (float) java.lang.Math
+ .exp(-0.5f * ((rx * rx) + (ry * ry)) / (float) BILATERAL_RADIUS);
+
+ float weight = diffMap * gaussianWeight;
+ sumR += pixelR * weight;
+ sumG += pixelG * weight;
+ sumB += pixelB * weight;
+ totalWeight += weight;
+ }
+ }
+
+ int outR = (int) ((sumR / totalWeight) * 0xff);
+ int outG = (int) ((sumG / totalWeight) * 0xff);
+ int outB = (int) ((sumB / totalWeight) * 0xff);
+
+ output.setRGB(x, y, (new Color(outR, outG, outB, (int) outAlpha)).getRGB());
+ }
+ }
+ }
+
+
+ // Median
+
+ private static final int MEDIAN_RADIUS = 7;
+
+ private static void runMedianRef(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ Int3[] val = new Int3[256];
+ for (int i = 0; i < val.length; ++i) { val[i] = new Int3(); }
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ for (int i = 0; i < val.length; i++) { val[i].set(0); }
+
+ for (int rx = -MEDIAN_RADIUS; rx <= MEDIAN_RADIUS; rx++) {
+ for (int ry = -MEDIAN_RADIUS; ry <= MEDIAN_RADIUS; ry++) {
+ int x2 = Math.clamp(x + rx, 0, width - 1);
+ int y2 = Math.clamp(y + ry, 0, height - 1);
+
+ byte pixel = input.get(x2, y2).x;
+ Int3.add(val[pixel & 0xff], new Int3(1), val[pixel & 0xff]);
+ }
+ }
+
+ int median = ((MEDIAN_RADIUS * 2 + 1) * (MEDIAN_RADIUS * 2 + 1)) / 2;
+ Int3 rgb = new Int3(0);
+ Byte4 out_pixel = new Byte4((byte) (0xff));
+
+ for (byte i = 0;
+ Int3.any(Byte3.isEqual(out_pixel.asByte3(), new Byte3((byte) (0xff)))) != 0;
+ i = (byte) ((i & 0xff) + 1)) {
+ if ((out_pixel.x & 0xff) == 0xff) {
+ rgb.x += val[i & 0xff].x;
+
+ if (rgb.x >= median)
+ out_pixel.x = i;
+ }
+
+ if ((out_pixel.y & 0xff) == 0xff) {
+ rgb.y += val[i & 0xff].y;
+
+ if (rgb.y >= median)
+ out_pixel.y = i;
+ }
+
+ if ((out_pixel.z & 0xff) == 0xff) {
+ rgb.z += val[i & 0xff].z;
+
+ if (rgb.z >= median)
+ out_pixel.z = i;
+ }
+ }
+
+ output.set(x, y, out_pixel);
+ }
+ }
+ }
+
+ private static void runMedianPerf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Byte4 pixelIn = new Byte4();
+ Int3 rgb = new Int3();
+ Byte4 pixelOut = new Byte4();
+
+ Int3 ones = new Int3(1);
+ Byte3 maxBytes = new Byte3((byte) (0xff));
+
+ Int3 tmpComp = new Int3();
+ Byte3 pixelOut3 = new Byte3();
+
+ Int3[] val = new Int3[256];
+ for (int i = 0; i < val.length; ++i) { val[i] = new Int3(); }
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ for (int i = 0; i < val.length; i++) { val[i].set(0); }
+
+ for (int rx = -MEDIAN_RADIUS; rx <= MEDIAN_RADIUS; rx++) {
+ for (int ry = -MEDIAN_RADIUS; ry <= MEDIAN_RADIUS; ry++) {
+ int x2 = Math.clamp(x + rx, 0, width - 1);
+ int y2 = Math.clamp(y + ry, 0, height - 1);
+
+ Byte4Array.getBuffer(iBuffer, y2 * width + x2, pixelIn);
+ Int3.add(val[pixelIn.x & 0xff], ones, val[pixelIn.x & 0xff]);
+ }
+ }
+
+ int median = ((MEDIAN_RADIUS * 2 + 1) * (MEDIAN_RADIUS * 2 + 1)) / 2;
+ rgb.set(0);
+ pixelOut.set((byte) 0xff);
+
+ pixelOut.asByte3(pixelOut3);
+ Byte3.isEqual(pixelOut3, maxBytes, tmpComp);
+ for (byte i = 0; Int3.any(tmpComp) != 0; i = (byte) ((i & 0xff) + 1)) {
+ if ((pixelOut.x & 0xff) == 0xff) {
+ rgb.x += val[i & 0xff].x;
+
+ if (rgb.x >= median)
+ pixelOut.x = i;
+ }
+
+ if ((pixelOut.y & 0xff) == 0xff) {
+ rgb.y += val[i & 0xff].y;
+
+ if (rgb.y >= median)
+ pixelOut.y = i;
+ }
+
+ if ((pixelOut.z & 0xff) == 0xff) {
+ rgb.z += val[i & 0xff].z;
+
+ if (rgb.z >= median)
+ pixelOut.z = i;
+ }
+
+ pixelOut.asByte3(pixelOut3);
+ Byte3.isEqual(pixelOut3, maxBytes, tmpComp);
+ }
+
+ Byte4Array.setBuffer(oBuffer, y * width + x, pixelOut);
+
+ if (x == 0 && y == 0) {
+ System.out.println("Performance");
+ Byte4 in = input.get(0, 0);
+ System.out.println("R: " + in.x + " | G: " + in.y + " | B: " + in.z + " | A: " + in.w);
+ Byte4 out = output.get(0, 0);
+ System.out.println("R: " + out.x + " | G: " + out.y + " | B: " + out.z + " | A: " + out.w);
+// System.out.println("R: " + pixelOut.x + " | G: " + pixelOut.y + " | B: " + pixelOut.z + " | A: " + pixelOut.w);
+ }
+ }
+ }
+ }
+
+ private static void runMedianBff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ int[] val = new int[256 * 3];
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Arrays.fill(val, 0);
+
+ for (int rx = -MEDIAN_RADIUS; rx <= MEDIAN_RADIUS; rx++) {
+ for (int ry = -MEDIAN_RADIUS; ry <= MEDIAN_RADIUS; ry++) {
+ int x2 = x + rx;
+ int y2 = y + ry;
+
+ if (x2 < 0)
+ x2 = 0;
+ else if (x2 >= width)
+ x2 = width - 1;
+ if (y2 < 0)
+ y2 = 0;
+ else if (y2 >= height)
+ y2 = height - 1;
+
+ int colorIndex = (new Color(input.getRGB(x2, y2))).getRed();
+ ++val[colorIndex * 3];
+ ++val[colorIndex * 3 + 1];
+ ++val[colorIndex * 3 + 2];
+ }
+ }
+
+ int median = ((MEDIAN_RADIUS * 2 + 1) * (MEDIAN_RADIUS * 2 + 1)) / 2;
+ int r = 0, g = 0, b = 0;
+ int outPixelR = 0xff;
+ int outPixelG = 0xff;
+ int outPixelB = 0xff;
+
+ for (byte i = 0; outPixelR == 0xff || outPixelG == 0xff || outPixelB == 0xff;
+ i = (byte) ((i & 0xff) + 1)) {
+ int intI = i & 0xff;
+ if (outPixelR == 0xff) {
+ r += val[intI * 3];
+
+ if (r >= median)
+ outPixelR = intI;
+ }
+
+ if (outPixelG == 0xff) {
+ g += val[intI * 3 + 1];
+
+ if (g >= median)
+ outPixelG = intI;
+ }
+
+ if (outPixelB == 0xff) {
+ b += val[intI * 3 + 2];
+
+ if (b >= median)
+ outPixelB = intI;
+ }
+ }
+
+ output.setRGB(x, y, (new Color(outPixelR, outPixelG, outPixelB, 0xff)).getRGB());
+ }
+ }
+ }
+
+
+ // Contrast
+
+ private static final float CONTRAST_ENHANCEMENT = 0.5f;
+
+ private static void runContrastRef(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4 pixelIn = input.get(x, y);
+ float brightM = Math.exp2(CONTRAST_ENHANCEMENT);
+
+ Float3 pixelOut = Float3.add(Float3.mul(pixelIn.asByte3().convertFloat3(), brightM),
+ new Float3(127.0f * (1 - brightM)));
+ Float3.clamp(pixelOut, 0.0f, 255.0f, pixelOut);
+ output.set(x, y, new Byte4(pixelOut.convertByte3(), pixelIn.w));
+ }
+ }
+ }
+
+ private static void runContrastPerf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Byte4 pixelIn = new Byte4();
+ Byte3 pixelIn3 = new Byte3();
+ Float3 pixelIn3F = new Float3();
+
+ Float3 tmp = new Float3();
+ Float3 tmp2 = new Float3();
+ Byte3 pixelOut = new Byte3();
+ Byte4 pixelOut4 = new Byte4();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4Array.getBuffer(iBuffer, y * width + x, pixelIn);
+ pixelIn.asByte3(pixelIn3);
+ pixelIn3.convertFloat3(pixelIn3F);
+ float brightM = Math.exp2(CONTRAST_ENHANCEMENT);
+
+ Float3.mul(pixelIn3F, brightM, tmp);
+ tmp2.set(127.0f * (1 - brightM));
+ Float3.add(tmp, tmp2, tmp);
+ Float3.clamp(tmp, 0.0f, 255.0f, tmp);
+
+ tmp.convertByte3(pixelOut);
+ pixelOut4.set(pixelOut, pixelIn.w);
+
+ Byte4Array.setBuffer(oBuffer, y * width + x, pixelOut4);
+ }
+ }
+ }
+
+ private static void runContrastBff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int pixelIn = input.getRGB(x, y);
+ Color color = new Color(pixelIn, true);
+ float brightM = (float) java.lang.Math.pow(2, CONTRAST_ENHANCEMENT);
+ float offset = 127.0f * (1 - brightM);
+
+ float pixelOutR = offset + color.getRed() * brightM;
+ float pixelOutG = offset + color.getGreen() * brightM;
+ float pixelOutB = offset + color.getBlue() * brightM;
+
+ if (pixelOutR < 0.0f)
+ pixelOutR = 0.0f;
+ else if (pixelOutR > 255.0f)
+ pixelOutR = 255.0f;
+ if (pixelOutG < 0.0f)
+ pixelOutG = 0.0f;
+ else if (pixelOutG > 255.0f)
+ pixelOutG = 255.0f;
+ if (pixelOutB < 0.0f)
+ pixelOutB = 0.0f;
+ else if (pixelOutB > 255.0f)
+ pixelOutB = 255.0f;
+
+ output.setRGB(x, y, (new Color( (int)pixelOutR, (int)pixelOutG, (int)pixelOutB, color.getAlpha())).getRGB());
+ }
+ }
+ }
+
+
+ // Fisheye
+
+ private static final Float2 FISHEYE_CENTER = new Float2(0.5f, 0.5f);
+ private static final float FISHEYE_SCALE = 0.75f;
+
+ private static Byte4 bilinearInterpRef(RGBAImage img, Int2 dims, Float2 coord) {
+ Float2 posCoord = Float2.max(coord, 0.0f);
+
+ int x0 = Math.min((int) Math.trunc(posCoord.x), dims.x - 1);
+ int x1 = Math.min(x0 + 1, dims.x - 1);
+ int y0 = Math.min((int) Math.trunc(posCoord.y), dims.y - 1);
+ int y1 = Math.min(y0 + 1, dims.y - 1);
+
+ Float4 p00 = img.get(x0, y0).convertFloat4();
+ Float4 p01 = img.get(x0, y1).convertFloat4();
+ Float4 p10 = img.get(x1, y0).convertFloat4();
+ Float4 p11 = img.get(x1, y1).convertFloat4();
+
+ float slopeX0 = (float) x1 - posCoord.x;
+ float slopeX1 = posCoord.x - (float) x0;
+
+ Float4 pXY0 = Float4.add(Float4.mul(p00, slopeX0), Float4.mul(p10, slopeX1));
+ Float4 pXY1 = Float4.add(Float4.mul(p01, slopeX0), Float4.mul(p11, slopeX1));
+
+ Float4 out = Float4
+ .add(Float4.mul(pXY0, ((float) y1 - coord.y)), Float4.mul(pXY1, (coord.y - (float) y0)));
+ Float4.clamp(out, 0.0f, 255.0f, out);
+ return out.convertByte4();
+ }
+
+ private static Byte4 bilinearInterpPerf(ByteBuffer iBuffer, int width, int height, float x,
+ float y, Byte4 tmpB4, Float4 p00, Float4 p01, Float4 p10,
+ Float4 p11, Float4 pXY0, Float4 pXY1, Float4 tmpF41,
+ Float4 tmpF42) {
+ float posCoordX = Math.max(x, 0.0f);
+ float posCoordY = Math.max(y, 0.0f);
+
+ int x0 = Math.min((int) Math.trunc(posCoordX), width - 1);
+ int x1 = Math.min(x0 + 1, width - 1);
+ int y0 = Math.min((int) Math.trunc(posCoordY), height - 1);
+ int y1 = Math.min(y0 + 1, height - 1);
+
+ Byte4Array.getBuffer(iBuffer, y0 * width + x0, tmpB4);
+ tmpB4.convertFloat4(p00);
+ Byte4Array.getBuffer(iBuffer, y1 * width + x0, tmpB4);
+ tmpB4.convertFloat4(p01);
+ Byte4Array.getBuffer(iBuffer, y0 * width + x1, tmpB4);
+ tmpB4.convertFloat4(p10);
+ Byte4Array.getBuffer(iBuffer, y1 * width + x1, tmpB4);
+ tmpB4.convertFloat4(p11);
+
+ float slopeX0 = (float) x1 - posCoordX;
+ float slopeX1 = posCoordX - (float) x0;
+
+ Float4.mul(p00, slopeX0, tmpF41);
+ Float4.mul(p10, slopeX1, tmpF42);
+ Float4.add(tmpF41, tmpF42, pXY0);
+ Float4.mul(p01, slopeX0, tmpF41);
+ Float4.mul(p11, slopeX1, tmpF42);
+ Float4.add(tmpF41, tmpF42, pXY1);
+
+ Float4.mul(pXY0, ((float) y1 - y), pXY0);
+ Float4.mul(pXY1, (y - (float) y0), pXY1);
+ Float4.add(pXY0, pXY1, tmpF41);
+
+ Float4.clamp(tmpF41, 0.0f, 255.0f, tmpF41);
+ tmpF41.convertByte4(tmpB4);
+ return tmpB4;
+ }
+
+ private static int bilinearInterpBff(BufferedImage img, int width, int height, float x, float y) {
+ float posCoordX = java.lang.Math.max(x, 0.0f);
+ float posCoordY = java.lang.Math.max(y, 0.0f);
+
+ int x0 = Math.min((int) Math.trunc(posCoordX), width - 1);
+ int x1 = Math.min(x0 + 1, width - 1);
+ int y0 = Math.min((int) Math.trunc(posCoordY), height - 1);
+ int y1 = Math.min(y0 + 1, height - 1);
+
+ int p00 = img.getRGB(x0, y0);
+ Color cp00 = new Color(p00, true);
+ int p01 = img.getRGB(x0, y1);
+ Color cp01 = new Color(p01, true);
+ int p10 = img.getRGB(x1, y0);
+ Color cp10 = new Color(p10, true);
+ int p11 = img.getRGB(x1, y1);
+ Color cp11 = new Color(p11, true);
+
+ float p00A = cp00.getAlpha();
+ float p00R = cp00.getRed();
+ float p00G = cp00.getGreen();
+ float p00B = cp00.getBlue();
+ float p01A = cp01.getAlpha();
+ float p01R = cp01.getRed();
+ float p01G = cp01.getGreen();
+ float p01B = cp01.getBlue();
+ float p10A = cp10.getAlpha();
+ float p10R = cp10.getRed();
+ float p10G = cp10.getGreen();
+ float p10B = cp10.getBlue();
+ float p11A = cp11.getAlpha();
+ float p11R = cp11.getRed();
+ float p11G = cp11.getGreen();
+ float p11B = cp11.getBlue();
+
+ float slopeX0 = (float) x1 - posCoordX;
+ float slopeX1 = posCoordX - (float) x0;
+ float slopeY0 = (float) y1 - y;
+ float slopeY1 = y - (float) y0;
+
+ float pXY0A = (p00A * slopeX0 + p10A * slopeX1) * slopeY0;
+ float pXY0R = (p00R * slopeX0 + p10R * slopeX1) * slopeY0;
+ float pXY0G = (p00G * slopeX0 + p10G * slopeX1) * slopeY0;
+ float pXY0B = (p00B * slopeX0 + p10B * slopeX1) * slopeY0;
+ float pXY1A = (p01A * slopeX0 + p11A * slopeX1) * slopeY1;
+ float pXY1R = (p01R * slopeX0 + p11R * slopeX1) * slopeY1;
+ float pXY1G = (p01G * slopeX0 + p11G * slopeX1) * slopeY1;
+ float pXY1B = (p01B * slopeX0 + p11B * slopeX1) * slopeY1;
+
+ float outA = pXY0A + pXY1A;
+ float outR = pXY0R + pXY1R;
+ float outG = pXY0G + pXY1G;
+ float outB = pXY0B + pXY1B;
+
+ if (outA < 0.0f)
+ outA = 0.0f;
+ else if (outA > 255.0f)
+ outA = 255.0f;
+ if (outR < 0.0f)
+ outR = 0.0f;
+ else if (outR > 255.0f)
+ outR = 255.0f;
+ if (outG < 0.0f)
+ outG = 0.0f;
+ else if (outG > 255.0f)
+ outG = 255.0f;
+ if (outB < 0.0f)
+ outB = 0.0f;
+ else if (outB > 255.0f)
+ outB = 255.0f;
+
+ return new Color((int) outR, (int) outG, (int) outB, (int) outA).getRGB();
+ }
+
+ private static void runFisheyeRef(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Float2 invDimensions = new Float2(1.0f / width, 1.0f / height);
+ float alpha = FISHEYE_SCALE * 2.0f + 0.75f;
+ Float2 axisScale = new Float2(1.0f);
+
+ if (width > height)
+ axisScale.y = height / (float) width;
+ else
+ axisScale.x = width / (float) height;
+
+ float bound2 = 0.25f * (axisScale.x * axisScale.x + axisScale.y * axisScale.y);
+ float bound = Math.sqrt(bound2);
+ float radius = 1.15f * bound;
+ float radius2 = radius * radius;
+ float factor =
+ bound / (Math.M_PI_2_F - Math.atan(alpha / bound * Math.sqrt(radius2 - bound2)));
+
+ Float2 coord = Float2.mad(new Float2(x, y), invDimensions, Float2.neg(FISHEYE_CENTER));
+ Float2 scaledCoord = Float2.mul(axisScale, coord);
+
+ float dist2 = scaledCoord.x * scaledCoord.x + scaledCoord.y * scaledCoord.y;
+ float invDist = Math.rsqrt(dist2);
+
+ float radian = Math.M_PI_2_F - Math.atan((alpha * Math.sqrt(radius2 - dist2)) * invDist);
+ float scalar = radian * factor * invDist;
+ Float2 newCoord = Float2
+ .mul(new Float2(width, height), Float2.mad(coord, new Float2(scalar), FISHEYE_CENTER));
+
+ output.set(x, y, bilinearInterpRef(input, new Int2(width, height), newCoord));
+ }
+ }
+ }
+
+ private static void runFisheyePerf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Float2 invDimensions = new Float2();
+ Float2 axisScale = new Float2();
+ Float2 id = new Float2();
+ Float2 negCenter = new Float2();
+ Float2 coord = new Float2();
+ Float2 scaledCoord = new Float2();
+ Int2 dims = new Int2();
+ Float2 dimsF = new Float2();
+ Float2 scalar2 = new Float2();
+ Float2 newCoord = new Float2();
+
+ Byte4 pixelOut = new Byte4();
+ Float4 tmp0 = new Float4();
+ Float4 tmp1 = new Float4();
+ Float4 tmp2 = new Float4();
+ Float4 tmp3 = new Float4();
+ Float4 tmp4 = new Float4();
+ Float4 tmp5 = new Float4();
+ Float4 tmp6 = new Float4();
+ Float4 tmp7 = new Float4();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ invDimensions.set(1.0f / width, 1.0f / height);
+ float alpha = FISHEYE_SCALE * 2.0f + 0.75f;
+ axisScale.set(1.0f);
+
+ if (width > height)
+ axisScale.y = height / (float) width;
+ else
+ axisScale.x = width / (float) height;
+
+ float bound2 = 0.25f * (axisScale.x * axisScale.x + axisScale.y * axisScale.y);
+ float bound = Math.sqrt(bound2);
+ float radius = 1.15f * bound;
+ float radius2 = radius * radius;
+ float factor =
+ bound / (Math.M_PI_2_F - Math.atan(alpha / bound * Math.sqrt(radius2 - bound2)));
+
+ id.x = x;
+ id.y = y;
+ Float2.neg(FISHEYE_CENTER, negCenter);
+ Float2.mad(id, invDimensions, negCenter, coord);
+ Float2.mul(axisScale, coord, scaledCoord);
+
+ float dist2 = scaledCoord.x * scaledCoord.x + scaledCoord.y * scaledCoord.y;
+ float invDist = Math.rsqrt(dist2);
+
+ float radian = Math.M_PI_2_F - Math.atan((alpha * Math.sqrt(radius2 - dist2)) * invDist);
+ float scalar = radian * factor * invDist;
+ dimsF.set(width, height);
+ scalar2.set(scalar);
+ Float2.mad(coord, scalar2, FISHEYE_CENTER, newCoord);
+ Float2.mul(dimsF, newCoord, newCoord);
+
+ dims.set(width, height);
+ pixelOut =
+ bilinearInterpPerf(iBuffer, width, height, newCoord.x, newCoord.y, pixelOut, tmp0, tmp1,
+ tmp2, tmp3, tmp4, tmp5, tmp6, tmp7);
+ Byte4Array.setBuffer(oBuffer, y * width + x, pixelOut);
+ }
+ }
+ }
+
+ private static void runFisheyeBff(BufferedImage input, BufferedImage output) {
+ final float PI_2 = (float) (java.lang.Math.PI / 2.0);
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ float invDimensionsX = 1.0f / width;
+ float invDimensionsY = 1.0f / height;
+ float axisScaleX = 1.0f;
+ float axisScaleY = 1.0f;
+ float alpha = FISHEYE_SCALE * 2.0f + 0.75f;
+
+ if (width > height)
+ axisScaleY = height / (float) width;
+ else
+ axisScaleX = width / (float) height;
+
+ float bound2 = 0.25f * (axisScaleX * axisScaleX + axisScaleY * axisScaleY);
+ float bound = (float) java.lang.Math.sqrt(bound2);
+ float radius = 1.15f * bound;
+ float radius2 = radius * radius;
+ float factor = bound / (PI_2 - (float) java.lang.Math
+ .atan(alpha / bound * java.lang.Math.sqrt(radius2 - bound2)));
+
+ float coordX = x * invDimensionsX - FISHEYE_CENTER.x;
+ float coordY = y * invDimensionsY - FISHEYE_CENTER.y;
+ float scaledCoordX = axisScaleX * coordX;
+ float scaledCoordY = axisScaleY * coordY;
+
+ float dist2 = scaledCoordX * scaledCoordX + scaledCoordY * scaledCoordY;
+ float invDist = 1.0f / (float) java.lang.Math.sqrt(dist2);
+
+ float radian = PI_2 - (float) java.lang.Math
+ .atan((alpha * java.lang.Math.sqrt(radius2 - dist2)) * invDist);
+ float scalar = radian * factor * invDist;
+ float newCoordX = width * (coordX * scalar + FISHEYE_CENTER.x);
+ float newCoordY = height * (coordY * scalar + FISHEYE_CENTER.y);
+
+ output.setRGB(x, y, bilinearInterpBff(input, width, height, newCoordX, newCoordY));
+ }
+ }
+ }
+
+
+ // Levels
+
+ private static final Float2 LEVELS_BLACK = new Float2(0.0f, 40.0f);
+ private static final Float2 LEVELS_WHITE = new Float2(200.0f, 255.0f);
+ private static final float LEVELS_SATURATION = 1.5f;
+
+ private static void levelsBuildSatMatrixRef(Float3[] satMatrix, float saturation) {
+ Float3 weights = Float3.mul(GS_WEIGHTS, 1.0f - saturation);
+
+ satMatrix[0] = Float3.add(weights, new Float3(saturation, 0.0f, 0.0f));
+ satMatrix[1] = Float3.add(weights, new Float3(0.0f, saturation, 0.0f));
+ satMatrix[2] = Float3.add(weights, new Float3(0.0f, 0.0f, saturation));
+ }
+
+ private static void levelsBuildSatMatrixPerf(Float3[] satMatrix, float saturation, Float3 weights,
+ Float3 tmp) {
+ Float3.mul(GS_WEIGHTS, 1.0f - saturation, weights);
+
+ tmp.set(saturation, 0.0f, 0.0f);
+ Float3.add(weights, tmp, satMatrix[0]);
+ tmp.set(0.0f, saturation, 0.0f);
+ Float3.add(weights, tmp, satMatrix[1]);
+ tmp.set(0.0f, 0.0f, saturation);
+ Float3.add(weights, tmp, satMatrix[2]);
+ }
+
+ private static void levelsBuildSatMatrixBff(float[] satMatrix, float saturation) {
+ float weightsX = GS_WEIGHTS.x * (1.0f - saturation);
+ float weightsY = GS_WEIGHTS.y * (1.0f - saturation);
+ float weightsZ = GS_WEIGHTS.z * (1.0f - saturation);
+
+ satMatrix[0] = weightsX + saturation;
+ satMatrix[1] = weightsY;
+ satMatrix[2] = weightsZ;
+ satMatrix[3] = weightsX;
+ satMatrix[4] = weightsY + saturation;
+ satMatrix[5] = weightsZ;
+ satMatrix[6] = weightsX;
+ satMatrix[7] = weightsY;
+ satMatrix[8] = weightsZ + saturation;
+ }
+
+ private static Float3 matrix3x3VectorMultiplyRef(Float3[] m, Float3 v) {
+ return new Float3(Float3.dot(m[0], v), Float3.dot(m[1], v), Float3.dot(m[2], v));
+ }
+
+ private static void matrix3x3VectorMultiplyPerf(Float3[] m, Float3 v, Float3 result) {
+ result.set(Float3.dot(m[0], v), Float3.dot(m[1], v), Float3.dot(m[2], v));
+ }
+
+ private static void matrix3x3VectorMultiplyBff(float[] m, float vx, float vy, float vz,
+ float[] result) {
+ result[0] = m[0] * vx + m[1] * vy + m[2] * vz;
+ result[1] = m[3] * vx + m[4] * vy + m[5] * vz;
+ result[2] = m[6] * vx + m[7] * vy + m[8] * vz;
+ }
+
+ private static void runLevelsRef(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ Float3[] satMatrix = new Float3[3];
+ levelsBuildSatMatrixRef(satMatrix, LEVELS_SATURATION);
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Float4 pixel = input.get(x, y).convertFloat4();
+ Float3 mul = matrix3x3VectorMultiplyRef(satMatrix, pixel.asFloat3());
+ pixel.set(mul, pixel.w);
+ pixel = Float4.clamp(pixel, 0.0f, 255.0f);
+ pixel = Float4
+ .div(Float4.sub(pixel, new Float4(LEVELS_BLACK.x)), LEVELS_WHITE.x - LEVELS_BLACK.x);
+ pixel = Float4
+ .add(Float4.mul(pixel, (LEVELS_WHITE.y - LEVELS_BLACK.y)), new Float4(LEVELS_BLACK.y));
+
+ Float4.clamp(pixel, 0.0f, 255.0f, pixel);
+ output.set(x, y, pixel.convertByte4());
+ }
+ }
+ }
+
+ private static void runLevelsPerf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Float3[] satMatrix = new Float3[3];
+ for (int i = 0; i < satMatrix.length; ++i) { satMatrix[i] = new Float3(); }
+
+ Float3 tmp0 = new Float3();
+ Float3 tmp1 = new Float3();
+ levelsBuildSatMatrixPerf(satMatrix, LEVELS_SATURATION, tmp0, tmp1);
+
+ Byte4 pixelIn = new Byte4();
+ Float4 pixel = new Float4();
+ Float3 mul = new Float3();
+ Float4 blackX4 = new Float4();
+ Float4 blackY4 = new Float4();
+ Float4 tmp2 = new Float4();
+ Float4 tmp3 = new Float4();
+ Byte4 pixelOut = new Byte4();
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4Array.getBuffer(iBuffer, y * width + x, pixelIn);
+ pixelIn.convertFloat4(pixel);
+ matrix3x3VectorMultiplyPerf(satMatrix, pixel.asFloat3(), mul);
+ pixel.set(mul, pixel.w);
+ Float4.clamp(pixel, 0.0f, 255.0f, pixel);
+
+ blackX4.set(LEVELS_BLACK.x);
+ blackY4.set(LEVELS_BLACK.y);
+ Float4.sub(pixel, blackX4, tmp2);
+ Float4.div(tmp2, LEVELS_WHITE.x - LEVELS_BLACK.x, pixel);
+ Float4.mul(pixel, (LEVELS_WHITE.y - LEVELS_BLACK.y), tmp3);
+ Float4.add(tmp3, blackY4, pixel);
+
+ Float4.clamp(pixel, 0.0f, 255.0f, pixel);
+ pixel.convertByte4(pixelOut);
+ Byte4Array.setBuffer(oBuffer, y * width + x, pixelOut);
+ }
+ }
+ }
+
+ private static void runLevelsBff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ float[] satMatrix = new float[3 * 3];
+ float[] mul = new float[3];
+ levelsBuildSatMatrixBff(satMatrix, LEVELS_SATURATION);
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int pixel = input.getRGB(x, y);
+ Color color = new Color(pixel, true);
+ float pixelA = color.getAlpha();
+ float pixelR = color.getRed();
+ float pixelG = color.getGreen();
+ float pixelB = color.getBlue();
+
+ matrix3x3VectorMultiplyBff(satMatrix, pixelR, pixelG, pixelB, mul);
+ pixelR = mul[0] < 0.0f ? 0.0f : java.lang.Math.min(mul[0], 255.0f);
+ pixelG = mul[1] < 0.0f ? 0.0f : java.lang.Math.min(mul[1], 255.0f);
+ pixelB = mul[2] < 0.0f ? 0.0f : java.lang.Math.min(mul[2], 255.0f);
+
+ float diffMin = LEVELS_WHITE.x - LEVELS_BLACK.x;
+ float diffMax = LEVELS_WHITE.y - LEVELS_BLACK.y;
+
+ pixelA = (pixelA - LEVELS_BLACK.x) / diffMin;
+ pixelR = (pixelR - LEVELS_BLACK.x) / diffMin;
+ pixelG = (pixelG - LEVELS_BLACK.x) / diffMin;
+ pixelB = (pixelB - LEVELS_BLACK.x) / diffMin;
+
+ pixelA = pixelA * diffMax + LEVELS_BLACK.y;
+ pixelR = pixelR * diffMax + LEVELS_BLACK.y;
+ pixelG = pixelG * diffMax + LEVELS_BLACK.y;
+ pixelB = pixelB * diffMax + LEVELS_BLACK.y;
+
+ if (pixelA < 0.0f)
+ pixelA = 0.0f;
+ else if (pixelA > 255.0f)
+ pixelA = 255.0f;
+ if (pixelR < 0.0f)
+ pixelR = 0.0f;
+ else if (pixelR > 255.0f)
+ pixelR = 255.0f;
+ if (pixelG < 0.0f)
+ pixelG = 0.0f;
+ else if (pixelG > 255.0f)
+ pixelG = 255.0f;
+ if (pixelB < 0.0f)
+ pixelB = 0.0f;
+ else if (pixelB > 255.0f)
+ pixelB = 255.0f;
+
+ output.setRGB(x, y, new Color((int) pixelR, (int) pixelG, (int) pixelB, (int) pixelA).getRGB());
+ }
+ }
+ }
+
+
+ // Posterize
+
+ private static final Float2[] POSTERIZE_INTENSITIES =
+ new Float2[]{new Float2(0.0f, 0.2f), new Float2(0.2f, 0.4f), new Float2(0.4f, 0.6f),
+ new Float2(0.6f, 0.8f), new Float2(0.8f, 1.0f)};
+
+ private static final Byte4[] POSTERIZE_COLORS =
+ new Byte4[]{RGBAColor.RED(), RGBAColor.GREEN(), RGBAColor.BLUE(), RGBAColor.YELLOW(),
+ RGBAColor.CYAN()};
+
+ private static final float[] POSTERIZE_INTENSITIES_BMP =
+ new float[]{0.0f, 0.2f, 0.4f, 0.6f, 0.8f, 1.0f};
+
+ private static final Color[] POSTERIZE_COLORS_BFF =
+ new Color[]{Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW, Color.CYAN};
+
+ private static void runPosterizeRef(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int stage = 0; stage < POSTERIZE_INTENSITIES.length; ++stage) {
+ Float2 intensity = POSTERIZE_INTENSITIES[stage];
+ Byte4 color = POSTERIZE_COLORS[stage];
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4 pixel = input.get(x, y);
+ float pixel_intensity =
+ Float3.dot(Float3.div(pixel.asByte3().convertFloat3(), 0xff), GS_WEIGHTS);
+
+ if ((pixel_intensity <= intensity.y) && (pixel_intensity >= intensity.x))
+ output.set(x, y, color);
+ }
+ }
+ }
+ }
+
+ private static void runPosterizePerf(RGBAImage input, RGBAImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+ ByteBuffer iBuffer = input.getBuffer();
+ ByteBuffer oBuffer = output.getBuffer();
+
+ Byte4 pixelIn = new Byte4();
+ Byte3 pixelIn3 = new Byte3();
+ Float3 pixelInF3 = new Float3();
+
+ Float3 div = new Float3();
+
+ for (int stage = 0; stage < POSTERIZE_INTENSITIES.length; ++stage) {
+ Float2 intensity = POSTERIZE_INTENSITIES[stage];
+ Byte4 color = POSTERIZE_COLORS[stage];
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ Byte4Array.getBuffer(iBuffer, y * width + x, pixelIn);
+ pixelIn.asByte3(pixelIn3);
+ pixelIn3.convertFloat3(pixelInF3);
+
+ Float3.div(pixelInF3, 0xff, div);
+ float pixel_intensity = Float3.dot(div, GS_WEIGHTS);
+
+ if ((pixel_intensity <= intensity.y) && (pixel_intensity >= intensity.x))
+ Byte4Array.setBuffer(oBuffer, y * width + x, color);
+ }
+ }
+ }
+ }
+
+ private static void runPosterizeBff(BufferedImage input, BufferedImage output) {
+ final int width = input.getWidth();
+ final int height = input.getHeight();
+
+ for (int stage = 0; stage < POSTERIZE_INTENSITIES_BMP.length - 1; ++stage) {
+ float intensityMin = POSTERIZE_INTENSITIES_BMP[stage];
+ float intensityMax = POSTERIZE_INTENSITIES_BMP[stage + 1];
+ Color color = POSTERIZE_COLORS_BFF[stage];
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int pixel = input.getRGB(x, y);
+ Color pixColor = new Color(pixel);
+ float pixelIntensityR = ((float) pixColor.getRed() / 0xff) * GS_WEIGHTS.x;
+ float pixelIntensityG = ((float) pixColor.getGreen() / 0xff) * GS_WEIGHTS.y;
+ float pixelIntensityB = ((float) pixColor.getBlue() / 0xff) * GS_WEIGHTS.z;
+ float pixelIntensity = pixelIntensityR + pixelIntensityG + pixelIntensityB;
+
+ if ((pixelIntensity <= intensityMax) && (pixelIntensity >= intensityMin))
+ output.setRGB(x, y, color.getRGB());
+ }
+ }
+ }
+ }
+
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/NativeImageFilter.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/NativeImageFilter.java
new file mode 100644
index 0000000..c37c47e
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/NativeImageFilter.java
@@ -0,0 +1,102 @@
+package es.ull.pcg.hpc.fancier.linuxtest.model;
+
+
+import es.ull.pcg.hpc.fancier.image.RGBAImage;
+
+import java.awt.image.BufferedImage;
+import java.awt.image.DataBufferInt;
+
+public class NativeImageFilter extends ImageFilter {
+
+ static {
+ System.loadLibrary("filters-lib");
+ }
+
+ public enum Version {
+ GPU, CPU, REF
+ }
+
+ @SuppressWarnings({"FieldMayBeFinal", "FieldCanBeLocal"})
+ private long nativeInstancePtr = 0L;
+
+ private final Version mVersion;
+
+ public NativeImageFilter(ImageFilters kernel, Version version) {
+ mKernel = kernel;
+ mVersion = version;
+ }
+
+ public Version getVersion() {
+ return mVersion;
+ }
+
+ public static native void compileKernels(String dir);
+ public static native void releaseKernels();
+
+ @Override
+ public void setup() {
+ setupNative(mKernel.ordinal());
+
+ switch (mVersion) {
+ case CPU:
+ mInput.syncToHost();
+ mOutput.syncToHost();
+ break;
+ case GPU:
+ mInput.syncToDevice();
+ mOutput.syncToDevice();
+ break;
+ }
+ }
+
+ @Override
+ public void process(BufferedImage output) {
+ if (output.getWidth() != mOutput.getWidth() || output.getHeight() != mOutput.getHeight())
+ throw new RuntimeException("Input and output dimensions do not match.");
+
+ if (output.getType() != BufferedImage.TYPE_INT_ARGB)
+ System.out.println("Output BufferedImage has an unsupported format.");
+
+ switch (mVersion) {
+ case CPU:
+ processCpu(mInput, mOutput);
+ break;
+ case GPU:
+ processGpu(mInput, mOutput);
+ // Force to wait for the execution to finish, only needed if updateBitmap is not called
+ mOutput.syncToHost();
+ break;
+ case REF:
+ processBff(mBffIn, output);
+ break;
+ }
+
+ if (mVersion != Version.REF)
+ mOutput.updateImage(output);
+ }
+
+ @Override
+ public void release() {
+ super.release();
+
+ if (nativeInstancePtr != 0L)
+ releaseNative();
+ }
+
+ private void processBff(BufferedImage input, BufferedImage output) {
+ int[] inputArr = ((DataBufferInt)input.getRaster().getDataBuffer()).getData();
+ int[] outputArr = ((DataBufferInt)output.getRaster().getDataBuffer()).getData();
+
+ processArray(inputArr, outputArr, input.getWidth(), input.getHeight());
+ }
+
+ private native void setupNative(int kernel);
+
+ private native void processGpu(RGBAImage input, RGBAImage output);
+
+ private native void processCpu(RGBAImage input, RGBAImage output);
+
+ private native void processArray(int[] input, int[] output, int width, int height);
+
+ private native void releaseNative();
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/TestTask.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/TestTask.java
new file mode 100644
index 0000000..bbeb8ba
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/model/TestTask.java
@@ -0,0 +1,61 @@
+package es.ull.pcg.hpc.fancier.linuxtest.model;
+
+import es.ull.pcg.hpc.fancier.linuxtest.Main;
+import es.ull.pcg.hpc.fancier.linuxtest.test.RuntimeTest;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+public class TestTask implements Runnable {
+
+ private final String TEST_START = "Test starting.";
+ private final String TEST_SETUP = "Set-up finished. Running test.";
+ private final String TEST_SUCCESS = "Test finished successfully!";
+ private final String TEST_ERROR = "Test finished with an error!";
+ private final String TEST_TEARDOWN = "Tearing down test.";
+ private final String TEST_TEARDOWN_FINISH = "Tear-down finished.";
+
+ private final Main mMain;
+ private final String mTestName;
+ private final RuntimeTest mTest;
+ private final int mTestID;
+
+ public TestTask(Main main, String testName, RuntimeTest test, int id) {
+ this.mMain = main;
+ this.mTestName = testName;
+ this.mTest = test;
+ this.mTestID = id;
+ }
+
+ @Override
+ public void run() {
+ try {
+ // Setup
+ log(TEST_START);
+ mTest.setup();
+
+ // Run
+ log(TEST_SETUP);
+ if (mTest.run())
+ log(TEST_SUCCESS);
+ else
+ log(TEST_ERROR);
+
+ // Teardown
+ log(TEST_TEARDOWN);
+ mTest.teardown();
+ log(TEST_TEARDOWN_FINISH);
+ System.out.println("");
+ }
+ catch (Throwable e) {
+ StringWriter w = new StringWriter();
+ e.printStackTrace(new PrintWriter(w));
+
+ log(mTestID + " " + mTestName + ": " + w);
+ }
+ }
+
+ private void log(final String text) {
+ System.out.println(text);
+ }
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/ArrayTest.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/ArrayTest.java
new file mode 100644
index 0000000..4e05309
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/ArrayTest.java
@@ -0,0 +1,118 @@
+package es.ull.pcg.hpc.fancier.linuxtest.test;
+
+import es.ull.pcg.hpc.fancier.array.FloatArray;
+import es.ull.pcg.hpc.fancier.array.ShortArray;
+
+import java.nio.ByteBuffer;
+
+public class ArrayTest implements RuntimeTest {
+ final int n = 10;
+ final float[] x = new float[]{1.0F, 2.5F, 4.0F};
+
+ @Override
+ public void setup() {}
+
+ @Override
+ public boolean run() {
+ // Short array
+ try (ShortArray s0 = new ShortArray(n)) {
+ // Initialization tests
+ if (s0.length() != n)
+ return false;
+
+ for (int i = 0; i < n; ++i)
+ s0.set(i, (short) (i * 2));
+
+ s0.syncToHost();
+
+ for (int i = 0; i < n; ++i) {
+ if (s0.get(i) != (short) (i * 2))
+ return false;
+ }
+
+ // Automatic sync-to-native test
+ s0.syncToDevice();
+
+ short[] s0Array = s0.getArray();
+ ByteBuffer s0Buffer = s0.getBuffer();
+
+ // getArray and getBuffer test
+ for (int i = 0; i < n; ++i) {
+ if (s0.get(i) != s0Array[i] || s0.get(i) != ShortArray.getBuffer(s0Buffer, i))
+ return false;
+ }
+
+ // getArray must return a copy
+ s0Array[0] = (short) (s0Array[0] + 10);
+ if (s0Array[0] == s0.get(0))
+ return false;
+
+ // getBuffer must return a modifiable reference
+ s0Buffer.putShort(0, (short) (s0Buffer.getShort(0) + 50));
+ if (s0Buffer.getShort(0) != s0.get(0))
+ return false;
+
+ // setArray test
+ s0.setArray(s0Array);
+
+ for (int i = 0; i < n; ++i) {
+ if (s0.get(i) != s0Array[i])
+ return false;
+ }
+
+ // setBuffer test, using the same buffer as input and output
+ s0.setBuffer(s0Buffer);
+ s0Buffer.rewind();
+ for (int i = 0; i < n; ++i) {
+ if (s0.get(i) != s0Buffer.getShort())
+ return false;
+ }
+ }
+
+ // Double array
+ try (FloatArray d0 = new FloatArray(x)) {
+ // Initialization tests
+ if (d0.length() != x.length)
+ return false;
+
+ for (int i = 0; i < d0.length(); ++i) {
+ if (d0.get(i) != x[i])
+ return false;
+ }
+
+ // OpenCL execution test
+ float[] d0_ = d0.getArray();
+
+ nativeProcess(d0);
+
+ for (int i = 0; i < d0.length(); ++i) {
+ if (d0.get(i) != d0_[i] * 2)
+ return false;
+ }
+
+ // Array copy test
+ try (FloatArray d1 = new FloatArray(d0)) {
+ if (d1.length() != d0.length())
+ return false;
+
+ for (int i = 0; i < d0.length(); ++i) {
+ if (d0.get(i) != d1.get(i))
+ return false;
+ }
+
+ d1.set(0, d1.get(0) + 10);
+ if (d0.get(0) == d1.get(0))
+ return false;
+ }
+ }
+
+ // Native tests
+ return nativeRun();
+ }
+
+ @Override
+ public void teardown() {}
+
+ private native boolean nativeRun();
+ private native void nativeProcess(FloatArray array);
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/FilterTest.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/FilterTest.java
new file mode 100644
index 0000000..fb1756e
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/FilterTest.java
@@ -0,0 +1,77 @@
+package es.ull.pcg.hpc.fancier.linuxtest.test;
+
+import es.ull.pcg.hpc.fancier.linuxtest.Main;
+import es.ull.pcg.hpc.fancier.linuxtest.model.ImageFilter;
+
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+public class FilterTest implements RuntimeTest {
+ private static final boolean EXPORT_IMAGE = true;
+
+ private ImageFilter mFilter;
+ private BufferedImage mInput, mOutput;
+
+ public FilterTest() {
+ mFilter = null;
+ mInput = mOutput = null;
+ }
+
+ public void setFilter(ImageFilter filter) {
+ mFilter = filter;
+ }
+
+ public ImageFilter getFilter() {
+ return mFilter;
+ }
+
+ public void setInput(BufferedImage input) {
+ mInput = input;
+ }
+
+ public BufferedImage getInput() {
+ return mInput;
+ }
+
+ public void setOutput(BufferedImage output) {
+ mOutput = output;
+ }
+
+ public BufferedImage getOutput() {
+ return mOutput;
+ }
+
+ @Override
+ public void setup() {
+ if (mFilter == null || mInput == null || mOutput == null)
+ throw new RuntimeException("Invalid filter, input or output");
+
+ mFilter.setInput(mInput);
+ mFilter.setup();
+ }
+
+ @Override
+ public boolean run() {
+ if (mFilter == null)
+ return false;
+
+ mFilter.process(mOutput);
+
+ if (EXPORT_IMAGE) {
+ try (FileOutputStream fos = new FileOutputStream(Main.RESOURCES_DIR + "outputs/out.png")) {
+ ImageIO.write(mOutput, "png", fos);
+ }
+ catch (IOException ignored) {}
+ }
+
+ return true;
+ }
+
+ @Override
+ public void teardown() {
+ if (mFilter != null)
+ mFilter.release();
+ }
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/InitTest.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/InitTest.java
new file mode 100644
index 0000000..2d690e4
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/InitTest.java
@@ -0,0 +1,20 @@
+package es.ull.pcg.hpc.fancier.linuxtest.test;
+
+import es.ull.pcg.hpc.fancier.Fancier;
+
+public class InitTest implements RuntimeTest {
+
+ public InitTest() {}
+
+ @Override
+ public void setup() {}
+
+ @Override
+ public boolean run() {
+ Fancier.init();
+ return true;
+ }
+
+ @Override
+ public void teardown() {}
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/MathTest.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/MathTest.java
new file mode 100644
index 0000000..aecee31
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/MathTest.java
@@ -0,0 +1,49 @@
+package es.ull.pcg.hpc.fancier.linuxtest.test;
+
+import es.ull.pcg.hpc.fancier.Math;
+
+public class MathTest implements RuntimeTest {
+ @Override
+ public void setup() {}
+
+ @Override
+ public boolean run() {
+ if (Math.abs(10) != 10)
+ return false;
+
+ if (Math.abs(-10L) != 10L)
+ return false;
+
+ if (Math.max(10.0, 5.0) != 10.0)
+ return false;
+
+ if (Math.min(10.1f, 10.0f) != 10.0f)
+ return false;
+
+ if (Math.clamp((byte) 18, (byte) 5, (byte) 15) != (byte) 15)
+ return false;
+
+ if (Math.clamp((byte) 4, (byte) 5, (byte) 15) != (byte) 5)
+ return false;
+
+ if (Math.asin(Math.M_PI_4) != java.lang.Math.asin(Math.M_PI_4))
+ return false;
+
+ if (Math.cosh(Math.M_PI_2) != java.lang.Math.cosh(Math.M_PI_2))
+ return false;
+
+ if (Math.fract(3.25) != 0.25)
+ return false;
+
+ // Will fail because Math.addSat is not implemented yet
+ // if (Math.addSat(Integer.MAX_VALUE, 5) != Integer.MAX_VALUE)
+ // return false;
+
+ return nativeRun();
+ }
+
+ @Override
+ public void teardown() {}
+
+ private native boolean nativeRun();
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/ReleaseTest.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/ReleaseTest.java
new file mode 100644
index 0000000..4a9bcbf
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/ReleaseTest.java
@@ -0,0 +1,17 @@
+package es.ull.pcg.hpc.fancier.linuxtest.test;
+
+import es.ull.pcg.hpc.fancier.Fancier;
+
+public class ReleaseTest implements RuntimeTest {
+ @Override
+ public void setup() {}
+
+ @Override
+ public boolean run() {
+ Fancier.release();
+ return true;
+ }
+
+ @Override
+ public void teardown() {}
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/RuntimeTest.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/RuntimeTest.java
new file mode 100644
index 0000000..f4d6862
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/RuntimeTest.java
@@ -0,0 +1,9 @@
+package es.ull.pcg.hpc.fancier.linuxtest.test;
+
+public interface RuntimeTest {
+ void setup();
+
+ boolean run();
+
+ void teardown();
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/VectorArrayTest.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/VectorArrayTest.java
new file mode 100644
index 0000000..5d19e1e
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/VectorArrayTest.java
@@ -0,0 +1,139 @@
+package es.ull.pcg.hpc.fancier.linuxtest.test;
+
+import es.ull.pcg.hpc.fancier.vector.Byte4;
+import es.ull.pcg.hpc.fancier.vector.Float3;
+import es.ull.pcg.hpc.fancier.vector.Int3;
+import es.ull.pcg.hpc.fancier.vector.Int4;
+import es.ull.pcg.hpc.fancier.vector.array.*;
+
+import java.nio.ByteBuffer;
+
+public class VectorArrayTest implements RuntimeTest {
+ final int n = 10;
+ final byte[] x = new byte[]{10, 10, 10, 10, 20, 20, 20, 20, 30, 30, 30, 30, 40, 50, 60, 70};
+
+ @Override
+ public void setup() {}
+
+ @Override
+ public boolean run() {
+ // Float3 array
+ try (Float3Array f0 = new Float3Array(n)) {
+ // Initialization tests
+ if (f0.length() != n)
+ return false;
+
+ for (int i = 0; i < n; ++i) { f0.set(i, new Float3(1.0f * i, 1.5f * i, 2.0f * i)); }
+
+ f0.syncToHost();
+
+ for (int i = 0; i < n; ++i) {
+ if (Int3.any(Float3.isNotEqual(f0.get(i), new Float3(1.0f * i, 1.5f * i, 2.0f * i))) != 0)
+ return false;
+ }
+
+ // Automatic sync-to-native test
+ f0.syncToDevice();
+
+ float[] f0Array = f0.getArray();
+ ByteBuffer f0Buffer = f0.getBuffer();
+
+ // getArray and getBuffer test
+ for (int i = 0; i < n; ++i) {
+ Float3 elem = f0.get(i);
+ Float3 elemBuffer = Float3Array.getBuffer(f0Buffer, i);
+
+ int baseIdx = i * 3;
+ if (elem.x != f0Array[baseIdx] || elem.y != f0Array[baseIdx + 1] ||
+ elem.z != f0Array[baseIdx + 2] || Int3.any(Float3.isNotEqual(elem, elemBuffer)) != 0)
+ return false;
+ }
+
+ // getArray must return a copy
+ f0Array[0] = f0Array[0] + 10;
+ if (f0Array[0] == f0.get(0).x || f0Array[1] != f0.get(0).y || f0Array[2] != f0.get(0).z)
+ return false;
+
+ // getBuffer must return a modifiable reference
+ Float3 firstElem = Float3Array.getBuffer(f0Buffer, 0);
+ firstElem.x += 50;
+ Float3Array.setBuffer(f0Buffer, 0, firstElem);
+ if (Int3.any(Float3.isNotEqual(Float3Array.getBuffer(f0Buffer, 0), f0.get(0))) != 0)
+ return false;
+
+ // setArray test
+ f0.setArray(f0Array);
+
+ for (int i = 0; i < n; ++i) {
+ Float3 elem = f0.get(i);
+ int baseIdx = i * 3;
+
+ if (elem.x != f0Array[baseIdx] || elem.y != f0Array[baseIdx + 1] ||
+ elem.z != f0Array[baseIdx + 2])
+ return false;
+ }
+
+ // setBuffer test, using the same buffer as input and output
+ f0.setBuffer(f0Buffer);
+ for (int i = 0; i < n; ++i) {
+ if (Int3.any(Float3.isNotEqual(f0.get(i), Float3Array.getBuffer(f0Buffer, i))) != 0)
+ return false;
+ }
+ }
+
+ // Byte4 array
+ try (Byte4Array b0 = new Byte4Array(x)) {
+ // Initialization tests
+ if (b0.length() != x.length / 4)
+ return false;
+
+ for (int i = 0; i < b0.length(); ++i) {
+ Byte4 elem = b0.get(i);
+ int baseIdx = i * 4;
+
+ if (elem.x != x[baseIdx] || elem.y != x[baseIdx + 1] || elem.z != x[baseIdx + 2] ||
+ elem.w != x[baseIdx + 3])
+ return false;
+ }
+
+ // OpenCL execution test
+ byte[] b0_ = b0.getArray();
+ nativeProcess(b0);
+
+ for (int i = 0; i < b0.length(); ++i) {
+ Byte4 elem = b0.get(i);
+ int baseIdx = i * 4;
+
+ if (elem.x != b0_[baseIdx] + 1 || elem.y != b0_[baseIdx + 1] + 2 ||
+ elem.z != b0_[baseIdx + 2] + 3 || elem.w != b0_[baseIdx + 3] + 4)
+ return false;
+ }
+
+ // Vector array copy test
+ try (Byte4Array b1 = new Byte4Array(b0)) {
+ if (b1.length() != b0.length())
+ return false;
+
+ for (int i = 0; i < b0.length(); ++i) {
+ if (Int4.any(Byte4.isNotEqual(b0.get(i), b1.get(i))) != 0)
+ return false;
+ }
+
+ b1.set(0, new Byte4((byte) (b1.get(0).x + 10), b1.get(0).y, b1.get(0).hi()));
+ Int4 b0b1_eq = Byte4.isEqual(b0.get(0), b1.get(0));
+
+ if (b0b1_eq.x != 0 || Int3.all(new Int3(b0b1_eq.y, b0b1_eq.z, b0b1_eq.w)) == 0)
+ return false;
+ }
+ }
+
+ return nativeRun();
+ }
+
+ @Override
+ public void teardown() {}
+
+ private native boolean nativeRun();
+
+ private native void nativeProcess(Byte4Array array);
+}
diff --git a/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/VectorTest.java b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/VectorTest.java
new file mode 100644
index 0000000..5de3b32
--- /dev/null
+++ b/test/linux/java/src/main/java/es/ull/pcg/hpc/fancier/linuxtest/test/VectorTest.java
@@ -0,0 +1,57 @@
+package es.ull.pcg.hpc.fancier.linuxtest.test;
+
+import es.ull.pcg.hpc.fancier.vector.*;
+import es.ull.pcg.hpc.fancier.Math;
+
+public class VectorTest implements RuntimeTest {
+ @Override
+ public void setup() {}
+
+ @Override
+ public boolean run() {
+ Byte2 b20 = new Byte2((byte) 3);
+ Byte2 b21 = new Byte2((byte) 3, (byte) 4);
+
+ if (b20.x != 3 || b20.y != 3)
+ return false;
+
+ if (b21.x != 3 || b21.y != 4)
+ return false;
+
+ Byte2 b22 = Byte2.add(b20, b21);
+ if (b22.x != 6 || b22.y != 7)
+ return false;
+
+ Byte2 b23 = Byte2.select(b22, b21, new Int2(0, 1));
+ if (b23.x != b22.x || b23.y != b21.y)
+ return false;
+
+ Double4 d40 = new Double4(Math.M_2_PI, Math.M_PI, Math.M_1_PI, Math.M_LN2);
+ Double4 d41 = new Double4(1.0, d40.asDouble2(), 5.0);
+
+ if (d40.x != Math.M_2_PI || d40.y != Math.M_PI || d40.z != Math.M_1_PI || d40.w != Math.M_LN2)
+ return false;
+
+ if (d41.x != 1.0 || d41.y != d40.x || d41.z != d40.y || d41.w != 5.0)
+ return false;
+
+ Double4 d42 = Double4.atan2(d40, d41);
+ if (d42.x != Math.atan2(d40.x, d41.x) || d42.y != Math.atan2(d40.y, d41.y) ||
+ d42.z != Math.atan2(d40.z, d41.z) || d42.w != Math.atan2(d40.w, d41.w))
+ return false;
+
+ Float4 f40 = nativeWrapUnwrap(new Double4(Math.M_2_PI_F));
+ if (f40.x != Math.M_2_PI_F || f40.y != Math.M_2_PI_F || f40.z != Math.M_2_PI_F ||
+ f40.w != Math.M_2_PI_F)
+ return false;
+
+ return nativeRun();
+ }
+
+ @Override
+ public void teardown() {}
+
+ private native boolean nativeRun();
+
+ private native Float4 nativeWrapUnwrap(Double4 vec);
+}
diff --git a/test/linux/java/src/main/resources/BenchmarkResults/FancierTest_IRIS_2021_11_24_15_18_25.xml b/test/linux/java/src/main/resources/BenchmarkResults/FancierTest_IRIS_2021_11_24_15_18_25.xml
new file mode 100644
index 0000000..933b20e
--- /dev/null
+++ b/test/linux/java/src/main/resources/BenchmarkResults/FancierTest_IRIS_2021_11_24_15_18_25.xml
@@ -0,0 +1,2301 @@
+
+
+
+ FISHEYE
+
+
+ NATIVE CPU RELIABLE
+
+
+ 01 VGA (640x480)
+
+
+ CPUFREQ0
+
+ 821735
+ 1161494
+ 2626524
+ 1946358
+ 1625101
+ 2659640
+ 1542197
+ 2143070
+ 3032588
+ 1834704
+
+
+
+ CPUFREQ1
+
+ 805750
+ 3631820
+ 4304560
+ 4327864
+ 4471587
+ 4341235
+ 4439938
+ 4422171
+ 4422609
+ 4360487
+
+
+
+ CPUFREQ2
+
+ 464042
+ 4409446
+ 3053050
+ 2166863
+ 3277167
+ 3599409
+ 1967942
+ 2735486
+ 3544509
+ 3169947
+
+
+
+ CPUFREQ3
+
+ 400472
+ 3250815
+ 3856845
+ 3911597
+ 3758024
+ 3626468
+ 2156048
+ 3455485
+ 3894683
+ 3117191
+
+
+
+ CPUFREQ4
+
+ 2327185
+ 2569499
+ 3834777
+ 1796999
+ 2450425
+ 2610928
+ 1714085
+ 2903564
+ 3127715
+ 2392108
+
+
+
+ CPUFREQ5
+
+ 829185
+ 4146458
+ 4668409
+ 4675686
+ 4679405
+ 4668785
+ 4685768
+ 4656844
+ 4663792
+ 4681542
+
+
+
+ CPUFREQ6
+
+ 2638573
+ 2171906
+ 3100314
+ 3670540
+ 2870338
+ 3401031
+ 1713794
+ 1715144
+ 3703330
+ 4029192
+
+
+
+ CPUFREQ7
+
+ 4395714
+ 892327
+ 3324715
+ 2871670
+ 2223199
+ 3540440
+ 2043389
+ 1191541
+ 2879477
+ 1764349
+
+
+
+ Execution Time
+
+ 196589321
+ 182070390
+ 168479252
+ 167947939
+ 167955568
+ 168639673
+ 167451788
+ 168803264
+ 169267244
+ 167330203
+
+
+
+ Execution Time Arithmetic Avg
+ 1.724534642E8
+
+
+ Execution Time Histogram
+
+ 8
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Execution Time Max
+ 196589321
+
+
+ Execution Time Min
+ 167330203
+
+
+ Execution Time Std Dev
+ 9548912.501143713
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 40000
+ 43000
+ 43000
+ 48000
+ 48000
+ 48000
+ 48000
+ 53000
+ 53000
+ 53000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window CPUFREQ0 Max
+ 3032588
+
+
+ Window CPUFREQ0 Min
+ 1542197
+
+
+ Window CPUFREQ4 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 1
+ 1
+
+
+
+ Window CPUFREQ4 Max
+ 3127715
+
+
+ Window CPUFREQ4 Min
+ 1714085
+
+
+ Window Execution Time Histogram
+
+ 2
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+
+ Window Execution Time Max
+ 169267244
+
+
+ Window Execution Time Min
+ 167330203
+
+
+ Window THERM0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+
+ Window THERM0 Max
+ 53000
+
+
+ Window THERM0 Min
+ 48000
+
+
+
+
+ 02 XGA (1024x768)
+
+
+ CPUFREQ0
+
+ 523660
+ 3139630
+ 3847221
+ 3355699
+ 3337728
+ 2712375
+ 3261698
+ 3359281
+ 2643982
+ 2961117
+
+
+
+ CPUFREQ1
+
+ 871341
+ 2564692
+ 3323043
+ 3085071
+ 3061269
+ 3244315
+ 2953667
+ 3563566
+ 3547942
+ 3315768
+
+
+
+ CPUFREQ2
+
+ 768888
+ 3651306
+ 4373646
+ 4626904
+ 3088473
+ 3570780
+ 3603802
+ 3528124
+ 3668086
+ 3485652
+
+
+
+ CPUFREQ3
+
+ 598280
+ 3328167
+ 3358196
+ 3343447
+ 4143525
+ 4234526
+ 4154135
+ 4255520
+ 4197356
+ 4272682
+
+
+
+ CPUFREQ4
+
+ 1049324
+ 1702795
+ 2542353
+ 1928858
+ 3234637
+ 2534843
+ 2567468
+ 4369930
+ 4156814
+ 2936792
+
+
+
+ CPUFREQ5
+
+ 722909
+ 1566217
+ 3477496
+ 3858870
+ 3032585
+ 2936286
+ 2784806
+ 3061200
+ 2705934
+ 2435565
+
+
+
+ CPUFREQ6
+
+ 1489619
+ 4456192
+ 4671784
+ 4675508
+ 3899442
+ 2893550
+ 3260943
+ 3192782
+ 2447177
+ 2472748
+
+
+
+ CPUFREQ7
+
+ 1592737
+ 2143872
+ 2693432
+ 2555584
+ 4676068
+ 4682509
+ 4673013
+ 4655416
+ 4664376
+ 4663147
+
+
+
+ Execution Time
+
+ 413028360
+ 413169786
+ 404872267
+ 404061688
+ 404874172
+ 405183789
+ 405457416
+ 409379626
+ 408382984
+ 415299647
+
+
+
+ Execution Time Arithmetic Avg
+ 4.083709735E8
+
+
+ Execution Time Histogram
+
+ 4
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+
+
+
+ Execution Time Max
+ 415299647
+
+
+ Execution Time Min
+ 404061688
+
+
+ Execution Time Std Dev
+ 4155710.4323102273
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 42000
+ 45000
+ 50000
+ 55000
+ 55000
+ 58000
+ 61000
+ 64000
+ 64000
+ 66000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 1
+ 1
+
+
+
+ Window CPUFREQ0 Max
+ 3359281
+
+
+ Window CPUFREQ0 Min
+ 2643982
+
+
+ Window CPUFREQ4 Histogram
+
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+
+
+
+ Window CPUFREQ4 Max
+ 4369930
+
+
+ Window CPUFREQ4 Min
+ 2567468
+
+
+ Window Execution Time Histogram
+
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window Execution Time Max
+ 415299647
+
+
+ Window Execution Time Min
+ 405457416
+
+
+ Window THERM0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 0
+ 1
+
+
+
+ Window THERM0 Max
+ 66000
+
+
+ Window THERM0 Min
+ 61000
+
+
+
+
+ 03 HD1 (1280x720)
+
+
+ CPUFREQ0
+
+ 2221416
+ 3586905
+ 4297522
+ 3200405
+ 2581113
+ 2779796
+ 2883281
+ 3235602
+ 2533437
+ 2363358
+
+
+
+ CPUFREQ1
+
+ 500212
+ 2904146
+ 3264299
+ 4205228
+ 4409838
+ 4299293
+ 3399742
+ 2974480
+ 3096721
+ 3192351
+
+
+
+ CPUFREQ2
+
+ 475181
+ 1818913
+ 3758040
+ 4002538
+ 3790302
+ 4236459
+ 4360366
+ 4231014
+ 4194945
+ 4109626
+
+
+
+ CPUFREQ3
+
+ 912600
+ 2505897
+ 3425888
+ 3307627
+ 3168576
+ 3420051
+ 3505792
+ 3774809
+ 3584344
+ 3592802
+
+
+
+ CPUFREQ4
+
+ 512077
+ 4479876
+ 4683462
+ 3483011
+ 2748168
+ 2625821
+ 2879793
+ 2795324
+ 2555381
+ 2642042
+
+
+
+ CPUFREQ5
+
+ 632868
+ 1899294
+ 3223091
+ 4678222
+ 4683275
+ 4674350
+ 3882482
+ 2942006
+ 2904558
+ 3500958
+
+
+
+ CPUFREQ6
+
+ 2225119
+ 2253419
+ 2218026
+ 3729069
+ 2732588
+ 3910250
+ 4677916
+ 4679515
+ 4675504
+ 4668996
+
+
+
+ CPUFREQ7
+
+ 1614500
+ 1610413
+ 2457090
+ 2355557
+ 1878537
+ 2503166
+ 2641271
+ 2246903
+ 3133987
+ 2707708
+
+
+
+ Execution Time
+
+ 479666316
+ 478278754
+ 470578090
+ 471801118
+ 470820724
+ 471484651
+ 475135607
+ 483333548
+ 470975255
+ 471754902
+
+
+
+ Execution Time Arithmetic Avg
+ 4.743828965E8
+
+
+ Execution Time Histogram
+
+ 6
+ 0
+ 0
+ 1
+ 0
+ 0
+ 1
+ 1
+ 0
+ 1
+
+
+
+ Execution Time Max
+ 483333548
+
+
+ Execution Time Min
+ 470578090
+
+
+ Execution Time Std Dev
+ 4527967.056130555
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 40000
+ 50000
+ 55000
+ 55000
+ 58000
+ 62000
+ 64000
+ 67000
+ 69000
+ 71000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 1
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window CPUFREQ0 Max
+ 3235602
+
+
+ Window CPUFREQ0 Min
+ 2363358
+
+
+ Window CPUFREQ4 Histogram
+
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+
+ Window CPUFREQ4 Max
+ 2879793
+
+
+ Window CPUFREQ4 Min
+ 2555381
+
+
+ Window Execution Time Histogram
+
+ 2
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window Execution Time Max
+ 483333548
+
+
+ Window Execution Time Min
+ 470975255
+
+
+ Window THERM0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+
+ Window THERM0 Max
+ 71000
+
+
+ Window THERM0 Min
+ 64000
+
+
+
+
+ 04 HD2 (1366x768)
+
+
+ CPUFREQ0
+
+ 850143
+ 4095327
+ 4380370
+ 4406221
+ 4225511
+ 4229427
+ 4382582
+ 2677584
+ 3372499
+ 4367729
+
+
+
+ CPUFREQ1
+
+ 775882
+ 2709966
+ 2986168
+ 3222167
+ 3411551
+ 3241070
+ 2946494
+ 3142498
+ 3926300
+ 2801636
+
+
+
+ CPUFREQ2
+
+ 682127
+ 1877949
+ 2872721
+ 2829418
+ 2363230
+ 2678272
+ 3033452
+ 3683045
+ 4148206
+ 3354272
+
+
+
+ CPUFREQ3
+
+ 507928
+ 3274622
+ 3563974
+ 3175766
+ 2791213
+ 3012459
+ 2580800
+ 3985325
+ 4272299
+ 4353638
+
+
+
+ CPUFREQ4
+
+ 733673
+ 4510260
+ 4685237
+ 4684624
+ 4680076
+ 4672831
+ 4677697
+ 3632282
+ 2975719
+ 2727623
+
+
+
+ CPUFREQ5
+
+ 956489
+ 2216431
+ 2570812
+ 3046050
+ 3590952
+ 3757896
+ 3448216
+ 3703060
+ 3467501
+ 3436524
+
+
+
+ CPUFREQ6
+
+ 1149466
+ 1833760
+ 2545807
+ 2336877
+ 2415795
+ 2782346
+ 2727512
+ 3043500
+ 2420340
+ 2559574
+
+
+
+ CPUFREQ7
+
+ 3461221
+ 1919421
+ 2783771
+ 2572258
+ 2314857
+ 2929088
+ 3339305
+ 4682662
+ 4657566
+ 4676642
+
+
+
+ Execution Time
+
+ 538865897
+ 539595135
+ 533615611
+ 533738225
+ 534396979
+ 539126712
+ 549215882
+ 534968168
+ 539952757
+ 535509528
+
+
+
+ Execution Time Arithmetic Avg
+ 5.378984894E8
+
+
+ Execution Time Histogram
+
+ 4
+ 1
+ 0
+ 3
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Execution Time Max
+ 549215882
+
+
+ Execution Time Min
+ 533615611
+
+
+ Execution Time Std Dev
+ 4712061.916837851
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 45000
+ 49000
+ 54000
+ 58000
+ 62000
+ 65000
+ 67000
+ 69000
+ 70000
+ 72000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 2
+
+
+
+ Window CPUFREQ0 Max
+ 4382582
+
+
+ Window CPUFREQ0 Min
+ 2677584
+
+
+ Window CPUFREQ4 Histogram
+
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window CPUFREQ4 Max
+ 4677697
+
+
+ Window CPUFREQ4 Min
+ 2727623
+
+
+ Window Execution Time Histogram
+
+ 2
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window Execution Time Max
+ 549215882
+
+
+ Window Execution Time Min
+ 534968168
+
+
+ Window THERM0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 1
+
+
+
+ Window THERM0 Max
+ 72000
+
+
+ Window THERM0 Min
+ 67000
+
+
+
+
+ 05 HD+ (1600x900)
+
+
+ CPUFREQ0
+
+ 864681
+ 2821182
+ 1920454
+ 3432392
+ 2732180
+ 2759163
+ 3136279
+ 884698
+ 3391210
+ 4227347
+
+
+
+ CPUFREQ1
+
+ 760714
+ 2922056
+ 3620042
+ 3263338
+ 4413634
+ 3219517
+ 3327753
+ 851663
+ 2644100
+ 2703964
+
+
+
+ CPUFREQ2
+
+ 725798
+ 1868805
+ 2424747
+ 2843636
+ 2622642
+ 2444655
+ 2316329
+ 989710
+ 2772941
+ 2710524
+
+
+
+ CPUFREQ3
+
+ 922054
+ 3702183
+ 4514053
+ 4315024
+ 4458418
+ 4368290
+ 4490809
+ 1017805
+ 1777618
+ 3585644
+
+
+
+ CPUFREQ4
+
+ 818501
+ 1832502
+ 2145520
+ 3379214
+ 2402995
+ 2876131
+ 3246547
+ 1012039
+ 4524074
+ 4674213
+
+
+
+ CPUFREQ5
+
+ 937362
+ 1963683
+ 2536502
+ 2851370
+ 2337213
+ 2443455
+ 2608403
+ 497918
+ 2172366
+ 3164527
+
+
+
+ CPUFREQ6
+
+ 1926847
+ 2597116
+ 2754945
+ 2773443
+ 2926126
+ 2986559
+ 2559798
+ 1219676
+ 1742272
+ 2622369
+
+
+
+ CPUFREQ7
+
+ 953695
+ 4555862
+ 4684208
+ 4678817
+ 4681712
+ 4682175
+ 4686537
+ 1682165
+ 1985543
+ 3405985
+
+
+
+ Execution Time
+
+ 746631088
+ 741025263
+ 737402693
+ 741329332
+ 755204956
+ 737753733
+ 734430707
+ 738787444
+ 741972279
+ 736434903
+
+
+
+ Execution Time Arithmetic Avg
+ 7.410972398E8
+
+
+ Execution Time Histogram
+
+ 2
+ 2
+ 1
+ 3
+ 0
+ 1
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Execution Time Max
+ 755204956
+
+
+ Execution Time Min
+ 734430707
+
+
+ Execution Time Std Dev
+ 6026052.5844757855
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 43000
+ 52000
+ 56000
+ 63000
+ 65000
+ 69000
+ 71000
+ 44000
+ 52000
+ 57000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 0
+ 1
+
+
+
+ Window CPUFREQ0 Max
+ 4227347
+
+
+ Window CPUFREQ0 Min
+ 884698
+
+
+ Window CPUFREQ4 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 2
+
+
+
+ Window CPUFREQ4 Max
+ 4674213
+
+
+ Window CPUFREQ4 Min
+ 1012039
+
+
+ Window Execution Time Histogram
+
+ 1
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window Execution Time Max
+ 741972279
+
+
+ Window Execution Time Min
+ 734430707
+
+
+ Window THERM0 Histogram
+
+ 1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window THERM0 Max
+ 71000
+
+
+ Window THERM0 Min
+ 44000
+
+
+
+
+ 06 FHD (1920x1080)
+
+
+ CPUFREQ0
+
+ 870345
+ 826369
+ 880775
+ 759190
+ 874271
+ 861269
+ 910737
+ 780876
+ 788763
+ 833151
+
+
+
+ CPUFREQ1
+
+ 499400
+ 935311
+ 902389
+ 936055
+ 528718
+ 861730
+ 917222
+ 911511
+ 927356
+ 921343
+
+
+
+ CPUFREQ2
+
+ 673316
+ 515612
+ 497901
+ 476825
+ 680102
+ 869911
+ 521840
+ 500714
+ 520643
+ 787650
+
+
+
+ CPUFREQ3
+
+ 893990
+ 1087523
+ 884859
+ 986006
+ 1002744
+ 533648
+ 523002
+ 521724
+ 496132
+ 858266
+
+
+
+ CPUFREQ4
+
+ 685162
+ 730402
+ 713155
+ 748386
+ 698626
+ 779726
+ 802865
+ 882174
+ 798531
+ 897712
+
+
+
+ CPUFREQ5
+
+ 531700
+ 1009909
+ 807779
+ 675777
+ 516666
+ 777343
+ 745228
+ 643460
+ 720323
+ 658362
+
+
+
+ CPUFREQ6
+
+ 649718
+ 2212827
+ 1183168
+ 1152149
+ 1044246
+ 916044
+ 1470877
+ 1083842
+ 1217725
+ 1006079
+
+
+
+ CPUFREQ7
+
+ 416695
+ 401103
+ 1059279
+ 1066023
+ 1152590
+ 704432
+ 1108907
+ 393581
+ 399898
+ 400840
+
+
+
+ Execution Time
+
+ 1063208323
+ 1066789088
+ 1071595359
+ 1063941385
+ 1072983199
+ 1061836934
+ 1058616686
+ 1066348942
+ 1067344525
+ 1059228188
+
+
+
+ Execution Time Arithmetic Avg
+ 1.0651892629E9
+
+
+ Execution Time Histogram
+
+ 2
+ 0
+ 1
+ 2
+ 0
+ 2
+ 1
+ 0
+ 0
+ 2
+
+
+
+ Execution Time Max
+ 1072983199
+
+
+ Execution Time Min
+ 1058616686
+
+
+ Execution Time Std Dev
+ 4781742.710245814
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 51000
+ 58000
+ 62000
+ 65000
+ 71000
+ 51000
+ 57000
+ 61000
+ 67000
+ 70000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 2
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window CPUFREQ0 Max
+ 910737
+
+
+ Window CPUFREQ0 Min
+ 780876
+
+
+ Window CPUFREQ4 Histogram
+
+ 2
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+
+
+
+ Window CPUFREQ4 Max
+ 897712
+
+
+ Window CPUFREQ4 Min
+ 798531
+
+
+ Window Execution Time Histogram
+
+ 2
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+
+
+
+ Window Execution Time Max
+ 1067344525
+
+
+ Window Execution Time Min
+ 1058616686
+
+
+ Window THERM0 Histogram
+
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+
+
+
+ Window THERM0 Max
+ 70000
+
+
+ Window THERM0 Min
+ 57000
+
+
+
+
+ 07 QHD (2560x1440)
+
+
+ CPUFREQ0
+
+ 812004
+ 857344
+ 676955
+ 795886
+ 846890
+ 846038
+ 904881
+ 759593
+ 510577
+ 728897
+
+
+
+ CPUFREQ1
+
+ 883812
+ 852422
+ 859098
+ 737359
+ 700460
+ 577256
+ 877049
+ 1002548
+ 863829
+ 937352
+
+
+
+ CPUFREQ2
+
+ 761570
+ 988929
+ 509385
+ 995920
+ 856753
+ 697473
+ 710529
+ 659920
+ 830491
+ 523646
+
+
+
+ CPUFREQ3
+
+ 483722
+ 875893
+ 945425
+ 578948
+ 934154
+ 873487
+ 858101
+ 774256
+ 661037
+ 400349
+
+
+
+ CPUFREQ4
+
+ 528998
+ 665593
+ 1136590
+ 892091
+ 801161
+ 898108
+ 819650
+ 2459214
+ 400594
+ 1098654
+
+
+
+ CPUFREQ5
+
+ 775808
+ 670880
+ 701241
+ 586477
+ 822277
+ 465725
+ 502924
+ 870931
+ 717622
+ 720590
+
+
+
+ CPUFREQ6
+
+ 1233431
+ 3071740
+ 960741
+ 1503760
+ 400898
+ 823470
+ 703556
+ 1234861
+ 400538
+ 829793
+
+
+
+ CPUFREQ7
+
+ 1203453
+ 1405001
+ 1704844
+ 981769
+ 2531342
+ 2196107
+ 2325601
+ 1451290
+ 1703763
+ 1687490
+
+
+
+ Execution Time
+
+ 1882600007
+ 1909243159
+ 1867603751
+ 1872731537
+ 1898381718
+ 1862322266
+ 1863682096
+ 1877983422
+ 1904313378
+ 1888359931
+
+
+
+ Execution Time Arithmetic Avg
+ 1.8827221265E9
+
+
+ Execution Time Histogram
+
+ 2
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+
+
+
+ Execution Time Max
+ 1909243159
+
+
+ Execution Time Min
+ 1862322266
+
+
+ Execution Time Std Dev
+ 1.6918364155939814E7
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 58000
+ 68000
+ 71000
+ 54000
+ 65000
+ 70000
+ 73000
+ 58000
+ 66000
+ 72000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+
+
+
+ Window CPUFREQ0 Max
+ 904881
+
+
+ Window CPUFREQ0 Min
+ 510577
+
+
+ Window CPUFREQ4 Histogram
+
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window CPUFREQ4 Max
+ 2459214
+
+
+ Window CPUFREQ4 Min
+ 400594
+
+
+ Window Execution Time Histogram
+
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 1
+
+
+
+ Window Execution Time Max
+ 1904313378
+
+
+ Window Execution Time Min
+ 1863682096
+
+
+ Window THERM0 Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 2
+
+
+
+ Window THERM0 Max
+ 73000
+
+
+ Window THERM0 Min
+ 58000
+
+
+
+
+ 08 UHD (3840x2160)
+
+
+ CPUFREQ0
+
+ 852256
+ 614086
+ 502701
+ 706441
+ 898092
+ 676088
+ 789321
+ 4649261
+ 878857
+ 514791
+
+
+
+ CPUFREQ1
+
+ 856023
+ 967982
+ 588882
+ 496424
+ 728447
+ 812768
+ 715293
+ 439385
+ 797067
+ 806813
+
+
+
+ CPUFREQ2
+
+ 791695
+ 509736
+ 861044
+ 400490
+ 767295
+ 726099
+ 868788
+ 1357665
+ 675314
+ 835405
+
+
+
+ CPUFREQ3
+
+ 499250
+ 536038
+ 936348
+ 915220
+ 915497
+ 878141
+ 807090
+ 2551876
+ 927140
+ 884599
+
+
+
+ CPUFREQ4
+
+ 688809
+ 740467
+ 817638
+ 674340
+ 882397
+ 400620
+ 828921
+ 2840073
+ 778995
+ 525970
+
+
+
+ CPUFREQ5
+
+ 689477
+ 753865
+ 524970
+ 906469
+ 884656
+ 761113
+ 758535
+ 950146
+ 526505
+ 731156
+
+
+
+ CPUFREQ6
+
+ 951519
+ 1102459
+ 400720
+ 1269485
+ 1029898
+ 723144
+ 825892
+ 1023639
+ 1446750
+ 924205
+
+
+
+ CPUFREQ7
+
+ 400516
+ 1269078
+ 1859475
+ 2263021
+ 1879403
+ 1035597
+ 1621188
+ 1937206
+ 2086601
+ 2188936
+
+
+
+ Execution Time
+
+ 4110441318
+ 4109651081
+ 4110589646
+ 4105507336
+ 4117015161
+ 4109326122
+ 4114592084
+ 4107900602
+ 4111233591
+ 4115221560
+
+
+
+ Execution Time Arithmetic Avg
+ 4.1111478501E9
+
+
+ Execution Time Histogram
+
+ 1
+ 0
+ 1
+ 2
+ 3
+ 0
+ 0
+ 1
+ 1
+ 1
+
+
+
+ Execution Time Max
+ 4117015161
+
+
+ Execution Time Min
+ 4105507336
+
+
+ Execution Time Std Dev
+ 3521684.5428847903
+
+
+ Successful Runs Arithmetic Avg
+ 1.0
+
+
+ Successful Runs Total
+ 10.0
+
+
+ THERM0
+
+ 69000
+ 78000
+ 69000
+ 76000
+ 67000
+ 76000
+ 66000
+ 76000
+ 69000
+ 77000
+
+
+
+ Window CPUFREQ0 Histogram
+
+ 3
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window CPUFREQ0 Max
+ 4649261
+
+
+ Window CPUFREQ0 Min
+ 514791
+
+
+ Window CPUFREQ4 Histogram
+
+ 1
+ 2
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+ Window CPUFREQ4 Max
+ 2840073
+
+
+ Window CPUFREQ4 Min
+ 525970
+
+
+ Window Execution Time Histogram
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 2
+
+
+
+ Window Execution Time Max
+ 4115221560
+
+
+ Window Execution Time Min
+ 4107900602
+
+
+ Window THERM0 Histogram
+
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+
+
+
+ Window THERM0 Max
+ 77000
+
+
+ Window THERM0 Min
+ 66000
+
+
+
+
+
+
+
+
diff --git a/test/linux/java/src/main/resources/ImageIds b/test/linux/java/src/main/resources/ImageIds
new file mode 100644
index 0000000..1c16162
--- /dev/null
+++ b/test/linux/java/src/main/resources/ImageIds
@@ -0,0 +1,8 @@
+vga.jpg
+xga.jpg
+hd1.jpg
+hd2.jpg
+hdplus.jpg
+fullhd.jpg
+qhd.jpg
+uhd.jpg
\ No newline at end of file
diff --git a/test/linux/java/src/main/resources/ImageTitles b/test/linux/java/src/main/resources/ImageTitles
new file mode 100644
index 0000000..ec3a7dd
--- /dev/null
+++ b/test/linux/java/src/main/resources/ImageTitles
@@ -0,0 +1,8 @@
+01 VGA (640x480)
+02 XGA (1024x768)
+03 HD1 (1280x720)
+04 HD2 (1366x768)
+05 HD+ (1600x900)
+06 FHD (1920x1080)
+07 QHD (2560x1440)
+08 UHD (3840x2160)
diff --git a/test/linux/java/src/main/resources/TestsNames b/test/linux/java/src/main/resources/TestsNames
new file mode 100644
index 0000000..9573658
--- /dev/null
+++ b/test/linux/java/src/main/resources/TestsNames
@@ -0,0 +1,36 @@
+Fancier Init
+Fancier Math
+Fancier Vector
+Fancier Array
+Fancier Vector Array
+OpenCL: Greyscale
+OpenCL: Gaussian Blur
+OpenCL: Convolve 3x3
+OpenCL: Convolve 5x5
+OpenCL: Bilateral
+OpenCL: Median Blur
+OpenCL: Contrast
+OpenCL: Fisheye
+OpenCL: Levels
+OpenCL: Posterize
+Native: Greyscale
+Native: Gaussian Blur
+Native: Convolve 3x3
+Native: Convolve 5x5
+Native: Bilateral
+Native: Median Blur
+Native: Contrast
+Native: Fisheye
+Native: Levels
+Native: Posterize
+Java: Greyscale
+Java: Gaussian Blur
+Java: Convolve 3x3
+Java: Convolve 5x5
+Java: Bilateral
+Java: Median Blur
+Java: Contrast
+Java: Fisheye
+Java: Levels
+Java: Posterize
+Fancier Release
\ No newline at end of file
diff --git a/test/linux/java/src/main/resources/fullhd.jpg b/test/linux/java/src/main/resources/fullhd.jpg
new file mode 100644
index 0000000..104f080
Binary files /dev/null and b/test/linux/java/src/main/resources/fullhd.jpg differ
diff --git a/test/linux/java/src/main/resources/hd1.jpg b/test/linux/java/src/main/resources/hd1.jpg
new file mode 100644
index 0000000..0152a92
Binary files /dev/null and b/test/linux/java/src/main/resources/hd1.jpg differ
diff --git a/test/linux/java/src/main/resources/hd2.jpg b/test/linux/java/src/main/resources/hd2.jpg
new file mode 100644
index 0000000..138d8ac
Binary files /dev/null and b/test/linux/java/src/main/resources/hd2.jpg differ
diff --git a/test/linux/java/src/main/resources/hdplus.jpg b/test/linux/java/src/main/resources/hdplus.jpg
new file mode 100644
index 0000000..f05c5a0
Binary files /dev/null and b/test/linux/java/src/main/resources/hdplus.jpg differ
diff --git a/test/linux/java/src/main/resources/outputs/out.png b/test/linux/java/src/main/resources/outputs/out.png
new file mode 100644
index 0000000..5b2c105
Binary files /dev/null and b/test/linux/java/src/main/resources/outputs/out.png differ
diff --git a/test/linux/java/src/main/resources/qhd.jpg b/test/linux/java/src/main/resources/qhd.jpg
new file mode 100644
index 0000000..c6e6fab
Binary files /dev/null and b/test/linux/java/src/main/resources/qhd.jpg differ
diff --git a/test/linux/java/src/main/resources/test.png b/test/linux/java/src/main/resources/test.png
new file mode 100644
index 0000000..10a393a
Binary files /dev/null and b/test/linux/java/src/main/resources/test.png differ
diff --git a/test/linux/java/src/main/resources/uhd.jpg b/test/linux/java/src/main/resources/uhd.jpg
new file mode 100644
index 0000000..3315e06
Binary files /dev/null and b/test/linux/java/src/main/resources/uhd.jpg differ
diff --git a/test/linux/java/src/main/resources/vga.jpg b/test/linux/java/src/main/resources/vga.jpg
new file mode 100644
index 0000000..8c5ef0d
Binary files /dev/null and b/test/linux/java/src/main/resources/vga.jpg differ
diff --git a/test/linux/java/src/main/resources/xga.jpg b/test/linux/java/src/main/resources/xga.jpg
new file mode 100644
index 0000000..985d9b0
Binary files /dev/null and b/test/linux/java/src/main/resources/xga.jpg differ
diff --git a/test/linux/java/src/test/java/MainTest.java b/test/linux/java/src/test/java/MainTest.java
new file mode 100644
index 0000000..714411d
--- /dev/null
+++ b/test/linux/java/src/test/java/MainTest.java
@@ -0,0 +1,9 @@
+import es.ull.pcg.hpc.fancier.linuxtest.Main;
+//import org.junit.Test;
+//
+//public class MainTest {
+// @Test
+// public void testHello() {
+// new Main().print();
+// }
+//}
diff --git a/test/linux/jni/CMakeLists.txt b/test/linux/jni/CMakeLists.txt
new file mode 100644
index 0000000..eabf521
--- /dev/null
+++ b/test/linux/jni/CMakeLists.txt
@@ -0,0 +1,93 @@
+# Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+# Copyright (C) 2021 Universidad de La Laguna.
+#
+# Fancier is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Fancier is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with Fancier. If not, see .
+
+cmake_minimum_required( VERSION 3.10.2 )
+project(fancier-test-linux)
+
+set(CMAKE_C_FLAGS "-std=gnu11")
+
+# Paths
+
+set( libs-dir
+ "${CMAKE_SOURCE_DIR}/libs" )
+
+set( root-dir
+ "${CMAKE_SOURCE_DIR}" )
+
+set( source-dir
+ "${root-dir}/src" )
+
+set( include-dir
+ "${root-dir}/include" )
+
+
+# Android prebuilt libs
+
+find_library( OpenCL
+ OpenCL )
+
+
+# Fancier prebuilt libs and non-standard system libraries
+
+find_library( fancier fancier PATHS "${libs-dir}" REQUIRED )
+
+link_directories( BEFORE "${libs-dir}" )
+
+
+# Application
+
+include_directories( "${include-dir}/common"
+ "${include-dir}/thirdparty" )
+
+add_library( test-lib
+ SHARED
+ "${source-dir}/test/array_test.c"
+ "${source-dir}/test/math_test.c"
+ "${source-dir}/test/vector_test.c"
+ "${source-dir}/test/vector_array_test.c"
+ "${source-dir}/test/quick_test.c" )
+
+add_library( filters-lib
+ SHARED
+ "${source-dir}/filter/native_filter.c" )
+
+add_library( rancid
+ SHARED
+ "${source-dir}/rancid/rancid.c" )
+
+
+target_include_directories( test-lib
+ PUBLIC
+ "${include-dir}/test" )
+
+target_include_directories( filters-lib
+ PUBLIC
+ "${include-dir}/filter" )
+
+target_include_directories( rancid
+ PUBLIC
+ "${include-dir}/rancid" )
+
+
+target_link_libraries( test-lib
+ fancier OpenCL )
+
+target_link_libraries( filters-lib
+ fancier OpenCL )
+
+target_link_libraries( rancid
+ OpenCL )
+
diff --git a/test/linux/jni/include/thirdparty/CL/cl.h b/test/linux/jni/include/thirdparty/CL/cl.h
new file mode 100644
index 0000000..5444d4e
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl.h
@@ -0,0 +1,1929 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef __OPENCL_CL_H
+#define __OPENCL_CL_H
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+typedef struct _cl_platform_id * cl_platform_id;
+typedef struct _cl_device_id * cl_device_id;
+typedef struct _cl_context * cl_context;
+typedef struct _cl_command_queue * cl_command_queue;
+typedef struct _cl_mem * cl_mem;
+typedef struct _cl_program * cl_program;
+typedef struct _cl_kernel * cl_kernel;
+typedef struct _cl_event * cl_event;
+typedef struct _cl_sampler * cl_sampler;
+
+typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */
+typedef cl_ulong cl_bitfield;
+typedef cl_ulong cl_properties;
+typedef cl_bitfield cl_device_type;
+typedef cl_uint cl_platform_info;
+typedef cl_uint cl_device_info;
+typedef cl_bitfield cl_device_fp_config;
+typedef cl_uint cl_device_mem_cache_type;
+typedef cl_uint cl_device_local_mem_type;
+typedef cl_bitfield cl_device_exec_capabilities;
+#ifdef CL_VERSION_2_0
+typedef cl_bitfield cl_device_svm_capabilities;
+#endif
+typedef cl_bitfield cl_command_queue_properties;
+#ifdef CL_VERSION_1_2
+typedef intptr_t cl_device_partition_property;
+typedef cl_bitfield cl_device_affinity_domain;
+#endif
+
+typedef intptr_t cl_context_properties;
+typedef cl_uint cl_context_info;
+#ifdef CL_VERSION_2_0
+typedef cl_properties cl_queue_properties;
+#endif
+typedef cl_uint cl_command_queue_info;
+typedef cl_uint cl_channel_order;
+typedef cl_uint cl_channel_type;
+typedef cl_bitfield cl_mem_flags;
+#ifdef CL_VERSION_2_0
+typedef cl_bitfield cl_svm_mem_flags;
+#endif
+typedef cl_uint cl_mem_object_type;
+typedef cl_uint cl_mem_info;
+#ifdef CL_VERSION_1_2
+typedef cl_bitfield cl_mem_migration_flags;
+#endif
+typedef cl_uint cl_image_info;
+#ifdef CL_VERSION_1_1
+typedef cl_uint cl_buffer_create_type;
+#endif
+typedef cl_uint cl_addressing_mode;
+typedef cl_uint cl_filter_mode;
+typedef cl_uint cl_sampler_info;
+typedef cl_bitfield cl_map_flags;
+#ifdef CL_VERSION_2_0
+typedef intptr_t cl_pipe_properties;
+typedef cl_uint cl_pipe_info;
+#endif
+typedef cl_uint cl_program_info;
+typedef cl_uint cl_program_build_info;
+#ifdef CL_VERSION_1_2
+typedef cl_uint cl_program_binary_type;
+#endif
+typedef cl_int cl_build_status;
+typedef cl_uint cl_kernel_info;
+#ifdef CL_VERSION_1_2
+typedef cl_uint cl_kernel_arg_info;
+typedef cl_uint cl_kernel_arg_address_qualifier;
+typedef cl_uint cl_kernel_arg_access_qualifier;
+typedef cl_bitfield cl_kernel_arg_type_qualifier;
+#endif
+typedef cl_uint cl_kernel_work_group_info;
+#ifdef CL_VERSION_2_1
+typedef cl_uint cl_kernel_sub_group_info;
+#endif
+typedef cl_uint cl_event_info;
+typedef cl_uint cl_command_type;
+typedef cl_uint cl_profiling_info;
+#ifdef CL_VERSION_2_0
+typedef cl_properties cl_sampler_properties;
+typedef cl_uint cl_kernel_exec_info;
+#endif
+#ifdef CL_VERSION_3_0
+typedef cl_bitfield cl_device_atomic_capabilities;
+typedef cl_bitfield cl_device_device_enqueue_capabilities;
+typedef cl_uint cl_khronos_vendor_id;
+typedef cl_properties cl_mem_properties;
+typedef cl_uint cl_version;
+#endif
+
+typedef struct _cl_image_format {
+ cl_channel_order image_channel_order;
+ cl_channel_type image_channel_data_type;
+} cl_image_format;
+
+#ifdef CL_VERSION_1_2
+
+typedef struct _cl_image_desc {
+ cl_mem_object_type image_type;
+ size_t image_width;
+ size_t image_height;
+ size_t image_depth;
+ size_t image_array_size;
+ size_t image_row_pitch;
+ size_t image_slice_pitch;
+ cl_uint num_mip_levels;
+ cl_uint num_samples;
+#ifdef CL_VERSION_2_0
+#if defined(__GNUC__)
+ __extension__ /* Prevents warnings about anonymous union in -pedantic builds */
+#endif
+#if defined(_MSC_VER) && !defined(__STDC__)
+#pragma warning( push )
+#pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 builds */
+#endif
+#if defined(_MSC_VER) && defined(__STDC__)
+ /* Anonymous unions are not supported in /Za builds */
+#else
+ union {
+#endif
+#endif
+ cl_mem buffer;
+#ifdef CL_VERSION_2_0
+#if defined(_MSC_VER) && defined(__STDC__)
+ /* Anonymous unions are not supported in /Za builds */
+#else
+ cl_mem mem_object;
+ };
+#endif
+#if defined(_MSC_VER) && !defined(__STDC__)
+#pragma warning( pop )
+#endif
+#endif
+} cl_image_desc;
+
+#endif
+
+#ifdef CL_VERSION_1_1
+
+typedef struct _cl_buffer_region {
+ size_t origin;
+ size_t size;
+} cl_buffer_region;
+
+#endif
+
+#ifdef CL_VERSION_3_0
+
+#define CL_NAME_VERSION_MAX_NAME_SIZE 64
+
+typedef struct _cl_name_version {
+ cl_version version;
+ char name[CL_NAME_VERSION_MAX_NAME_SIZE];
+} cl_name_version;
+
+#endif
+
+/******************************************************************************/
+
+/* Error Codes */
+#define CL_SUCCESS 0
+#define CL_DEVICE_NOT_FOUND -1
+#define CL_DEVICE_NOT_AVAILABLE -2
+#define CL_COMPILER_NOT_AVAILABLE -3
+#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
+#define CL_OUT_OF_RESOURCES -5
+#define CL_OUT_OF_HOST_MEMORY -6
+#define CL_PROFILING_INFO_NOT_AVAILABLE -7
+#define CL_MEM_COPY_OVERLAP -8
+#define CL_IMAGE_FORMAT_MISMATCH -9
+#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
+#define CL_BUILD_PROGRAM_FAILURE -11
+#define CL_MAP_FAILURE -12
+#ifdef CL_VERSION_1_1
+#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
+#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
+#endif
+#ifdef CL_VERSION_1_2
+#define CL_COMPILE_PROGRAM_FAILURE -15
+#define CL_LINKER_NOT_AVAILABLE -16
+#define CL_LINK_PROGRAM_FAILURE -17
+#define CL_DEVICE_PARTITION_FAILED -18
+#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19
+#endif
+
+#define CL_INVALID_VALUE -30
+#define CL_INVALID_DEVICE_TYPE -31
+#define CL_INVALID_PLATFORM -32
+#define CL_INVALID_DEVICE -33
+#define CL_INVALID_CONTEXT -34
+#define CL_INVALID_QUEUE_PROPERTIES -35
+#define CL_INVALID_COMMAND_QUEUE -36
+#define CL_INVALID_HOST_PTR -37
+#define CL_INVALID_MEM_OBJECT -38
+#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
+#define CL_INVALID_IMAGE_SIZE -40
+#define CL_INVALID_SAMPLER -41
+#define CL_INVALID_BINARY -42
+#define CL_INVALID_BUILD_OPTIONS -43
+#define CL_INVALID_PROGRAM -44
+#define CL_INVALID_PROGRAM_EXECUTABLE -45
+#define CL_INVALID_KERNEL_NAME -46
+#define CL_INVALID_KERNEL_DEFINITION -47
+#define CL_INVALID_KERNEL -48
+#define CL_INVALID_ARG_INDEX -49
+#define CL_INVALID_ARG_VALUE -50
+#define CL_INVALID_ARG_SIZE -51
+#define CL_INVALID_KERNEL_ARGS -52
+#define CL_INVALID_WORK_DIMENSION -53
+#define CL_INVALID_WORK_GROUP_SIZE -54
+#define CL_INVALID_WORK_ITEM_SIZE -55
+#define CL_INVALID_GLOBAL_OFFSET -56
+#define CL_INVALID_EVENT_WAIT_LIST -57
+#define CL_INVALID_EVENT -58
+#define CL_INVALID_OPERATION -59
+#define CL_INVALID_GL_OBJECT -60
+#define CL_INVALID_BUFFER_SIZE -61
+#define CL_INVALID_MIP_LEVEL -62
+#define CL_INVALID_GLOBAL_WORK_SIZE -63
+#ifdef CL_VERSION_1_1
+#define CL_INVALID_PROPERTY -64
+#endif
+#ifdef CL_VERSION_1_2
+#define CL_INVALID_IMAGE_DESCRIPTOR -65
+#define CL_INVALID_COMPILER_OPTIONS -66
+#define CL_INVALID_LINKER_OPTIONS -67
+#define CL_INVALID_DEVICE_PARTITION_COUNT -68
+#endif
+#ifdef CL_VERSION_2_0
+#define CL_INVALID_PIPE_SIZE -69
+#define CL_INVALID_DEVICE_QUEUE -70
+#endif
+#ifdef CL_VERSION_2_2
+#define CL_INVALID_SPEC_ID -71
+#define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72
+#endif
+
+
+/* cl_bool */
+#define CL_FALSE 0
+#define CL_TRUE 1
+#ifdef CL_VERSION_1_2
+#define CL_BLOCKING CL_TRUE
+#define CL_NON_BLOCKING CL_FALSE
+#endif
+
+/* cl_platform_info */
+#define CL_PLATFORM_PROFILE 0x0900
+#define CL_PLATFORM_VERSION 0x0901
+#define CL_PLATFORM_NAME 0x0902
+#define CL_PLATFORM_VENDOR 0x0903
+#define CL_PLATFORM_EXTENSIONS 0x0904
+#ifdef CL_VERSION_2_1
+#define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905
+#endif
+#ifdef CL_VERSION_3_0
+#define CL_PLATFORM_NUMERIC_VERSION 0x0906
+#define CL_PLATFORM_EXTENSIONS_WITH_VERSION 0x0907
+#endif
+
+/* cl_device_type - bitfield */
+#define CL_DEVICE_TYPE_DEFAULT (1 << 0)
+#define CL_DEVICE_TYPE_CPU (1 << 1)
+#define CL_DEVICE_TYPE_GPU (1 << 2)
+#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
+#ifdef CL_VERSION_1_2
+#define CL_DEVICE_TYPE_CUSTOM (1 << 4)
+#endif
+#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
+
+/* cl_device_info */
+#define CL_DEVICE_TYPE 0x1000
+#define CL_DEVICE_VENDOR_ID 0x1001
+#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
+#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
+#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
+#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
+#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
+#define CL_DEVICE_ADDRESS_BITS 0x100D
+#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
+#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
+#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
+#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
+#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
+#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
+#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
+#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
+#define CL_DEVICE_IMAGE_SUPPORT 0x1016
+#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
+#define CL_DEVICE_MAX_SAMPLERS 0x1018
+#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
+#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
+#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
+#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
+#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
+#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
+#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
+#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
+#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
+#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
+#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
+#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
+#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
+#define CL_DEVICE_ENDIAN_LITTLE 0x1026
+#define CL_DEVICE_AVAILABLE 0x1027
+#define CL_DEVICE_COMPILER_AVAILABLE 0x1028
+#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
+#define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */
+#ifdef CL_VERSION_2_0
+#define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A
+#endif
+#define CL_DEVICE_NAME 0x102B
+#define CL_DEVICE_VENDOR 0x102C
+#define CL_DRIVER_VERSION 0x102D
+#define CL_DEVICE_PROFILE 0x102E
+#define CL_DEVICE_VERSION 0x102F
+#define CL_DEVICE_EXTENSIONS 0x1030
+#define CL_DEVICE_PLATFORM 0x1031
+#ifdef CL_VERSION_1_2
+#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
+#endif
+/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */
+#ifdef CL_VERSION_1_1
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
+#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
+#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
+#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
+#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
+#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
+#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
+#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
+#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
+#define CL_DEVICE_OPENCL_C_VERSION 0x103D
+#endif
+#ifdef CL_VERSION_1_2
+#define CL_DEVICE_LINKER_AVAILABLE 0x103E
+#define CL_DEVICE_BUILT_IN_KERNELS 0x103F
+#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
+#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
+#define CL_DEVICE_PARENT_DEVICE 0x1042
+#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
+#define CL_DEVICE_PARTITION_PROPERTIES 0x1044
+#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
+#define CL_DEVICE_PARTITION_TYPE 0x1046
+#define CL_DEVICE_REFERENCE_COUNT 0x1047
+#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
+#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
+#endif
+#ifdef CL_VERSION_2_0
+#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
+#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
+#define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C
+#define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D
+#define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E
+#define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F
+#define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050
+#define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051
+#define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052
+#define CL_DEVICE_SVM_CAPABILITIES 0x1053
+#define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054
+#define CL_DEVICE_MAX_PIPE_ARGS 0x1055
+#define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056
+#define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057
+#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058
+#define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059
+#define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A
+#endif
+#ifdef CL_VERSION_2_1
+#define CL_DEVICE_IL_VERSION 0x105B
+#define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C
+#define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D
+#endif
+#ifdef CL_VERSION_3_0
+#define CL_DEVICE_NUMERIC_VERSION 0x105E
+#define CL_DEVICE_EXTENSIONS_WITH_VERSION 0x1060
+#define CL_DEVICE_ILS_WITH_VERSION 0x1061
+#define CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION 0x1062
+#define CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES 0x1063
+#define CL_DEVICE_ATOMIC_FENCE_CAPABILITIES 0x1064
+#define CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT 0x1065
+#define CL_DEVICE_OPENCL_C_ALL_VERSIONS 0x1066
+#define CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x1067
+#define CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT 0x1068
+#define CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT 0x1069
+/* 0x106A to 0x106E - Reserved for upcoming KHR extension */
+#define CL_DEVICE_OPENCL_C_FEATURES 0x106F
+#define CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES 0x1070
+#define CL_DEVICE_PIPE_SUPPORT 0x1071
+#define CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED 0x1072
+#endif
+
+/* cl_device_fp_config - bitfield */
+#define CL_FP_DENORM (1 << 0)
+#define CL_FP_INF_NAN (1 << 1)
+#define CL_FP_ROUND_TO_NEAREST (1 << 2)
+#define CL_FP_ROUND_TO_ZERO (1 << 3)
+#define CL_FP_ROUND_TO_INF (1 << 4)
+#define CL_FP_FMA (1 << 5)
+#ifdef CL_VERSION_1_1
+#define CL_FP_SOFT_FLOAT (1 << 6)
+#endif
+#ifdef CL_VERSION_1_2
+#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7)
+#endif
+
+/* cl_device_mem_cache_type */
+#define CL_NONE 0x0
+#define CL_READ_ONLY_CACHE 0x1
+#define CL_READ_WRITE_CACHE 0x2
+
+/* cl_device_local_mem_type */
+#define CL_LOCAL 0x1
+#define CL_GLOBAL 0x2
+
+/* cl_device_exec_capabilities - bitfield */
+#define CL_EXEC_KERNEL (1 << 0)
+#define CL_EXEC_NATIVE_KERNEL (1 << 1)
+
+/* cl_command_queue_properties - bitfield */
+#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
+#define CL_QUEUE_PROFILING_ENABLE (1 << 1)
+#ifdef CL_VERSION_2_0
+#define CL_QUEUE_ON_DEVICE (1 << 2)
+#define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3)
+#endif
+
+/* cl_context_info */
+#define CL_CONTEXT_REFERENCE_COUNT 0x1080
+#define CL_CONTEXT_DEVICES 0x1081
+#define CL_CONTEXT_PROPERTIES 0x1082
+#ifdef CL_VERSION_1_1
+#define CL_CONTEXT_NUM_DEVICES 0x1083
+#endif
+
+/* cl_context_properties */
+#define CL_CONTEXT_PLATFORM 0x1084
+#ifdef CL_VERSION_1_2
+#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* cl_device_partition_property */
+#define CL_DEVICE_PARTITION_EQUALLY 0x1086
+#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087
+#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0
+#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* cl_device_affinity_domain */
+#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0)
+#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1)
+#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2)
+#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3)
+#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4)
+#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
+
+#endif
+
+#ifdef CL_VERSION_2_0
+
+/* cl_device_svm_capabilities */
+#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0)
+#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1)
+#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2)
+#define CL_DEVICE_SVM_ATOMICS (1 << 3)
+
+#endif
+
+/* cl_command_queue_info */
+#define CL_QUEUE_CONTEXT 0x1090
+#define CL_QUEUE_DEVICE 0x1091
+#define CL_QUEUE_REFERENCE_COUNT 0x1092
+#define CL_QUEUE_PROPERTIES 0x1093
+#ifdef CL_VERSION_2_0
+#define CL_QUEUE_SIZE 0x1094
+#endif
+#ifdef CL_VERSION_2_1
+#define CL_QUEUE_DEVICE_DEFAULT 0x1095
+#endif
+#ifdef CL_VERSION_3_0
+#define CL_QUEUE_PROPERTIES_ARRAY 0x1098
+#endif
+
+/* cl_mem_flags and cl_svm_mem_flags - bitfield */
+#define CL_MEM_READ_WRITE (1 << 0)
+#define CL_MEM_WRITE_ONLY (1 << 1)
+#define CL_MEM_READ_ONLY (1 << 2)
+#define CL_MEM_USE_HOST_PTR (1 << 3)
+#define CL_MEM_ALLOC_HOST_PTR (1 << 4)
+#define CL_MEM_COPY_HOST_PTR (1 << 5)
+/* reserved (1 << 6) */
+#ifdef CL_VERSION_1_2
+#define CL_MEM_HOST_WRITE_ONLY (1 << 7)
+#define CL_MEM_HOST_READ_ONLY (1 << 8)
+#define CL_MEM_HOST_NO_ACCESS (1 << 9)
+#endif
+#ifdef CL_VERSION_2_0
+#define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */
+#define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */
+#define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12)
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* cl_mem_migration_flags - bitfield */
+#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0)
+#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1)
+
+#endif
+
+/* cl_channel_order */
+#define CL_R 0x10B0
+#define CL_A 0x10B1
+#define CL_RG 0x10B2
+#define CL_RA 0x10B3
+#define CL_RGB 0x10B4
+#define CL_RGBA 0x10B5
+#define CL_BGRA 0x10B6
+#define CL_ARGB 0x10B7
+#define CL_INTENSITY 0x10B8
+#define CL_LUMINANCE 0x10B9
+#ifdef CL_VERSION_1_1
+#define CL_Rx 0x10BA
+#define CL_RGx 0x10BB
+#define CL_RGBx 0x10BC
+#endif
+#ifdef CL_VERSION_1_2
+#define CL_DEPTH 0x10BD
+#define CL_DEPTH_STENCIL 0x10BE
+#endif
+#ifdef CL_VERSION_2_0
+#define CL_sRGB 0x10BF
+#define CL_sRGBx 0x10C0
+#define CL_sRGBA 0x10C1
+#define CL_sBGRA 0x10C2
+#define CL_ABGR 0x10C3
+#endif
+
+/* cl_channel_type */
+#define CL_SNORM_INT8 0x10D0
+#define CL_SNORM_INT16 0x10D1
+#define CL_UNORM_INT8 0x10D2
+#define CL_UNORM_INT16 0x10D3
+#define CL_UNORM_SHORT_565 0x10D4
+#define CL_UNORM_SHORT_555 0x10D5
+#define CL_UNORM_INT_101010 0x10D6
+#define CL_SIGNED_INT8 0x10D7
+#define CL_SIGNED_INT16 0x10D8
+#define CL_SIGNED_INT32 0x10D9
+#define CL_UNSIGNED_INT8 0x10DA
+#define CL_UNSIGNED_INT16 0x10DB
+#define CL_UNSIGNED_INT32 0x10DC
+#define CL_HALF_FLOAT 0x10DD
+#define CL_FLOAT 0x10DE
+#ifdef CL_VERSION_1_2
+#define CL_UNORM_INT24 0x10DF
+#endif
+#ifdef CL_VERSION_2_1
+#define CL_UNORM_INT_101010_2 0x10E0
+#endif
+
+/* cl_mem_object_type */
+#define CL_MEM_OBJECT_BUFFER 0x10F0
+#define CL_MEM_OBJECT_IMAGE2D 0x10F1
+#define CL_MEM_OBJECT_IMAGE3D 0x10F2
+#ifdef CL_VERSION_1_2
+#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3
+#define CL_MEM_OBJECT_IMAGE1D 0x10F4
+#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5
+#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6
+#endif
+#ifdef CL_VERSION_2_0
+#define CL_MEM_OBJECT_PIPE 0x10F7
+#endif
+
+/* cl_mem_info */
+#define CL_MEM_TYPE 0x1100
+#define CL_MEM_FLAGS 0x1101
+#define CL_MEM_SIZE 0x1102
+#define CL_MEM_HOST_PTR 0x1103
+#define CL_MEM_MAP_COUNT 0x1104
+#define CL_MEM_REFERENCE_COUNT 0x1105
+#define CL_MEM_CONTEXT 0x1106
+#ifdef CL_VERSION_1_1
+#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
+#define CL_MEM_OFFSET 0x1108
+#endif
+#ifdef CL_VERSION_2_0
+#define CL_MEM_USES_SVM_POINTER 0x1109
+#endif
+#ifdef CL_VERSION_3_0
+#define CL_MEM_PROPERTIES 0x110A
+#endif
+
+/* cl_image_info */
+#define CL_IMAGE_FORMAT 0x1110
+#define CL_IMAGE_ELEMENT_SIZE 0x1111
+#define CL_IMAGE_ROW_PITCH 0x1112
+#define CL_IMAGE_SLICE_PITCH 0x1113
+#define CL_IMAGE_WIDTH 0x1114
+#define CL_IMAGE_HEIGHT 0x1115
+#define CL_IMAGE_DEPTH 0x1116
+#ifdef CL_VERSION_1_2
+#define CL_IMAGE_ARRAY_SIZE 0x1117
+#define CL_IMAGE_BUFFER 0x1118
+#define CL_IMAGE_NUM_MIP_LEVELS 0x1119
+#define CL_IMAGE_NUM_SAMPLES 0x111A
+#endif
+
+
+/* cl_pipe_info */
+#ifdef CL_VERSION_2_0
+#define CL_PIPE_PACKET_SIZE 0x1120
+#define CL_PIPE_MAX_PACKETS 0x1121
+#endif
+#ifdef CL_VERSION_3_0
+#define CL_PIPE_PROPERTIES 0x1122
+#endif
+
+/* cl_addressing_mode */
+#define CL_ADDRESS_NONE 0x1130
+#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
+#define CL_ADDRESS_CLAMP 0x1132
+#define CL_ADDRESS_REPEAT 0x1133
+#ifdef CL_VERSION_1_1
+#define CL_ADDRESS_MIRRORED_REPEAT 0x1134
+#endif
+
+/* cl_filter_mode */
+#define CL_FILTER_NEAREST 0x1140
+#define CL_FILTER_LINEAR 0x1141
+
+/* cl_sampler_info */
+#define CL_SAMPLER_REFERENCE_COUNT 0x1150
+#define CL_SAMPLER_CONTEXT 0x1151
+#define CL_SAMPLER_NORMALIZED_COORDS 0x1152
+#define CL_SAMPLER_ADDRESSING_MODE 0x1153
+#define CL_SAMPLER_FILTER_MODE 0x1154
+#ifdef CL_VERSION_2_0
+/* These enumerants are for the cl_khr_mipmap_image extension.
+ They have since been added to cl_ext.h with an appropriate
+ KHR suffix, but are left here for backwards compatibility. */
+#define CL_SAMPLER_MIP_FILTER_MODE 0x1155
+#define CL_SAMPLER_LOD_MIN 0x1156
+#define CL_SAMPLER_LOD_MAX 0x1157
+#endif
+#ifdef CL_VERSION_3_0
+#define CL_SAMPLER_PROPERTIES 0x1158
+#endif
+
+/* cl_map_flags - bitfield */
+#define CL_MAP_READ (1 << 0)
+#define CL_MAP_WRITE (1 << 1)
+#ifdef CL_VERSION_1_2
+#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2)
+#endif
+
+/* cl_program_info */
+#define CL_PROGRAM_REFERENCE_COUNT 0x1160
+#define CL_PROGRAM_CONTEXT 0x1161
+#define CL_PROGRAM_NUM_DEVICES 0x1162
+#define CL_PROGRAM_DEVICES 0x1163
+#define CL_PROGRAM_SOURCE 0x1164
+#define CL_PROGRAM_BINARY_SIZES 0x1165
+#define CL_PROGRAM_BINARIES 0x1166
+#ifdef CL_VERSION_1_2
+#define CL_PROGRAM_NUM_KERNELS 0x1167
+#define CL_PROGRAM_KERNEL_NAMES 0x1168
+#endif
+#ifdef CL_VERSION_2_1
+#define CL_PROGRAM_IL 0x1169
+#endif
+#ifdef CL_VERSION_2_2
+#define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A
+#define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B
+#endif
+
+/* cl_program_build_info */
+#define CL_PROGRAM_BUILD_STATUS 0x1181
+#define CL_PROGRAM_BUILD_OPTIONS 0x1182
+#define CL_PROGRAM_BUILD_LOG 0x1183
+#ifdef CL_VERSION_1_2
+#define CL_PROGRAM_BINARY_TYPE 0x1184
+#endif
+#ifdef CL_VERSION_2_0
+#define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* cl_program_binary_type */
+#define CL_PROGRAM_BINARY_TYPE_NONE 0x0
+#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1
+#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2
+#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4
+
+#endif
+
+/* cl_build_status */
+#define CL_BUILD_SUCCESS 0
+#define CL_BUILD_NONE -1
+#define CL_BUILD_ERROR -2
+#define CL_BUILD_IN_PROGRESS -3
+
+/* cl_kernel_info */
+#define CL_KERNEL_FUNCTION_NAME 0x1190
+#define CL_KERNEL_NUM_ARGS 0x1191
+#define CL_KERNEL_REFERENCE_COUNT 0x1192
+#define CL_KERNEL_CONTEXT 0x1193
+#define CL_KERNEL_PROGRAM 0x1194
+#ifdef CL_VERSION_1_2
+#define CL_KERNEL_ATTRIBUTES 0x1195
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* cl_kernel_arg_info */
+#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
+#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197
+#define CL_KERNEL_ARG_TYPE_NAME 0x1198
+#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199
+#define CL_KERNEL_ARG_NAME 0x119A
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* cl_kernel_arg_address_qualifier */
+#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B
+#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C
+#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D
+#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* cl_kernel_arg_access_qualifier */
+#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0
+#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1
+#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
+#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* cl_kernel_arg_type_qualifier */
+#define CL_KERNEL_ARG_TYPE_NONE 0
+#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
+#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
+#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2)
+#ifdef CL_VERSION_2_0
+#define CL_KERNEL_ARG_TYPE_PIPE (1 << 3)
+#endif
+
+#endif
+
+/* cl_kernel_work_group_info */
+#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
+#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
+#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
+#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
+#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
+#ifdef CL_VERSION_1_2
+#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
+#endif
+
+#ifdef CL_VERSION_2_1
+
+/* cl_kernel_sub_group_info */
+#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033
+#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034
+#define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8
+#define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9
+#define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA
+
+#endif
+
+#ifdef CL_VERSION_2_0
+
+/* cl_kernel_exec_info */
+#define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6
+#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7
+
+#endif
+
+/* cl_event_info */
+#define CL_EVENT_COMMAND_QUEUE 0x11D0
+#define CL_EVENT_COMMAND_TYPE 0x11D1
+#define CL_EVENT_REFERENCE_COUNT 0x11D2
+#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
+#ifdef CL_VERSION_1_1
+#define CL_EVENT_CONTEXT 0x11D4
+#endif
+
+/* cl_command_type */
+#define CL_COMMAND_NDRANGE_KERNEL 0x11F0
+#define CL_COMMAND_TASK 0x11F1
+#define CL_COMMAND_NATIVE_KERNEL 0x11F2
+#define CL_COMMAND_READ_BUFFER 0x11F3
+#define CL_COMMAND_WRITE_BUFFER 0x11F4
+#define CL_COMMAND_COPY_BUFFER 0x11F5
+#define CL_COMMAND_READ_IMAGE 0x11F6
+#define CL_COMMAND_WRITE_IMAGE 0x11F7
+#define CL_COMMAND_COPY_IMAGE 0x11F8
+#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
+#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
+#define CL_COMMAND_MAP_BUFFER 0x11FB
+#define CL_COMMAND_MAP_IMAGE 0x11FC
+#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
+#define CL_COMMAND_MARKER 0x11FE
+#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
+#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
+#ifdef CL_VERSION_1_1
+#define CL_COMMAND_READ_BUFFER_RECT 0x1201
+#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
+#define CL_COMMAND_COPY_BUFFER_RECT 0x1203
+#define CL_COMMAND_USER 0x1204
+#endif
+#ifdef CL_VERSION_1_2
+#define CL_COMMAND_BARRIER 0x1205
+#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
+#define CL_COMMAND_FILL_BUFFER 0x1207
+#define CL_COMMAND_FILL_IMAGE 0x1208
+#endif
+#ifdef CL_VERSION_2_0
+#define CL_COMMAND_SVM_FREE 0x1209
+#define CL_COMMAND_SVM_MEMCPY 0x120A
+#define CL_COMMAND_SVM_MEMFILL 0x120B
+#define CL_COMMAND_SVM_MAP 0x120C
+#define CL_COMMAND_SVM_UNMAP 0x120D
+#endif
+#ifdef CL_VERSION_3_0
+#define CL_COMMAND_SVM_MIGRATE_MEM 0x120E
+#endif
+
+/* command execution status */
+#define CL_COMPLETE 0x0
+#define CL_RUNNING 0x1
+#define CL_SUBMITTED 0x2
+#define CL_QUEUED 0x3
+
+/* cl_buffer_create_type */
+#ifdef CL_VERSION_1_1
+#define CL_BUFFER_CREATE_TYPE_REGION 0x1220
+#endif
+
+/* cl_profiling_info */
+#define CL_PROFILING_COMMAND_QUEUED 0x1280
+#define CL_PROFILING_COMMAND_SUBMIT 0x1281
+#define CL_PROFILING_COMMAND_START 0x1282
+#define CL_PROFILING_COMMAND_END 0x1283
+#ifdef CL_VERSION_2_0
+#define CL_PROFILING_COMMAND_COMPLETE 0x1284
+#endif
+
+/* cl_device_atomic_capabilities - bitfield */
+#ifdef CL_VERSION_3_0
+#define CL_DEVICE_ATOMIC_ORDER_RELAXED (1 << 0)
+#define CL_DEVICE_ATOMIC_ORDER_ACQ_REL (1 << 1)
+#define CL_DEVICE_ATOMIC_ORDER_SEQ_CST (1 << 2)
+#define CL_DEVICE_ATOMIC_SCOPE_WORK_ITEM (1 << 3)
+#define CL_DEVICE_ATOMIC_SCOPE_WORK_GROUP (1 << 4)
+#define CL_DEVICE_ATOMIC_SCOPE_DEVICE (1 << 5)
+#define CL_DEVICE_ATOMIC_SCOPE_ALL_DEVICES (1 << 6)
+#endif
+
+/* cl_device_device_enqueue_capabilities - bitfield */
+#ifdef CL_VERSION_3_0
+#define CL_DEVICE_QUEUE_SUPPORTED (1 << 0)
+#define CL_DEVICE_QUEUE_REPLACEABLE_DEFAULT (1 << 1)
+#endif
+
+/* cl_khronos_vendor_id */
+#define CL_KHRONOS_VENDOR_ID_CODEPLAY 0x10004
+
+#ifdef CL_VERSION_3_0
+
+/* cl_version */
+#define CL_VERSION_MAJOR_BITS (10)
+#define CL_VERSION_MINOR_BITS (10)
+#define CL_VERSION_PATCH_BITS (12)
+
+#define CL_VERSION_MAJOR_MASK ((1 << CL_VERSION_MAJOR_BITS) - 1)
+#define CL_VERSION_MINOR_MASK ((1 << CL_VERSION_MINOR_BITS) - 1)
+#define CL_VERSION_PATCH_MASK ((1 << CL_VERSION_PATCH_BITS) - 1)
+
+#define CL_VERSION_MAJOR(version) \
+ ((version) >> (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS))
+
+#define CL_VERSION_MINOR(version) \
+ (((version) >> CL_VERSION_PATCH_BITS) & CL_VERSION_MINOR_MASK)
+
+#define CL_VERSION_PATCH(version) ((version) & CL_VERSION_PATCH_MASK)
+
+#define CL_MAKE_VERSION(major, minor, patch) \
+ ((((major) & CL_VERSION_MAJOR_MASK) \
+ << (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS)) | \
+ (((minor) & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS) | \
+ ((patch) & CL_VERSION_PATCH_MASK))
+
+#endif
+
+/********************************************************************************************************/
+
+/* Platform API */
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetPlatformIDs(cl_uint num_entries,
+ cl_platform_id * platforms,
+ cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetPlatformInfo(cl_platform_id platform,
+ cl_platform_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+/* Device APIs */
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceIDs(cl_platform_id platform,
+ cl_device_type device_type,
+ cl_uint num_entries,
+ cl_device_id * devices,
+ cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceInfo(cl_device_id device,
+ cl_device_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clCreateSubDevices(cl_device_id in_device,
+ const cl_device_partition_property * properties,
+ cl_uint num_devices,
+ cl_device_id * out_devices,
+ cl_uint * num_devices_ret) CL_API_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+#ifdef CL_VERSION_2_1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetDefaultDeviceCommandQueue(cl_context context,
+ cl_device_id device,
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceAndHostTimer(cl_device_id device,
+ cl_ulong* device_timestamp,
+ cl_ulong* host_timestamp) CL_API_SUFFIX__VERSION_2_1;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetHostTimer(cl_device_id device,
+ cl_ulong * host_timestamp) CL_API_SUFFIX__VERSION_2_1;
+
+#endif
+
+/* Context APIs */
+extern CL_API_ENTRY cl_context CL_API_CALL
+clCreateContext(const cl_context_properties * properties,
+ cl_uint num_devices,
+ const cl_device_id * devices,
+ void (CL_CALLBACK * pfn_notify)(const char * errinfo,
+ const void * private_info,
+ size_t cb,
+ void * user_data),
+ void * user_data,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_context CL_API_CALL
+clCreateContextFromType(const cl_context_properties * properties,
+ cl_device_type device_type,
+ void (CL_CALLBACK * pfn_notify)(const char * errinfo,
+ const void * private_info,
+ size_t cb,
+ void * user_data),
+ void * user_data,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainContext(cl_context context) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetContextInfo(cl_context context,
+ cl_context_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_3_0
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetContextDestructorCallback(cl_context context,
+ void (CL_CALLBACK* pfn_notify)(cl_context context,
+ void* user_data),
+ void* user_data) CL_API_SUFFIX__VERSION_3_0;
+
+#endif
+
+/* Command Queue APIs */
+
+#ifdef CL_VERSION_2_0
+
+extern CL_API_ENTRY cl_command_queue CL_API_CALL
+clCreateCommandQueueWithProperties(cl_context context,
+ cl_device_id device,
+ const cl_queue_properties * properties,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetCommandQueueInfo(cl_command_queue command_queue,
+ cl_command_queue_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+/* Memory Object APIs */
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateBuffer(cl_context context,
+ cl_mem_flags flags,
+ size_t size,
+ void * host_ptr,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateSubBuffer(cl_mem buffer,
+ cl_mem_flags flags,
+ cl_buffer_create_type buffer_create_type,
+ const void * buffer_create_info,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1;
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateImage(cl_context context,
+ cl_mem_flags flags,
+ const cl_image_format * image_format,
+ const cl_image_desc * image_desc,
+ void * host_ptr,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+#ifdef CL_VERSION_2_0
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreatePipe(cl_context context,
+ cl_mem_flags flags,
+ cl_uint pipe_packet_size,
+ cl_uint pipe_max_packets,
+ const cl_pipe_properties * properties,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0;
+
+#endif
+
+#ifdef CL_VERSION_3_0
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateBufferWithProperties(cl_context context,
+ const cl_mem_properties * properties,
+ cl_mem_flags flags,
+ size_t size,
+ void * host_ptr,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_3_0;
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateImageWithProperties(cl_context context,
+ const cl_mem_properties * properties,
+ cl_mem_flags flags,
+ const cl_image_format * image_format,
+ const cl_image_desc * image_desc,
+ void * host_ptr,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_3_0;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetSupportedImageFormats(cl_context context,
+ cl_mem_flags flags,
+ cl_mem_object_type image_type,
+ cl_uint num_entries,
+ cl_image_format * image_formats,
+ cl_uint * num_image_formats) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetMemObjectInfo(cl_mem memobj,
+ cl_mem_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetImageInfo(cl_mem image,
+ cl_image_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_0
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetPipeInfo(cl_mem pipe,
+ cl_pipe_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_2_0;
+
+#endif
+
+#ifdef CL_VERSION_1_1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetMemObjectDestructorCallback(cl_mem memobj,
+ void (CL_CALLBACK * pfn_notify)(cl_mem memobj,
+ void * user_data),
+ void * user_data) CL_API_SUFFIX__VERSION_1_1;
+
+#endif
+
+/* SVM Allocation APIs */
+
+#ifdef CL_VERSION_2_0
+
+extern CL_API_ENTRY void * CL_API_CALL
+clSVMAlloc(cl_context context,
+ cl_svm_mem_flags flags,
+ size_t size,
+ cl_uint alignment) CL_API_SUFFIX__VERSION_2_0;
+
+extern CL_API_ENTRY void CL_API_CALL
+clSVMFree(cl_context context,
+ void * svm_pointer) CL_API_SUFFIX__VERSION_2_0;
+
+#endif
+
+/* Sampler APIs */
+
+#ifdef CL_VERSION_2_0
+
+extern CL_API_ENTRY cl_sampler CL_API_CALL
+clCreateSamplerWithProperties(cl_context context,
+ const cl_sampler_properties * sampler_properties,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetSamplerInfo(cl_sampler sampler,
+ cl_sampler_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+/* Program Object APIs */
+extern CL_API_ENTRY cl_program CL_API_CALL
+clCreateProgramWithSource(cl_context context,
+ cl_uint count,
+ const char ** strings,
+ const size_t * lengths,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_program CL_API_CALL
+clCreateProgramWithBinary(cl_context context,
+ cl_uint num_devices,
+ const cl_device_id * device_list,
+ const size_t * lengths,
+ const unsigned char ** binaries,
+ cl_int * binary_status,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_program CL_API_CALL
+clCreateProgramWithBuiltInKernels(cl_context context,
+ cl_uint num_devices,
+ const cl_device_id * device_list,
+ const char * kernel_names,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+#ifdef CL_VERSION_2_1
+
+extern CL_API_ENTRY cl_program CL_API_CALL
+clCreateProgramWithIL(cl_context context,
+ const void* il,
+ size_t length,
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clBuildProgram(cl_program program,
+ cl_uint num_devices,
+ const cl_device_id * device_list,
+ const char * options,
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
+ void * user_data),
+ void * user_data) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clCompileProgram(cl_program program,
+ cl_uint num_devices,
+ const cl_device_id * device_list,
+ const char * options,
+ cl_uint num_input_headers,
+ const cl_program * input_headers,
+ const char ** header_include_names,
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
+ void * user_data),
+ void * user_data) CL_API_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_program CL_API_CALL
+clLinkProgram(cl_context context,
+ cl_uint num_devices,
+ const cl_device_id * device_list,
+ const char * options,
+ cl_uint num_input_programs,
+ const cl_program * input_programs,
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
+ void * user_data),
+ void * user_data,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+#ifdef CL_VERSION_2_2
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_2_DEPRECATED cl_int CL_API_CALL
+clSetProgramReleaseCallback(cl_program program,
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
+ void * user_data),
+ void * user_data) CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetProgramSpecializationConstant(cl_program program,
+ cl_uint spec_id,
+ size_t spec_size,
+ const void* spec_value) CL_API_SUFFIX__VERSION_2_2;
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetProgramInfo(cl_program program,
+ cl_program_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetProgramBuildInfo(cl_program program,
+ cl_device_id device,
+ cl_program_build_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+/* Kernel Object APIs */
+extern CL_API_ENTRY cl_kernel CL_API_CALL
+clCreateKernel(cl_program program,
+ const char * kernel_name,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clCreateKernelsInProgram(cl_program program,
+ cl_uint num_kernels,
+ cl_kernel * kernels,
+ cl_uint * num_kernels_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_1
+
+extern CL_API_ENTRY cl_kernel CL_API_CALL
+clCloneKernel(cl_kernel source_kernel,
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetKernelArg(cl_kernel kernel,
+ cl_uint arg_index,
+ size_t arg_size,
+ const void * arg_value) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_0
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetKernelArgSVMPointer(cl_kernel kernel,
+ cl_uint arg_index,
+ const void * arg_value) CL_API_SUFFIX__VERSION_2_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetKernelExecInfo(cl_kernel kernel,
+ cl_kernel_exec_info param_name,
+ size_t param_value_size,
+ const void * param_value) CL_API_SUFFIX__VERSION_2_0;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetKernelInfo(cl_kernel kernel,
+ cl_kernel_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetKernelArgInfo(cl_kernel kernel,
+ cl_uint arg_indx,
+ cl_kernel_arg_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetKernelWorkGroupInfo(cl_kernel kernel,
+ cl_device_id device,
+ cl_kernel_work_group_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetKernelSubGroupInfo(cl_kernel kernel,
+ cl_device_id device,
+ cl_kernel_sub_group_info param_name,
+ size_t input_value_size,
+ const void* input_value,
+ size_t param_value_size,
+ void* param_value,
+ size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_1;
+
+#endif
+
+/* Event Object APIs */
+extern CL_API_ENTRY cl_int CL_API_CALL
+clWaitForEvents(cl_uint num_events,
+ const cl_event * event_list) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetEventInfo(cl_event event,
+ cl_event_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+extern CL_API_ENTRY cl_event CL_API_CALL
+clCreateUserEvent(cl_context context,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetUserEventStatus(cl_event event,
+ cl_int execution_status) CL_API_SUFFIX__VERSION_1_1;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetEventCallback(cl_event event,
+ cl_int command_exec_callback_type,
+ void (CL_CALLBACK * pfn_notify)(cl_event event,
+ cl_int event_command_status,
+ void * user_data),
+ void * user_data) CL_API_SUFFIX__VERSION_1_1;
+
+#endif
+
+/* Profiling APIs */
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetEventProfilingInfo(cl_event event,
+ cl_profiling_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+/* Flush and Finish APIs */
+extern CL_API_ENTRY cl_int CL_API_CALL
+clFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clFinish(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+/* Enqueued Commands APIs */
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReadBuffer(cl_command_queue command_queue,
+ cl_mem buffer,
+ cl_bool blocking_read,
+ size_t offset,
+ size_t size,
+ void * ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReadBufferRect(cl_command_queue command_queue,
+ cl_mem buffer,
+ cl_bool blocking_read,
+ const size_t * buffer_offset,
+ const size_t * host_offset,
+ const size_t * region,
+ size_t buffer_row_pitch,
+ size_t buffer_slice_pitch,
+ size_t host_row_pitch,
+ size_t host_slice_pitch,
+ void * ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_1;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueWriteBuffer(cl_command_queue command_queue,
+ cl_mem buffer,
+ cl_bool blocking_write,
+ size_t offset,
+ size_t size,
+ const void * ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueWriteBufferRect(cl_command_queue command_queue,
+ cl_mem buffer,
+ cl_bool blocking_write,
+ const size_t * buffer_offset,
+ const size_t * host_offset,
+ const size_t * region,
+ size_t buffer_row_pitch,
+ size_t buffer_slice_pitch,
+ size_t host_row_pitch,
+ size_t host_slice_pitch,
+ const void * ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_1;
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueFillBuffer(cl_command_queue command_queue,
+ cl_mem buffer,
+ const void * pattern,
+ size_t pattern_size,
+ size_t offset,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyBuffer(cl_command_queue command_queue,
+ cl_mem src_buffer,
+ cl_mem dst_buffer,
+ size_t src_offset,
+ size_t dst_offset,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyBufferRect(cl_command_queue command_queue,
+ cl_mem src_buffer,
+ cl_mem dst_buffer,
+ const size_t * src_origin,
+ const size_t * dst_origin,
+ const size_t * region,
+ size_t src_row_pitch,
+ size_t src_slice_pitch,
+ size_t dst_row_pitch,
+ size_t dst_slice_pitch,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_1;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReadImage(cl_command_queue command_queue,
+ cl_mem image,
+ cl_bool blocking_read,
+ const size_t * origin,
+ const size_t * region,
+ size_t row_pitch,
+ size_t slice_pitch,
+ void * ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueWriteImage(cl_command_queue command_queue,
+ cl_mem image,
+ cl_bool blocking_write,
+ const size_t * origin,
+ const size_t * region,
+ size_t input_row_pitch,
+ size_t input_slice_pitch,
+ const void * ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueFillImage(cl_command_queue command_queue,
+ cl_mem image,
+ const void * fill_color,
+ const size_t * origin,
+ const size_t * region,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyImage(cl_command_queue command_queue,
+ cl_mem src_image,
+ cl_mem dst_image,
+ const size_t * src_origin,
+ const size_t * dst_origin,
+ const size_t * region,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyImageToBuffer(cl_command_queue command_queue,
+ cl_mem src_image,
+ cl_mem dst_buffer,
+ const size_t * src_origin,
+ const size_t * region,
+ size_t dst_offset,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyBufferToImage(cl_command_queue command_queue,
+ cl_mem src_buffer,
+ cl_mem dst_image,
+ size_t src_offset,
+ const size_t * dst_origin,
+ const size_t * region,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY void * CL_API_CALL
+clEnqueueMapBuffer(cl_command_queue command_queue,
+ cl_mem buffer,
+ cl_bool blocking_map,
+ cl_map_flags map_flags,
+ size_t offset,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY void * CL_API_CALL
+clEnqueueMapImage(cl_command_queue command_queue,
+ cl_mem image,
+ cl_bool blocking_map,
+ cl_map_flags map_flags,
+ const size_t * origin,
+ const size_t * region,
+ size_t * image_row_pitch,
+ size_t * image_slice_pitch,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueUnmapMemObject(cl_command_queue command_queue,
+ cl_mem memobj,
+ void * mapped_ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMigrateMemObjects(cl_command_queue command_queue,
+ cl_uint num_mem_objects,
+ const cl_mem * mem_objects,
+ cl_mem_migration_flags flags,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueNDRangeKernel(cl_command_queue command_queue,
+ cl_kernel kernel,
+ cl_uint work_dim,
+ const size_t * global_work_offset,
+ const size_t * global_work_size,
+ const size_t * local_work_size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueNativeKernel(cl_command_queue command_queue,
+ void (CL_CALLBACK * user_func)(void *),
+ void * args,
+ size_t cb_args,
+ cl_uint num_mem_objects,
+ const cl_mem * mem_list,
+ const void ** args_mem_loc,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMarkerWithWaitList(cl_command_queue command_queue,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueBarrierWithWaitList(cl_command_queue command_queue,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+#ifdef CL_VERSION_2_0
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMFree(cl_command_queue command_queue,
+ cl_uint num_svm_pointers,
+ void * svm_pointers[],
+ void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue,
+ cl_uint num_svm_pointers,
+ void * svm_pointers[],
+ void * user_data),
+ void * user_data,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMMemcpy(cl_command_queue command_queue,
+ cl_bool blocking_copy,
+ void * dst_ptr,
+ const void * src_ptr,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMMemFill(cl_command_queue command_queue,
+ void * svm_ptr,
+ const void * pattern,
+ size_t pattern_size,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMMap(cl_command_queue command_queue,
+ cl_bool blocking_map,
+ cl_map_flags flags,
+ void * svm_ptr,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMUnmap(cl_command_queue command_queue,
+ void * svm_ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
+
+#endif
+
+#ifdef CL_VERSION_2_1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMMigrateMem(cl_command_queue command_queue,
+ cl_uint num_svm_pointers,
+ const void ** svm_pointers,
+ const size_t * sizes,
+ cl_mem_migration_flags flags,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_2_1;
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+/* Extension function access
+ *
+ * Returns the extension function address for the given function name,
+ * or NULL if a valid function can not be found. The client must
+ * check to make sure the address is not NULL, before using or
+ * calling the returned function address.
+ */
+extern CL_API_ENTRY void * CL_API_CALL
+clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
+ const char * func_name) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
+ /*
+ * WARNING:
+ * This API introduces mutable state into the OpenCL implementation. It has been REMOVED
+ * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the
+ * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
+ * It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
+ *
+ * Software developers previously relying on this API are instructed to set the command queue
+ * properties when creating the queue, instead.
+ */
+ extern CL_API_ENTRY cl_int CL_API_CALL
+ clSetCommandQueueProperty(cl_command_queue command_queue,
+ cl_command_queue_properties properties,
+ cl_bool enable,
+ cl_command_queue_properties * old_properties) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
+#endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
+
+/* Deprecated OpenCL 1.1 APIs */
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+clCreateImage2D(cl_context context,
+ cl_mem_flags flags,
+ const cl_image_format * image_format,
+ size_t image_width,
+ size_t image_height,
+ size_t image_row_pitch,
+ void * host_ptr,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+clCreateImage3D(cl_context context,
+ cl_mem_flags flags,
+ const cl_image_format * image_format,
+ size_t image_width,
+ size_t image_height,
+ size_t image_depth,
+ size_t image_row_pitch,
+ size_t image_slice_pitch,
+ void * host_ptr,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
+clEnqueueMarker(cl_command_queue command_queue,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
+clEnqueueWaitForEvents(cl_command_queue command_queue,
+ cl_uint num_events,
+ const cl_event * event_list) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
+clEnqueueBarrier(cl_command_queue command_queue) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
+clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
+clGetExtensionFunctionAddress(const char * func_name) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+/* Deprecated OpenCL 2.0 APIs */
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
+clCreateCommandQueue(cl_context context,
+ cl_device_id device,
+ cl_command_queue_properties properties,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
+clCreateSampler(cl_context context,
+ cl_bool normalized_coords,
+ cl_addressing_mode addressing_mode,
+ cl_filter_mode filter_mode,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
+clEnqueueTask(cl_command_queue command_queue,
+ cl_kernel kernel,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENCL_CL_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_egl.h b/test/linux/jni/include/thirdparty/CL/cl_egl.h
new file mode 100644
index 0000000..c8bde80
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_egl.h
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef __OPENCL_CL_EGL_H
+#define __OPENCL_CL_EGL_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
+#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
+#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
+#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
+
+/* Error type for clCreateFromEGLImageKHR */
+#define CL_INVALID_EGL_OBJECT_KHR -1093
+#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
+
+/* CLeglImageKHR is an opaque handle to an EGLImage */
+typedef void* CLeglImageKHR;
+
+/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
+typedef void* CLeglDisplayKHR;
+
+/* CLeglSyncKHR is an opaque handle to an EGLSync object */
+typedef void* CLeglSyncKHR;
+
+/* properties passed to clCreateFromEGLImageKHR */
+typedef intptr_t cl_egl_image_properties_khr;
+
+
+#define cl_khr_egl_image 1
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromEGLImageKHR(cl_context context,
+ CLeglDisplayKHR egldisplay,
+ CLeglImageKHR eglimage,
+ cl_mem_flags flags,
+ const cl_egl_image_properties_khr * properties,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
+ cl_context context,
+ CLeglDisplayKHR egldisplay,
+ CLeglImageKHR eglimage,
+ cl_mem_flags flags,
+ const cl_egl_image_properties_khr * properties,
+ cl_int * errcode_ret);
+
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event);
+
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
+ cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event);
+
+
+#define cl_khr_egl_event 1
+
+extern CL_API_ENTRY cl_event CL_API_CALL
+clCreateEventFromEGLSyncKHR(cl_context context,
+ CLeglSyncKHR sync,
+ CLeglDisplayKHR display,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
+ cl_context context,
+ CLeglSyncKHR sync,
+ CLeglDisplayKHR display,
+ cl_int * errcode_ret);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENCL_CL_EGL_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_ext.h b/test/linux/jni/include/thirdparty/CL/cl_ext.h
new file mode 100644
index 0000000..0239b64
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_ext.h
@@ -0,0 +1,907 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+/* cl_ext.h contains OpenCL extensions which don't have external */
+/* (OpenGL, D3D) dependencies. */
+
+#ifndef __CL_EXT_H
+#define __CL_EXT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+/* cl_khr_fp64 extension - no extension #define since it has no functions */
+/* CL_DEVICE_DOUBLE_FP_CONFIG is defined in CL.h for OpenCL >= 120 */
+
+#if CL_TARGET_OPENCL_VERSION <= 110
+#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
+#endif
+
+/* cl_khr_fp16 extension - no extension #define since it has no functions */
+#define CL_DEVICE_HALF_FP_CONFIG 0x1033
+
+/* Memory object destruction
+ *
+ * Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
+ *
+ * Registers a user callback function that will be called when the memory object is deleted and its resources
+ * freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
+ * stack associated with memobj. The registered user callback functions are called in the reverse order in
+ * which they were registered. The user callback functions are called and then the memory object is deleted
+ * and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
+ * notified when the memory referenced by host_ptr, specified when the memory object is created and used as
+ * the storage bits for the memory object, can be reused or freed.
+ *
+ * The application may not call CL api's with the cl_mem object passed to the pfn_notify.
+ *
+ * Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
+ * before using.
+ */
+#define cl_APPLE_SetMemObjectDestructor 1
+cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem memobj,
+ void (* pfn_notify)(cl_mem memobj, void * user_data),
+ void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
+
+
+/* Context Logging Functions
+ *
+ * The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
+ * Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
+ * before using.
+ *
+ * clLogMessagesToSystemLog forwards on all log messages to the Apple System Logger
+ */
+#define cl_APPLE_ContextLoggingFunctions 1
+extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * errstr,
+ const void * private_info,
+ size_t cb,
+ void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
+
+/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
+extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * errstr,
+ const void * private_info,
+ size_t cb,
+ void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
+
+/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
+extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * errstr,
+ const void * private_info,
+ size_t cb,
+ void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
+
+
+/************************
+* cl_khr_icd extension *
+************************/
+#define cl_khr_icd 1
+
+/* cl_platform_info */
+#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
+
+/* Additional Error Codes */
+#define CL_PLATFORM_NOT_FOUND_KHR -1001
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clIcdGetPlatformIDsKHR(cl_uint num_entries,
+ cl_platform_id * platforms,
+ cl_uint * num_platforms);
+
+typedef CL_API_ENTRY cl_int
+(CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(cl_uint num_entries,
+ cl_platform_id * platforms,
+ cl_uint * num_platforms);
+
+
+/*******************************
+ * cl_khr_il_program extension *
+ *******************************/
+#define cl_khr_il_program 1
+
+/* New property to clGetDeviceInfo for retrieving supported intermediate
+ * languages
+ */
+#define CL_DEVICE_IL_VERSION_KHR 0x105B
+
+/* New property to clGetProgramInfo for retrieving for retrieving the IL of a
+ * program
+ */
+#define CL_PROGRAM_IL_KHR 0x1169
+
+extern CL_API_ENTRY cl_program CL_API_CALL
+clCreateProgramWithILKHR(cl_context context,
+ const void * il,
+ size_t length,
+ cl_int * errcode_ret);
+
+typedef CL_API_ENTRY cl_program
+(CL_API_CALL *clCreateProgramWithILKHR_fn)(cl_context context,
+ const void * il,
+ size_t length,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
+
+/* Extension: cl_khr_image2d_from_buffer
+ *
+ * This extension allows a 2D image to be created from a cl_mem buffer without
+ * a copy. The type associated with a 2D image created from a buffer in an
+ * OpenCL program is image2d_t. Both the sampler and sampler-less read_image
+ * built-in functions are supported for 2D images and 2D images created from
+ * a buffer. Similarly, the write_image built-ins are also supported for 2D
+ * images created from a buffer.
+ *
+ * When the 2D image from buffer is created, the client must specify the
+ * width, height, image format (i.e. channel order and channel data type)
+ * and optionally the row pitch.
+ *
+ * The pitch specified must be a multiple of
+ * CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR pixels.
+ * The base address of the buffer must be aligned to
+ * CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR pixels.
+ */
+
+#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR 0x104A
+#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR 0x104B
+
+
+/**************************************
+ * cl_khr_initialize_memory extension *
+ **************************************/
+
+#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030
+
+
+/**************************************
+ * cl_khr_terminate_context extension *
+ **************************************/
+
+#define CL_CONTEXT_TERMINATED_KHR -1121
+
+#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x2031
+#define CL_CONTEXT_TERMINATE_KHR 0x2032
+
+#define cl_khr_terminate_context 1
+extern CL_API_ENTRY cl_int CL_API_CALL
+clTerminateContextKHR(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_int
+(CL_API_CALL *clTerminateContextKHR_fn)(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
+
+
+/*
+ * Extension: cl_khr_spir
+ *
+ * This extension adds support to create an OpenCL program object from a
+ * Standard Portable Intermediate Representation (SPIR) instance
+ */
+
+#define CL_DEVICE_SPIR_VERSIONS 0x40E0
+#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
+
+
+/*****************************************
+ * cl_khr_create_command_queue extension *
+ *****************************************/
+#define cl_khr_create_command_queue 1
+
+typedef cl_properties cl_queue_properties_khr;
+
+extern CL_API_ENTRY cl_command_queue CL_API_CALL
+clCreateCommandQueueWithPropertiesKHR(cl_context context,
+ cl_device_id device,
+ const cl_queue_properties_khr* properties,
+ cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_command_queue
+(CL_API_CALL *clCreateCommandQueueWithPropertiesKHR_fn)(cl_context context,
+ cl_device_id device,
+ const cl_queue_properties_khr* properties,
+ cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
+
+
+/******************************************
+* cl_nv_device_attribute_query extension *
+******************************************/
+
+/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
+#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
+#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
+#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
+#define CL_DEVICE_WARP_SIZE_NV 0x4003
+#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
+#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
+#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
+
+
+/*********************************
+* cl_amd_device_attribute_query *
+*********************************/
+
+#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
+#define CL_DEVICE_TOPOLOGY_AMD 0x4037
+#define CL_DEVICE_BOARD_NAME_AMD 0x4038
+#define CL_DEVICE_GLOBAL_FREE_MEMORY_AMD 0x4039
+#define CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD 0x4040
+#define CL_DEVICE_SIMD_WIDTH_AMD 0x4041
+#define CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD 0x4042
+#define CL_DEVICE_WAVEFRONT_WIDTH_AMD 0x4043
+#define CL_DEVICE_GLOBAL_MEM_CHANNELS_AMD 0x4044
+#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANKS_AMD 0x4045
+#define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD 0x4046
+#define CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD 0x4047
+#define CL_DEVICE_LOCAL_MEM_BANKS_AMD 0x4048
+#define CL_DEVICE_THREAD_TRACE_SUPPORTED_AMD 0x4049
+#define CL_DEVICE_GFXIP_MAJOR_AMD 0x404A
+#define CL_DEVICE_GFXIP_MINOR_AMD 0x404B
+#define CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD 0x404C
+#define CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_AMD 0x4030
+#define CL_DEVICE_MAX_WORK_GROUP_SIZE_AMD 0x4031
+#define CL_DEVICE_PREFERRED_CONSTANT_BUFFER_SIZE_AMD 0x4033
+#define CL_DEVICE_PCIE_ID_AMD 0x4034
+
+
+/*********************************
+* cl_arm_printf extension
+*********************************/
+
+#define CL_PRINTF_CALLBACK_ARM 0x40B0
+#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
+
+
+/***********************************
+* cl_ext_device_fission extension
+***********************************/
+#define cl_ext_device_fission 1
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
+
+typedef CL_API_ENTRY cl_int
+(CL_API_CALL *clReleaseDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
+
+typedef CL_API_ENTRY cl_int
+(CL_API_CALL *clRetainDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
+
+typedef cl_ulong cl_device_partition_property_ext;
+extern CL_API_ENTRY cl_int CL_API_CALL
+clCreateSubDevicesEXT(cl_device_id in_device,
+ const cl_device_partition_property_ext * properties,
+ cl_uint num_entries,
+ cl_device_id * out_devices,
+ cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
+
+typedef CL_API_ENTRY cl_int
+(CL_API_CALL * clCreateSubDevicesEXT_fn)(cl_device_id in_device,
+ const cl_device_partition_property_ext * properties,
+ cl_uint num_entries,
+ cl_device_id * out_devices,
+ cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
+
+/* cl_device_partition_property_ext */
+#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
+#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
+#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
+#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
+
+/* clDeviceGetInfo selectors */
+#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
+#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
+#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
+#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
+#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
+
+/* error codes */
+#define CL_DEVICE_PARTITION_FAILED_EXT -1057
+#define CL_INVALID_PARTITION_COUNT_EXT -1058
+#define CL_INVALID_PARTITION_NAME_EXT -1059
+
+/* CL_AFFINITY_DOMAINs */
+#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
+#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
+#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
+#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
+#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
+#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
+
+/* cl_device_partition_property_ext list terminators */
+#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
+#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
+#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
+
+
+/***********************************
+ * cl_ext_migrate_memobject extension definitions
+ ***********************************/
+#define cl_ext_migrate_memobject 1
+
+typedef cl_bitfield cl_mem_migration_flags_ext;
+
+#define CL_MIGRATE_MEM_OBJECT_HOST_EXT 0x1
+
+#define CL_COMMAND_MIGRATE_MEM_OBJECT_EXT 0x4040
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMigrateMemObjectEXT(cl_command_queue command_queue,
+ cl_uint num_mem_objects,
+ const cl_mem * mem_objects,
+ cl_mem_migration_flags_ext flags,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event);
+
+typedef CL_API_ENTRY cl_int
+(CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)(cl_command_queue command_queue,
+ cl_uint num_mem_objects,
+ const cl_mem * mem_objects,
+ cl_mem_migration_flags_ext flags,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event);
+
+
+/*********************************
+* cl_ext_cxx_for_opencl extension
+*********************************/
+#define cl_ext_cxx_for_opencl 1
+
+#define CL_DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT 0x4230
+
+/*********************************
+* cl_qcom_ext_host_ptr extension
+*********************************/
+#define cl_qcom_ext_host_ptr 1
+
+#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
+
+#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
+#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
+#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
+#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
+#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
+#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
+#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
+#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
+
+typedef cl_uint cl_image_pitch_info_qcom;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceImageInfoQCOM(cl_device_id device,
+ size_t image_width,
+ size_t image_height,
+ const cl_image_format *image_format,
+ cl_image_pitch_info_qcom param_name,
+ size_t param_value_size,
+ void *param_value,
+ size_t *param_value_size_ret);
+
+typedef struct _cl_mem_ext_host_ptr
+{
+ /* Type of external memory allocation. */
+ /* Legal values will be defined in layered extensions. */
+ cl_uint allocation_type;
+
+ /* Host cache policy for this external memory allocation. */
+ cl_uint host_cache_policy;
+
+} cl_mem_ext_host_ptr;
+
+
+/*******************************************
+* cl_qcom_ext_host_ptr_iocoherent extension
+********************************************/
+
+/* Cache policy specifying io-coherence */
+#define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9
+
+
+/*********************************
+* cl_qcom_ion_host_ptr extension
+*********************************/
+
+#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
+
+typedef struct _cl_mem_ion_host_ptr
+{
+ /* Type of external memory allocation. */
+ /* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
+ cl_mem_ext_host_ptr ext_host_ptr;
+
+ /* ION file descriptor */
+ int ion_filedesc;
+
+ /* Host pointer to the ION allocated memory */
+ void* ion_hostptr;
+
+} cl_mem_ion_host_ptr;
+
+
+/*********************************
+* cl_qcom_android_native_buffer_host_ptr extension
+*********************************/
+
+#define CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM 0x40C6
+
+typedef struct _cl_mem_android_native_buffer_host_ptr
+{
+ /* Type of external memory allocation. */
+ /* Must be CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM for Android native buffers. */
+ cl_mem_ext_host_ptr ext_host_ptr;
+
+ /* Virtual pointer to the android native buffer */
+ void* anb_ptr;
+
+} cl_mem_android_native_buffer_host_ptr;
+
+
+/******************************************
+ * cl_img_yuv_image extension *
+ ******************************************/
+
+/* Image formats used in clCreateImage */
+#define CL_NV21_IMG 0x40D0
+#define CL_YV12_IMG 0x40D1
+
+
+/******************************************
+ * cl_img_cached_allocations extension *
+ ******************************************/
+
+/* Flag values used by clCreateBuffer */
+#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
+#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
+
+
+/******************************************
+ * cl_img_use_gralloc_ptr extension *
+ ******************************************/
+#define cl_img_use_gralloc_ptr 1
+
+/* Flag values used by clCreateBuffer */
+#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
+
+/* To be used by clGetEventInfo: */
+#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
+#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
+
+/* Error codes from clEnqueueAcquireGrallocObjectsIMG and clEnqueueReleaseGrallocObjectsIMG */
+#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
+#define CL_INVALID_GRALLOC_OBJECT_IMG 0x40D5
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueAcquireGrallocObjectsIMG(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReleaseGrallocObjectsIMG(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
+
+/******************************************
+ * cl_img_generate_mipmap extension *
+ ******************************************/
+#define cl_img_generate_mipmap 1
+
+typedef cl_uint cl_mipmap_filter_mode_img;
+
+/* To be used by clEnqueueGenerateMipmapIMG */
+#define CL_MIPMAP_FILTER_ANY_IMG 0x0
+#define CL_MIPMAP_FILTER_BOX_IMG 0x1
+
+/* To be used by clGetEventInfo */
+#define CL_COMMAND_GENERATE_MIPMAP_IMG 0x40D6
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueGenerateMipmapIMG(cl_command_queue command_queue,
+ cl_mem src_image,
+ cl_mem dst_image,
+ cl_mipmap_filter_mode_img mipmap_filter_mode,
+ const size_t *array_region,
+ const size_t *mip_region,
+ cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
+
+/******************************************
+ * cl_img_mem_properties extension *
+ ******************************************/
+#define cl_img_mem_properties 1
+
+/* To be used by clCreateBufferWithProperties */
+#define CL_MEM_ALLOC_FLAGS_IMG 0x40D7
+
+/* To be used wiith the CL_MEM_ALLOC_FLAGS_IMG property */
+typedef cl_bitfield cl_mem_alloc_flags_img;
+
+/* To be used with cl_mem_alloc_flags_img */
+#define CL_MEM_ALLOC_RELAX_REQUIREMENTS_IMG (1 << 0)
+
+/*********************************
+* cl_khr_subgroups extension
+*********************************/
+#define cl_khr_subgroups 1
+
+#if !defined(CL_VERSION_2_1)
+/* For OpenCL 2.1 and newer, cl_kernel_sub_group_info is declared in CL.h.
+ In hindsight, there should have been a khr suffix on this type for
+ the extension, but keeping it un-suffixed to maintain backwards
+ compatibility. */
+typedef cl_uint cl_kernel_sub_group_info;
+#endif
+
+/* cl_kernel_sub_group_info */
+#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
+#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetKernelSubGroupInfoKHR(cl_kernel in_kernel,
+ cl_device_id in_device,
+ cl_kernel_sub_group_info param_name,
+ size_t input_value_size,
+ const void * input_value,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
+
+typedef CL_API_ENTRY cl_int
+(CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel in_kernel,
+ cl_device_id in_device,
+ cl_kernel_sub_group_info param_name,
+ size_t input_value_size,
+ const void * input_value,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
+
+
+/*********************************
+* cl_khr_mipmap_image extension
+*********************************/
+
+/* cl_sampler_properties */
+#define CL_SAMPLER_MIP_FILTER_MODE_KHR 0x1155
+#define CL_SAMPLER_LOD_MIN_KHR 0x1156
+#define CL_SAMPLER_LOD_MAX_KHR 0x1157
+
+
+/*********************************
+* cl_khr_priority_hints extension
+*********************************/
+/* This extension define is for backwards compatibility.
+ It shouldn't be required since this extension has no new functions. */
+#define cl_khr_priority_hints 1
+
+typedef cl_uint cl_queue_priority_khr;
+
+/* cl_command_queue_properties */
+#define CL_QUEUE_PRIORITY_KHR 0x1096
+
+/* cl_queue_priority_khr */
+#define CL_QUEUE_PRIORITY_HIGH_KHR (1<<0)
+#define CL_QUEUE_PRIORITY_MED_KHR (1<<1)
+#define CL_QUEUE_PRIORITY_LOW_KHR (1<<2)
+
+
+/*********************************
+* cl_khr_throttle_hints extension
+*********************************/
+/* This extension define is for backwards compatibility.
+ It shouldn't be required since this extension has no new functions. */
+#define cl_khr_throttle_hints 1
+
+typedef cl_uint cl_queue_throttle_khr;
+
+/* cl_command_queue_properties */
+#define CL_QUEUE_THROTTLE_KHR 0x1097
+
+/* cl_queue_throttle_khr */
+#define CL_QUEUE_THROTTLE_HIGH_KHR (1<<0)
+#define CL_QUEUE_THROTTLE_MED_KHR (1<<1)
+#define CL_QUEUE_THROTTLE_LOW_KHR (1<<2)
+
+
+/*********************************
+* cl_khr_subgroup_named_barrier
+*********************************/
+/* This extension define is for backwards compatibility.
+ It shouldn't be required since this extension has no new functions. */
+#define cl_khr_subgroup_named_barrier 1
+
+/* cl_device_info */
+#define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035
+
+
+/*********************************
+* cl_khr_extended_versioning
+*********************************/
+
+#define cl_khr_extended_versioning 1
+
+#define CL_VERSION_MAJOR_BITS_KHR (10)
+#define CL_VERSION_MINOR_BITS_KHR (10)
+#define CL_VERSION_PATCH_BITS_KHR (12)
+
+#define CL_VERSION_MAJOR_MASK_KHR ((1 << CL_VERSION_MAJOR_BITS_KHR) - 1)
+#define CL_VERSION_MINOR_MASK_KHR ((1 << CL_VERSION_MINOR_BITS_KHR) - 1)
+#define CL_VERSION_PATCH_MASK_KHR ((1 << CL_VERSION_PATCH_BITS_KHR) - 1)
+
+#define CL_VERSION_MAJOR_KHR(version) ((version) >> (CL_VERSION_MINOR_BITS_KHR + CL_VERSION_PATCH_BITS_KHR))
+#define CL_VERSION_MINOR_KHR(version) (((version) >> CL_VERSION_PATCH_BITS_KHR) & CL_VERSION_MINOR_MASK_KHR)
+#define CL_VERSION_PATCH_KHR(version) ((version) & CL_VERSION_PATCH_MASK_KHR)
+
+#define CL_MAKE_VERSION_KHR(major, minor, patch) \
+ ((((major) & CL_VERSION_MAJOR_MASK_KHR) << (CL_VERSION_MINOR_BITS_KHR + CL_VERSION_PATCH_BITS_KHR)) | \
+ (((minor) & CL_VERSION_MINOR_MASK_KHR) << CL_VERSION_PATCH_BITS_KHR) | \
+ ((patch) & CL_VERSION_PATCH_MASK_KHR))
+
+typedef cl_uint cl_version_khr;
+
+#define CL_NAME_VERSION_MAX_NAME_SIZE_KHR 64
+
+typedef struct _cl_name_version_khr
+{
+ cl_version_khr version;
+ char name[CL_NAME_VERSION_MAX_NAME_SIZE_KHR];
+} cl_name_version_khr;
+
+/* cl_platform_info */
+#define CL_PLATFORM_NUMERIC_VERSION_KHR 0x0906
+#define CL_PLATFORM_EXTENSIONS_WITH_VERSION_KHR 0x0907
+
+/* cl_device_info */
+#define CL_DEVICE_NUMERIC_VERSION_KHR 0x105E
+#define CL_DEVICE_OPENCL_C_NUMERIC_VERSION_KHR 0x105F
+#define CL_DEVICE_EXTENSIONS_WITH_VERSION_KHR 0x1060
+#define CL_DEVICE_ILS_WITH_VERSION_KHR 0x1061
+#define CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION_KHR 0x1062
+
+
+/*********************************
+* cl_khr_device_uuid extension
+*********************************/
+#define cl_khr_device_uuid 1
+
+#define CL_UUID_SIZE_KHR 16
+#define CL_LUID_SIZE_KHR 8
+
+#define CL_DEVICE_UUID_KHR 0x106A
+#define CL_DRIVER_UUID_KHR 0x106B
+#define CL_DEVICE_LUID_VALID_KHR 0x106C
+#define CL_DEVICE_LUID_KHR 0x106D
+#define CL_DEVICE_NODE_MASK_KHR 0x106E
+
+
+/**********************************
+ * cl_arm_import_memory extension *
+ **********************************/
+#define cl_arm_import_memory 1
+
+typedef intptr_t cl_import_properties_arm;
+
+/* Default and valid proporties name for cl_arm_import_memory */
+#define CL_IMPORT_TYPE_ARM 0x40B2
+
+/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
+#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
+
+/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
+#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
+
+/* Protected memory property */
+#define CL_IMPORT_TYPE_PROTECTED_ARM 0x40B5
+
+/* Android hardware buffer type value for CL_IMPORT_TYPE_ARM property */
+#define CL_IMPORT_TYPE_ANDROID_HARDWARE_BUFFER_ARM 0x41E2
+
+/* Data consistency with host property */
+#define CL_IMPORT_DMA_BUF_DATA_CONSISTENCY_WITH_HOST_ARM 0x41E3
+
+/* Import memory size value to indicate a size for the whole buffer */
+#define CL_IMPORT_MEMORY_WHOLE_ALLOCATION_ARM SIZE_MAX
+
+/* This extension adds a new function that allows for direct memory import into
+ * OpenCL via the clImportMemoryARM function.
+ *
+ * Memory imported through this interface will be mapped into the device's page
+ * tables directly, providing zero copy access. It will never fall back to copy
+ * operations and aliased buffers.
+ *
+ * Types of memory supported for import are specified as additional extension
+ * strings.
+ *
+ * This extension produces cl_mem allocations which are compatible with all other
+ * users of cl_mem in the standard API.
+ *
+ * This extension maps pages with the same properties as the normal buffer creation
+ * function clCreateBuffer.
+ */
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clImportMemoryARM( cl_context context,
+ cl_mem_flags flags,
+ const cl_import_properties_arm *properties,
+ void *memory,
+ size_t size,
+ cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
+
+
+/******************************************
+ * cl_arm_shared_virtual_memory extension *
+ ******************************************/
+#define cl_arm_shared_virtual_memory 1
+
+/* Used by clGetDeviceInfo */
+#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
+
+/* Used by clGetMemObjectInfo */
+#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
+
+/* Used by clSetKernelExecInfoARM: */
+#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
+#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
+
+/* To be used by clGetEventInfo: */
+#define CL_COMMAND_SVM_FREE_ARM 0x40BA
+#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
+#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
+#define CL_COMMAND_SVM_MAP_ARM 0x40BD
+#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
+
+/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
+#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
+#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
+#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
+#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
+
+/* Flag values used by clSVMAllocARM: */
+#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
+#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
+
+typedef cl_bitfield cl_svm_mem_flags_arm;
+typedef cl_uint cl_kernel_exec_info_arm;
+typedef cl_bitfield cl_device_svm_capabilities_arm;
+
+extern CL_API_ENTRY void * CL_API_CALL
+clSVMAllocARM(cl_context context,
+ cl_svm_mem_flags_arm flags,
+ size_t size,
+ cl_uint alignment) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY void CL_API_CALL
+clSVMFreeARM(cl_context context,
+ void * svm_pointer) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMFreeARM(cl_command_queue command_queue,
+ cl_uint num_svm_pointers,
+ void * svm_pointers[],
+ void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue,
+ cl_uint num_svm_pointers,
+ void * svm_pointers[],
+ void * user_data),
+ void * user_data,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMMemcpyARM(cl_command_queue command_queue,
+ cl_bool blocking_copy,
+ void * dst_ptr,
+ const void * src_ptr,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMMemFillARM(cl_command_queue command_queue,
+ void * svm_ptr,
+ const void * pattern,
+ size_t pattern_size,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMMapARM(cl_command_queue command_queue,
+ cl_bool blocking_map,
+ cl_map_flags flags,
+ void * svm_ptr,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueSVMUnmapARM(cl_command_queue command_queue,
+ void * svm_ptr,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetKernelArgSVMPointerARM(cl_kernel kernel,
+ cl_uint arg_index,
+ const void * arg_value) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetKernelExecInfoARM(cl_kernel kernel,
+ cl_kernel_exec_info_arm param_name,
+ size_t param_value_size,
+ const void * param_value) CL_EXT_SUFFIX__VERSION_1_2;
+
+/********************************
+ * cl_arm_get_core_id extension *
+ ********************************/
+
+#ifdef CL_VERSION_1_2
+
+#define cl_arm_get_core_id 1
+
+/* Device info property for bitfield of cores present */
+#define CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM 0x40BF
+
+#endif /* CL_VERSION_1_2 */
+
+/*********************************
+* cl_arm_job_slot_selection
+*********************************/
+
+#define cl_arm_job_slot_selection 1
+
+/* cl_device_info */
+#define CL_DEVICE_JOB_SLOTS_ARM 0x41E0
+
+/* cl_command_queue_properties */
+#define CL_QUEUE_JOB_SLOT_ARM 0x41E1
+
+/*********************************
+* cl_arm_scheduling_controls
+*********************************/
+
+#define cl_arm_scheduling_controls 1
+
+/* cl_device_info */
+#define CL_DEVICE_SCHEDULING_CONTROLS_CAPABILITIES_ARM 0x41E4
+
+#define CL_DEVICE_SCHEDULING_KERNEL_BATCHING_ARM (1 << 0)
+#define CL_DEVICE_SCHEDULING_WORKGROUP_BATCH_SIZE_ARM (1 << 1)
+#define CL_DEVICE_SCHEDULING_WORKGROUP_BATCH_SIZE_MODIFIER_ARM (1 << 2)
+
+/* cl_kernel_info */
+#define CL_KERNEL_EXEC_INFO_WORKGROUP_BATCH_SIZE_ARM 0x41E5
+#define CL_KERNEL_EXEC_INFO_WORKGROUP_BATCH_SIZE_MODIFIER_ARM 0x41E6
+
+/* cl_queue_properties */
+#define CL_QUEUE_KERNEL_BATCHING_ARM 0x41E7
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __CL_EXT_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_ext_intel.h b/test/linux/jni/include/thirdparty/CL/cl_ext_intel.h
new file mode 100644
index 0000000..aab8228
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_ext_intel.h
@@ -0,0 +1,731 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+/*****************************************************************************\
+
+Copyright (c) 2013-2020 Intel Corporation All Rights Reserved.
+
+THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
+MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+File Name: cl_ext_intel.h
+
+Abstract:
+
+Notes:
+
+\*****************************************************************************/
+
+#ifndef __CL_EXT_INTEL_H
+#define __CL_EXT_INTEL_H
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***************************************
+* cl_intel_thread_local_exec extension *
+****************************************/
+
+#define cl_intel_thread_local_exec 1
+
+#define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL (((cl_bitfield)1) << 31)
+
+/***********************************************
+* cl_intel_device_partition_by_names extension *
+************************************************/
+
+#define cl_intel_device_partition_by_names 1
+
+#define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052
+#define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1
+
+/************************************************
+* cl_intel_accelerator extension *
+* cl_intel_motion_estimation extension *
+* cl_intel_advanced_motion_estimation extension *
+*************************************************/
+
+#define cl_intel_accelerator 1
+#define cl_intel_motion_estimation 1
+#define cl_intel_advanced_motion_estimation 1
+
+typedef struct _cl_accelerator_intel* cl_accelerator_intel;
+typedef cl_uint cl_accelerator_type_intel;
+typedef cl_uint cl_accelerator_info_intel;
+
+typedef struct _cl_motion_estimation_desc_intel {
+ cl_uint mb_block_type;
+ cl_uint subpixel_mode;
+ cl_uint sad_adjust_mode;
+ cl_uint search_path_type;
+} cl_motion_estimation_desc_intel;
+
+/* error codes */
+#define CL_INVALID_ACCELERATOR_INTEL -1094
+#define CL_INVALID_ACCELERATOR_TYPE_INTEL -1095
+#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL -1096
+#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097
+
+/* cl_accelerator_type_intel */
+#define CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL 0x0
+
+/* cl_accelerator_info_intel */
+#define CL_ACCELERATOR_DESCRIPTOR_INTEL 0x4090
+#define CL_ACCELERATOR_REFERENCE_COUNT_INTEL 0x4091
+#define CL_ACCELERATOR_CONTEXT_INTEL 0x4092
+#define CL_ACCELERATOR_TYPE_INTEL 0x4093
+
+/* cl_motion_detect_desc_intel flags */
+#define CL_ME_MB_TYPE_16x16_INTEL 0x0
+#define CL_ME_MB_TYPE_8x8_INTEL 0x1
+#define CL_ME_MB_TYPE_4x4_INTEL 0x2
+
+#define CL_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
+#define CL_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
+#define CL_ME_SUBPIXEL_MODE_QPEL_INTEL 0x2
+
+#define CL_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
+#define CL_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x1
+
+#define CL_ME_SEARCH_PATH_RADIUS_2_2_INTEL 0x0
+#define CL_ME_SEARCH_PATH_RADIUS_4_4_INTEL 0x1
+#define CL_ME_SEARCH_PATH_RADIUS_16_12_INTEL 0x5
+
+#define CL_ME_SKIP_BLOCK_TYPE_16x16_INTEL 0x0
+#define CL_ME_CHROMA_INTRA_PREDICT_ENABLED_INTEL 0x1
+#define CL_ME_LUMA_INTRA_PREDICT_ENABLED_INTEL 0x2
+#define CL_ME_SKIP_BLOCK_TYPE_8x8_INTEL 0x4
+
+#define CL_ME_FORWARD_INPUT_MODE_INTEL 0x1
+#define CL_ME_BACKWARD_INPUT_MODE_INTEL 0x2
+#define CL_ME_BIDIRECTION_INPUT_MODE_INTEL 0x3
+
+#define CL_ME_BIDIR_WEIGHT_QUARTER_INTEL 16
+#define CL_ME_BIDIR_WEIGHT_THIRD_INTEL 21
+#define CL_ME_BIDIR_WEIGHT_HALF_INTEL 32
+#define CL_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 43
+#define CL_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 48
+
+#define CL_ME_COST_PENALTY_NONE_INTEL 0x0
+#define CL_ME_COST_PENALTY_LOW_INTEL 0x1
+#define CL_ME_COST_PENALTY_NORMAL_INTEL 0x2
+#define CL_ME_COST_PENALTY_HIGH_INTEL 0x3
+
+#define CL_ME_COST_PRECISION_QPEL_INTEL 0x0
+#define CL_ME_COST_PRECISION_HPEL_INTEL 0x1
+#define CL_ME_COST_PRECISION_PEL_INTEL 0x2
+#define CL_ME_COST_PRECISION_DPEL_INTEL 0x3
+
+#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
+#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
+#define CL_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
+#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
+
+#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
+#define CL_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
+#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
+#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
+#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
+#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
+
+#define CL_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
+#define CL_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
+#define CL_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
+#define CL_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
+
+/* cl_device_info */
+#define CL_DEVICE_ME_VERSION_INTEL 0x407E
+
+#define CL_ME_VERSION_LEGACY_INTEL 0x0
+#define CL_ME_VERSION_ADVANCED_VER_1_INTEL 0x1
+#define CL_ME_VERSION_ADVANCED_VER_2_INTEL 0x2
+
+extern CL_API_ENTRY cl_accelerator_intel CL_API_CALL
+clCreateAcceleratorINTEL(
+ cl_context context,
+ cl_accelerator_type_intel accelerator_type,
+ size_t descriptor_size,
+ const void* descriptor,
+ cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_accelerator_intel (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
+ cl_context context,
+ cl_accelerator_type_intel accelerator_type,
+ size_t descriptor_size,
+ const void* descriptor,
+ cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetAcceleratorInfoINTEL(
+ cl_accelerator_intel accelerator,
+ cl_accelerator_info_intel param_name,
+ size_t param_value_size,
+ void* param_value,
+ size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
+ cl_accelerator_intel accelerator,
+ cl_accelerator_info_intel param_name,
+ size_t param_value_size,
+ void* param_value,
+ size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainAcceleratorINTEL(
+ cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
+ cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseAcceleratorINTEL(
+ cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
+ cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
+
+/******************************************
+* cl_intel_simultaneous_sharing extension *
+*******************************************/
+
+#define cl_intel_simultaneous_sharing 1
+
+#define CL_DEVICE_SIMULTANEOUS_INTEROPS_INTEL 0x4104
+#define CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL 0x4105
+
+/***********************************
+* cl_intel_egl_image_yuv extension *
+************************************/
+
+#define cl_intel_egl_image_yuv 1
+
+#define CL_EGL_YUV_PLANE_INTEL 0x4107
+
+/********************************
+* cl_intel_packed_yuv extension *
+*********************************/
+
+#define cl_intel_packed_yuv 1
+
+#define CL_YUYV_INTEL 0x4076
+#define CL_UYVY_INTEL 0x4077
+#define CL_YVYU_INTEL 0x4078
+#define CL_VYUY_INTEL 0x4079
+
+/********************************************
+* cl_intel_required_subgroup_size extension *
+*********************************************/
+
+#define cl_intel_required_subgroup_size 1
+
+#define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108
+#define CL_KERNEL_SPILL_MEM_SIZE_INTEL 0x4109
+#define CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL 0x410A
+
+/****************************************
+* cl_intel_driver_diagnostics extension *
+*****************************************/
+
+#define cl_intel_driver_diagnostics 1
+
+typedef cl_uint cl_diagnostics_verbose_level;
+
+#define CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL 0x4106
+
+#define CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL ( 0xff )
+#define CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL ( 1 )
+#define CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL ( 1 << 1 )
+#define CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL ( 1 << 2 )
+
+/********************************
+* cl_intel_planar_yuv extension *
+*********************************/
+
+#define CL_NV12_INTEL 0x410E
+
+#define CL_MEM_NO_ACCESS_INTEL ( 1 << 24 )
+#define CL_MEM_ACCESS_FLAGS_UNRESTRICTED_INTEL ( 1 << 25 )
+
+#define CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL 0x417E
+#define CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL 0x417F
+
+/*******************************************************
+* cl_intel_device_side_avc_motion_estimation extension *
+********************************************************/
+
+#define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B
+#define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C
+#define CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL 0x410D
+
+#define CL_AVC_ME_VERSION_0_INTEL 0x0 /* No support. */
+#define CL_AVC_ME_VERSION_1_INTEL 0x1 /* First supported version. */
+
+#define CL_AVC_ME_MAJOR_16x16_INTEL 0x0
+#define CL_AVC_ME_MAJOR_16x8_INTEL 0x1
+#define CL_AVC_ME_MAJOR_8x16_INTEL 0x2
+#define CL_AVC_ME_MAJOR_8x8_INTEL 0x3
+
+#define CL_AVC_ME_MINOR_8x8_INTEL 0x0
+#define CL_AVC_ME_MINOR_8x4_INTEL 0x1
+#define CL_AVC_ME_MINOR_4x8_INTEL 0x2
+#define CL_AVC_ME_MINOR_4x4_INTEL 0x3
+
+#define CL_AVC_ME_MAJOR_FORWARD_INTEL 0x0
+#define CL_AVC_ME_MAJOR_BACKWARD_INTEL 0x1
+#define CL_AVC_ME_MAJOR_BIDIRECTIONAL_INTEL 0x2
+
+#define CL_AVC_ME_PARTITION_MASK_ALL_INTEL 0x0
+#define CL_AVC_ME_PARTITION_MASK_16x16_INTEL 0x7E
+#define CL_AVC_ME_PARTITION_MASK_16x8_INTEL 0x7D
+#define CL_AVC_ME_PARTITION_MASK_8x16_INTEL 0x7B
+#define CL_AVC_ME_PARTITION_MASK_8x8_INTEL 0x77
+#define CL_AVC_ME_PARTITION_MASK_8x4_INTEL 0x6F
+#define CL_AVC_ME_PARTITION_MASK_4x8_INTEL 0x5F
+#define CL_AVC_ME_PARTITION_MASK_4x4_INTEL 0x3F
+
+#define CL_AVC_ME_SEARCH_WINDOW_EXHAUSTIVE_INTEL 0x0
+#define CL_AVC_ME_SEARCH_WINDOW_SMALL_INTEL 0x1
+#define CL_AVC_ME_SEARCH_WINDOW_TINY_INTEL 0x2
+#define CL_AVC_ME_SEARCH_WINDOW_EXTRA_TINY_INTEL 0x3
+#define CL_AVC_ME_SEARCH_WINDOW_DIAMOND_INTEL 0x4
+#define CL_AVC_ME_SEARCH_WINDOW_LARGE_DIAMOND_INTEL 0x5
+#define CL_AVC_ME_SEARCH_WINDOW_RESERVED0_INTEL 0x6
+#define CL_AVC_ME_SEARCH_WINDOW_RESERVED1_INTEL 0x7
+#define CL_AVC_ME_SEARCH_WINDOW_CUSTOM_INTEL 0x8
+#define CL_AVC_ME_SEARCH_WINDOW_16x12_RADIUS_INTEL 0x9
+#define CL_AVC_ME_SEARCH_WINDOW_4x4_RADIUS_INTEL 0x2
+#define CL_AVC_ME_SEARCH_WINDOW_2x2_RADIUS_INTEL 0xa
+
+#define CL_AVC_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
+#define CL_AVC_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x2
+
+#define CL_AVC_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
+#define CL_AVC_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
+#define CL_AVC_ME_SUBPIXEL_MODE_QPEL_INTEL 0x3
+
+#define CL_AVC_ME_COST_PRECISION_QPEL_INTEL 0x0
+#define CL_AVC_ME_COST_PRECISION_HPEL_INTEL 0x1
+#define CL_AVC_ME_COST_PRECISION_PEL_INTEL 0x2
+#define CL_AVC_ME_COST_PRECISION_DPEL_INTEL 0x3
+
+#define CL_AVC_ME_BIDIR_WEIGHT_QUARTER_INTEL 0x10
+#define CL_AVC_ME_BIDIR_WEIGHT_THIRD_INTEL 0x15
+#define CL_AVC_ME_BIDIR_WEIGHT_HALF_INTEL 0x20
+#define CL_AVC_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 0x2B
+#define CL_AVC_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 0x30
+
+#define CL_AVC_ME_BORDER_REACHED_LEFT_INTEL 0x0
+#define CL_AVC_ME_BORDER_REACHED_RIGHT_INTEL 0x2
+#define CL_AVC_ME_BORDER_REACHED_TOP_INTEL 0x4
+#define CL_AVC_ME_BORDER_REACHED_BOTTOM_INTEL 0x8
+
+#define CL_AVC_ME_SKIP_BLOCK_PARTITION_16x16_INTEL 0x0
+#define CL_AVC_ME_SKIP_BLOCK_PARTITION_8x8_INTEL 0x4000
+
+#define CL_AVC_ME_SKIP_BLOCK_16x16_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
+#define CL_AVC_ME_SKIP_BLOCK_16x16_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
+#define CL_AVC_ME_SKIP_BLOCK_16x16_DUAL_ENABLE_INTEL ( 0x3 << 24 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_FORWARD_ENABLE_INTEL ( 0x55 << 24 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_BACKWARD_ENABLE_INTEL ( 0xAA << 24 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_DUAL_ENABLE_INTEL ( 0xFF << 24 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_0_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_0_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_1_FORWARD_ENABLE_INTEL ( 0x1 << 26 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_1_BACKWARD_ENABLE_INTEL ( 0x2 << 26 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_2_FORWARD_ENABLE_INTEL ( 0x1 << 28 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_2_BACKWARD_ENABLE_INTEL ( 0x2 << 28 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_3_FORWARD_ENABLE_INTEL ( 0x1 << 30 )
+#define CL_AVC_ME_SKIP_BLOCK_8x8_3_BACKWARD_ENABLE_INTEL ( 0x2 << 30 )
+
+#define CL_AVC_ME_BLOCK_BASED_SKIP_4x4_INTEL 0x00
+#define CL_AVC_ME_BLOCK_BASED_SKIP_8x8_INTEL 0x80
+
+#define CL_AVC_ME_INTRA_16x16_INTEL 0x0
+#define CL_AVC_ME_INTRA_8x8_INTEL 0x1
+#define CL_AVC_ME_INTRA_4x4_INTEL 0x2
+
+#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_16x16_INTEL 0x6
+#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_8x8_INTEL 0x5
+#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_4x4_INTEL 0x3
+
+#define CL_AVC_ME_INTRA_NEIGHBOR_LEFT_MASK_ENABLE_INTEL 0x60
+#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_MASK_ENABLE_INTEL 0x10
+#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_RIGHT_MASK_ENABLE_INTEL 0x8
+#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_LEFT_MASK_ENABLE_INTEL 0x4
+
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
+#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
+#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
+#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
+#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
+#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
+
+#define CL_AVC_ME_FRAME_FORWARD_INTEL 0x1
+#define CL_AVC_ME_FRAME_BACKWARD_INTEL 0x2
+#define CL_AVC_ME_FRAME_DUAL_INTEL 0x3
+
+#define CL_AVC_ME_SLICE_TYPE_PRED_INTEL 0x0
+#define CL_AVC_ME_SLICE_TYPE_BPRED_INTEL 0x1
+#define CL_AVC_ME_SLICE_TYPE_INTRA_INTEL 0x2
+
+#define CL_AVC_ME_INTERLACED_SCAN_TOP_FIELD_INTEL 0x0
+#define CL_AVC_ME_INTERLACED_SCAN_BOTTOM_FIELD_INTEL 0x1
+
+/*******************************************
+* cl_intel_unified_shared_memory extension *
+********************************************/
+
+/* These APIs are in sync with Revision Q of the cl_intel_unified_shared_memory spec! */
+
+#define cl_intel_unified_shared_memory 1
+
+/* cl_device_info */
+#define CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL 0x4190
+#define CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL 0x4191
+#define CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL 0x4192
+#define CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL 0x4193
+#define CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL 0x4194
+
+typedef cl_bitfield cl_device_unified_shared_memory_capabilities_intel;
+
+/* cl_device_unified_shared_memory_capabilities_intel - bitfield */
+#define CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL (1 << 0)
+#define CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL (1 << 1)
+#define CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS_INTEL (1 << 2)
+#define CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS_INTEL (1 << 3)
+
+typedef cl_properties cl_mem_properties_intel;
+
+/* cl_mem_properties_intel */
+#define CL_MEM_ALLOC_FLAGS_INTEL 0x4195
+
+typedef cl_bitfield cl_mem_alloc_flags_intel;
+
+/* cl_mem_alloc_flags_intel - bitfield */
+#define CL_MEM_ALLOC_WRITE_COMBINED_INTEL (1 << 0)
+
+typedef cl_uint cl_mem_info_intel;
+
+/* cl_mem_alloc_info_intel */
+#define CL_MEM_ALLOC_TYPE_INTEL 0x419A
+#define CL_MEM_ALLOC_BASE_PTR_INTEL 0x419B
+#define CL_MEM_ALLOC_SIZE_INTEL 0x419C
+#define CL_MEM_ALLOC_DEVICE_INTEL 0x419D
+/* Enum values 0x419E-0x419F are reserved for future queries. */
+
+typedef cl_uint cl_unified_shared_memory_type_intel;
+
+/* cl_unified_shared_memory_type_intel */
+#define CL_MEM_TYPE_UNKNOWN_INTEL 0x4196
+#define CL_MEM_TYPE_HOST_INTEL 0x4197
+#define CL_MEM_TYPE_DEVICE_INTEL 0x4198
+#define CL_MEM_TYPE_SHARED_INTEL 0x4199
+
+typedef cl_uint cl_mem_advice_intel;
+
+/* cl_mem_advice_intel */
+/* Enum values 0x4208-0x420F are reserved for future memory advices. */
+
+/* cl_kernel_exec_info */
+#define CL_KERNEL_EXEC_INFO_INDIRECT_HOST_ACCESS_INTEL 0x4200
+#define CL_KERNEL_EXEC_INFO_INDIRECT_DEVICE_ACCESS_INTEL 0x4201
+#define CL_KERNEL_EXEC_INFO_INDIRECT_SHARED_ACCESS_INTEL 0x4202
+#define CL_KERNEL_EXEC_INFO_USM_PTRS_INTEL 0x4203
+
+/* cl_command_type */
+#define CL_COMMAND_MEMFILL_INTEL 0x4204
+#define CL_COMMAND_MEMCPY_INTEL 0x4205
+#define CL_COMMAND_MIGRATEMEM_INTEL 0x4206
+#define CL_COMMAND_MEMADVISE_INTEL 0x4207
+
+extern CL_API_ENTRY void* CL_API_CALL
+clHostMemAllocINTEL(
+ cl_context context,
+ const cl_mem_properties_intel* properties,
+ size_t size,
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+typedef CL_API_ENTRY void* (CL_API_CALL *
+clHostMemAllocINTEL_fn)(
+ cl_context context,
+ const cl_mem_properties_intel* properties,
+ size_t size,
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+extern CL_API_ENTRY void* CL_API_CALL
+clDeviceMemAllocINTEL(
+ cl_context context,
+ cl_device_id device,
+ const cl_mem_properties_intel* properties,
+ size_t size,
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+typedef CL_API_ENTRY void* (CL_API_CALL *
+clDeviceMemAllocINTEL_fn)(
+ cl_context context,
+ cl_device_id device,
+ const cl_mem_properties_intel* properties,
+ size_t size,
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+extern CL_API_ENTRY void* CL_API_CALL
+clSharedMemAllocINTEL(
+ cl_context context,
+ cl_device_id device,
+ const cl_mem_properties_intel* properties,
+ size_t size,
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+typedef CL_API_ENTRY void* (CL_API_CALL *
+clSharedMemAllocINTEL_fn)(
+ cl_context context,
+ cl_device_id device,
+ const cl_mem_properties_intel* properties,
+ size_t size,
+ cl_uint alignment,
+ cl_int* errcode_ret);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clMemFreeINTEL(
+ cl_context context,
+ void* ptr);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clMemFreeINTEL_fn)(
+ cl_context context,
+ void* ptr);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clMemBlockingFreeINTEL(
+ cl_context context,
+ void* ptr);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clMemBlockingFreeINTEL_fn)(
+ cl_context context,
+ void* ptr);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetMemAllocInfoINTEL(
+ cl_context context,
+ const void* ptr,
+ cl_mem_info_intel param_name,
+ size_t param_value_size,
+ void* param_value,
+ size_t* param_value_size_ret);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clGetMemAllocInfoINTEL_fn)(
+ cl_context context,
+ const void* ptr,
+ cl_mem_info_intel param_name,
+ size_t param_value_size,
+ void* param_value,
+ size_t* param_value_size_ret);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetKernelArgMemPointerINTEL(
+ cl_kernel kernel,
+ cl_uint arg_index,
+ const void* arg_value);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clSetKernelArgMemPointerINTEL_fn)(
+ cl_kernel kernel,
+ cl_uint arg_index,
+ const void* arg_value);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMemsetINTEL( /* Deprecated */
+ cl_command_queue command_queue,
+ void* dst_ptr,
+ cl_int value,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clEnqueueMemsetINTEL_fn)( /* Deprecated */
+ cl_command_queue command_queue,
+ void* dst_ptr,
+ cl_int value,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMemFillINTEL(
+ cl_command_queue command_queue,
+ void* dst_ptr,
+ const void* pattern,
+ size_t pattern_size,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clEnqueueMemFillINTEL_fn)(
+ cl_command_queue command_queue,
+ void* dst_ptr,
+ const void* pattern,
+ size_t pattern_size,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMemcpyINTEL(
+ cl_command_queue command_queue,
+ cl_bool blocking,
+ void* dst_ptr,
+ const void* src_ptr,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clEnqueueMemcpyINTEL_fn)(
+ cl_command_queue command_queue,
+ cl_bool blocking,
+ void* dst_ptr,
+ const void* src_ptr,
+ size_t size,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+#ifdef CL_VERSION_1_2
+
+/* Because these APIs use cl_mem_migration_flags, they require
+ OpenCL 1.2: */
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMigrateMemINTEL(
+ cl_command_queue command_queue,
+ const void* ptr,
+ size_t size,
+ cl_mem_migration_flags flags,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clEnqueueMigrateMemINTEL_fn)(
+ cl_command_queue command_queue,
+ const void* ptr,
+ size_t size,
+ cl_mem_migration_flags flags,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+#endif
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMemAdviseINTEL(
+ cl_command_queue command_queue,
+ const void* ptr,
+ size_t size,
+ cl_mem_advice_intel advice,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *
+clEnqueueMemAdviseINTEL_fn)(
+ cl_command_queue command_queue,
+ const void* ptr,
+ size_t size,
+ cl_mem_advice_intel advice,
+ cl_uint num_events_in_wait_list,
+ const cl_event* event_wait_list,
+ cl_event* event);
+
+/***************************************************
+* cl_intel_create_buffer_with_properties extension *
+****************************************************/
+
+#define cl_intel_create_buffer_with_properties 1
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateBufferWithPropertiesINTEL(
+ cl_context context,
+ const cl_mem_properties_intel* properties,
+ cl_mem_flags flags,
+ size_t size,
+ void * host_ptr,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_mem (CL_API_CALL *
+clCreateBufferWithPropertiesINTEL_fn)(
+ cl_context context,
+ const cl_mem_properties_intel* properties,
+ cl_mem_flags flags,
+ size_t size,
+ void * host_ptr,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
+
+/******************************************
+* cl_intel_mem_channel_property extension *
+*******************************************/
+
+#define CL_MEM_CHANNEL_INTEL 0x4213
+
+/*********************************
+* cl_intel_mem_force_host_memory *
+**********************************/
+
+#define cl_intel_mem_force_host_memory 1
+
+/* cl_mem_flags */
+#define CL_MEM_FORCE_HOST_MEMORY_INTEL (1 << 20)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CL_EXT_INTEL_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_gl.h b/test/linux/jni/include/thirdparty/CL/cl_gl.h
new file mode 100644
index 0000000..b587f02
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_gl.h
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef __OPENCL_CL_GL_H
+#define __OPENCL_CL_GL_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef cl_uint cl_gl_object_type;
+typedef cl_uint cl_gl_texture_info;
+typedef cl_uint cl_gl_platform_info;
+typedef struct __GLsync *cl_GLsync;
+
+/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */
+#define CL_GL_OBJECT_BUFFER 0x2000
+#define CL_GL_OBJECT_TEXTURE2D 0x2001
+#define CL_GL_OBJECT_TEXTURE3D 0x2002
+#define CL_GL_OBJECT_RENDERBUFFER 0x2003
+#ifdef CL_VERSION_1_2
+#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
+#define CL_GL_OBJECT_TEXTURE1D 0x200F
+#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
+#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
+#endif
+
+/* cl_gl_texture_info */
+#define CL_GL_TEXTURE_TARGET 0x2004
+#define CL_GL_MIPMAP_LEVEL 0x2005
+#ifdef CL_VERSION_1_2
+#define CL_GL_NUM_SAMPLES 0x2012
+#endif
+
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromGLBuffer(cl_context context,
+ cl_mem_flags flags,
+ cl_GLuint bufobj,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromGLTexture(cl_context context,
+ cl_mem_flags flags,
+ cl_GLenum target,
+ cl_GLint miplevel,
+ cl_GLuint texture,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#endif
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromGLRenderbuffer(cl_context context,
+ cl_mem_flags flags,
+ cl_GLuint renderbuffer,
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetGLObjectInfo(cl_mem memobj,
+ cl_gl_object_type * gl_object_type,
+ cl_GLuint * gl_object_name) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetGLTextureInfo(cl_mem memobj,
+ cl_gl_texture_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueAcquireGLObjects(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReleaseGLObjects(cl_command_queue command_queue,
+ cl_uint num_objects,
+ const cl_mem * mem_objects,
+ cl_uint num_events_in_wait_list,
+ const cl_event * event_wait_list,
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
+
+
+/* Deprecated OpenCL 1.1 APIs */
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+clCreateFromGLTexture2D(cl_context context,
+ cl_mem_flags flags,
+ cl_GLenum target,
+ cl_GLint miplevel,
+ cl_GLuint texture,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
+clCreateFromGLTexture3D(cl_context context,
+ cl_mem_flags flags,
+ cl_GLenum target,
+ cl_GLint miplevel,
+ cl_GLuint texture,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+/* cl_khr_gl_sharing extension */
+
+#define cl_khr_gl_sharing 1
+
+typedef cl_uint cl_gl_context_info;
+
+/* Additional Error Codes */
+#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
+
+/* cl_gl_context_info */
+#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
+#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
+
+/* Additional cl_context_properties */
+#define CL_GL_CONTEXT_KHR 0x2008
+#define CL_EGL_DISPLAY_KHR 0x2009
+#define CL_GLX_DISPLAY_KHR 0x200A
+#define CL_WGL_HDC_KHR 0x200B
+#define CL_CGL_SHAREGROUP_KHR 0x200C
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetGLContextInfoKHR(const cl_context_properties * properties,
+ cl_gl_context_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
+ const cl_context_properties * properties,
+ cl_gl_context_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENCL_CL_GL_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_gl_ext.h b/test/linux/jni/include/thirdparty/CL/cl_gl_ext.h
new file mode 100644
index 0000000..52107b1
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_gl_ext.h
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef __OPENCL_CL_GL_EXT_H
+#define __OPENCL_CL_GL_EXT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+/*
+ * cl_khr_gl_event extension
+ */
+#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
+
+extern CL_API_ENTRY cl_event CL_API_CALL
+clCreateEventFromGLsyncKHR(cl_context context,
+ cl_GLsync sync,
+ cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENCL_CL_GL_EXT_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_half.h b/test/linux/jni/include/thirdparty/CL/cl_half.h
new file mode 100644
index 0000000..ecc4223
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_half.h
@@ -0,0 +1,440 @@
+/*******************************************************************************
+ * Copyright (c) 2019-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+/**
+ * This is a header-only utility library that provides OpenCL host code with
+ * routines for converting to/from cl_half values.
+ *
+ * Example usage:
+ *
+ * #include
+ * ...
+ * cl_half h = cl_half_from_float(0.5f, CL_HALF_RTE);
+ * cl_float f = cl_half_to_float(h);
+ */
+
+#ifndef OPENCL_CL_HALF_H
+#define OPENCL_CL_HALF_H
+
+#include
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Rounding mode used when converting to cl_half.
+ */
+typedef enum
+{
+ CL_HALF_RTE, // round to nearest even
+ CL_HALF_RTZ, // round towards zero
+ CL_HALF_RTP, // round towards positive infinity
+ CL_HALF_RTN, // round towards negative infinity
+} cl_half_rounding_mode;
+
+
+/* Private utility macros. */
+#define CL_HALF_EXP_MASK 0x7C00
+#define CL_HALF_MAX_FINITE_MAG 0x7BFF
+
+
+/*
+ * Utility to deal with values that overflow when converting to half precision.
+ */
+static inline cl_half cl_half_handle_overflow(cl_half_rounding_mode rounding_mode,
+ uint16_t sign)
+{
+ if (rounding_mode == CL_HALF_RTZ)
+ {
+ // Round overflow towards zero -> largest finite number (preserving sign)
+ return (sign << 15) | CL_HALF_MAX_FINITE_MAG;
+ }
+ else if (rounding_mode == CL_HALF_RTP && sign)
+ {
+ // Round negative overflow towards positive infinity -> most negative finite number
+ return (1 << 15) | CL_HALF_MAX_FINITE_MAG;
+ }
+ else if (rounding_mode == CL_HALF_RTN && !sign)
+ {
+ // Round positive overflow towards negative infinity -> largest finite number
+ return CL_HALF_MAX_FINITE_MAG;
+ }
+
+ // Overflow to infinity
+ return (sign << 15) | CL_HALF_EXP_MASK;
+}
+
+/*
+ * Utility to deal with values that underflow when converting to half precision.
+ */
+static inline cl_half cl_half_handle_underflow(cl_half_rounding_mode rounding_mode,
+ uint16_t sign)
+{
+ if (rounding_mode == CL_HALF_RTP && !sign)
+ {
+ // Round underflow towards positive infinity -> smallest positive value
+ return (sign << 15) | 1;
+ }
+ else if (rounding_mode == CL_HALF_RTN && sign)
+ {
+ // Round underflow towards negative infinity -> largest negative value
+ return (sign << 15) | 1;
+ }
+
+ // Flush to zero
+ return (sign << 15);
+}
+
+
+/**
+ * Convert a cl_float to a cl_half.
+ */
+static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode)
+{
+ // Type-punning to get direct access to underlying bits
+ union
+ {
+ cl_float f;
+ uint32_t i;
+ } f32;
+ f32.f = f;
+
+ // Extract sign bit
+ uint16_t sign = f32.i >> 31;
+
+ // Extract FP32 exponent and mantissa
+ uint32_t f_exp = (f32.i >> (CL_FLT_MANT_DIG - 1)) & 0xFF;
+ uint32_t f_mant = f32.i & ((1 << (CL_FLT_MANT_DIG - 1)) - 1);
+
+ // Remove FP32 exponent bias
+ int32_t exp = f_exp - CL_FLT_MAX_EXP + 1;
+
+ // Add FP16 exponent bias
+ uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
+
+ // Position of the bit that will become the FP16 mantissa LSB
+ uint32_t lsb_pos = CL_FLT_MANT_DIG - CL_HALF_MANT_DIG;
+
+ // Check for NaN / infinity
+ if (f_exp == 0xFF)
+ {
+ if (f_mant)
+ {
+ // NaN -> propagate mantissa and silence it
+ uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
+ h_mant |= 0x200;
+ return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
+ }
+ else
+ {
+ // Infinity -> zero mantissa
+ return (sign << 15) | CL_HALF_EXP_MASK;
+ }
+ }
+
+ // Check for zero
+ if (!f_exp && !f_mant)
+ {
+ return (sign << 15);
+ }
+
+ // Check for overflow
+ if (exp >= CL_HALF_MAX_EXP)
+ {
+ return cl_half_handle_overflow(rounding_mode, sign);
+ }
+
+ // Check for underflow
+ if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
+ {
+ return cl_half_handle_underflow(rounding_mode, sign);
+ }
+
+ // Check for value that will become denormal
+ if (exp < -14)
+ {
+ // Denormal -> include the implicit 1 from the FP32 mantissa
+ h_exp = 0;
+ f_mant |= 1 << (CL_FLT_MANT_DIG - 1);
+
+ // Mantissa shift amount depends on exponent
+ lsb_pos = -exp + (CL_FLT_MANT_DIG - 25);
+ }
+
+ // Generate FP16 mantissa by shifting FP32 mantissa
+ uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
+
+ // Check whether we need to round
+ uint32_t halfway = 1 << (lsb_pos - 1);
+ uint32_t mask = (halfway << 1) - 1;
+ switch (rounding_mode)
+ {
+ case CL_HALF_RTE:
+ if ((f_mant & mask) > halfway)
+ {
+ // More than halfway -> round up
+ h_mant += 1;
+ }
+ else if ((f_mant & mask) == halfway)
+ {
+ // Exactly halfway -> round to nearest even
+ if (h_mant & 0x1)
+ h_mant += 1;
+ }
+ break;
+ case CL_HALF_RTZ:
+ // Mantissa has already been truncated -> do nothing
+ break;
+ case CL_HALF_RTP:
+ if ((f_mant & mask) && !sign)
+ {
+ // Round positive numbers up
+ h_mant += 1;
+ }
+ break;
+ case CL_HALF_RTN:
+ if ((f_mant & mask) && sign)
+ {
+ // Round negative numbers down
+ h_mant += 1;
+ }
+ break;
+ }
+
+ // Check for mantissa overflow
+ if (h_mant & 0x400)
+ {
+ h_exp += 1;
+ h_mant = 0;
+ }
+
+ return (sign << 15) | (h_exp << 10) | h_mant;
+}
+
+
+/**
+ * Convert a cl_double to a cl_half.
+ */
+static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rounding_mode)
+{
+ // Type-punning to get direct access to underlying bits
+ union
+ {
+ cl_double d;
+ uint64_t i;
+ } f64;
+ f64.d = d;
+
+ // Extract sign bit
+ uint16_t sign = f64.i >> 63;
+
+ // Extract FP64 exponent and mantissa
+ uint64_t d_exp = (f64.i >> (CL_DBL_MANT_DIG - 1)) & 0x7FF;
+ uint64_t d_mant = f64.i & (((uint64_t)1 << (CL_DBL_MANT_DIG - 1)) - 1);
+
+ // Remove FP64 exponent bias
+ int64_t exp = d_exp - CL_DBL_MAX_EXP + 1;
+
+ // Add FP16 exponent bias
+ uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
+
+ // Position of the bit that will become the FP16 mantissa LSB
+ uint32_t lsb_pos = CL_DBL_MANT_DIG - CL_HALF_MANT_DIG;
+
+ // Check for NaN / infinity
+ if (d_exp == 0x7FF)
+ {
+ if (d_mant)
+ {
+ // NaN -> propagate mantissa and silence it
+ uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
+ h_mant |= 0x200;
+ return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
+ }
+ else
+ {
+ // Infinity -> zero mantissa
+ return (sign << 15) | CL_HALF_EXP_MASK;
+ }
+ }
+
+ // Check for zero
+ if (!d_exp && !d_mant)
+ {
+ return (sign << 15);
+ }
+
+ // Check for overflow
+ if (exp >= CL_HALF_MAX_EXP)
+ {
+ return cl_half_handle_overflow(rounding_mode, sign);
+ }
+
+ // Check for underflow
+ if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
+ {
+ return cl_half_handle_underflow(rounding_mode, sign);
+ }
+
+ // Check for value that will become denormal
+ if (exp < -14)
+ {
+ // Include the implicit 1 from the FP64 mantissa
+ h_exp = 0;
+ d_mant |= (uint64_t)1 << (CL_DBL_MANT_DIG - 1);
+
+ // Mantissa shift amount depends on exponent
+ lsb_pos = (uint32_t)(-exp + (CL_DBL_MANT_DIG - 25));
+ }
+
+ // Generate FP16 mantissa by shifting FP64 mantissa
+ uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
+
+ // Check whether we need to round
+ uint64_t halfway = (uint64_t)1 << (lsb_pos - 1);
+ uint64_t mask = (halfway << 1) - 1;
+ switch (rounding_mode)
+ {
+ case CL_HALF_RTE:
+ if ((d_mant & mask) > halfway)
+ {
+ // More than halfway -> round up
+ h_mant += 1;
+ }
+ else if ((d_mant & mask) == halfway)
+ {
+ // Exactly halfway -> round to nearest even
+ if (h_mant & 0x1)
+ h_mant += 1;
+ }
+ break;
+ case CL_HALF_RTZ:
+ // Mantissa has already been truncated -> do nothing
+ break;
+ case CL_HALF_RTP:
+ if ((d_mant & mask) && !sign)
+ {
+ // Round positive numbers up
+ h_mant += 1;
+ }
+ break;
+ case CL_HALF_RTN:
+ if ((d_mant & mask) && sign)
+ {
+ // Round negative numbers down
+ h_mant += 1;
+ }
+ break;
+ }
+
+ // Check for mantissa overflow
+ if (h_mant & 0x400)
+ {
+ h_exp += 1;
+ h_mant = 0;
+ }
+
+ return (sign << 15) | (h_exp << 10) | h_mant;
+}
+
+
+/**
+ * Convert a cl_half to a cl_float.
+ */
+static inline cl_float cl_half_to_float(cl_half h)
+{
+ // Type-punning to get direct access to underlying bits
+ union
+ {
+ cl_float f;
+ uint32_t i;
+ } f32;
+
+ // Extract sign bit
+ uint16_t sign = h >> 15;
+
+ // Extract FP16 exponent and mantissa
+ uint16_t h_exp = (h >> (CL_HALF_MANT_DIG - 1)) & 0x1F;
+ uint16_t h_mant = h & 0x3FF;
+
+ // Remove FP16 exponent bias
+ int32_t exp = h_exp - CL_HALF_MAX_EXP + 1;
+
+ // Add FP32 exponent bias
+ uint32_t f_exp = exp + CL_FLT_MAX_EXP - 1;
+
+ // Check for NaN / infinity
+ if (h_exp == 0x1F)
+ {
+ if (h_mant)
+ {
+ // NaN -> propagate mantissa and silence it
+ uint32_t f_mant = h_mant << (CL_FLT_MANT_DIG - CL_HALF_MANT_DIG);
+ f_mant |= 0x400000;
+ f32.i = (sign << 31) | 0x7F800000 | f_mant;
+ return f32.f;
+ }
+ else
+ {
+ // Infinity -> zero mantissa
+ f32.i = (sign << 31) | 0x7F800000;
+ return f32.f;
+ }
+ }
+
+ // Check for zero / denormal
+ if (h_exp == 0)
+ {
+ if (h_mant == 0)
+ {
+ // Zero -> zero exponent
+ f_exp = 0;
+ }
+ else
+ {
+ // Denormal -> normalize it
+ // - Shift mantissa to make most-significant 1 implicit
+ // - Adjust exponent accordingly
+ uint32_t shift = 0;
+ while ((h_mant & 0x400) == 0)
+ {
+ h_mant <<= 1;
+ shift++;
+ }
+ h_mant &= 0x3FF;
+ f_exp -= shift - 1;
+ }
+ }
+
+ f32.i = (sign << 31) | (f_exp << 23) | (h_mant << 13);
+ return f32.f;
+}
+
+
+#undef CL_HALF_EXP_MASK
+#undef CL_HALF_MAX_FINITE_MAG
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* OPENCL_CL_HALF_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_icd.h b/test/linux/jni/include/thirdparty/CL/cl_icd.h
new file mode 100644
index 0000000..8ff8b94
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_icd.h
@@ -0,0 +1,1294 @@
+/*******************************************************************************
+ * Copyright (c) 2019-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef OPENCL_CL_ICD_H
+#define OPENCL_CL_ICD_H
+
+#include
+#include
+#include
+#include
+
+#if defined(_WIN32)
+#include
+#include
+#include
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This file contains pointer type definitions for each of the CL API calls as
+ * well as a type definition for the dispatch table used by the Khronos ICD
+ * loader (see cl_khr_icd extension specification for background).
+ */
+
+/* API function pointer definitions */
+
+// Platform APIs
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetPlatformIDs)(
+ cl_uint num_entries, cl_platform_id *platforms,
+ cl_uint *num_platforms) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetPlatformInfo)(
+ cl_platform_id platform, cl_platform_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+// Device APIs
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceIDs)(
+ cl_platform_id platform, cl_device_type device_type, cl_uint num_entries,
+ cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceInfo)(
+ cl_device_id device, cl_device_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clCreateSubDevices)(
+ cl_device_id in_device,
+ const cl_device_partition_property *partition_properties,
+ cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices);
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainDevice)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseDevice)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clCreateSubDevices;
+typedef void *cl_api_clRetainDevice;
+typedef void *cl_api_clReleaseDevice;
+
+#endif
+
+// Context APIs
+typedef CL_API_ENTRY cl_context(CL_API_CALL *cl_api_clCreateContext)(
+ const cl_context_properties *properties, cl_uint num_devices,
+ const cl_device_id *devices,
+ void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
+ void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_context(CL_API_CALL *cl_api_clCreateContextFromType)(
+ const cl_context_properties *properties, cl_device_type device_type,
+ void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *),
+ void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainContext)(
+ cl_context context) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseContext)(
+ cl_context context) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetContextInfo)(
+ cl_context context, cl_context_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+// Command Queue APIs
+typedef CL_API_ENTRY cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueue)(
+ cl_context context, cl_device_id device,
+ cl_command_queue_properties properties,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_0
+
+typedef CL_API_ENTRY
+cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueueWithProperties)(
+ cl_context /* context */, cl_device_id /* device */,
+ const cl_queue_properties * /* properties */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
+
+#else
+
+typedef void *cl_api_clCreateCommandQueueWithProperties;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainCommandQueue)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseCommandQueue)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetCommandQueueInfo)(
+ cl_command_queue command_queue, cl_command_queue_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+// Memory Object APIs
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateBuffer)(
+ cl_context context, cl_mem_flags flags, size_t size, void *host_ptr,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImage)(
+ cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
+ const cl_image_desc *image_desc, void *host_ptr,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clCreateImage;
+
+#endif
+
+#ifdef CL_VERSION_3_0
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateBufferWithProperties)(
+ cl_context context, const cl_mem_properties *properties, cl_mem_flags flags,
+ size_t size, void *host_ptr,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_3_0;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImageWithProperties)(
+ cl_context context, const cl_mem_properties *properties, cl_mem_flags flags,
+ const cl_image_format *image_format, const cl_image_desc *image_desc,
+ void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_3_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL* cl_api_clSetContextDestructorCallback)(
+ cl_context context,
+ void(CL_CALLBACK* pfn_notify)(cl_context context, void* user_data),
+ void* user_data) CL_API_SUFFIX__VERSION_3_0;
+
+#else
+
+typedef void *cl_api_clCreateBufferWithProperties;
+typedef void *cl_api_clCreateImageWithProperties;
+typedef void *cl_api_clSetContextDestructorCallback;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainMemObject)(
+ cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseMemObject)(
+ cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetSupportedImageFormats)(
+ cl_context context, cl_mem_flags flags, cl_mem_object_type image_type,
+ cl_uint num_entries, cl_image_format *image_formats,
+ cl_uint *num_image_formats) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetMemObjectInfo)(
+ cl_mem memobj, cl_mem_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetImageInfo)(
+ cl_mem image, cl_image_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_0
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreatePipe)(
+ cl_context /* context */, cl_mem_flags /* flags */,
+ cl_uint /* pipe_packet_size */, cl_uint /* pipe_max_packets */,
+ const cl_pipe_properties * /* properties */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetPipeInfo)(
+ cl_mem /* pipe */, cl_pipe_info /* param_name */,
+ size_t /* param_value_size */, void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY void *(CL_API_CALL *cl_api_clSVMAlloc)(
+ cl_context /* context */, cl_svm_mem_flags /* flags */, size_t /* size */,
+ unsigned int /* alignment */)CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY void(CL_API_CALL *cl_api_clSVMFree)(
+ cl_context /* context */,
+ void * /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0;
+
+#else
+
+typedef void *cl_api_clCreatePipe;
+typedef void *cl_api_clGetPipeInfo;
+typedef void *cl_api_clSVMAlloc;
+typedef void *cl_api_clSVMFree;
+
+#endif
+
+// Sampler APIs
+typedef CL_API_ENTRY cl_sampler(CL_API_CALL *cl_api_clCreateSampler)(
+ cl_context context, cl_bool normalized_coords,
+ cl_addressing_mode addressing_mode, cl_filter_mode filter_mode,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainSampler)(
+ cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseSampler)(
+ cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetSamplerInfo)(
+ cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_0
+
+typedef CL_API_ENTRY
+cl_sampler(CL_API_CALL *cl_api_clCreateSamplerWithProperties)(
+ cl_context /* context */,
+ const cl_sampler_properties * /* sampler_properties */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
+
+#else
+
+typedef void *cl_api_clCreateSamplerWithProperties;
+
+#endif
+
+// Program Object APIs
+typedef CL_API_ENTRY cl_program(CL_API_CALL *cl_api_clCreateProgramWithSource)(
+ cl_context context, cl_uint count, const char **strings,
+ const size_t *lengths, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_program(CL_API_CALL *cl_api_clCreateProgramWithBinary)(
+ cl_context context, cl_uint num_devices, const cl_device_id *device_list,
+ const size_t *lengths, const unsigned char **binaries,
+ cl_int *binary_status, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY
+cl_program(CL_API_CALL *cl_api_clCreateProgramWithBuiltInKernels)(
+ cl_context context, cl_uint num_devices, const cl_device_id *device_list,
+ const char *kernel_names, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clCreateProgramWithBuiltInKernels;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainProgram)(
+ cl_program program) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseProgram)(
+ cl_program program) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clBuildProgram)(
+ cl_program program, cl_uint num_devices, const cl_device_id *device_list,
+ const char *options,
+ void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
+ void *user_data) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clCompileProgram)(
+ cl_program program, cl_uint num_devices, const cl_device_id *device_list,
+ const char *options, cl_uint num_input_headers,
+ const cl_program *input_headers, const char **header_include_names,
+ void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
+ void *user_data) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_program(CL_API_CALL *cl_api_clLinkProgram)(
+ cl_context context, cl_uint num_devices, const cl_device_id *device_list,
+ const char *options, cl_uint num_input_programs,
+ const cl_program *input_programs,
+ void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
+ void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clCompileProgram;
+typedef void *cl_api_clLinkProgram;
+
+#endif
+
+#ifdef CL_VERSION_2_2
+
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clSetProgramSpecializationConstant)(
+ cl_program program, cl_uint spec_id, size_t spec_size,
+ const void *spec_value) CL_API_SUFFIX__VERSION_2_2;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetProgramReleaseCallback)(
+ cl_program program,
+ void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
+ void *user_data) CL_API_SUFFIX__VERSION_2_2;
+
+#else
+
+typedef void *cl_api_clSetProgramSpecializationConstant;
+typedef void *cl_api_clSetProgramReleaseCallback;
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clUnloadPlatformCompiler)(
+ cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clUnloadPlatformCompiler;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetProgramInfo)(
+ cl_program program, cl_program_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetProgramBuildInfo)(
+ cl_program program, cl_device_id device, cl_program_build_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+// Kernel Object APIs
+typedef CL_API_ENTRY cl_kernel(CL_API_CALL *cl_api_clCreateKernel)(
+ cl_program program, const char *kernel_name,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clCreateKernelsInProgram)(
+ cl_program program, cl_uint num_kernels, cl_kernel *kernels,
+ cl_uint *num_kernels_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainKernel)(
+ cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseKernel)(
+ cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetKernelArg)(
+ cl_kernel kernel, cl_uint arg_index, size_t arg_size,
+ const void *arg_value) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelInfo)(
+ cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelArgInfo)(
+ cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clGetKernelArgInfo;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelWorkGroupInfo)(
+ cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name,
+ size_t param_value_size, void *param_value,
+ size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_2_0
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetKernelArgSVMPointer)(
+ cl_kernel /* kernel */, cl_uint /* arg_index */,
+ const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetKernelExecInfo)(
+ cl_kernel /* kernel */, cl_kernel_exec_info /* param_name */,
+ size_t /* param_value_size */,
+ const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfoKHR)(
+ cl_kernel /* in_kernel */, cl_device_id /*in_device*/,
+ cl_kernel_sub_group_info /* param_name */, size_t /*input_value_size*/,
+ const void * /*input_value*/, size_t /*param_value_size*/,
+ void * /*param_value*/,
+ size_t * /*param_value_size_ret*/) CL_EXT_SUFFIX__VERSION_2_0;
+
+#else
+
+typedef void *cl_api_clSetKernelArgSVMPointer;
+typedef void *cl_api_clSetKernelExecInfo;
+typedef void *cl_api_clGetKernelSubGroupInfoKHR;
+
+#endif
+
+// Event Object APIs
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clWaitForEvents)(
+ cl_uint num_events, const cl_event *event_list) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetEventInfo)(
+ cl_event event, cl_event_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainEvent)(cl_event event)
+ CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseEvent)(cl_event event)
+ CL_API_SUFFIX__VERSION_1_0;
+
+// Profiling APIs
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetEventProfilingInfo)(
+ cl_event event, cl_profiling_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+// Flush and Finish APIs
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clFlush)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clFinish)(
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
+
+// Enqueued Commands APIs
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReadBuffer)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
+ size_t offset, size_t cb, void *ptr, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReadBufferRect)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
+ const size_t *buffer_origin, const size_t *host_origin,
+ const size_t *region, size_t buffer_row_pitch, size_t buffer_slice_pitch,
+ size_t host_row_pitch, size_t host_slice_pitch, void *ptr,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_1;
+
+#else
+
+typedef void *cl_api_clEnqueueReadBufferRect;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueWriteBuffer)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write,
+ size_t offset, size_t cb, const void *ptr, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueWriteBufferRect)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
+ const size_t *buffer_origin, const size_t *host_origin,
+ const size_t *region, size_t buffer_row_pitch, size_t buffer_slice_pitch,
+ size_t host_row_pitch, size_t host_slice_pitch, const void *ptr,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_1;
+
+#else
+
+typedef void *cl_api_clEnqueueWriteBufferRect;
+
+#endif
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueFillBuffer)(
+ cl_command_queue command_queue, cl_mem buffer, const void *pattern,
+ size_t pattern_size, size_t offset, size_t cb,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clEnqueueFillBuffer;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyBuffer)(
+ cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
+ size_t src_offset, size_t dst_offset, size_t cb,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_1
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferRect)(
+ cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
+ const size_t *src_origin, const size_t *dst_origin, const size_t *region,
+ size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch,
+ size_t dst_slice_pitch, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_1;
+
+#else
+
+typedef void *cl_api_clEnqueueCopyBufferRect;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReadImage)(
+ cl_command_queue command_queue, cl_mem image, cl_bool blocking_read,
+ const size_t *origin, const size_t *region, size_t row_pitch,
+ size_t slice_pitch, void *ptr, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueWriteImage)(
+ cl_command_queue command_queue, cl_mem image, cl_bool blocking_write,
+ const size_t *origin, const size_t *region, size_t input_row_pitch,
+ size_t input_slice_pitch, const void *ptr, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueFillImage)(
+ cl_command_queue command_queue, cl_mem image, const void *fill_color,
+ const size_t origin[3], const size_t region[3],
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clEnqueueFillImage;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyImage)(
+ cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image,
+ const size_t *src_origin, const size_t *dst_origin, const size_t *region,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyImageToBuffer)(
+ cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer,
+ const size_t *src_origin, const size_t *region, size_t dst_offset,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferToImage)(
+ cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image,
+ size_t src_offset, const size_t *dst_origin, const size_t *region,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY void *(CL_API_CALL *cl_api_clEnqueueMapBuffer)(
+ cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map,
+ cl_map_flags map_flags, size_t offset, size_t cb,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event, cl_int *errcode_ret)CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY void *(CL_API_CALL *cl_api_clEnqueueMapImage)(
+ cl_command_queue command_queue, cl_mem image, cl_bool blocking_map,
+ cl_map_flags map_flags, const size_t *origin, const size_t *region,
+ size_t *image_row_pitch, size_t *image_slice_pitch,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event, cl_int *errcode_ret)CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueUnmapMemObject)(
+ cl_command_queue command_queue, cl_mem memobj, void *mapped_ptr,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueMigrateMemObjects)(
+ cl_command_queue command_queue, cl_uint num_mem_objects,
+ const cl_mem *mem_objects, cl_mem_migration_flags flags,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clEnqueueMigrateMemObjects;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueNDRangeKernel)(
+ cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim,
+ const size_t *global_work_offset, const size_t *global_work_size,
+ const size_t *local_work_size, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueTask)(
+ cl_command_queue command_queue, cl_kernel kernel,
+ cl_uint num_events_in_wait_list, const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueNativeKernel)(
+ cl_command_queue command_queue, void(CL_CALLBACK *user_func)(void *),
+ void *args, size_t cb_args, cl_uint num_mem_objects, const cl_mem *mem_list,
+ const void **args_mem_loc, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef CL_VERSION_1_2
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueMarkerWithWaitList)(
+ cl_command_queue command_queue, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueBarrierWithWaitList)(
+ cl_command_queue command_queue, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY void *(
+ CL_API_CALL *cl_api_clGetExtensionFunctionAddressForPlatform)(
+ cl_platform_id platform,
+ const char *function_name)CL_API_SUFFIX__VERSION_1_2;
+
+#else
+
+typedef void *cl_api_clEnqueueMarkerWithWaitList;
+typedef void *cl_api_clEnqueueBarrierWithWaitList;
+typedef void *cl_api_clGetExtensionFunctionAddressForPlatform;
+
+#endif
+
+// Shared Virtual Memory APIs
+
+#ifdef CL_VERSION_2_0
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMFree)(
+ cl_command_queue /* command_queue */, cl_uint /* num_svm_pointers */,
+ void ** /* svm_pointers */,
+ void(CL_CALLBACK *pfn_free_func)(cl_command_queue /* queue */,
+ cl_uint /* num_svm_pointers */,
+ void ** /* svm_pointers[] */,
+ void * /* user_data */),
+ void * /* user_data */, cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMMemcpy)(
+ cl_command_queue /* command_queue */, cl_bool /* blocking_copy */,
+ void * /* dst_ptr */, const void * /* src_ptr */, size_t /* size */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMMemFill)(
+ cl_command_queue /* command_queue */, void * /* svm_ptr */,
+ const void * /* pattern */, size_t /* pattern_size */, size_t /* size */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMMap)(
+ cl_command_queue /* command_queue */, cl_bool /* blocking_map */,
+ cl_map_flags /* map_flags */, void * /* svm_ptr */, size_t /* size */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMUnmap)(
+ cl_command_queue /* command_queue */, void * /* svm_ptr */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
+
+#else
+
+typedef void *cl_api_clEnqueueSVMFree;
+typedef void *cl_api_clEnqueueSVMMemcpy;
+typedef void *cl_api_clEnqueueSVMMemFill;
+typedef void *cl_api_clEnqueueSVMMap;
+typedef void *cl_api_clEnqueueSVMUnmap;
+
+#endif
+
+// Deprecated APIs
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetCommandQueueProperty)(
+ cl_command_queue command_queue, cl_command_queue_properties properties,
+ cl_bool enable, cl_command_queue_properties *old_properties)
+ CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImage2D)(
+ cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
+ size_t image_width, size_t image_height, size_t image_row_pitch,
+ void *host_ptr, cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImage3D)(
+ cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
+ size_t image_width, size_t image_height, size_t image_depth,
+ size_t image_row_pitch, size_t image_slice_pitch, void *host_ptr,
+ cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clUnloadCompiler)(void)
+ CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueMarker)(
+ cl_command_queue command_queue,
+ cl_event *event) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueWaitForEvents)(
+ cl_command_queue command_queue, cl_uint num_events,
+ const cl_event *event_list) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueBarrier)(
+ cl_command_queue command_queue) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+typedef CL_API_ENTRY void *(CL_API_CALL *cl_api_clGetExtensionFunctionAddress)(
+ const char *function_name)CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
+
+// GL and other APIs
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLBuffer)(
+ cl_context context, cl_mem_flags flags, cl_GLuint bufobj,
+ int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture)(
+ cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
+ cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture2D)(
+ cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
+ cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture3D)(
+ cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel,
+ cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromGLRenderbuffer)(
+ cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetGLObjectInfo)(
+ cl_mem memobj, cl_gl_object_type *gl_object_type,
+ cl_GLuint *gl_object_name) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetGLTextureInfo)(
+ cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueAcquireGLObjects)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReleaseGLObjects)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+/* cl_khr_gl_sharing */
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetGLContextInfoKHR)(
+ const cl_context_properties *properties, cl_gl_context_info param_name,
+ size_t param_value_size, void *param_value, size_t *param_value_size_ret);
+
+/* cl_khr_gl_event */
+typedef CL_API_ENTRY cl_event(CL_API_CALL *cl_api_clCreateEventFromGLsyncKHR)(
+ cl_context context, cl_GLsync sync, cl_int *errcode_ret);
+
+#if defined(_WIN32)
+
+/* cl_khr_d3d10_sharing */
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D10KHR)(
+ cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source,
+ void *d3d_object, cl_d3d10_device_set_khr d3d_device_set,
+ cl_uint num_entries, cl_device_id *devices,
+ cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10BufferKHR)(
+ cl_context context, cl_mem_flags flags, ID3D10Buffer *resource,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture2DKHR)(
+ cl_context context, cl_mem_flags flags, ID3D10Texture2D *resource,
+ UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture3DKHR)(
+ cl_context context, cl_mem_flags flags, ID3D10Texture3D *resource,
+ UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clEnqueueAcquireD3D10ObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clEnqueueReleaseD3D10ObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR(
+ cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source,
+ void *d3d_object, cl_d3d10_device_set_khr d3d_device_set,
+ cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices);
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromD3D10BufferKHR(cl_context context, cl_mem_flags flags,
+ ID3D10Buffer *resource, cl_int *errcode_ret);
+
+extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR(
+ cl_context context, cl_mem_flags flags, ID3D10Texture2D *resource,
+ UINT subresource, cl_int *errcode_ret);
+
+extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR(
+ cl_context context, cl_mem_flags flags, ID3D10Texture3D *resource,
+ UINT subresource, cl_int *errcode_ret);
+
+extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+/* cl_khr_d3d11_sharing */
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D11KHR)(
+ cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source,
+ void *d3d_object, cl_d3d11_device_set_khr d3d_device_set,
+ cl_uint num_entries, cl_device_id *devices,
+ cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11BufferKHR)(
+ cl_context context, cl_mem_flags flags, ID3D11Buffer *resource,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture2DKHR)(
+ cl_context context, cl_mem_flags flags, ID3D11Texture2D *resource,
+ UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture3DKHR)(
+ cl_context context, cl_mem_flags flags, ID3D11Texture3D *resource,
+ UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clEnqueueAcquireD3D11ObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clEnqueueReleaseD3D11ObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+/* cl_khr_dx9_media_sharing */
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR)(
+ cl_platform_id platform, cl_uint num_media_adapters,
+ cl_dx9_media_adapter_type_khr *media_adapters_type, void *media_adapters,
+ cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries,
+ cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromDX9MediaSurfaceKHR)(
+ cl_context context, cl_mem_flags flags,
+ cl_dx9_media_adapter_type_khr adapter_type, void *surface_info,
+ cl_uint plane, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clEnqueueAcquireDX9MediaSurfacesKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clEnqueueReleaseDX9MediaSurfacesKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_1_2;
+
+/* cl_khr_d3d11_sharing */
+extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR(
+ cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source,
+ void *d3d_object, cl_d3d11_device_set_khr d3d_device_set,
+ cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices);
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromD3D11BufferKHR(cl_context context, cl_mem_flags flags,
+ ID3D11Buffer *resource, cl_int *errcode_ret);
+
+extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR(
+ cl_context context, cl_mem_flags flags, ID3D11Texture2D *resource,
+ UINT subresource, cl_int *errcode_ret);
+
+extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR(
+ cl_context context, cl_mem_flags flags, ID3D11Texture3D *resource,
+ UINT subresource, cl_int *errcode_ret);
+
+extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+/* cl_khr_dx9_media_sharing */
+extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR(
+ cl_platform_id platform, cl_uint num_media_adapters,
+ cl_dx9_media_adapter_type_khr *media_adapter_type, void *media_adapters,
+ cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries,
+ cl_device_id *devices, cl_uint *num_devices);
+
+extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR(
+ cl_context context, cl_mem_flags flags,
+ cl_dx9_media_adapter_type_khr adapter_type, void *surface_info,
+ cl_uint plane, cl_int *errcode_ret);
+
+extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+#else
+
+/* cl_khr_d3d10_sharing */
+typedef void *cl_api_clGetDeviceIDsFromD3D10KHR;
+typedef void *cl_api_clCreateFromD3D10BufferKHR;
+typedef void *cl_api_clCreateFromD3D10Texture2DKHR;
+typedef void *cl_api_clCreateFromD3D10Texture3DKHR;
+typedef void *cl_api_clEnqueueAcquireD3D10ObjectsKHR;
+typedef void *cl_api_clEnqueueReleaseD3D10ObjectsKHR;
+
+/* cl_khr_d3d11_sharing */
+typedef void *cl_api_clGetDeviceIDsFromD3D11KHR;
+typedef void *cl_api_clCreateFromD3D11BufferKHR;
+typedef void *cl_api_clCreateFromD3D11Texture2DKHR;
+typedef void *cl_api_clCreateFromD3D11Texture3DKHR;
+typedef void *cl_api_clEnqueueAcquireD3D11ObjectsKHR;
+typedef void *cl_api_clEnqueueReleaseD3D11ObjectsKHR;
+
+/* cl_khr_dx9_media_sharing */
+typedef void *cl_api_clCreateFromDX9MediaSurfaceKHR;
+typedef void *cl_api_clEnqueueAcquireDX9MediaSurfacesKHR;
+typedef void *cl_api_clEnqueueReleaseDX9MediaSurfacesKHR;
+typedef void *cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR;
+
+#endif
+
+/* OpenCL 1.1 */
+
+#ifdef CL_VERSION_1_1
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetEventCallback)(
+ cl_event /* event */, cl_int /* command_exec_callback_type */,
+ void(CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
+ void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
+
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateSubBuffer)(
+ cl_mem /* buffer */, cl_mem_flags /* flags */,
+ cl_buffer_create_type /* buffer_create_type */,
+ const void * /* buffer_create_info */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
+
+typedef CL_API_ENTRY
+cl_int(CL_API_CALL *cl_api_clSetMemObjectDestructorCallback)(
+ cl_mem /* memobj */,
+ void(CL_CALLBACK * /*pfn_notify*/)(cl_mem /* memobj */,
+ void * /*user_data*/),
+ void * /*user_data */) CL_API_SUFFIX__VERSION_1_1;
+
+typedef CL_API_ENTRY cl_event(CL_API_CALL *cl_api_clCreateUserEvent)(
+ cl_context /* context */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetUserEventStatus)(
+ cl_event /* event */,
+ cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
+
+#else
+
+typedef void *cl_api_clSetEventCallback;
+typedef void *cl_api_clCreateSubBuffer;
+typedef void *cl_api_clSetMemObjectDestructorCallback;
+typedef void *cl_api_clCreateUserEvent;
+typedef void *cl_api_clSetUserEventStatus;
+
+#endif
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clCreateSubDevicesEXT)(
+ cl_device_id in_device,
+ const cl_device_partition_property_ext *partition_properties,
+ cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices);
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainDeviceEXT)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_0;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseDeviceEXT)(
+ cl_device_id device) CL_API_SUFFIX__VERSION_1_0;
+
+/* cl_khr_egl_image */
+typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateFromEGLImageKHR)(
+ cl_context context, CLeglDisplayKHR display, CLeglImageKHR image,
+ cl_mem_flags flags, const cl_egl_image_properties_khr *properties,
+ cl_int *errcode_ret);
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueAcquireEGLObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueReleaseEGLObjectsKHR)(
+ cl_command_queue command_queue, cl_uint num_objects,
+ const cl_mem *mem_objects, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list, cl_event *event);
+
+/* cl_khr_egl_event */
+typedef CL_API_ENTRY cl_event(CL_API_CALL *cl_api_clCreateEventFromEGLSyncKHR)(
+ cl_context context, CLeglSyncKHR sync, CLeglDisplayKHR display,
+ cl_int *errcode_ret);
+
+#ifdef CL_VERSION_2_1
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clSetDefaultDeviceCommandQueue)(
+ cl_context context, cl_device_id device,
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1;
+
+typedef CL_API_ENTRY cl_program(CL_API_CALL *cl_api_clCreateProgramWithIL)(
+ cl_context context, const void *il, size_t length,
+ cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_1;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfo)(
+ cl_kernel kernel, cl_device_id device, cl_kernel_sub_group_info param_name,
+ size_t input_value_size, const void *input_value, size_t param_value_size,
+ void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_2_1;
+
+typedef CL_API_ENTRY cl_kernel(CL_API_CALL *cl_api_clCloneKernel)(
+ cl_kernel source_kernel, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_1;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueSVMMigrateMem)(
+ cl_command_queue command_queue, cl_uint num_svm_pointers,
+ const void **svm_pointers, const size_t *sizes,
+ cl_mem_migration_flags flags, cl_uint num_events_in_wait_list,
+ const cl_event *event_wait_list,
+ cl_event *event) CL_API_SUFFIX__VERSION_2_1;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetDeviceAndHostTimer)(
+ cl_device_id device, cl_ulong *device_timestamp,
+ cl_ulong *host_timestamp) CL_API_SUFFIX__VERSION_2_1;
+
+typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetHostTimer)(
+ cl_device_id device, cl_ulong *host_timestamp) CL_API_SUFFIX__VERSION_2_1;
+
+#else
+
+typedef void *cl_api_clSetDefaultDeviceCommandQueue;
+typedef void *cl_api_clCreateProgramWithIL;
+typedef void *cl_api_clGetKernelSubGroupInfo;
+typedef void *cl_api_clCloneKernel;
+typedef void *cl_api_clEnqueueSVMMigrateMem;
+typedef void *cl_api_clGetDeviceAndHostTimer;
+typedef void *cl_api_clGetHostTimer;
+
+#endif
+
+/* Vendor dispatch table struture */
+
+typedef struct _cl_icd_dispatch {
+ /* OpenCL 1.0 */
+ cl_api_clGetPlatformIDs clGetPlatformIDs;
+ cl_api_clGetPlatformInfo clGetPlatformInfo;
+ cl_api_clGetDeviceIDs clGetDeviceIDs;
+ cl_api_clGetDeviceInfo clGetDeviceInfo;
+ cl_api_clCreateContext clCreateContext;
+ cl_api_clCreateContextFromType clCreateContextFromType;
+ cl_api_clRetainContext clRetainContext;
+ cl_api_clReleaseContext clReleaseContext;
+ cl_api_clGetContextInfo clGetContextInfo;
+ cl_api_clCreateCommandQueue clCreateCommandQueue;
+ cl_api_clRetainCommandQueue clRetainCommandQueue;
+ cl_api_clReleaseCommandQueue clReleaseCommandQueue;
+ cl_api_clGetCommandQueueInfo clGetCommandQueueInfo;
+ cl_api_clSetCommandQueueProperty clSetCommandQueueProperty;
+ cl_api_clCreateBuffer clCreateBuffer;
+ cl_api_clCreateImage2D clCreateImage2D;
+ cl_api_clCreateImage3D clCreateImage3D;
+ cl_api_clRetainMemObject clRetainMemObject;
+ cl_api_clReleaseMemObject clReleaseMemObject;
+ cl_api_clGetSupportedImageFormats clGetSupportedImageFormats;
+ cl_api_clGetMemObjectInfo clGetMemObjectInfo;
+ cl_api_clGetImageInfo clGetImageInfo;
+ cl_api_clCreateSampler clCreateSampler;
+ cl_api_clRetainSampler clRetainSampler;
+ cl_api_clReleaseSampler clReleaseSampler;
+ cl_api_clGetSamplerInfo clGetSamplerInfo;
+ cl_api_clCreateProgramWithSource clCreateProgramWithSource;
+ cl_api_clCreateProgramWithBinary clCreateProgramWithBinary;
+ cl_api_clRetainProgram clRetainProgram;
+ cl_api_clReleaseProgram clReleaseProgram;
+ cl_api_clBuildProgram clBuildProgram;
+ cl_api_clUnloadCompiler clUnloadCompiler;
+ cl_api_clGetProgramInfo clGetProgramInfo;
+ cl_api_clGetProgramBuildInfo clGetProgramBuildInfo;
+ cl_api_clCreateKernel clCreateKernel;
+ cl_api_clCreateKernelsInProgram clCreateKernelsInProgram;
+ cl_api_clRetainKernel clRetainKernel;
+ cl_api_clReleaseKernel clReleaseKernel;
+ cl_api_clSetKernelArg clSetKernelArg;
+ cl_api_clGetKernelInfo clGetKernelInfo;
+ cl_api_clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo;
+ cl_api_clWaitForEvents clWaitForEvents;
+ cl_api_clGetEventInfo clGetEventInfo;
+ cl_api_clRetainEvent clRetainEvent;
+ cl_api_clReleaseEvent clReleaseEvent;
+ cl_api_clGetEventProfilingInfo clGetEventProfilingInfo;
+ cl_api_clFlush clFlush;
+ cl_api_clFinish clFinish;
+ cl_api_clEnqueueReadBuffer clEnqueueReadBuffer;
+ cl_api_clEnqueueWriteBuffer clEnqueueWriteBuffer;
+ cl_api_clEnqueueCopyBuffer clEnqueueCopyBuffer;
+ cl_api_clEnqueueReadImage clEnqueueReadImage;
+ cl_api_clEnqueueWriteImage clEnqueueWriteImage;
+ cl_api_clEnqueueCopyImage clEnqueueCopyImage;
+ cl_api_clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer;
+ cl_api_clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage;
+ cl_api_clEnqueueMapBuffer clEnqueueMapBuffer;
+ cl_api_clEnqueueMapImage clEnqueueMapImage;
+ cl_api_clEnqueueUnmapMemObject clEnqueueUnmapMemObject;
+ cl_api_clEnqueueNDRangeKernel clEnqueueNDRangeKernel;
+ cl_api_clEnqueueTask clEnqueueTask;
+ cl_api_clEnqueueNativeKernel clEnqueueNativeKernel;
+ cl_api_clEnqueueMarker clEnqueueMarker;
+ cl_api_clEnqueueWaitForEvents clEnqueueWaitForEvents;
+ cl_api_clEnqueueBarrier clEnqueueBarrier;
+ cl_api_clGetExtensionFunctionAddress clGetExtensionFunctionAddress;
+ cl_api_clCreateFromGLBuffer clCreateFromGLBuffer;
+ cl_api_clCreateFromGLTexture2D clCreateFromGLTexture2D;
+ cl_api_clCreateFromGLTexture3D clCreateFromGLTexture3D;
+ cl_api_clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer;
+ cl_api_clGetGLObjectInfo clGetGLObjectInfo;
+ cl_api_clGetGLTextureInfo clGetGLTextureInfo;
+ cl_api_clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects;
+ cl_api_clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects;
+ cl_api_clGetGLContextInfoKHR clGetGLContextInfoKHR;
+
+ /* cl_khr_d3d10_sharing */
+ cl_api_clGetDeviceIDsFromD3D10KHR clGetDeviceIDsFromD3D10KHR;
+ cl_api_clCreateFromD3D10BufferKHR clCreateFromD3D10BufferKHR;
+ cl_api_clCreateFromD3D10Texture2DKHR clCreateFromD3D10Texture2DKHR;
+ cl_api_clCreateFromD3D10Texture3DKHR clCreateFromD3D10Texture3DKHR;
+ cl_api_clEnqueueAcquireD3D10ObjectsKHR clEnqueueAcquireD3D10ObjectsKHR;
+ cl_api_clEnqueueReleaseD3D10ObjectsKHR clEnqueueReleaseD3D10ObjectsKHR;
+
+ /* OpenCL 1.1 */
+ cl_api_clSetEventCallback clSetEventCallback;
+ cl_api_clCreateSubBuffer clCreateSubBuffer;
+ cl_api_clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback;
+ cl_api_clCreateUserEvent clCreateUserEvent;
+ cl_api_clSetUserEventStatus clSetUserEventStatus;
+ cl_api_clEnqueueReadBufferRect clEnqueueReadBufferRect;
+ cl_api_clEnqueueWriteBufferRect clEnqueueWriteBufferRect;
+ cl_api_clEnqueueCopyBufferRect clEnqueueCopyBufferRect;
+
+ /* cl_ext_device_fission */
+ cl_api_clCreateSubDevicesEXT clCreateSubDevicesEXT;
+ cl_api_clRetainDeviceEXT clRetainDeviceEXT;
+ cl_api_clReleaseDeviceEXT clReleaseDeviceEXT;
+
+ /* cl_khr_gl_event */
+ cl_api_clCreateEventFromGLsyncKHR clCreateEventFromGLsyncKHR;
+
+ /* OpenCL 1.2 */
+ cl_api_clCreateSubDevices clCreateSubDevices;
+ cl_api_clRetainDevice clRetainDevice;
+ cl_api_clReleaseDevice clReleaseDevice;
+ cl_api_clCreateImage clCreateImage;
+ cl_api_clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels;
+ cl_api_clCompileProgram clCompileProgram;
+ cl_api_clLinkProgram clLinkProgram;
+ cl_api_clUnloadPlatformCompiler clUnloadPlatformCompiler;
+ cl_api_clGetKernelArgInfo clGetKernelArgInfo;
+ cl_api_clEnqueueFillBuffer clEnqueueFillBuffer;
+ cl_api_clEnqueueFillImage clEnqueueFillImage;
+ cl_api_clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects;
+ cl_api_clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList;
+ cl_api_clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList;
+ cl_api_clGetExtensionFunctionAddressForPlatform
+ clGetExtensionFunctionAddressForPlatform;
+ cl_api_clCreateFromGLTexture clCreateFromGLTexture;
+
+ /* cl_khr_d3d11_sharing */
+ cl_api_clGetDeviceIDsFromD3D11KHR clGetDeviceIDsFromD3D11KHR;
+ cl_api_clCreateFromD3D11BufferKHR clCreateFromD3D11BufferKHR;
+ cl_api_clCreateFromD3D11Texture2DKHR clCreateFromD3D11Texture2DKHR;
+ cl_api_clCreateFromD3D11Texture3DKHR clCreateFromD3D11Texture3DKHR;
+ cl_api_clCreateFromDX9MediaSurfaceKHR clCreateFromDX9MediaSurfaceKHR;
+ cl_api_clEnqueueAcquireD3D11ObjectsKHR clEnqueueAcquireD3D11ObjectsKHR;
+ cl_api_clEnqueueReleaseD3D11ObjectsKHR clEnqueueReleaseD3D11ObjectsKHR;
+
+ /* cl_khr_dx9_media_sharing */
+ cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR
+ clGetDeviceIDsFromDX9MediaAdapterKHR;
+ cl_api_clEnqueueAcquireDX9MediaSurfacesKHR
+ clEnqueueAcquireDX9MediaSurfacesKHR;
+ cl_api_clEnqueueReleaseDX9MediaSurfacesKHR
+ clEnqueueReleaseDX9MediaSurfacesKHR;
+
+ /* cl_khr_egl_image */
+ cl_api_clCreateFromEGLImageKHR clCreateFromEGLImageKHR;
+ cl_api_clEnqueueAcquireEGLObjectsKHR clEnqueueAcquireEGLObjectsKHR;
+ cl_api_clEnqueueReleaseEGLObjectsKHR clEnqueueReleaseEGLObjectsKHR;
+
+ /* cl_khr_egl_event */
+ cl_api_clCreateEventFromEGLSyncKHR clCreateEventFromEGLSyncKHR;
+
+ /* OpenCL 2.0 */
+ cl_api_clCreateCommandQueueWithProperties clCreateCommandQueueWithProperties;
+ cl_api_clCreatePipe clCreatePipe;
+ cl_api_clGetPipeInfo clGetPipeInfo;
+ cl_api_clSVMAlloc clSVMAlloc;
+ cl_api_clSVMFree clSVMFree;
+ cl_api_clEnqueueSVMFree clEnqueueSVMFree;
+ cl_api_clEnqueueSVMMemcpy clEnqueueSVMMemcpy;
+ cl_api_clEnqueueSVMMemFill clEnqueueSVMMemFill;
+ cl_api_clEnqueueSVMMap clEnqueueSVMMap;
+ cl_api_clEnqueueSVMUnmap clEnqueueSVMUnmap;
+ cl_api_clCreateSamplerWithProperties clCreateSamplerWithProperties;
+ cl_api_clSetKernelArgSVMPointer clSetKernelArgSVMPointer;
+ cl_api_clSetKernelExecInfo clSetKernelExecInfo;
+
+ /* cl_khr_sub_groups */
+ cl_api_clGetKernelSubGroupInfoKHR clGetKernelSubGroupInfoKHR;
+
+ /* OpenCL 2.1 */
+ cl_api_clCloneKernel clCloneKernel;
+ cl_api_clCreateProgramWithIL clCreateProgramWithIL;
+ cl_api_clEnqueueSVMMigrateMem clEnqueueSVMMigrateMem;
+ cl_api_clGetDeviceAndHostTimer clGetDeviceAndHostTimer;
+ cl_api_clGetHostTimer clGetHostTimer;
+ cl_api_clGetKernelSubGroupInfo clGetKernelSubGroupInfo;
+ cl_api_clSetDefaultDeviceCommandQueue clSetDefaultDeviceCommandQueue;
+
+ /* OpenCL 2.2 */
+ cl_api_clSetProgramReleaseCallback clSetProgramReleaseCallback;
+ cl_api_clSetProgramSpecializationConstant clSetProgramSpecializationConstant;
+
+ /* OpenCL 3.0 */
+ cl_api_clCreateBufferWithProperties clCreateBufferWithProperties;
+ cl_api_clCreateImageWithProperties clCreateImageWithProperties;
+ cl_api_clSetContextDestructorCallback clSetContextDestructorCallback;
+
+} cl_icd_dispatch;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef OPENCL_CL_ICD_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_platform.h b/test/linux/jni/include/thirdparty/CL/cl_platform.h
new file mode 100644
index 0000000..2d69cc4
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_platform.h
@@ -0,0 +1,1384 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef __CL_PLATFORM_H
+#define __CL_PLATFORM_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(_WIN32)
+ #define CL_API_ENTRY
+ #define CL_API_CALL __stdcall
+ #define CL_CALLBACK __stdcall
+#else
+ #define CL_API_ENTRY
+ #define CL_API_CALL
+ #define CL_CALLBACK
+#endif
+
+/*
+ * Deprecation flags refer to the last version of the header in which the
+ * feature was not deprecated.
+ *
+ * E.g. VERSION_1_1_DEPRECATED means the feature is present in 1.1 without
+ * deprecation but is deprecated in versions later than 1.1.
+ */
+
+#define CL_EXTENSION_WEAK_LINK
+#define CL_API_SUFFIX__VERSION_1_0
+#define CL_EXT_SUFFIX__VERSION_1_0
+#define CL_API_SUFFIX__VERSION_1_1
+#define CL_EXT_SUFFIX__VERSION_1_1
+#define CL_API_SUFFIX__VERSION_1_2
+#define CL_EXT_SUFFIX__VERSION_1_2
+#define CL_API_SUFFIX__VERSION_2_0
+#define CL_EXT_SUFFIX__VERSION_2_0
+#define CL_API_SUFFIX__VERSION_2_1
+#define CL_EXT_SUFFIX__VERSION_2_1
+#define CL_API_SUFFIX__VERSION_2_2
+#define CL_EXT_SUFFIX__VERSION_2_2
+#define CL_API_SUFFIX__VERSION_3_0
+#define CL_EXT_SUFFIX__VERSION_3_0
+#define CL_API_SUFFIX__EXPERIMENTAL
+#define CL_EXT_SUFFIX__EXPERIMENTAL
+
+
+#ifdef __GNUC__
+ #define CL_EXT_SUFFIX_DEPRECATED __attribute__((deprecated))
+ #define CL_EXT_PREFIX_DEPRECATED
+#elif defined(_WIN32)
+ #define CL_EXT_SUFFIX_DEPRECATED
+ #define CL_EXT_PREFIX_DEPRECATED __declspec(deprecated)
+#else
+ #define CL_EXT_SUFFIX_DEPRECATED
+ #define CL_EXT_PREFIX_DEPRECATED
+#endif
+
+#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
+ #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
+#else
+ #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED CL_EXT_PREFIX_DEPRECATED
+#endif
+
+#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
+ #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
+#else
+ #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED CL_EXT_PREFIX_DEPRECATED
+#endif
+
+#ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
+ #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
+#else
+ #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED CL_EXT_PREFIX_DEPRECATED
+ #endif
+
+#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
+ #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
+#else
+ #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED CL_EXT_PREFIX_DEPRECATED
+#endif
+
+#ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS
+ #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
+#else
+ #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED CL_EXT_PREFIX_DEPRECATED
+#endif
+
+#ifdef CL_USE_DEPRECATED_OPENCL_2_2_APIS
+ #define CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_2_2_DEPRECATED
+#else
+ #define CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
+ #define CL_EXT_PREFIX__VERSION_2_2_DEPRECATED CL_EXT_PREFIX_DEPRECATED
+#endif
+
+#if (defined (_WIN32) && defined(_MSC_VER))
+
+/* scalar types */
+typedef signed __int8 cl_char;
+typedef unsigned __int8 cl_uchar;
+typedef signed __int16 cl_short;
+typedef unsigned __int16 cl_ushort;
+typedef signed __int32 cl_int;
+typedef unsigned __int32 cl_uint;
+typedef signed __int64 cl_long;
+typedef unsigned __int64 cl_ulong;
+
+typedef unsigned __int16 cl_half;
+typedef float cl_float;
+typedef double cl_double;
+
+/* Macro names and corresponding values defined by OpenCL */
+#define CL_CHAR_BIT 8
+#define CL_SCHAR_MAX 127
+#define CL_SCHAR_MIN (-127-1)
+#define CL_CHAR_MAX CL_SCHAR_MAX
+#define CL_CHAR_MIN CL_SCHAR_MIN
+#define CL_UCHAR_MAX 255
+#define CL_SHRT_MAX 32767
+#define CL_SHRT_MIN (-32767-1)
+#define CL_USHRT_MAX 65535
+#define CL_INT_MAX 2147483647
+#define CL_INT_MIN (-2147483647-1)
+#define CL_UINT_MAX 0xffffffffU
+#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
+#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
+#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
+
+#define CL_FLT_DIG 6
+#define CL_FLT_MANT_DIG 24
+#define CL_FLT_MAX_10_EXP +38
+#define CL_FLT_MAX_EXP +128
+#define CL_FLT_MIN_10_EXP -37
+#define CL_FLT_MIN_EXP -125
+#define CL_FLT_RADIX 2
+#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
+#define CL_FLT_MIN 1.175494350822287507969e-38f
+#define CL_FLT_EPSILON 1.1920928955078125e-7f
+
+#define CL_HALF_DIG 3
+#define CL_HALF_MANT_DIG 11
+#define CL_HALF_MAX_10_EXP +4
+#define CL_HALF_MAX_EXP +16
+#define CL_HALF_MIN_10_EXP -4
+#define CL_HALF_MIN_EXP -13
+#define CL_HALF_RADIX 2
+#define CL_HALF_MAX 65504.0f
+#define CL_HALF_MIN 6.103515625e-05f
+#define CL_HALF_EPSILON 9.765625e-04f
+
+#define CL_DBL_DIG 15
+#define CL_DBL_MANT_DIG 53
+#define CL_DBL_MAX_10_EXP +308
+#define CL_DBL_MAX_EXP +1024
+#define CL_DBL_MIN_10_EXP -307
+#define CL_DBL_MIN_EXP -1021
+#define CL_DBL_RADIX 2
+#define CL_DBL_MAX 1.7976931348623158e+308
+#define CL_DBL_MIN 2.225073858507201383090e-308
+#define CL_DBL_EPSILON 2.220446049250313080847e-16
+
+#define CL_M_E 2.7182818284590452354
+#define CL_M_LOG2E 1.4426950408889634074
+#define CL_M_LOG10E 0.43429448190325182765
+#define CL_M_LN2 0.69314718055994530942
+#define CL_M_LN10 2.30258509299404568402
+#define CL_M_PI 3.14159265358979323846
+#define CL_M_PI_2 1.57079632679489661923
+#define CL_M_PI_4 0.78539816339744830962
+#define CL_M_1_PI 0.31830988618379067154
+#define CL_M_2_PI 0.63661977236758134308
+#define CL_M_2_SQRTPI 1.12837916709551257390
+#define CL_M_SQRT2 1.41421356237309504880
+#define CL_M_SQRT1_2 0.70710678118654752440
+
+#define CL_M_E_F 2.718281828f
+#define CL_M_LOG2E_F 1.442695041f
+#define CL_M_LOG10E_F 0.434294482f
+#define CL_M_LN2_F 0.693147181f
+#define CL_M_LN10_F 2.302585093f
+#define CL_M_PI_F 3.141592654f
+#define CL_M_PI_2_F 1.570796327f
+#define CL_M_PI_4_F 0.785398163f
+#define CL_M_1_PI_F 0.318309886f
+#define CL_M_2_PI_F 0.636619772f
+#define CL_M_2_SQRTPI_F 1.128379167f
+#define CL_M_SQRT2_F 1.414213562f
+#define CL_M_SQRT1_2_F 0.707106781f
+
+#define CL_NAN (CL_INFINITY - CL_INFINITY)
+#define CL_HUGE_VALF ((cl_float) 1e50)
+#define CL_HUGE_VAL ((cl_double) 1e500)
+#define CL_MAXFLOAT CL_FLT_MAX
+#define CL_INFINITY CL_HUGE_VALF
+
+#else
+
+#include
+
+/* scalar types */
+typedef int8_t cl_char;
+typedef uint8_t cl_uchar;
+typedef int16_t cl_short;
+typedef uint16_t cl_ushort;
+typedef int32_t cl_int;
+typedef uint32_t cl_uint;
+typedef int64_t cl_long;
+typedef uint64_t cl_ulong;
+
+typedef uint16_t cl_half;
+typedef float cl_float;
+typedef double cl_double;
+
+/* Macro names and corresponding values defined by OpenCL */
+#define CL_CHAR_BIT 8
+#define CL_SCHAR_MAX 127
+#define CL_SCHAR_MIN (-127-1)
+#define CL_CHAR_MAX CL_SCHAR_MAX
+#define CL_CHAR_MIN CL_SCHAR_MIN
+#define CL_UCHAR_MAX 255
+#define CL_SHRT_MAX 32767
+#define CL_SHRT_MIN (-32767-1)
+#define CL_USHRT_MAX 65535
+#define CL_INT_MAX 2147483647
+#define CL_INT_MIN (-2147483647-1)
+#define CL_UINT_MAX 0xffffffffU
+#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
+#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
+#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
+
+#define CL_FLT_DIG 6
+#define CL_FLT_MANT_DIG 24
+#define CL_FLT_MAX_10_EXP +38
+#define CL_FLT_MAX_EXP +128
+#define CL_FLT_MIN_10_EXP -37
+#define CL_FLT_MIN_EXP -125
+#define CL_FLT_RADIX 2
+#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
+#define CL_FLT_MIN 1.175494350822287507969e-38f
+#define CL_FLT_EPSILON 1.1920928955078125e-7f
+
+#define CL_HALF_DIG 3
+#define CL_HALF_MANT_DIG 11
+#define CL_HALF_MAX_10_EXP +4
+#define CL_HALF_MAX_EXP +16
+#define CL_HALF_MIN_10_EXP -4
+#define CL_HALF_MIN_EXP -13
+#define CL_HALF_RADIX 2
+#define CL_HALF_MAX 65504.0f
+#define CL_HALF_MIN 6.103515625e-05f
+#define CL_HALF_EPSILON 9.765625e-04f
+
+#define CL_DBL_DIG 15
+#define CL_DBL_MANT_DIG 53
+#define CL_DBL_MAX_10_EXP +308
+#define CL_DBL_MAX_EXP +1024
+#define CL_DBL_MIN_10_EXP -307
+#define CL_DBL_MIN_EXP -1021
+#define CL_DBL_RADIX 2
+#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
+#define CL_DBL_MIN 2.225073858507201383090e-308
+#define CL_DBL_EPSILON 2.220446049250313080847e-16
+
+#define CL_M_E 2.7182818284590452354
+#define CL_M_LOG2E 1.4426950408889634074
+#define CL_M_LOG10E 0.43429448190325182765
+#define CL_M_LN2 0.69314718055994530942
+#define CL_M_LN10 2.30258509299404568402
+#define CL_M_PI 3.14159265358979323846
+#define CL_M_PI_2 1.57079632679489661923
+#define CL_M_PI_4 0.78539816339744830962
+#define CL_M_1_PI 0.31830988618379067154
+#define CL_M_2_PI 0.63661977236758134308
+#define CL_M_2_SQRTPI 1.12837916709551257390
+#define CL_M_SQRT2 1.41421356237309504880
+#define CL_M_SQRT1_2 0.70710678118654752440
+
+#define CL_M_E_F 2.718281828f
+#define CL_M_LOG2E_F 1.442695041f
+#define CL_M_LOG10E_F 0.434294482f
+#define CL_M_LN2_F 0.693147181f
+#define CL_M_LN10_F 2.302585093f
+#define CL_M_PI_F 3.141592654f
+#define CL_M_PI_2_F 1.570796327f
+#define CL_M_PI_4_F 0.785398163f
+#define CL_M_1_PI_F 0.318309886f
+#define CL_M_2_PI_F 0.636619772f
+#define CL_M_2_SQRTPI_F 1.128379167f
+#define CL_M_SQRT2_F 1.414213562f
+#define CL_M_SQRT1_2_F 0.707106781f
+
+#if defined( __GNUC__ )
+ #define CL_HUGE_VALF __builtin_huge_valf()
+ #define CL_HUGE_VAL __builtin_huge_val()
+ #define CL_NAN __builtin_nanf( "" )
+#else
+ #define CL_HUGE_VALF ((cl_float) 1e50)
+ #define CL_HUGE_VAL ((cl_double) 1e500)
+ float nanf( const char * );
+ #define CL_NAN nanf( "" )
+#endif
+#define CL_MAXFLOAT CL_FLT_MAX
+#define CL_INFINITY CL_HUGE_VALF
+
+#endif
+
+#include
+
+/* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */
+typedef unsigned int cl_GLuint;
+typedef int cl_GLint;
+typedef unsigned int cl_GLenum;
+
+/*
+ * Vector types
+ *
+ * Note: OpenCL requires that all types be naturally aligned.
+ * This means that vector types must be naturally aligned.
+ * For example, a vector of four floats must be aligned to
+ * a 16 byte boundary (calculated as 4 * the natural 4-byte
+ * alignment of the float). The alignment qualifiers here
+ * will only function properly if your compiler supports them
+ * and if you don't actively work to defeat them. For example,
+ * in order for a cl_float4 to be 16 byte aligned in a struct,
+ * the start of the struct must itself be 16-byte aligned.
+ *
+ * Maintaining proper alignment is the user's responsibility.
+ */
+
+/* Define basic vector types */
+#if defined( __VEC__ )
+ #if !defined(__clang__)
+ #include /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
+ #endif
+ typedef __vector unsigned char __cl_uchar16;
+ typedef __vector signed char __cl_char16;
+ typedef __vector unsigned short __cl_ushort8;
+ typedef __vector signed short __cl_short8;
+ typedef __vector unsigned int __cl_uint4;
+ typedef __vector signed int __cl_int4;
+ typedef __vector float __cl_float4;
+ #define __CL_UCHAR16__ 1
+ #define __CL_CHAR16__ 1
+ #define __CL_USHORT8__ 1
+ #define __CL_SHORT8__ 1
+ #define __CL_UINT4__ 1
+ #define __CL_INT4__ 1
+ #define __CL_FLOAT4__ 1
+#endif
+
+#if defined( __SSE__ )
+ #if defined( __MINGW64__ )
+ #include
+ #else
+ #include
+ #endif
+ #if defined( __GNUC__ )
+ typedef float __cl_float4 __attribute__((vector_size(16)));
+ #else
+ typedef __m128 __cl_float4;
+ #endif
+ #define __CL_FLOAT4__ 1
+#endif
+
+#if defined( __SSE2__ )
+ #if defined( __MINGW64__ )
+ #include
+ #else
+ #include
+ #endif
+ #if defined( __GNUC__ )
+ typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
+ typedef cl_char __cl_char16 __attribute__((vector_size(16)));
+ typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
+ typedef cl_short __cl_short8 __attribute__((vector_size(16)));
+ typedef cl_uint __cl_uint4 __attribute__((vector_size(16)));
+ typedef cl_int __cl_int4 __attribute__((vector_size(16)));
+ typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16)));
+ typedef cl_long __cl_long2 __attribute__((vector_size(16)));
+ typedef cl_double __cl_double2 __attribute__((vector_size(16)));
+ #else
+ typedef __m128i __cl_uchar16;
+ typedef __m128i __cl_char16;
+ typedef __m128i __cl_ushort8;
+ typedef __m128i __cl_short8;
+ typedef __m128i __cl_uint4;
+ typedef __m128i __cl_int4;
+ typedef __m128i __cl_ulong2;
+ typedef __m128i __cl_long2;
+ typedef __m128d __cl_double2;
+ #endif
+ #define __CL_UCHAR16__ 1
+ #define __CL_CHAR16__ 1
+ #define __CL_USHORT8__ 1
+ #define __CL_SHORT8__ 1
+ #define __CL_INT4__ 1
+ #define __CL_UINT4__ 1
+ #define __CL_ULONG2__ 1
+ #define __CL_LONG2__ 1
+ #define __CL_DOUBLE2__ 1
+#endif
+
+#if defined( __MMX__ )
+ #include
+ #if defined( __GNUC__ )
+ typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
+ typedef cl_char __cl_char8 __attribute__((vector_size(8)));
+ typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
+ typedef cl_short __cl_short4 __attribute__((vector_size(8)));
+ typedef cl_uint __cl_uint2 __attribute__((vector_size(8)));
+ typedef cl_int __cl_int2 __attribute__((vector_size(8)));
+ typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8)));
+ typedef cl_long __cl_long1 __attribute__((vector_size(8)));
+ typedef cl_float __cl_float2 __attribute__((vector_size(8)));
+ #else
+ typedef __m64 __cl_uchar8;
+ typedef __m64 __cl_char8;
+ typedef __m64 __cl_ushort4;
+ typedef __m64 __cl_short4;
+ typedef __m64 __cl_uint2;
+ typedef __m64 __cl_int2;
+ typedef __m64 __cl_ulong1;
+ typedef __m64 __cl_long1;
+ typedef __m64 __cl_float2;
+ #endif
+ #define __CL_UCHAR8__ 1
+ #define __CL_CHAR8__ 1
+ #define __CL_USHORT4__ 1
+ #define __CL_SHORT4__ 1
+ #define __CL_INT2__ 1
+ #define __CL_UINT2__ 1
+ #define __CL_ULONG1__ 1
+ #define __CL_LONG1__ 1
+ #define __CL_FLOAT2__ 1
+#endif
+
+#if defined( __AVX__ )
+ #if defined( __MINGW64__ )
+ #include
+ #else
+ #include
+ #endif
+ #if defined( __GNUC__ )
+ typedef cl_float __cl_float8 __attribute__((vector_size(32)));
+ typedef cl_double __cl_double4 __attribute__((vector_size(32)));
+ #else
+ typedef __m256 __cl_float8;
+ typedef __m256d __cl_double4;
+ #endif
+ #define __CL_FLOAT8__ 1
+ #define __CL_DOUBLE4__ 1
+#endif
+
+/* Define capabilities for anonymous struct members. */
+#if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#define __CL_HAS_ANON_STRUCT__ 1
+#define __CL_ANON_STRUCT__
+#elif defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
+#define __CL_HAS_ANON_STRUCT__ 1
+#define __CL_ANON_STRUCT__ __extension__
+#elif defined( _WIN32) && defined(_MSC_VER) && ! defined(__STDC__)
+ #if _MSC_VER >= 1500
+ /* Microsoft Developer Studio 2008 supports anonymous structs, but
+ * complains by default. */
+ #define __CL_HAS_ANON_STRUCT__ 1
+ #define __CL_ANON_STRUCT__
+ /* Disable warning C4201: nonstandard extension used : nameless
+ * struct/union */
+ #pragma warning( push )
+ #pragma warning( disable : 4201 )
+ #endif
+#else
+#define __CL_HAS_ANON_STRUCT__ 0
+#define __CL_ANON_STRUCT__
+#endif
+
+/* Define alignment keys */
+#if defined( __GNUC__ ) || defined(__INTEGRITY)
+ #define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
+#elif defined( _WIN32) && (_MSC_VER)
+ /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
+ /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
+ /* #include */
+ /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */
+ #define CL_ALIGNED(_x)
+#else
+ #warning Need to implement some method to align data here
+ #define CL_ALIGNED(_x)
+#endif
+
+/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
+#if __CL_HAS_ANON_STRUCT__
+ /* .xyzw and .s0123...{f|F} are supported */
+ #define CL_HAS_NAMED_VECTOR_FIELDS 1
+ /* .hi and .lo are supported */
+ #define CL_HAS_HI_LO_VECTOR_FIELDS 1
+#endif
+
+/* Define cl_vector types */
+
+/* ---- cl_charn ---- */
+typedef union
+{
+ cl_char CL_ALIGNED(2) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_char x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_char lo, hi; };
+#endif
+#if defined( __CL_CHAR2__)
+ __cl_char2 v2;
+#endif
+}cl_char2;
+
+typedef union
+{
+ cl_char CL_ALIGNED(4) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_char2 lo, hi; };
+#endif
+#if defined( __CL_CHAR2__)
+ __cl_char2 v2[2];
+#endif
+#if defined( __CL_CHAR4__)
+ __cl_char4 v4;
+#endif
+}cl_char4;
+
+/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */
+typedef cl_char4 cl_char3;
+
+typedef union
+{
+ cl_char CL_ALIGNED(8) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_char4 lo, hi; };
+#endif
+#if defined( __CL_CHAR2__)
+ __cl_char2 v2[4];
+#endif
+#if defined( __CL_CHAR4__)
+ __cl_char4 v4[2];
+#endif
+#if defined( __CL_CHAR8__ )
+ __cl_char8 v8;
+#endif
+}cl_char8;
+
+typedef union
+{
+ cl_char CL_ALIGNED(16) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_char8 lo, hi; };
+#endif
+#if defined( __CL_CHAR2__)
+ __cl_char2 v2[8];
+#endif
+#if defined( __CL_CHAR4__)
+ __cl_char4 v4[4];
+#endif
+#if defined( __CL_CHAR8__ )
+ __cl_char8 v8[2];
+#endif
+#if defined( __CL_CHAR16__ )
+ __cl_char16 v16;
+#endif
+}cl_char16;
+
+
+/* ---- cl_ucharn ---- */
+typedef union
+{
+ cl_uchar CL_ALIGNED(2) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_uchar lo, hi; };
+#endif
+#if defined( __cl_uchar2__)
+ __cl_uchar2 v2;
+#endif
+}cl_uchar2;
+
+typedef union
+{
+ cl_uchar CL_ALIGNED(4) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_uchar2 lo, hi; };
+#endif
+#if defined( __CL_UCHAR2__)
+ __cl_uchar2 v2[2];
+#endif
+#if defined( __CL_UCHAR4__)
+ __cl_uchar4 v4;
+#endif
+}cl_uchar4;
+
+/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */
+typedef cl_uchar4 cl_uchar3;
+
+typedef union
+{
+ cl_uchar CL_ALIGNED(8) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_uchar4 lo, hi; };
+#endif
+#if defined( __CL_UCHAR2__)
+ __cl_uchar2 v2[4];
+#endif
+#if defined( __CL_UCHAR4__)
+ __cl_uchar4 v4[2];
+#endif
+#if defined( __CL_UCHAR8__ )
+ __cl_uchar8 v8;
+#endif
+}cl_uchar8;
+
+typedef union
+{
+ cl_uchar CL_ALIGNED(16) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_uchar8 lo, hi; };
+#endif
+#if defined( __CL_UCHAR2__)
+ __cl_uchar2 v2[8];
+#endif
+#if defined( __CL_UCHAR4__)
+ __cl_uchar4 v4[4];
+#endif
+#if defined( __CL_UCHAR8__ )
+ __cl_uchar8 v8[2];
+#endif
+#if defined( __CL_UCHAR16__ )
+ __cl_uchar16 v16;
+#endif
+}cl_uchar16;
+
+
+/* ---- cl_shortn ---- */
+typedef union
+{
+ cl_short CL_ALIGNED(4) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_short x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_short lo, hi; };
+#endif
+#if defined( __CL_SHORT2__)
+ __cl_short2 v2;
+#endif
+}cl_short2;
+
+typedef union
+{
+ cl_short CL_ALIGNED(8) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_short2 lo, hi; };
+#endif
+#if defined( __CL_SHORT2__)
+ __cl_short2 v2[2];
+#endif
+#if defined( __CL_SHORT4__)
+ __cl_short4 v4;
+#endif
+}cl_short4;
+
+/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */
+typedef cl_short4 cl_short3;
+
+typedef union
+{
+ cl_short CL_ALIGNED(16) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_short4 lo, hi; };
+#endif
+#if defined( __CL_SHORT2__)
+ __cl_short2 v2[4];
+#endif
+#if defined( __CL_SHORT4__)
+ __cl_short4 v4[2];
+#endif
+#if defined( __CL_SHORT8__ )
+ __cl_short8 v8;
+#endif
+}cl_short8;
+
+typedef union
+{
+ cl_short CL_ALIGNED(32) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_short8 lo, hi; };
+#endif
+#if defined( __CL_SHORT2__)
+ __cl_short2 v2[8];
+#endif
+#if defined( __CL_SHORT4__)
+ __cl_short4 v4[4];
+#endif
+#if defined( __CL_SHORT8__ )
+ __cl_short8 v8[2];
+#endif
+#if defined( __CL_SHORT16__ )
+ __cl_short16 v16;
+#endif
+}cl_short16;
+
+
+/* ---- cl_ushortn ---- */
+typedef union
+{
+ cl_ushort CL_ALIGNED(4) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_ushort lo, hi; };
+#endif
+#if defined( __CL_USHORT2__)
+ __cl_ushort2 v2;
+#endif
+}cl_ushort2;
+
+typedef union
+{
+ cl_ushort CL_ALIGNED(8) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_ushort2 lo, hi; };
+#endif
+#if defined( __CL_USHORT2__)
+ __cl_ushort2 v2[2];
+#endif
+#if defined( __CL_USHORT4__)
+ __cl_ushort4 v4;
+#endif
+}cl_ushort4;
+
+/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */
+typedef cl_ushort4 cl_ushort3;
+
+typedef union
+{
+ cl_ushort CL_ALIGNED(16) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_ushort4 lo, hi; };
+#endif
+#if defined( __CL_USHORT2__)
+ __cl_ushort2 v2[4];
+#endif
+#if defined( __CL_USHORT4__)
+ __cl_ushort4 v4[2];
+#endif
+#if defined( __CL_USHORT8__ )
+ __cl_ushort8 v8;
+#endif
+}cl_ushort8;
+
+typedef union
+{
+ cl_ushort CL_ALIGNED(32) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_ushort8 lo, hi; };
+#endif
+#if defined( __CL_USHORT2__)
+ __cl_ushort2 v2[8];
+#endif
+#if defined( __CL_USHORT4__)
+ __cl_ushort4 v4[4];
+#endif
+#if defined( __CL_USHORT8__ )
+ __cl_ushort8 v8[2];
+#endif
+#if defined( __CL_USHORT16__ )
+ __cl_ushort16 v16;
+#endif
+}cl_ushort16;
+
+
+/* ---- cl_halfn ---- */
+typedef union
+{
+ cl_half CL_ALIGNED(4) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_half x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_half lo, hi; };
+#endif
+#if defined( __CL_HALF2__)
+ __cl_half2 v2;
+#endif
+}cl_half2;
+
+typedef union
+{
+ cl_half CL_ALIGNED(8) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_half2 lo, hi; };
+#endif
+#if defined( __CL_HALF2__)
+ __cl_half2 v2[2];
+#endif
+#if defined( __CL_HALF4__)
+ __cl_half4 v4;
+#endif
+}cl_half4;
+
+/* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */
+typedef cl_half4 cl_half3;
+
+typedef union
+{
+ cl_half CL_ALIGNED(16) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_half4 lo, hi; };
+#endif
+#if defined( __CL_HALF2__)
+ __cl_half2 v2[4];
+#endif
+#if defined( __CL_HALF4__)
+ __cl_half4 v4[2];
+#endif
+#if defined( __CL_HALF8__ )
+ __cl_half8 v8;
+#endif
+}cl_half8;
+
+typedef union
+{
+ cl_half CL_ALIGNED(32) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_half8 lo, hi; };
+#endif
+#if defined( __CL_HALF2__)
+ __cl_half2 v2[8];
+#endif
+#if defined( __CL_HALF4__)
+ __cl_half4 v4[4];
+#endif
+#if defined( __CL_HALF8__ )
+ __cl_half8 v8[2];
+#endif
+#if defined( __CL_HALF16__ )
+ __cl_half16 v16;
+#endif
+}cl_half16;
+
+/* ---- cl_intn ---- */
+typedef union
+{
+ cl_int CL_ALIGNED(8) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_int x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_int lo, hi; };
+#endif
+#if defined( __CL_INT2__)
+ __cl_int2 v2;
+#endif
+}cl_int2;
+
+typedef union
+{
+ cl_int CL_ALIGNED(16) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_int2 lo, hi; };
+#endif
+#if defined( __CL_INT2__)
+ __cl_int2 v2[2];
+#endif
+#if defined( __CL_INT4__)
+ __cl_int4 v4;
+#endif
+}cl_int4;
+
+/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */
+typedef cl_int4 cl_int3;
+
+typedef union
+{
+ cl_int CL_ALIGNED(32) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_int4 lo, hi; };
+#endif
+#if defined( __CL_INT2__)
+ __cl_int2 v2[4];
+#endif
+#if defined( __CL_INT4__)
+ __cl_int4 v4[2];
+#endif
+#if defined( __CL_INT8__ )
+ __cl_int8 v8;
+#endif
+}cl_int8;
+
+typedef union
+{
+ cl_int CL_ALIGNED(64) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_int8 lo, hi; };
+#endif
+#if defined( __CL_INT2__)
+ __cl_int2 v2[8];
+#endif
+#if defined( __CL_INT4__)
+ __cl_int4 v4[4];
+#endif
+#if defined( __CL_INT8__ )
+ __cl_int8 v8[2];
+#endif
+#if defined( __CL_INT16__ )
+ __cl_int16 v16;
+#endif
+}cl_int16;
+
+
+/* ---- cl_uintn ---- */
+typedef union
+{
+ cl_uint CL_ALIGNED(8) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_uint lo, hi; };
+#endif
+#if defined( __CL_UINT2__)
+ __cl_uint2 v2;
+#endif
+}cl_uint2;
+
+typedef union
+{
+ cl_uint CL_ALIGNED(16) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_uint2 lo, hi; };
+#endif
+#if defined( __CL_UINT2__)
+ __cl_uint2 v2[2];
+#endif
+#if defined( __CL_UINT4__)
+ __cl_uint4 v4;
+#endif
+}cl_uint4;
+
+/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */
+typedef cl_uint4 cl_uint3;
+
+typedef union
+{
+ cl_uint CL_ALIGNED(32) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_uint4 lo, hi; };
+#endif
+#if defined( __CL_UINT2__)
+ __cl_uint2 v2[4];
+#endif
+#if defined( __CL_UINT4__)
+ __cl_uint4 v4[2];
+#endif
+#if defined( __CL_UINT8__ )
+ __cl_uint8 v8;
+#endif
+}cl_uint8;
+
+typedef union
+{
+ cl_uint CL_ALIGNED(64) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_uint8 lo, hi; };
+#endif
+#if defined( __CL_UINT2__)
+ __cl_uint2 v2[8];
+#endif
+#if defined( __CL_UINT4__)
+ __cl_uint4 v4[4];
+#endif
+#if defined( __CL_UINT8__ )
+ __cl_uint8 v8[2];
+#endif
+#if defined( __CL_UINT16__ )
+ __cl_uint16 v16;
+#endif
+}cl_uint16;
+
+/* ---- cl_longn ---- */
+typedef union
+{
+ cl_long CL_ALIGNED(16) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_long x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_long lo, hi; };
+#endif
+#if defined( __CL_LONG2__)
+ __cl_long2 v2;
+#endif
+}cl_long2;
+
+typedef union
+{
+ cl_long CL_ALIGNED(32) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_long2 lo, hi; };
+#endif
+#if defined( __CL_LONG2__)
+ __cl_long2 v2[2];
+#endif
+#if defined( __CL_LONG4__)
+ __cl_long4 v4;
+#endif
+}cl_long4;
+
+/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */
+typedef cl_long4 cl_long3;
+
+typedef union
+{
+ cl_long CL_ALIGNED(64) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_long4 lo, hi; };
+#endif
+#if defined( __CL_LONG2__)
+ __cl_long2 v2[4];
+#endif
+#if defined( __CL_LONG4__)
+ __cl_long4 v4[2];
+#endif
+#if defined( __CL_LONG8__ )
+ __cl_long8 v8;
+#endif
+}cl_long8;
+
+typedef union
+{
+ cl_long CL_ALIGNED(128) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_long8 lo, hi; };
+#endif
+#if defined( __CL_LONG2__)
+ __cl_long2 v2[8];
+#endif
+#if defined( __CL_LONG4__)
+ __cl_long4 v4[4];
+#endif
+#if defined( __CL_LONG8__ )
+ __cl_long8 v8[2];
+#endif
+#if defined( __CL_LONG16__ )
+ __cl_long16 v16;
+#endif
+}cl_long16;
+
+
+/* ---- cl_ulongn ---- */
+typedef union
+{
+ cl_ulong CL_ALIGNED(16) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_ulong lo, hi; };
+#endif
+#if defined( __CL_ULONG2__)
+ __cl_ulong2 v2;
+#endif
+}cl_ulong2;
+
+typedef union
+{
+ cl_ulong CL_ALIGNED(32) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_ulong2 lo, hi; };
+#endif
+#if defined( __CL_ULONG2__)
+ __cl_ulong2 v2[2];
+#endif
+#if defined( __CL_ULONG4__)
+ __cl_ulong4 v4;
+#endif
+}cl_ulong4;
+
+/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */
+typedef cl_ulong4 cl_ulong3;
+
+typedef union
+{
+ cl_ulong CL_ALIGNED(64) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_ulong4 lo, hi; };
+#endif
+#if defined( __CL_ULONG2__)
+ __cl_ulong2 v2[4];
+#endif
+#if defined( __CL_ULONG4__)
+ __cl_ulong4 v4[2];
+#endif
+#if defined( __CL_ULONG8__ )
+ __cl_ulong8 v8;
+#endif
+}cl_ulong8;
+
+typedef union
+{
+ cl_ulong CL_ALIGNED(128) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_ulong8 lo, hi; };
+#endif
+#if defined( __CL_ULONG2__)
+ __cl_ulong2 v2[8];
+#endif
+#if defined( __CL_ULONG4__)
+ __cl_ulong4 v4[4];
+#endif
+#if defined( __CL_ULONG8__ )
+ __cl_ulong8 v8[2];
+#endif
+#if defined( __CL_ULONG16__ )
+ __cl_ulong16 v16;
+#endif
+}cl_ulong16;
+
+
+/* --- cl_floatn ---- */
+
+typedef union
+{
+ cl_float CL_ALIGNED(8) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_float x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_float lo, hi; };
+#endif
+#if defined( __CL_FLOAT2__)
+ __cl_float2 v2;
+#endif
+}cl_float2;
+
+typedef union
+{
+ cl_float CL_ALIGNED(16) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_float2 lo, hi; };
+#endif
+#if defined( __CL_FLOAT2__)
+ __cl_float2 v2[2];
+#endif
+#if defined( __CL_FLOAT4__)
+ __cl_float4 v4;
+#endif
+}cl_float4;
+
+/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */
+typedef cl_float4 cl_float3;
+
+typedef union
+{
+ cl_float CL_ALIGNED(32) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_float4 lo, hi; };
+#endif
+#if defined( __CL_FLOAT2__)
+ __cl_float2 v2[4];
+#endif
+#if defined( __CL_FLOAT4__)
+ __cl_float4 v4[2];
+#endif
+#if defined( __CL_FLOAT8__ )
+ __cl_float8 v8;
+#endif
+}cl_float8;
+
+typedef union
+{
+ cl_float CL_ALIGNED(64) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_float8 lo, hi; };
+#endif
+#if defined( __CL_FLOAT2__)
+ __cl_float2 v2[8];
+#endif
+#if defined( __CL_FLOAT4__)
+ __cl_float4 v4[4];
+#endif
+#if defined( __CL_FLOAT8__ )
+ __cl_float8 v8[2];
+#endif
+#if defined( __CL_FLOAT16__ )
+ __cl_float16 v16;
+#endif
+}cl_float16;
+
+/* --- cl_doublen ---- */
+
+typedef union
+{
+ cl_double CL_ALIGNED(16) s[2];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_double x, y; };
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1; };
+ __CL_ANON_STRUCT__ struct{ cl_double lo, hi; };
+#endif
+#if defined( __CL_DOUBLE2__)
+ __cl_double2 v2;
+#endif
+}cl_double2;
+
+typedef union
+{
+ cl_double CL_ALIGNED(32) s[4];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3; };
+ __CL_ANON_STRUCT__ struct{ cl_double2 lo, hi; };
+#endif
+#if defined( __CL_DOUBLE2__)
+ __cl_double2 v2[2];
+#endif
+#if defined( __CL_DOUBLE4__)
+ __cl_double4 v4;
+#endif
+}cl_double4;
+
+/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */
+typedef cl_double4 cl_double3;
+
+typedef union
+{
+ cl_double CL_ALIGNED(64) s[8];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; };
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; };
+ __CL_ANON_STRUCT__ struct{ cl_double4 lo, hi; };
+#endif
+#if defined( __CL_DOUBLE2__)
+ __cl_double2 v2[4];
+#endif
+#if defined( __CL_DOUBLE4__)
+ __cl_double4 v4[2];
+#endif
+#if defined( __CL_DOUBLE8__ )
+ __cl_double8 v8;
+#endif
+}cl_double8;
+
+typedef union
+{
+ cl_double CL_ALIGNED(128) s[16];
+#if __CL_HAS_ANON_STRUCT__
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
+ __CL_ANON_STRUCT__ struct{ cl_double8 lo, hi; };
+#endif
+#if defined( __CL_DOUBLE2__)
+ __cl_double2 v2[8];
+#endif
+#if defined( __CL_DOUBLE4__)
+ __cl_double4 v4[4];
+#endif
+#if defined( __CL_DOUBLE8__ )
+ __cl_double8 v8[2];
+#endif
+#if defined( __CL_DOUBLE16__ )
+ __cl_double16 v16;
+#endif
+}cl_double16;
+
+/* Macro to facilitate debugging
+ * Usage:
+ * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.
+ * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \"
+ * Each line thereafter of OpenCL C source must end with: \n\
+ * The last line ends in ";
+ *
+ * Example:
+ *
+ * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\
+ * kernel void foo( int a, float * b ) \n\
+ * { \n\
+ * // my comment \n\
+ * *b[ get_global_id(0)] = a; \n\
+ * } \n\
+ * ";
+ *
+ * This should correctly set up the line, (column) and file information for your source
+ * string so you can do source level debugging.
+ */
+#define __CL_STRINGIFY( _x ) # _x
+#define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x )
+#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"
+
+#ifdef __cplusplus
+}
+#endif
+
+#if defined( _WIN32) && defined(_MSC_VER) && ! defined(__STDC__)
+ #if _MSC_VER >=1500
+ #pragma warning( pop )
+ #endif
+#endif
+
+#endif /* __CL_PLATFORM_H */
diff --git a/test/linux/jni/include/thirdparty/CL/cl_version.h b/test/linux/jni/include/thirdparty/CL/cl_version.h
new file mode 100644
index 0000000..3844938
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/cl_version.h
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2018-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef __CL_VERSION_H
+#define __CL_VERSION_H
+
+/* Detect which version to target */
+#if !defined(CL_TARGET_OPENCL_VERSION)
+#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
+#define CL_TARGET_OPENCL_VERSION 300
+#endif
+#if CL_TARGET_OPENCL_VERSION != 100 && \
+ CL_TARGET_OPENCL_VERSION != 110 && \
+ CL_TARGET_OPENCL_VERSION != 120 && \
+ CL_TARGET_OPENCL_VERSION != 200 && \
+ CL_TARGET_OPENCL_VERSION != 210 && \
+ CL_TARGET_OPENCL_VERSION != 220 && \
+ CL_TARGET_OPENCL_VERSION != 300
+#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220, 300). Defaulting to 300 (OpenCL 3.0)")
+#undef CL_TARGET_OPENCL_VERSION
+#define CL_TARGET_OPENCL_VERSION 300
+#endif
+
+
+/* OpenCL Version */
+#if CL_TARGET_OPENCL_VERSION >= 300 && !defined(CL_VERSION_3_0)
+#define CL_VERSION_3_0 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
+#define CL_VERSION_2_2 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
+#define CL_VERSION_2_1 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
+#define CL_VERSION_2_0 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
+#define CL_VERSION_1_2 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
+#define CL_VERSION_1_1 1
+#endif
+#if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
+#define CL_VERSION_1_0 1
+#endif
+
+/* Allow deprecated APIs for older OpenCL versions. */
+#if CL_TARGET_OPENCL_VERSION <= 220 && !defined(CL_USE_DEPRECATED_OPENCL_2_2_APIS)
+#define CL_USE_DEPRECATED_OPENCL_2_2_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
+#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
+#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
+#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
+#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
+#endif
+#if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
+#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
+#endif
+
+#endif /* __CL_VERSION_H */
diff --git a/test/linux/jni/include/thirdparty/CL/opencl.h b/test/linux/jni/include/thirdparty/CL/opencl.h
new file mode 100644
index 0000000..1c4e10c
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/CL/opencl.h
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+#ifndef __OPENCL_H
+#define __OPENCL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENCL_H */
diff --git a/test/linux/jni/include/thirdparty/fancier.h b/test/linux/jni/include/thirdparty/fancier.h
new file mode 100644
index 0000000..a035739
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier.h
@@ -0,0 +1,81 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/**
+ * @file
+ * This file contains the main definitions of the Fancier API, that
+ * simplifies common operations done by the generated native code.
+ * @note Access to the global variables or functions exported is not
+ * thread-safe.
+ */
+
+#ifndef _FANCIER_H_
+#define _FANCIER_H_
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+/// The parent directory of all private fancier directories
+extern const char* FC_CACHE_BASE_PATH;
+
+
+/**
+ * Check if the class implementation has been updated by Fancier, so that
+ * cached data can be deleted.
+ * @param className The name of the class.
+ * @param lastCodeUpdateTime Timestamp generated by the Fancier compiler.
+ * @return Whether if this is a new version of the class or not.
+ */
+FANCIER_API bool fcCache_updateStoredClassData(const char* className, uint64_t lastCodeUpdateTime);
+
+/**
+ * Initialize the global variables exported by this library.
+ * The library maintains a count of times this function has been called without
+ * calling \c fcFancier_releaseJNI() afterwards, so that global variables are
+ * only initialized once and shared across its users.
+ * @param env The JNI interface pointer.
+ * @see fcFancier_releaseJNI()
+ * @return \c true if the initialization succeeded.
+ * @throw If the Java classes needed to initialize the global variables of this
+ * library are not found, the corresponding JNI exception will be
+ * thrown.
+ */
+FANCIER_API jint fcFancier_initJNI(JNIEnv* env);
+
+/**
+ * Release the global variables exported by this library.
+ * Variables are only released when this function is called as many times as
+ * \c fcFancier_initJNI().
+ * @param env The JNI interface pointer.
+ * @see fcFancier_initJNI()
+ */
+FANCIER_API void fcFancier_releaseJNI(JNIEnv* env);
+
+
+#endif // _FANCIER_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/array.h b/test/linux/jni/include/thirdparty/fancier/array.h
new file mode 100644
index 0000000..0678efa
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/array.h
@@ -0,0 +1,321 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/*
+ * DO NOT MANUALLY EDIT THIS FILE!
+ * This file has been automatically generated, any modifications will be lost
+ * when generating the Fancier library. Any modifications to this file must be
+ * done via the corresponding template.
+ */
+
+#ifndef _FANCIER_ARRAY_H_
+#define _FANCIER_ARRAY_H_
+
+#include
+
+// clang-format off
+/// Current possible memory locations for the updated array data.
+typedef enum {
+ FC_ARRAY_LOCATION_NONE,
+ FC_ARRAY_LOCATION_NATIVE,
+ FC_ARRAY_LOCATION_OPENCL,
+} fcArrayLocation;
+// clang-format on
+
+// Global Java References
+
+extern jclass fcByteArray_class;
+extern jmethodID fcByteArray_constructor;
+
+extern jclass fcShortArray_class;
+extern jmethodID fcShortArray_constructor;
+
+extern jclass fcIntArray_class;
+extern jmethodID fcIntArray_constructor;
+
+extern jclass fcLongArray_class;
+extern jmethodID fcLongArray_constructor;
+
+extern jclass fcFloatArray_class;
+extern jmethodID fcFloatArray_constructor;
+
+extern jclass fcDoubleArray_class;
+extern jmethodID fcDoubleArray_constructor;
+
+
+// Native Definitions
+
+/// Native representation of an array of elements of type `byte`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcByte* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcByteArray;
+
+/// Native representation of an array of elements of type `short`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcShort* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcShortArray;
+
+/// Native representation of an array of elements of type `int`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcInt* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcIntArray;
+
+/// Native representation of an array of elements of type `long`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcLong* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcLongArray;
+
+/// Native representation of an array of elements of type `float`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcFloat* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcFloatArray;
+
+/// Native representation of an array of elements of type `double`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcDouble* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcDoubleArray;
+
+
+// Native Interface
+
+FANCIER_API jint fcArray_initJNI(JNIEnv* env);
+FANCIER_API void fcArray_releaseJNI(JNIEnv* env);
+
+FANCIER_API fcByteArray* fcByteArray_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcByteArray_createRef(fcByteArray* array);
+FANCIER_API fcError fcByteArray_releaseRef(fcByteArray* array);
+
+FANCIER_API fcError fcByteArray_init(fcByteArray* self);
+FANCIER_API fcError fcByteArray_initSize(fcByteArray* self, fcInt n);
+FANCIER_API fcError fcByteArray_initArray(fcByteArray* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByteArray_initCopy(fcByteArray* self, const fcByteArray* array);
+FANCIER_API fcError fcByteArray_release(fcByteArray* self);
+
+FANCIER_API fcByte fcByteArray_get(fcByteArray* self, fcInt i, fcError* err);
+FANCIER_API fcError fcByteArray_set(fcByteArray* self, fcInt i, fcByte x);
+
+FANCIER_API fcError fcByteArray_setArray(fcByteArray* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByteArray_setCopy(fcByteArray* self, const fcByteArray* array);
+FANCIER_API fcError fcByteArray_setBuffer(fcByteArray* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcByteArray_syncToHost(fcByteArray* self);
+FANCIER_API fcError fcByteArray_syncToDevice(fcByteArray* self);
+FANCIER_API fcBool fcByteArray_valid(const fcByteArray* self);
+
+FANCIER_API fcShortArray* fcShortArray_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcShortArray_createRef(fcShortArray* array);
+FANCIER_API fcError fcShortArray_releaseRef(fcShortArray* array);
+
+FANCIER_API fcError fcShortArray_init(fcShortArray* self);
+FANCIER_API fcError fcShortArray_initSize(fcShortArray* self, fcInt n);
+FANCIER_API fcError fcShortArray_initArray(fcShortArray* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShortArray_initCopy(fcShortArray* self, const fcShortArray* array);
+FANCIER_API fcError fcShortArray_release(fcShortArray* self);
+
+FANCIER_API fcShort fcShortArray_get(fcShortArray* self, fcInt i, fcError* err);
+FANCIER_API fcError fcShortArray_set(fcShortArray* self, fcInt i, fcShort x);
+
+FANCIER_API fcError fcShortArray_setArray(fcShortArray* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShortArray_setCopy(fcShortArray* self, const fcShortArray* array);
+FANCIER_API fcError fcShortArray_setBuffer(fcShortArray* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcShortArray_syncToHost(fcShortArray* self);
+FANCIER_API fcError fcShortArray_syncToDevice(fcShortArray* self);
+FANCIER_API fcBool fcShortArray_valid(const fcShortArray* self);
+
+FANCIER_API fcIntArray* fcIntArray_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcIntArray_createRef(fcIntArray* array);
+FANCIER_API fcError fcIntArray_releaseRef(fcIntArray* array);
+
+FANCIER_API fcError fcIntArray_init(fcIntArray* self);
+FANCIER_API fcError fcIntArray_initSize(fcIntArray* self, fcInt n);
+FANCIER_API fcError fcIntArray_initArray(fcIntArray* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcIntArray_initCopy(fcIntArray* self, const fcIntArray* array);
+FANCIER_API fcError fcIntArray_release(fcIntArray* self);
+
+FANCIER_API fcInt fcIntArray_get(fcIntArray* self, fcInt i, fcError* err);
+FANCIER_API fcError fcIntArray_set(fcIntArray* self, fcInt i, fcInt x);
+
+FANCIER_API fcError fcIntArray_setArray(fcIntArray* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcIntArray_setCopy(fcIntArray* self, const fcIntArray* array);
+FANCIER_API fcError fcIntArray_setBuffer(fcIntArray* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcIntArray_syncToHost(fcIntArray* self);
+FANCIER_API fcError fcIntArray_syncToDevice(fcIntArray* self);
+FANCIER_API fcBool fcIntArray_valid(const fcIntArray* self);
+
+FANCIER_API fcLongArray* fcLongArray_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcLongArray_createRef(fcLongArray* array);
+FANCIER_API fcError fcLongArray_releaseRef(fcLongArray* array);
+
+FANCIER_API fcError fcLongArray_init(fcLongArray* self);
+FANCIER_API fcError fcLongArray_initSize(fcLongArray* self, fcInt n);
+FANCIER_API fcError fcLongArray_initArray(fcLongArray* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLongArray_initCopy(fcLongArray* self, const fcLongArray* array);
+FANCIER_API fcError fcLongArray_release(fcLongArray* self);
+
+FANCIER_API fcLong fcLongArray_get(fcLongArray* self, fcInt i, fcError* err);
+FANCIER_API fcError fcLongArray_set(fcLongArray* self, fcInt i, fcLong x);
+
+FANCIER_API fcError fcLongArray_setArray(fcLongArray* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLongArray_setCopy(fcLongArray* self, const fcLongArray* array);
+FANCIER_API fcError fcLongArray_setBuffer(fcLongArray* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcLongArray_syncToHost(fcLongArray* self);
+FANCIER_API fcError fcLongArray_syncToDevice(fcLongArray* self);
+FANCIER_API fcBool fcLongArray_valid(const fcLongArray* self);
+
+FANCIER_API fcFloatArray* fcFloatArray_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcFloatArray_createRef(fcFloatArray* array);
+FANCIER_API fcError fcFloatArray_releaseRef(fcFloatArray* array);
+
+FANCIER_API fcError fcFloatArray_init(fcFloatArray* self);
+FANCIER_API fcError fcFloatArray_initSize(fcFloatArray* self, fcInt n);
+FANCIER_API fcError fcFloatArray_initArray(fcFloatArray* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloatArray_initCopy(fcFloatArray* self, const fcFloatArray* array);
+FANCIER_API fcError fcFloatArray_release(fcFloatArray* self);
+
+FANCIER_API fcFloat fcFloatArray_get(fcFloatArray* self, fcInt i, fcError* err);
+FANCIER_API fcError fcFloatArray_set(fcFloatArray* self, fcInt i, fcFloat x);
+
+FANCIER_API fcError fcFloatArray_setArray(fcFloatArray* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloatArray_setCopy(fcFloatArray* self, const fcFloatArray* array);
+FANCIER_API fcError fcFloatArray_setBuffer(fcFloatArray* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcFloatArray_syncToHost(fcFloatArray* self);
+FANCIER_API fcError fcFloatArray_syncToDevice(fcFloatArray* self);
+FANCIER_API fcBool fcFloatArray_valid(const fcFloatArray* self);
+
+FANCIER_API fcDoubleArray* fcDoubleArray_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcDoubleArray_createRef(fcDoubleArray* array);
+FANCIER_API fcError fcDoubleArray_releaseRef(fcDoubleArray* array);
+
+FANCIER_API fcError fcDoubleArray_init(fcDoubleArray* self);
+FANCIER_API fcError fcDoubleArray_initSize(fcDoubleArray* self, fcInt n);
+FANCIER_API fcError fcDoubleArray_initArray(fcDoubleArray* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDoubleArray_initCopy(fcDoubleArray* self, const fcDoubleArray* array);
+FANCIER_API fcError fcDoubleArray_release(fcDoubleArray* self);
+
+FANCIER_API fcDouble fcDoubleArray_get(fcDoubleArray* self, fcInt i, fcError* err);
+FANCIER_API fcError fcDoubleArray_set(fcDoubleArray* self, fcInt i, fcDouble x);
+
+FANCIER_API fcError fcDoubleArray_setArray(fcDoubleArray* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDoubleArray_setCopy(fcDoubleArray* self, const fcDoubleArray* array);
+FANCIER_API fcError fcDoubleArray_setBuffer(fcDoubleArray* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcDoubleArray_syncToHost(fcDoubleArray* self);
+FANCIER_API fcError fcDoubleArray_syncToDevice(fcDoubleArray* self);
+FANCIER_API fcBool fcDoubleArray_valid(const fcDoubleArray* self);
+
+#endif // _FANCIER_ARRAY_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/color.h b/test/linux/jni/include/thirdparty/fancier/color.h
new file mode 100644
index 0000000..56c9337
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/color.h
@@ -0,0 +1,79 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#ifndef _FANCIER_COLOR_H_
+#define _FANCIER_COLOR_H_
+
+#include
+#include
+
+
+extern const fcInt fcRGBAColor_Red;
+extern const fcInt fcRGBAColor_Green;
+extern const fcInt fcRGBAColor_Blue;
+extern const fcInt fcRGBAColor_Yellow;
+extern const fcInt fcRGBAColor_Magenta;
+extern const fcInt fcRGBAColor_Cyan;
+extern const fcInt fcRGBAColor_White;
+extern const fcInt fcRGBAColor_LtGray;
+extern const fcInt fcRGBAColor_Gray;
+extern const fcInt fcRGBAColor_DkGray;
+extern const fcInt fcRGBAColor_Black;
+extern const fcInt fcRGBAColor_Transparent;
+
+extern const fcByte4 fcRGBAColor_RED;
+extern const fcByte4 fcRGBAColor_GREEN;
+extern const fcByte4 fcRGBAColor_BLUE;
+extern const fcByte4 fcRGBAColor_YELLOW;
+extern const fcByte4 fcRGBAColor_MAGENTA;
+extern const fcByte4 fcRGBAColor_CYAN;
+extern const fcByte4 fcRGBAColor_WHITE;
+extern const fcByte4 fcRGBAColor_LTGRAY;
+extern const fcByte4 fcRGBAColor_GRAY;
+extern const fcByte4 fcRGBAColor_DKGRAY;
+extern const fcByte4 fcRGBAColor_BLACK;
+extern const fcByte4 fcRGBAColor_TRANSPARENT;
+
+
+FANCIER_STATIC fcInt fcRGBAColor_toRgba(fcByte4 color) {
+ return ((color.s[0] & 0xff) << 24) | ((color.s[1] & 0xff) << 16) | ((color.s[2] & 0xff) << 8) |
+ ((color.s[3] & 0xff) << 0);
+}
+
+FANCIER_STATIC fcByte4 fcRGBAColor_fromRgba(fcInt rgba) {
+ return fcByte4_create1111((fcByte)((rgba >> 24) & 0xff), (fcByte)((rgba >> 16) & 0xff),
+ (fcByte)((rgba >> 8) & 0xff), (fcByte)((rgba >> 0) & 0xff));
+}
+
+FANCIER_STATIC fcByte fcRGBAColor_alpha(fcByte4 color) {
+ return color.s[0];
+}
+
+FANCIER_STATIC fcByte fcRGBAColor_red(fcByte4 color) {
+ return color.s[1];
+}
+
+FANCIER_STATIC fcByte fcRGBAColor_green(fcByte4 color) {
+ return color.s[2];
+}
+
+FANCIER_STATIC fcByte fcRGBAColor_blue(fcByte4 color) {
+ return color.s[3];
+}
+
+#endif // _FANCIER_COLOR_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/exception.h b/test/linux/jni/include/thirdparty/fancier/exception.h
new file mode 100644
index 0000000..39f53be
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/exception.h
@@ -0,0 +1,169 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/**
+ * @file
+ * This file contains macro definitions used to create and throw Java
+ * exceptions from JNI code.
+ */
+
+#ifndef _FANCIER_EXCEPTION_H_
+#define _FANCIER_EXCEPTION_H_
+
+#include
+
+
+/// This tag can be used as return expression in many macros, resulting in a
+/// valid empty return statement.
+#define FC_VOID_EXPR
+
+/// A global reference to the \c NativeException class used to report errors to
+/// the Java application.
+extern jclass fcException_NativeException_class;
+
+/// A global reference to the \c OpenCLException class used to report errors to
+/// the Java application.
+extern jclass fcException_OpenCLException_class;
+
+/// The method identifier of the constructor for the \c NativeException class
+/// that contains a message.
+extern jmethodID fcException_NativeException_constructor_s;
+
+/// The method identifier of the constructor for the \c NativeException class
+/// that contains a message and wraps a previous exception.
+extern jmethodID fcException_NativeException_constructor_st;
+
+/// The method identifier of the constructor for the \c OpenCLException class
+/// that contains an OpenCL error code and a message.
+extern jmethodID fcException_OpenCLException_constructor_is;
+
+// clang-format off
+/// Native exception codes
+typedef enum {
+ FC_EXCEPTION_SUCCESS = 0,
+
+ // Generic exceptions
+ FC_EXCEPTION_INVALID_THIS,
+ FC_EXCEPTION_BAD_PARAMETER,
+ FC_EXCEPTION_INVALID_STATE,
+ FC_EXCEPTION_FAILED_COPY,
+
+ // OS exceptions
+ FC_EXCEPTION_DIR_ERROR,
+ FC_EXCEPTION_FILE_ERROR,
+
+ // JNI exceptions
+ FC_EXCEPTION_CLASS_NOT_FOUND,
+ FC_EXCEPTION_METHOD_NOT_FOUND,
+ FC_EXCEPTION_FIELD_NOT_FOUND,
+ FC_EXCEPTION_OUT_OF_MEMORY,
+ FC_EXCEPTION_ARRAY_GET_ELEMENTS,
+ FC_EXCEPTION_ARRAY_BAD_LENGTH,
+
+ // Bitmap exceptions
+ FC_EXCEPTION_BITMAP_INFO,
+ FC_EXCEPTION_BITMAP_UNSUPPORTED_FORMAT,
+ FC_EXCEPTION_BITMAP_LOCK_PIXELS,
+ FC_EXCEPTION_BITMAP_UNLOCK_PIXELS,
+ FC_EXCEPTION_BITMAP_BAD_DIMENSIONS,
+
+ // BufferedImage exceptions
+ FC_EXCEPTION_BUFFEREDIMAGE_INFO,
+ FC_EXCEPTION_BUFFEREDIMAGE_UNSOPPORTED_FORMAT,
+ FC_EXCEPTION_BUFFEREDIMAGE_BAD_DIMENSIONS,
+
+ FC_EXCEPTION_OTHER
+} fcNativeExceptionCode;
+// clang-format on
+
+
+FANCIER_API jint fcException_initJNI(JNIEnv* env);
+FANCIER_API void fcException_releaseJNI(JNIEnv* env);
+
+FANCIER_API jstring fcException_createString(JNIEnv* env, const char* file, int line,
+ const char* function, const char* message);
+FANCIER_API void fcException_throwWrappedNative(JNIEnv* env, const char* file, int line,
+ const char* function, jthrowable cause);
+FANCIER_API void fcException_throwNative(JNIEnv* env, const char* file, int line,
+ const char* function, fcError error);
+FANCIER_API void fcException_throwOpenCL(JNIEnv* env, const char* file, int line,
+ const char* function, fcError clerror);
+FANCIER_API void fcException_throwOpenCLBuild(JNIEnv* env, const char* file, int line,
+ const char* function, cl_program program);
+FANCIER_API void fcException_logNative(const char* file, int line, const char* function,
+ fcError error);
+FANCIER_API void fcException_logOpenCL(const char* file, int line, const char* function,
+ fcError clerror);
+
+
+#define FC_EXCEPTION_HANDLE_PENDING(_env, _pred, _func, _ret) \
+ if ((_pred) || FC_JNI_CALL(_env, ExceptionCheck)) { \
+ fcException_throwWrappedNative(_env, __FILE__, __LINE__, _func, \
+ FC_JNI_CALL(_env, ExceptionOccurred)); \
+ return _ret; \
+ } \
+ else \
+ ((void) 0)
+
+#define FC_EXCEPTION_HANDLE_NULL(_env, _var, _err, _func, _ret) \
+ if ((_var) == NULL) { \
+ fcException_throwNative(_env, __FILE__, __LINE__, _func, _err); \
+ return _ret; \
+ } \
+ else \
+ ((void) 0)
+
+#define FC_EXCEPTION_HANDLE_ERROR(_env, _err, _func, _ret) \
+ if (_err > 0) { \
+ fcException_throwNative(_env, __FILE__, __LINE__, _func, _err); \
+ return _ret; \
+ } \
+ else if (_err < 0) { \
+ fcException_throwOpenCL(_env, __FILE__, __LINE__, _func, _err); \
+ return _ret; \
+ } \
+ else \
+ ((void) 0)
+
+#define FC_EXCEPTION_HANDLE_BUILD(_env, _err, _func, _prog, _ret) \
+ if (_err == CL_BUILD_PROGRAM_FAILURE) { \
+ fcException_throwOpenCLBuild(_env, __FILE__, __LINE__, _func, _prog); \
+ return _ret; \
+ } \
+ else \
+ FC_EXCEPTION_HANDLE_ERROR(_env, _err, _func, _ret)
+
+#define FC_EXCEPTION_HANDLE_NULL_LOG(_var, _err, _func) \
+ if ((_var) == NULL) { \
+ fcException_logNative(__FILE__, __LINE__, _func, _err); \
+ } \
+ else \
+ ((void) 0)
+
+#define FC_EXCEPTION_HANDLE_ERROR_LOG(_err, _func) \
+ if (_err > 0) { \
+ fcException_logNative(__FILE__, __LINE__, _func, _err); \
+ } \
+ else if (_err < 0) { \
+ fcException_logOpenCL(__FILE__, __LINE__, _func, _err); \
+ } \
+ else \
+ ((void) 0)
+
+
+#endif // _FANCIER_EXCEPTION_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/image.h b/test/linux/jni/include/thirdparty/fancier/image.h
new file mode 100644
index 0000000..467ea1b
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/image.h
@@ -0,0 +1,90 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#ifndef _FANCIER_IMAGE_H_
+#define _FANCIER_IMAGE_H_
+
+#include
+#include
+#include
+
+#include
+
+#ifdef __ANDROID__
+#include
+#endif // __ANDROID__
+
+extern jclass fcRGBAImage_class;
+extern jmethodID fcRGBAImage_constructor;
+
+typedef struct {
+ fcInt ref_count;
+ fcInt2 dims;
+ fcByte4Array* pixels;
+} fcRGBAImage;
+
+
+FANCIER_API jint fcImage_initJNI(JNIEnv* env);
+FANCIER_API void fcImage_releaseJNI(JNIEnv* env);
+
+FANCIER_API fcRGBAImage* fcRGBAImage_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcRGBAImage_createRef(fcRGBAImage* self);
+FANCIER_API fcError fcRGBAImage_releaseRef(fcRGBAImage* self);
+
+FANCIER_API fcError fcRGBAImage_init(fcRGBAImage* self);
+FANCIER_API fcError fcRGBAImage_initDims(fcRGBAImage* self, fcInt2 dims);
+FANCIER_API fcError fcRGBAImage_initSize(fcRGBAImage* self, fcInt width, fcInt height);
+FANCIER_API fcError fcRGBAImage_initPixels(fcRGBAImage* self, fcInt width, fcInt height,
+ const fcInt* pixels);
+
+FANCIER_API fcError fcRGBAImage_initPixelsBGRA(fcRGBAImage* self, fcInt width, fcInt height,
+ const fcInt* pixels);
+FANCIER_API fcError fcRGBAImage_initArrayColorComponentsBGRA(fcRGBAImage* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcRGBAImage_setArrayColorComponentsBGRA(fcRGBAImage* self, fcInt len, const fcByte* v);
+
+FANCIER_API fcError fcRGBAImage_initCopy(fcRGBAImage* self, const fcRGBAImage* image);
+FANCIER_API fcError fcRGBAImage_release(fcRGBAImage* self);
+
+FANCIER_API fcByte4 fcRGBAImage_getCoords(fcRGBAImage* self, fcInt2 coords, fcError* err);
+FANCIER_API fcByte4 fcRGBAImage_get(fcRGBAImage* self, fcInt x, fcInt y, fcError* err);
+FANCIER_API fcError fcRGBAImage_setCoords(fcRGBAImage* self, fcInt2 coords, fcByte4 argb);
+FANCIER_API fcError fcRGBAImage_set(fcRGBAImage* self, fcInt x, fcInt y, fcByte4 argb);
+
+FANCIER_API fcError fcRGBAImage_setPixels(fcRGBAImage* self, fcInt width, fcInt height,
+ const fcInt* pixels);
+FANCIER_API fcError fcRGBAImage_setPixelsChangeBGRA(fcRGBAImage* self, fcInt width, fcInt height, fcInt* pixels);
+FANCIER_API fcError fcRGBAImage_setPixelsCopy(fcRGBAImage* self, const fcRGBAImage* image);
+
+FANCIER_API fcError fcRGBAImage_syncToHost(fcRGBAImage* self);
+FANCIER_API fcError fcRGBAImage_syncToDevice(fcRGBAImage* self);
+FANCIER_API fcBool fcRGBAImage_valid(const fcRGBAImage* self);
+
+#ifdef __ANDROID__
+FANCIER_API fcError fcRGBAImage_initBitmap(fcRGBAImage* self, AndroidBitmapInfo info,
+ const void* pixels);
+
+FANCIER_API fcError fcRGBAImage_setPixelsBitmap(fcRGBAImage* self, AndroidBitmapInfo info,
+ const void* pixels);
+
+FANCIER_API fcError fcRGBAImage_updateBitmap(fcRGBAImage* self, AndroidBitmapInfo info,
+ void* pixels);
+#endif // __ANDROID__
+
+FANCIER_API fcError fcRGBAImage_updateArray(fcRGBAImage* self, jint** __tmp_pixels, jint pixels_size, jboolean changeFromBGRA);
+
+#endif // _FANCIER_IMAGE_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/internal/snippets.inc b/test/linux/jni/include/thirdparty/fancier/internal/snippets.inc
new file mode 100644
index 0000000..0cb1eb2
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/internal/snippets.inc
@@ -0,0 +1,39 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#define FC_INIT_CLASS_REF(_env, _pkg_cls, _result, _func, _ret) \
+ do { \
+ jclass cls = FC_JNI_CALL(_env, FindClass, _pkg_cls); \
+ FC_EXCEPTION_HANDLE_PENDING(_env, !cls, _func, _ret); \
+ _result = (jclass) FC_JNI_CALL(_env, NewGlobalRef, cls); \
+ FC_EXCEPTION_HANDLE_PENDING(env, !_result, _func, _ret); \
+ } while (0)
+
+#define FC_FREE_CLASS_REF(_env, _ref) \
+ if (_ref) { \
+ FC_JNI_CALL(_env, DeleteGlobalRef, _ref); \
+ _ref = NULL; \
+ } \
+ else \
+ ((void) 0)
+
+#define FC_INIT_CONSTRUCTOR(_env, _result, _cls, _signature, _func, _ret) \
+ do { \
+ _result = FC_JNI_CALL(_env, GetMethodID, _cls, "", "(" _signature ")V"); \
+ FC_EXCEPTION_HANDLE_PENDING(_env, !_result, _func, _ret); \
+ } while (0)
diff --git a/test/linux/jni/include/thirdparty/fancier/java.h b/test/linux/jni/include/thirdparty/fancier/java.h
new file mode 100644
index 0000000..9ea83e5
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/java.h
@@ -0,0 +1,83 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#ifndef _FANCIER_JAVA_H_
+#define _FANCIER_JAVA_H_
+
+#include
+
+#include
+
+#define FC_JAVA_INSTANCE_HANDLERS(_classname) \
+ static jfieldID _classname##_nativePtrField = NULL; \
+ _classname* _classname##_allocJava(JNIEnv* env, jobject obj) { \
+ if (_classname##_nativePtrField == NULL) { \
+ _classname##_nativePtrField = fcJava_getNativePtrFieldID(env, _classname##_class); \
+ if (_classname##_nativePtrField == NULL) \
+ return NULL; \
+ } \
+ _classname* self = calloc(1, sizeof(_classname)); \
+ FC_JNI_CALL(env, SetLongField, obj, _classname##_nativePtrField, (long) self); \
+ return self; \
+ } \
+ _classname* _classname##_getJava(JNIEnv* env, jobject obj) { \
+ if (_classname##_nativePtrField == NULL) { \
+ _classname##_nativePtrField = fcJava_getNativePtrFieldID(env, _classname##_class); \
+ if (_classname##_nativePtrField == NULL) \
+ return NULL; \
+ } \
+ return (_classname*) FC_JNI_CALL(env, GetLongField, obj, _classname##_nativePtrField); \
+ } \
+ void _classname##_setJava(JNIEnv* env, jobject obj, jlong nativePtr) { \
+ if (_classname##_nativePtrField == NULL) { \
+ _classname##_nativePtrField = fcJava_getNativePtrFieldID(env, _classname##_class); \
+ if (_classname##_nativePtrField == NULL) \
+ return; \
+ } \
+ FC_JNI_CALL(env, SetLongField, obj, _classname##_nativePtrField, nativePtr); \
+ } \
+ void _classname##_freeJava(JNIEnv* env, jobject obj) { \
+ if (_classname##_nativePtrField == NULL) { \
+ _classname##_nativePtrField = fcJava_getNativePtrFieldID(env, _classname##_class); \
+ if (_classname##_nativePtrField == NULL) \
+ return; \
+ } \
+ _classname* self = \
+ (_classname*) FC_JNI_CALL(env, GetLongField, obj, _classname##_nativePtrField); \
+ FC_JNI_CALL(env, SetLongField, obj, _classname##_nativePtrField, 0L); \
+ if (self != NULL) \
+ free(self); \
+ }
+
+
+/**
+ * Obtains the class field that should contain the pointer to the native
+ * instance data.
+ * It will try to find a field named \c nativeInstancePtr of type \c long in
+ * the specified class.
+ * @param env The JNI interface pointer.
+ * @param currentClass A reference to the class in which to find this field.
+ * Auto-generated native classes contain this field.
+ * @return The field ID of the native instance data pointer or NULL if it
+ * couldn't be found.
+ * @throw If the field ID couldn't be found, it will throw a
+ * \c NativeException.
+ */
+FANCIER_API jfieldID fcJava_getNativePtrFieldID(JNIEnv* env, jclass currentClass);
+
+#endif // _FANCIER_JAVA_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/log.h b/test/linux/jni/include/thirdparty/fancier/log.h
new file mode 100644
index 0000000..82316c0
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/log.h
@@ -0,0 +1,119 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/**
+ * @file
+ * This file contains macro definitions used to log messages
+ * from native JNI code, using the platform's preferred method.
+ */
+
+#ifndef _FANCIER_LOG_H_
+#define _FANCIER_LOG_H_
+
+
+#include
+
+#ifdef __ANDROID__
+#include
+#endif
+
+
+#ifndef FC_LOG_TAG
+/// The tag used to identify what module the exception comes from in the logs.
+/// It can be redefined in other compilation units before including this file
+/// or it will default to "fancier"
+#define FC_LOG_TAG "fancier"
+#endif // FC_LOG_TAG
+
+// clang-format off
+typedef enum {
+#ifdef __ANDROID__
+ FC_LOG_VERBOSE = ANDROID_LOG_VERBOSE,
+ FC_LOG_DEBUG = ANDROID_LOG_DEBUG,
+ FC_LOG_INFO = ANDROID_LOG_INFO,
+ FC_LOG_WARN = ANDROID_LOG_WARN,
+ FC_LOG_ERROR = ANDROID_LOG_ERROR,
+ FC_LOG_FATAL = ANDROID_LOG_FATAL
+#else
+ FC_LOG_VERBOSE = 1,
+ FC_LOG_DEBUG,
+ FC_LOG_INFO,
+ FC_LOG_WARN,
+ FC_LOG_ERROR,
+ FC_LOG_FATAL
+#endif // __ANDROID__
+} fcLogLevels;
+// clang-format on
+
+FANCIER_API void __fcinternal_log_fmt(fcLogLevels log_level, const char* log_tag,
+ const char* format, ...);
+FANCIER_API void __fcinternal_log(fcLogLevels log_level, const char* log_tag, const char* message);
+
+
+/**
+ * @name Logging macros
+ * @{
+ */
+
+/// Logs a printf-like formatted string and parameters with priority \c VERBOSE.
+#define FC_LOGVERBOSE_FMT(_fmt, ...) \
+ __fcinternal_log_fmt(FC_LOG_VERBOSE, FC_LOG_TAG, _fmt, __VA_ARGS__)
+
+// Logs a printf-like formatted string and parameters with priority \c DEBUG.
+#define FC_LOGDEBUG_FMT(_fmt, ...) \
+ __fcinternal_log_fmt(FC_LOG_DEBUG, FC_LOG_TAG, _fmt, __VA_ARGS__)
+
+// Logs a printf-like formatted string and parameters with priority \c INFO.
+#define FC_LOGINFO_FMT(_fmt, ...) \
+ __fcinternal_log_fmt(FC_LOG_INFO, FC_LOG_TAG, _fmt, __VA_ARGS__)
+
+// Logs a printf-like formatted string and parameters with priority \c WARN.
+#define FC_LOGWARN_FMT(_fmt, ...) \
+ __fcinternal_log_fmt(FC_LOG_WARN, FC_LOG_TAG, _fmt, __VA_ARGS__)
+
+// Logs a printf-like formatted string and parameters with priority \c ERROR.
+#define FC_LOGERROR_FMT(_fmt, ...) \
+ __fcinternal_log_fmt(FC_LOG_ERROR, FC_LOG_TAG, _fmt, __VA_ARGS__)
+
+// Logs a printf-like formatted string and parameters with priority \c FATAL.
+#define FC_LOGFATAL_FMT(_fmt, ...) \
+ __fcinternal_log_fmt(FC_LOG_FATAL, FC_LOG_TAG, _fmt, __VA_ARGS__)
+
+/// Logs a string \a _str with priority \c VERBOSE.
+#define FC_LOGVERBOSE(_str) __fcinternal_log(FC_LOG_VERBOSE, FC_LOG_TAG, _str)
+
+/// Logs a string \a _str with priority \c DEBUG.
+#define FC_LOGDEBUG(_str) __fcinternal_log(FC_LOG_DEBUG, FC_LOG_TAG, _str)
+
+/// Logs a string \a _str with priority \c INFO.
+#define FC_LOGINFO(_str) __fcinternal_log(FC_LOG_INFO, FC_LOG_TAG, _str)
+
+/// Logs a string \a _str with priority \c WARN.
+#define FC_LOGWARN(_str) __fcinternal_log(FC_LOG_WARN, FC_LOG_TAG, _str)
+
+/// Logs a string \a _str with priority \c ERROR.
+#define FC_LOGERROR(_str) __fcinternal_log(FC_LOG_ERROR, FC_LOG_TAG, _str)
+
+/// Logs a string \a _str with priority \c FATAL.
+#define FC_LOGFATAL(_str) __fcinternal_log(FC_LOG_FATAL, FC_LOG_TAG, _str)
+
+/**
+ * @}
+ */
+
+#endif // _FANCIER_LOG_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/math.h b/test/linux/jni/include/thirdparty/fancier/math.h
new file mode 100644
index 0000000..955c76a
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/math.h
@@ -0,0 +1,233 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#ifndef _FANCIER_MATH_H_
+#define _FANCIER_MATH_H_
+
+#include
+
+
+/**
+ * @name Functions from Java's \c Math class.
+ * @{
+ */
+
+#define fcMath_abs(x) ((x) < 0 ? -(x) : (x)) // OpenCL abs() | fabs()
+#define fcMath_max(x, y) ((x) > (y) ? (x) : (y)) // OpenCL max() | fmax()
+#define fcMath_min(x, y) ((x) < (y) ? (x) : (y)) // OpenCL min() | fmin()
+
+FANCIER_API fcDouble fcMath_acos(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_acosf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_asin(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_asinf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_atan(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_atanf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_atan2(fcDouble y, fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_atan2f(fcFloat y, fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_cbrt(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_cbrtf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_ceil(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_ceilf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_copySign(fcDouble magnitude, fcDouble sign) FC_PURE; // OpenCL copysign()
+FANCIER_API fcFloat fcMath_copySignf(fcFloat magnitude, fcFloat sign) FC_PURE;
+FANCIER_API fcDouble fcMath_cos(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_cosf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_cosh(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_coshf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_exp(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_expf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_expm1(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_expm1f(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_floor(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_floorf(fcFloat a) FC_PURE;
+FANCIER_API fcInt fcMath_getExponent(fcDouble d) FC_PURE; // OpenCL ilogb()
+FANCIER_API fcInt fcMath_getExponentf(fcFloat f) FC_PURE;
+FANCIER_API fcDouble fcMath_hypot(fcDouble x, fcDouble y) FC_PURE;
+FANCIER_API fcFloat fcMath_hypotf(fcFloat x, fcFloat y) FC_PURE;
+FANCIER_API fcDouble fcMath_remainder(fcDouble f1, fcDouble f2) FC_PURE;
+FANCIER_API fcFloat fcMath_remainderf(fcFloat f1, fcFloat f2) FC_PURE;
+FANCIER_API fcDouble fcMath_log(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_logf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_log10(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_log10f(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_log1p(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_log1pf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_nextAfter(fcDouble start, fcDouble direction) FC_PURE; // OpenCL nextafter()
+FANCIER_API fcFloat fcMath_nextAfterf(fcFloat start, fcFloat direction) FC_PURE;
+FANCIER_API fcDouble fcMath_pow(fcDouble a, fcDouble b) FC_PURE;
+FANCIER_API fcFloat fcMath_powf(fcFloat a, fcFloat b) FC_PURE;
+FANCIER_API fcDouble fcMath_rint(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_rintf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_round(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_roundf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_scalb(fcDouble a, fcInt scaleFactor) FC_PURE; // OpenCL ldexp()
+FANCIER_API fcFloat fcMath_scalbf(fcFloat a, fcInt scaleFactor) FC_PURE;
+FANCIER_API fcDouble fcMath_signum(fcDouble d) FC_PURE; // OpenCL sign()
+FANCIER_API fcFloat fcMath_signumf(fcFloat f) FC_PURE;
+FANCIER_API fcDouble fcMath_sin(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_sinf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_sinh(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_sinhf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_sqrt(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_sqrtf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_tan(fcDouble a) FC_PURE;
+FANCIER_API fcFloat fcMath_tanf(fcFloat a) FC_PURE;
+FANCIER_API fcDouble fcMath_tanh(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_tanhf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_toDegrees(fcDouble angrad) FC_PURE; // OpenCL degrees()
+FANCIER_API fcFloat fcMath_toDegreesf(fcFloat angrad) FC_PURE;
+FANCIER_API fcDouble fcMath_toRadians(fcDouble angdeg) FC_PURE; // OpenCL radians()
+FANCIER_API fcFloat fcMath_toRadiansf(fcFloat angdeg) FC_PURE;
+
+/**
+ * @}
+ */
+
+/**
+ * @name Built-in OpenCL functions.
+ * @{
+ */
+
+// Common functions
+
+#define fcMath_clamp(v, min, max) ((v) < (min) ? (min) : ((v) > (max) ? (max) : (v)))
+#define fcMath_mix(x, y, a) ((x) + ((y) - (x)) * (a))
+
+// OpenCL smoothstep
+FANCIER_API fcDouble fcMath_smoothStep(fcDouble edge0, fcDouble edge1, fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_smoothStepf(fcFloat edge0, fcFloat edge1, fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_step(fcDouble edge, fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_stepf(fcFloat edge, fcFloat x) FC_PURE;
+
+// Integer functions
+
+#define fcMath_absDiff(x, y) (fcMath_abs((x) - (y))) // OpenCL abs_diff()
+
+FANCIER_API fcInt fcMath_addSat(fcInt x, fcInt y) FC_PURE; // OpenCL add_sat()
+FANCIER_API fcByte fcMath_addSatc(fcByte x, fcByte y) FC_PURE;
+FANCIER_API fcShort fcMath_addSats(fcShort x, fcShort y) FC_PURE;
+FANCIER_API fcLong fcMath_addSatl(fcLong x, fcLong y) FC_PURE;
+FANCIER_API fcInt fcMath_clz(fcInt x) FC_PURE;
+FANCIER_API fcByte fcMath_clzc(fcByte x) FC_PURE;
+FANCIER_API fcShort fcMath_clzs(fcShort x) FC_PURE;
+FANCIER_API fcLong fcMath_clzl(fcLong x) FC_PURE;
+FANCIER_API fcInt fcMath_hadd(fcInt x, fcInt y) FC_PURE;
+FANCIER_API fcByte fcMath_haddc(fcByte x, fcByte y) FC_PURE;
+FANCIER_API fcShort fcMath_hadds(fcShort x, fcShort y) FC_PURE;
+FANCIER_API fcLong fcMath_haddl(fcLong x, fcLong y) FC_PURE;
+FANCIER_API fcInt fcMath_mad24(fcInt x, fcInt y, fcInt z) FC_PURE;
+FANCIER_API fcInt fcMath_madHi(fcInt a, fcInt b, fcInt c) FC_PURE; // OpenCL mad_hi()
+FANCIER_API fcByte fcMath_madHic(fcByte a, fcByte b, fcByte c) FC_PURE;
+FANCIER_API fcShort fcMath_madHis(fcShort a, fcShort b, fcShort c) FC_PURE;
+FANCIER_API fcLong fcMath_madHil(fcLong a, fcLong b, fcLong c) FC_PURE;
+FANCIER_API fcInt fcMath_madSat(fcInt a, fcInt b, fcInt c) FC_PURE; // OpenCL mad_sat()
+FANCIER_API fcByte fcMath_madSatc(fcByte a, fcByte b, fcByte c) FC_PURE;
+FANCIER_API fcShort fcMath_madSats(fcShort a, fcShort b, fcShort c) FC_PURE;
+FANCIER_API fcLong fcMath_madSatl(fcLong a, fcLong b, fcLong c) FC_PURE;
+FANCIER_API fcInt fcMath_mul24(fcInt x, fcInt y) FC_PURE;
+FANCIER_API fcInt fcMath_mulHi(fcInt x, fcInt y) FC_PURE;
+FANCIER_API fcByte fcMath_mulHic(fcByte x, fcByte y) FC_PURE; // OpenCL mul_hi()
+FANCIER_API fcShort fcMath_mulHis(fcShort x, fcShort y) FC_PURE;
+FANCIER_API fcLong fcMath_mulHil(fcLong x, fcLong y) FC_PURE;
+FANCIER_API fcInt fcMath_rhadd(fcInt x, fcInt y) FC_PURE;
+FANCIER_API fcByte fcMath_rhaddc(fcByte x, fcByte y) FC_PURE;
+FANCIER_API fcShort fcMath_rhadds(fcShort x, fcShort y) FC_PURE;
+FANCIER_API fcLong fcMath_rhaddl(fcLong x, fcLong y) FC_PURE;
+FANCIER_API fcInt fcMath_rotate(fcInt v, fcInt i) FC_PURE;
+FANCIER_API fcByte fcMath_rotatec(fcByte v, fcByte i) FC_PURE;
+FANCIER_API fcShort fcMath_rotates(fcShort v, fcShort i) FC_PURE;
+FANCIER_API fcLong fcMath_rotatel(fcLong v, fcLong i) FC_PURE;
+FANCIER_API fcInt fcMath_subSat(fcInt x, fcInt y) FC_PURE; // OpenCL sub_sat()
+FANCIER_API fcByte fcMath_subSatc(fcByte x, fcByte y) FC_PURE;
+FANCIER_API fcShort fcMath_subSats(fcShort x, fcShort y) FC_PURE;
+FANCIER_API fcLong fcMath_subSatl(fcLong x, fcLong y) FC_PURE;
+
+// Math functions
+
+#define fcMath_maxMag(x, y) (fcMath_abs(x) > fcMath_abs(y) ? x : y) // OpenCL maxmag()
+#define fcMath_minMag(x, y) (fcMath_abs(x) < fcMath_abs(y) ? x : y) // OpenCL minmag()
+
+FANCIER_API fcDouble fcMath_acosh(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_acoshf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_asinh(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_asinhf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_atanh(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_atanhf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_erf(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_erff(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_erfc(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_erfcf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_exp2(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_exp2f(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_exp10(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_exp10f(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_fdim(fcDouble x, fcDouble y) FC_PURE;
+FANCIER_API fcFloat fcMath_fdimf(fcFloat x, fcFloat y) FC_PURE;
+FANCIER_API fcDouble fcMath_fma(fcDouble a, fcDouble b, fcDouble c) FC_PURE;
+FANCIER_API fcFloat fcMath_fmaf(fcFloat a, fcFloat b, fcFloat c) FC_PURE;
+FANCIER_API fcDouble fcMath_fmod(fcDouble x, fcDouble y) FC_PURE;
+FANCIER_API fcFloat fcMath_fmodf(fcFloat x, fcFloat y) FC_PURE;
+FANCIER_API fcDouble fcMath_fract(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_fractf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_frexp(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_frexpf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_ldexp(fcDouble x, fcInt n) FC_PURE;
+FANCIER_API fcFloat fcMath_ldexpf(fcFloat x, fcInt n) FC_PURE;
+FANCIER_API fcDouble fcMath_lgamma(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_lgammaf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_log2(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_log2f(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_logb(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_logbf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_mad(fcDouble a, fcDouble b, fcDouble c) FC_PURE;
+FANCIER_API fcFloat fcMath_madf(fcFloat a, fcFloat b, fcFloat c) FC_PURE;
+FANCIER_API fcDouble fcMath_pown(fcDouble x, fcInt y) FC_PURE;
+FANCIER_API fcFloat fcMath_pownf(fcFloat x, fcInt y) FC_PURE;
+FANCIER_API fcDouble fcMath_powr(fcDouble x, fcDouble y) FC_PURE;
+FANCIER_API fcFloat fcMath_powrf(fcFloat x, fcFloat y) FC_PURE;
+FANCIER_API fcDouble fcMath_rootn(fcDouble x, fcInt y) FC_PURE;
+FANCIER_API fcFloat fcMath_rootnf(fcFloat x, fcInt y) FC_PURE;
+FANCIER_API fcDouble fcMath_rsqrt(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_rsqrtf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_tgamma(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_tgammaf(fcFloat x) FC_PURE;
+FANCIER_API fcDouble fcMath_trunc(fcDouble x) FC_PURE;
+FANCIER_API fcFloat fcMath_truncf(fcFloat x) FC_PURE;
+
+// Relational functions
+
+#define fcMath_select(a, b, c) ((c) ? (b) : (a))
+
+FANCIER_API fcInt fcMath_isFinite(fcDouble x) FC_PURE; // OpenCL isfinite()
+FANCIER_API fcInt fcMath_isFinitef(fcFloat x) FC_PURE;
+FANCIER_API fcInt fcMath_isInf(fcDouble x) FC_PURE; // OpenCL isinf()
+FANCIER_API fcInt fcMath_isInff(fcFloat x) FC_PURE;
+FANCIER_API fcInt fcMath_isNaN(fcDouble x) FC_PURE; // OpenCL isnan()
+FANCIER_API fcInt fcMath_isNaNf(fcFloat x) FC_PURE;
+FANCIER_API fcInt fcMath_isNormal(fcDouble x) FC_PURE; // OpenCL isnormal()
+FANCIER_API fcInt fcMath_isNormalf(fcFloat x) FC_PURE;
+FANCIER_API fcInt fcMath_isOrdered(fcDouble x, fcDouble y) FC_PURE; // OpenCL isordered()
+FANCIER_API fcInt fcMath_isOrderedf(fcFloat x, fcFloat y) FC_PURE;
+FANCIER_API fcInt fcMath_isUnordered(fcDouble x, fcDouble y) FC_PURE; // OpenCL isunordered()
+FANCIER_API fcInt fcMath_isUnorderedf(fcFloat x, fcFloat y) FC_PURE;
+
+/**
+ * @}
+ */
+
+#endif // _FANCIER_MATH_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/ocl.h b/test/linux/jni/include/thirdparty/fancier/ocl.h
new file mode 100644
index 0000000..9711631
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/ocl.h
@@ -0,0 +1,84 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/**
+ * @file
+ * This file contains macro definitions and functions used to simplify common
+ * operations that have to be done in the generated native OpenCL host code.
+ * @note Access to the global variables or functions exported is not
+ * thread-safe.
+ */
+
+#ifndef _FANCIER_OCL_H_
+#define _FANCIER_OCL_H_
+
+#include
+
+
+/**
+ * A structure that represents information for an OpenCL device.
+ */
+typedef struct {
+ cl_device_type deviceType; //!< The type of OpenCL device.
+ cl_uint computeUnits; //!< The number of compute units.
+ size_t workgroupSize; //!< The maximum workgroup size.
+ cl_bool unifiedMemory; //!< Whether host and device memory is shared.
+ cl_ulong globalMemory; //!< The size of global memory in bytes.
+ cl_ulong localMemory; //!< The size of local memory in bytes.
+ cl_ulong globalCache; //!< The size of the cache memory in bytes.
+ cl_uint preferredCharVectorWidth; //!< The preferred vector width for chars.
+ cl_uint nativeCharVectorWidth; //!< The native vector width for chars.
+ cl_uint preferredFloatVectorWidth; //!< The preferred vector width for floats.
+ cl_uint nativeFloatVectorWidth; //!< The native vector width for floats.
+} fcOpenCLInfo;
+
+/**
+ * A structure that holds runtime OpenCL objects needed to manage execution and memory.
+ */
+typedef struct {
+ cl_platform_id platform; //!< The selected OpenCL platform.
+ cl_device_id device; //!< The selected OpenCL device.
+ cl_context context; //!< The context in which all operations are executed.
+ cl_command_queue queue; //!< The OpenCL command queue where all operations are sent.
+} fcOpenCLRT;
+
+
+/// The information about the selected OpenCL device.
+extern fcOpenCLInfo fcOpenCL_info;
+
+/// The runtime management objects for the current OpenCL execution context.
+extern fcOpenCLRT fcOpenCL_rt;
+
+
+FANCIER_API jint fcOpenCL_initJNI(JNIEnv* env);
+FANCIER_API void fcOpenCL_releaseJNI(JNIEnv* env);
+
+FANCIER_API void fcOpenCL_logInfo();
+
+FANCIER_API cl_program fcOpenCL_compileKernel(int count, const char** src, cl_int* err);
+FANCIER_API cl_program fcOpenCL_compileKernelFile(const char* kernel_dir, const char* file_name,
+ cl_int* err);
+
+#ifdef __ANDROID__
+FANCIER_API cl_program fcOpenCL_compileKernelAsset(JNIEnv* env, jobject asset_manager,
+ const char* kernel_dir, const char* file_name,
+ cl_int* err);
+#endif // __ANDROID__
+
+
+#endif // _FANCIER_OCL_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/platform.h b/test/linux/jni/include/thirdparty/fancier/platform.h
new file mode 100644
index 0000000..a1826b6
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/platform.h
@@ -0,0 +1,57 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#ifndef _FANCIER_PLATFORM_H_
+#define _FANCIER_PLATFORM_H_
+
+#include
+#define CL_TARGET_OPENCL_VERSION 110
+#include
+
+#include
+#include
+
+
+#ifdef __cplusplus
+#define FANCIER_API extern "C"
+#define FC_JNI_CALL(_env, _func_name, ...) (_env)->_func_name(__VA_ARGS__)
+
+typedef bool fcBool;
+#define FC_TRUE true
+#define FC_FALSE false
+#else
+#define FANCIER_API extern
+#define FC_JNI_CALL(_env, _func_name, ...) (*_env)->_func_name(_env, ##__VA_ARGS__)
+
+typedef int fcBool;
+#define FC_TRUE 1
+#define FC_FALSE 0
+#endif
+
+#define FANCIER_STATIC static
+#define FC_PURE __attribute__((const))
+
+typedef cl_char fcByte;
+typedef cl_short fcShort;
+typedef cl_int fcInt;
+typedef cl_long fcLong;
+typedef cl_float fcFloat;
+typedef cl_double fcDouble;
+typedef fcInt fcError;
+
+#endif // _FANCIER_PLATFORM_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/utils.h b/test/linux/jni/include/thirdparty/fancier/utils.h
new file mode 100644
index 0000000..24de98c
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/utils.h
@@ -0,0 +1,140 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/**
+ * @file
+ * This file defines utility functions with various purposes.
+ */
+
+#ifndef _FANCIER_UTILS_H_
+#define _FANCIER_UTILS_H_
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+
+/// The amount of microseconds there are in a second
+#define FC_MICROSECONDS_PER_SECOND (1000000UL)
+
+/// The amount of nanoseconds there are in a microsecond
+#define FC_NANOSECONDS_PER_MICROSECOND (1000UL)
+
+/// The amount of nanoseconds there are in a second
+#define FC_NANOSECONDS_PER_SECOND (FC_NANOSECONDS_PER_MICROSECOND * FC_MICROSECONDS_PER_SECOND)
+
+
+/**
+ * @name Time functions
+ * @{
+ */
+
+/**
+ * Get a time reference for measuring execution times.
+ * @return A monotonic timestamp measured in nanoseconds.
+ */
+FANCIER_API uint64_t fcUtils_getCurrentTimeNs();
+
+/**
+ * Get the elapsed time between a previous time reference and the calling time.
+ * @param prevTimeNs Previous time in nanoseconds, as returned by \c fcUtils_getCurrentTimeNs().
+ * @return The elapsed time in microseconds.
+ */
+FANCIER_API uint32_t fcUtils_getElapsedTimeUs(uint64_t prevTimeNs);
+
+/**
+ * @}
+ */
+
+/**
+ * @name Directory manipulation functions
+ * @{
+ */
+
+/**
+ * Open a directory, or create it if it does not exist.
+ * @note It will only be created if its parent directory exists.
+ * @param path Relative or absolute path to the directory.
+ * @return The pointer to a structure holding information of the opened directory or \c NULL if the
+ * operation failed.
+ */
+FANCIER_API DIR* fcUtils_createOpenDir(const char* path);
+
+/**
+ * @}
+ */
+
+/**
+ * @name File manipulation functions
+ * @{
+ */
+
+/**
+ * Open a file, or create it if it does not exist.
+ * @note The file can only be created if the parent directory exists, and the user has write
+ * permissions on it.
+ * @param fileName Relative or absolute path to the file.
+ * @param openMode The file open mode, which can be \c O_RDONLY, \c O_WRONLU or \c O_RDWR
+ * @return The file descriptor of the opened file or \c -1 if the operation failed.
+ */
+FANCIER_API int fcUtils_createOpenFile(const char* fileName, int openMode);
+
+/**
+ * Write data into an open file.
+ * @note The file must have been opened with a mode that allows writing.
+ * @param fd The file descriptor of the file.
+ * @param data A pointer to a buffer holding the data to write.
+ * @param count The number of bytes to write in the file.
+ * @return \c 0 if the operation ended successfully or \c -1 if it failed.
+ */
+FANCIER_API int fcUtils_writeFileData(int fd, const char* data, size_t count);
+
+/**
+ * Read data from an open file.
+ * @note The file must have been opened with a mode that allows reading.
+ * @param fd The file descriptor of the file.
+ * @param data A pointer to a buffer holding the data to read.
+ * @param count The number of bytes to read from the file.
+ * @return \c 0 if the operation ended successfully or \c -1 if it failed.
+ */
+FANCIER_API int fcUtils_readFileData(int fd, char* data, size_t count);
+
+/**
+ * Read a whole file into memory, allocating the necessary space in the heap.
+ */
+FANCIER_API int fcUtils_readFile(const char* dirName, const char* fileName, size_t* length,
+ char** out);
+
+/**
+ * @}
+ */
+
+#ifdef __ANDROID__
+
+FANCIER_API fcError fcUtils_readAsset(JNIEnv* env, jobject asset_manager, const char* dir_name,
+ const char* file_name, size_t* length, char** out);
+
+#endif // __ANDROID__
+
+#endif
diff --git a/test/linux/jni/include/thirdparty/fancier/vector.h b/test/linux/jni/include/thirdparty/fancier/vector.h
new file mode 100644
index 0000000..b8aa796
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/vector.h
@@ -0,0 +1,17187 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/*
+ * DO NOT MANUALLY EDIT THIS FILE!
+ * This file has been automatically generated, any modifications will be lost
+ * when generating the Fancier library. Any modifications to this file must be
+ * done via the corresponding template.
+ */
+
+#ifndef _FANCIER_VECTOR_H_
+#define _FANCIER_VECTOR_H_
+
+#include
+#include
+
+
+// Type definitions
+
+typedef cl_char2 fcByte2;
+typedef cl_char3 fcByte3;
+typedef cl_char4 fcByte4;
+typedef cl_char8 fcByte8;
+
+typedef cl_short2 fcShort2;
+typedef cl_short3 fcShort3;
+typedef cl_short4 fcShort4;
+typedef cl_short8 fcShort8;
+
+typedef cl_int2 fcInt2;
+typedef cl_int3 fcInt3;
+typedef cl_int4 fcInt4;
+typedef cl_int8 fcInt8;
+
+typedef cl_long2 fcLong2;
+typedef cl_long3 fcLong3;
+typedef cl_long4 fcLong4;
+typedef cl_long8 fcLong8;
+
+typedef cl_float2 fcFloat2;
+typedef cl_float3 fcFloat3;
+typedef cl_float4 fcFloat4;
+typedef cl_float8 fcFloat8;
+
+typedef cl_double2 fcDouble2;
+typedef cl_double3 fcDouble3;
+typedef cl_double4 fcDouble4;
+typedef cl_double8 fcDouble8;
+
+
+// Java references
+
+extern jclass fcByte2_class;
+extern jmethodID fcByte2_constructor;
+extern jclass fcByte3_class;
+extern jmethodID fcByte3_constructor;
+extern jclass fcByte4_class;
+extern jmethodID fcByte4_constructor;
+extern jclass fcByte8_class;
+extern jmethodID fcByte8_constructor;
+
+extern jclass fcShort2_class;
+extern jmethodID fcShort2_constructor;
+extern jclass fcShort3_class;
+extern jmethodID fcShort3_constructor;
+extern jclass fcShort4_class;
+extern jmethodID fcShort4_constructor;
+extern jclass fcShort8_class;
+extern jmethodID fcShort8_constructor;
+
+extern jclass fcInt2_class;
+extern jmethodID fcInt2_constructor;
+extern jclass fcInt3_class;
+extern jmethodID fcInt3_constructor;
+extern jclass fcInt4_class;
+extern jmethodID fcInt4_constructor;
+extern jclass fcInt8_class;
+extern jmethodID fcInt8_constructor;
+
+extern jclass fcLong2_class;
+extern jmethodID fcLong2_constructor;
+extern jclass fcLong3_class;
+extern jmethodID fcLong3_constructor;
+extern jclass fcLong4_class;
+extern jmethodID fcLong4_constructor;
+extern jclass fcLong8_class;
+extern jmethodID fcLong8_constructor;
+
+extern jclass fcFloat2_class;
+extern jmethodID fcFloat2_constructor;
+extern jclass fcFloat3_class;
+extern jmethodID fcFloat3_constructor;
+extern jclass fcFloat4_class;
+extern jmethodID fcFloat4_constructor;
+extern jclass fcFloat8_class;
+extern jmethodID fcFloat8_constructor;
+
+extern jclass fcDouble2_class;
+extern jmethodID fcDouble2_constructor;
+extern jclass fcDouble3_class;
+extern jmethodID fcDouble3_constructor;
+extern jclass fcDouble4_class;
+extern jmethodID fcDouble4_constructor;
+extern jclass fcDouble8_class;
+extern jmethodID fcDouble8_constructor;
+
+
+// Module initialization
+
+FANCIER_API jint fcVector_initJNI(JNIEnv* env);
+FANCIER_API void fcVector_releaseJNI(JNIEnv* env);
+
+// Java interface
+
+FANCIER_API jobject fcByte2_wrap(JNIEnv* env, fcByte2 vec);
+FANCIER_API fcByte2 fcByte2_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcByte3_wrap(JNIEnv* env, fcByte3 vec);
+FANCIER_API fcByte3 fcByte3_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcByte4_wrap(JNIEnv* env, fcByte4 vec);
+FANCIER_API fcByte4 fcByte4_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcByte8_wrap(JNIEnv* env, fcByte8 vec);
+FANCIER_API fcByte8 fcByte8_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcShort2_wrap(JNIEnv* env, fcShort2 vec);
+FANCIER_API fcShort2 fcShort2_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcShort3_wrap(JNIEnv* env, fcShort3 vec);
+FANCIER_API fcShort3 fcShort3_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcShort4_wrap(JNIEnv* env, fcShort4 vec);
+FANCIER_API fcShort4 fcShort4_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcShort8_wrap(JNIEnv* env, fcShort8 vec);
+FANCIER_API fcShort8 fcShort8_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcInt2_wrap(JNIEnv* env, fcInt2 vec);
+FANCIER_API fcInt2 fcInt2_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcInt3_wrap(JNIEnv* env, fcInt3 vec);
+FANCIER_API fcInt3 fcInt3_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcInt4_wrap(JNIEnv* env, fcInt4 vec);
+FANCIER_API fcInt4 fcInt4_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcInt8_wrap(JNIEnv* env, fcInt8 vec);
+FANCIER_API fcInt8 fcInt8_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcLong2_wrap(JNIEnv* env, fcLong2 vec);
+FANCIER_API fcLong2 fcLong2_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcLong3_wrap(JNIEnv* env, fcLong3 vec);
+FANCIER_API fcLong3 fcLong3_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcLong4_wrap(JNIEnv* env, fcLong4 vec);
+FANCIER_API fcLong4 fcLong4_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcLong8_wrap(JNIEnv* env, fcLong8 vec);
+FANCIER_API fcLong8 fcLong8_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcFloat2_wrap(JNIEnv* env, fcFloat2 vec);
+FANCIER_API fcFloat2 fcFloat2_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcFloat3_wrap(JNIEnv* env, fcFloat3 vec);
+FANCIER_API fcFloat3 fcFloat3_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcFloat4_wrap(JNIEnv* env, fcFloat4 vec);
+FANCIER_API fcFloat4 fcFloat4_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcFloat8_wrap(JNIEnv* env, fcFloat8 vec);
+FANCIER_API fcFloat8 fcFloat8_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcDouble2_wrap(JNIEnv* env, fcDouble2 vec);
+FANCIER_API fcDouble2 fcDouble2_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcDouble3_wrap(JNIEnv* env, fcDouble3 vec);
+FANCIER_API fcDouble3 fcDouble3_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcDouble4_wrap(JNIEnv* env, fcDouble4 vec);
+FANCIER_API fcDouble4 fcDouble4_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+FANCIER_API jobject fcDouble8_wrap(JNIEnv* env, fcDouble8 vec);
+FANCIER_API fcDouble8 fcDouble8_unwrap(JNIEnv* env, jobject vec, fcError* err);
+
+
+// Native interface
+
+FANCIER_STATIC fcByte2 fcByte2_create1(fcByte v);
+FANCIER_STATIC void fcByte2_set1(fcByte2* self, fcByte v);
+FANCIER_STATIC fcByte2 fcByte2_create11(fcByte a, fcByte b);
+FANCIER_STATIC void fcByte2_set11(fcByte2* self, fcByte a, fcByte b);
+FANCIER_STATIC fcByte2 fcByte2_create2(fcByte2 vec1);
+FANCIER_STATIC void fcByte2_set2(fcByte2* self, fcByte2 vec1);
+
+FANCIER_STATIC fcShort2 fcByte2_convertShort2(fcByte2 a);
+FANCIER_STATIC fcInt2 fcByte2_convertInt2(fcByte2 a);
+FANCIER_STATIC fcLong2 fcByte2_convertLong2(fcByte2 a);
+FANCIER_STATIC fcFloat2 fcByte2_convertFloat2(fcByte2 a);
+FANCIER_STATIC fcDouble2 fcByte2_convertDouble2(fcByte2 a);
+
+FANCIER_STATIC fcInt2 fcByte2_isEqual(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcInt2 fcByte2_isNotEqual(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcInt2 fcByte2_isGreater(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcInt2 fcByte2_isGreaterEqual(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcInt2 fcByte2_isLess(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcInt2 fcByte2_isLessEqual(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_select(fcByte2 a, fcByte2 b, fcInt2 c);
+
+FANCIER_STATIC fcInt fcByte2_any(fcByte2 a);
+FANCIER_STATIC fcInt fcByte2_all(fcByte2 a);
+
+FANCIER_STATIC fcByte2 fcByte2_neg(fcByte2 a);
+FANCIER_STATIC fcByte2 fcByte2_add(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_sub(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_mul(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcDouble2 fcByte2_muld(fcByte2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcByte2_mulf(fcByte2 a, fcFloat2 b);
+FANCIER_STATIC fcByte2 fcByte2_mulk(fcByte2 a, fcByte k);
+FANCIER_STATIC fcDouble2 fcByte2_mulkd(fcByte2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcByte2_mulkf(fcByte2 a, fcFloat k);
+FANCIER_STATIC fcByte2 fcByte2_div(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcDouble2 fcByte2_divd(fcByte2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcByte2_divf(fcByte2 a, fcFloat2 b);
+FANCIER_STATIC fcByte2 fcByte2_divk(fcByte2 a, fcByte k);
+FANCIER_STATIC fcDouble2 fcByte2_divkd(fcByte2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcByte2_divkf(fcByte2 a, fcFloat k);
+FANCIER_STATIC fcByte2 fcByte2_mod(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_modk(fcByte2 a, fcByte k);
+FANCIER_STATIC fcByte2 fcByte2_bitAnd(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_bitOr(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_bitXor(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_bitNot(fcByte2 a);
+
+FANCIER_STATIC fcByte2 fcByte2_abs(fcByte2 a);
+FANCIER_STATIC fcByte2 fcByte2_clamp(fcByte2 a, fcByte2 b, fcByte2 c);
+FANCIER_STATIC fcByte2 fcByte2_max(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_maxMag(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_min(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_minMag(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_mix(fcByte2 a, fcByte2 b, fcByte2 c);
+FANCIER_STATIC fcByte2 fcByte2_clampk(fcByte2 v, fcByte min, fcByte max);
+FANCIER_STATIC fcByte2 fcByte2_maxk(fcByte2 x, fcByte y);
+FANCIER_STATIC fcByte2 fcByte2_mink(fcByte2 x, fcByte y);
+FANCIER_STATIC fcByte2 fcByte2_mixk(fcByte2 x, fcByte2 y, fcByte a);
+FANCIER_STATIC fcByte2 fcByte2_absDiff(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_addSat(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_clz(fcByte2 a);
+FANCIER_STATIC fcByte2 fcByte2_hadd(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_madHi(fcByte2 a, fcByte2 b, fcByte2 c);
+FANCIER_STATIC fcByte2 fcByte2_madSat(fcByte2 a, fcByte2 b, fcByte2 c);
+FANCIER_STATIC fcByte2 fcByte2_mulHi(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_rhadd(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_rotate(fcByte2 a, fcByte2 b);
+FANCIER_STATIC fcByte2 fcByte2_subSat(fcByte2 a, fcByte2 b);
+
+FANCIER_STATIC fcByte3 fcByte3_create1(fcByte v);
+FANCIER_STATIC void fcByte3_set1(fcByte3* self, fcByte v);
+FANCIER_STATIC fcByte3 fcByte3_create111(fcByte a, fcByte b, fcByte c);
+FANCIER_STATIC void fcByte3_set111(fcByte3* self, fcByte a, fcByte b, fcByte c);
+FANCIER_STATIC fcByte3 fcByte3_create12(fcByte x, fcByte2 vec1);
+FANCIER_STATIC void fcByte3_set12(fcByte3* self, fcByte x, fcByte2 vec1);
+FANCIER_STATIC fcByte3 fcByte3_create21(fcByte2 vec1, fcByte z);
+FANCIER_STATIC void fcByte3_set21(fcByte3* self, fcByte2 vec1, fcByte z);
+FANCIER_STATIC fcByte3 fcByte3_create3(fcByte3 vec1);
+FANCIER_STATIC void fcByte3_set3(fcByte3* self, fcByte3 vec1);
+
+FANCIER_STATIC fcShort3 fcByte3_convertShort3(fcByte3 a);
+FANCIER_STATIC fcInt3 fcByte3_convertInt3(fcByte3 a);
+FANCIER_STATIC fcLong3 fcByte3_convertLong3(fcByte3 a);
+FANCIER_STATIC fcFloat3 fcByte3_convertFloat3(fcByte3 a);
+FANCIER_STATIC fcDouble3 fcByte3_convertDouble3(fcByte3 a);
+FANCIER_STATIC fcByte2 fcByte3_asByte2(fcByte3 a);
+
+FANCIER_STATIC fcInt3 fcByte3_isEqual(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcInt3 fcByte3_isNotEqual(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcInt3 fcByte3_isGreater(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcInt3 fcByte3_isGreaterEqual(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcInt3 fcByte3_isLess(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcInt3 fcByte3_isLessEqual(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_select(fcByte3 a, fcByte3 b, fcInt3 c);
+
+FANCIER_STATIC fcInt fcByte3_any(fcByte3 a);
+FANCIER_STATIC fcInt fcByte3_all(fcByte3 a);
+
+FANCIER_STATIC fcByte3 fcByte3_neg(fcByte3 a);
+FANCIER_STATIC fcByte3 fcByte3_add(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_sub(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_mul(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcDouble3 fcByte3_muld(fcByte3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcByte3_mulf(fcByte3 a, fcFloat3 b);
+FANCIER_STATIC fcByte3 fcByte3_mulk(fcByte3 a, fcByte k);
+FANCIER_STATIC fcDouble3 fcByte3_mulkd(fcByte3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcByte3_mulkf(fcByte3 a, fcFloat k);
+FANCIER_STATIC fcByte3 fcByte3_div(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcDouble3 fcByte3_divd(fcByte3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcByte3_divf(fcByte3 a, fcFloat3 b);
+FANCIER_STATIC fcByte3 fcByte3_divk(fcByte3 a, fcByte k);
+FANCIER_STATIC fcDouble3 fcByte3_divkd(fcByte3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcByte3_divkf(fcByte3 a, fcFloat k);
+FANCIER_STATIC fcByte3 fcByte3_mod(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_modk(fcByte3 a, fcByte k);
+FANCIER_STATIC fcByte3 fcByte3_bitAnd(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_bitOr(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_bitXor(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_bitNot(fcByte3 a);
+
+FANCIER_STATIC fcByte3 fcByte3_abs(fcByte3 a);
+FANCIER_STATIC fcByte3 fcByte3_clamp(fcByte3 a, fcByte3 b, fcByte3 c);
+FANCIER_STATIC fcByte3 fcByte3_max(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_maxMag(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_min(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_minMag(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_mix(fcByte3 a, fcByte3 b, fcByte3 c);
+FANCIER_STATIC fcByte3 fcByte3_clampk(fcByte3 v, fcByte min, fcByte max);
+FANCIER_STATIC fcByte3 fcByte3_maxk(fcByte3 x, fcByte y);
+FANCIER_STATIC fcByte3 fcByte3_mink(fcByte3 x, fcByte y);
+FANCIER_STATIC fcByte3 fcByte3_mixk(fcByte3 x, fcByte3 y, fcByte a);
+FANCIER_STATIC fcByte3 fcByte3_absDiff(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_addSat(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_clz(fcByte3 a);
+FANCIER_STATIC fcByte3 fcByte3_hadd(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_madHi(fcByte3 a, fcByte3 b, fcByte3 c);
+FANCIER_STATIC fcByte3 fcByte3_madSat(fcByte3 a, fcByte3 b, fcByte3 c);
+FANCIER_STATIC fcByte3 fcByte3_mulHi(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_rhadd(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_rotate(fcByte3 a, fcByte3 b);
+FANCIER_STATIC fcByte3 fcByte3_subSat(fcByte3 a, fcByte3 b);
+
+FANCIER_STATIC fcByte4 fcByte4_create1(fcByte v);
+FANCIER_STATIC void fcByte4_set1(fcByte4* self, fcByte v);
+FANCIER_STATIC fcByte4 fcByte4_create1111(fcByte a, fcByte b, fcByte c, fcByte d);
+FANCIER_STATIC void fcByte4_set1111(fcByte4* self, fcByte a, fcByte b, fcByte c, fcByte d);
+FANCIER_STATIC fcByte4 fcByte4_create112(fcByte x, fcByte y, fcByte2 vec1);
+FANCIER_STATIC void fcByte4_set112(fcByte4* self, fcByte x, fcByte y, fcByte2 vec1);
+FANCIER_STATIC fcByte4 fcByte4_create121(fcByte x, fcByte2 vec1, fcByte w);
+FANCIER_STATIC void fcByte4_set121(fcByte4* self, fcByte x, fcByte2 vec1, fcByte w);
+FANCIER_STATIC fcByte4 fcByte4_create13(fcByte x, fcByte3 vec1);
+FANCIER_STATIC void fcByte4_set13(fcByte4* self, fcByte x, fcByte3 vec1);
+FANCIER_STATIC fcByte4 fcByte4_create211(fcByte2 vec1, fcByte z, fcByte w);
+FANCIER_STATIC void fcByte4_set211(fcByte4* self, fcByte2 vec1, fcByte z, fcByte w);
+FANCIER_STATIC fcByte4 fcByte4_create22(fcByte2 vec1, fcByte2 vec2);
+FANCIER_STATIC void fcByte4_set22(fcByte4* self, fcByte2 vec1, fcByte2 vec2);
+FANCIER_STATIC fcByte4 fcByte4_create31(fcByte3 vec1, fcByte w);
+FANCIER_STATIC void fcByte4_set31(fcByte4* self, fcByte3 vec1, fcByte w);
+FANCIER_STATIC fcByte4 fcByte4_create4(fcByte4 vec1);
+FANCIER_STATIC void fcByte4_set4(fcByte4* self, fcByte4 vec1);
+
+FANCIER_STATIC fcByte2 fcByte4_odd(fcByte4 a);
+FANCIER_STATIC fcByte2 fcByte4_even(fcByte4 a);
+
+FANCIER_STATIC fcShort4 fcByte4_convertShort4(fcByte4 a);
+FANCIER_STATIC fcInt4 fcByte4_convertInt4(fcByte4 a);
+FANCIER_STATIC fcLong4 fcByte4_convertLong4(fcByte4 a);
+FANCIER_STATIC fcFloat4 fcByte4_convertFloat4(fcByte4 a);
+FANCIER_STATIC fcDouble4 fcByte4_convertDouble4(fcByte4 a);
+FANCIER_STATIC fcByte2 fcByte4_asByte2(fcByte4 a);
+FANCIER_STATIC fcByte3 fcByte4_asByte3(fcByte4 a);
+
+FANCIER_STATIC fcInt4 fcByte4_isEqual(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcInt4 fcByte4_isNotEqual(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcInt4 fcByte4_isGreater(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcInt4 fcByte4_isGreaterEqual(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcInt4 fcByte4_isLess(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcInt4 fcByte4_isLessEqual(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_select(fcByte4 a, fcByte4 b, fcInt4 c);
+
+FANCIER_STATIC fcInt fcByte4_any(fcByte4 a);
+FANCIER_STATIC fcInt fcByte4_all(fcByte4 a);
+
+FANCIER_STATIC fcByte4 fcByte4_neg(fcByte4 a);
+FANCIER_STATIC fcByte4 fcByte4_add(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_sub(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_mul(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcDouble4 fcByte4_muld(fcByte4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcByte4_mulf(fcByte4 a, fcFloat4 b);
+FANCIER_STATIC fcByte4 fcByte4_mulk(fcByte4 a, fcByte k);
+FANCIER_STATIC fcDouble4 fcByte4_mulkd(fcByte4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcByte4_mulkf(fcByte4 a, fcFloat k);
+FANCIER_STATIC fcByte4 fcByte4_div(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcDouble4 fcByte4_divd(fcByte4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcByte4_divf(fcByte4 a, fcFloat4 b);
+FANCIER_STATIC fcByte4 fcByte4_divk(fcByte4 a, fcByte k);
+FANCIER_STATIC fcDouble4 fcByte4_divkd(fcByte4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcByte4_divkf(fcByte4 a, fcFloat k);
+FANCIER_STATIC fcByte4 fcByte4_mod(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_modk(fcByte4 a, fcByte k);
+FANCIER_STATIC fcByte4 fcByte4_bitAnd(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_bitOr(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_bitXor(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_bitNot(fcByte4 a);
+
+FANCIER_STATIC fcByte4 fcByte4_abs(fcByte4 a);
+FANCIER_STATIC fcByte4 fcByte4_clamp(fcByte4 a, fcByte4 b, fcByte4 c);
+FANCIER_STATIC fcByte4 fcByte4_max(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_maxMag(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_min(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_minMag(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_mix(fcByte4 a, fcByte4 b, fcByte4 c);
+FANCIER_STATIC fcByte4 fcByte4_clampk(fcByte4 v, fcByte min, fcByte max);
+FANCIER_STATIC fcByte4 fcByte4_maxk(fcByte4 x, fcByte y);
+FANCIER_STATIC fcByte4 fcByte4_mink(fcByte4 x, fcByte y);
+FANCIER_STATIC fcByte4 fcByte4_mixk(fcByte4 x, fcByte4 y, fcByte a);
+FANCIER_STATIC fcByte4 fcByte4_absDiff(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_addSat(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_clz(fcByte4 a);
+FANCIER_STATIC fcByte4 fcByte4_hadd(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_madHi(fcByte4 a, fcByte4 b, fcByte4 c);
+FANCIER_STATIC fcByte4 fcByte4_madSat(fcByte4 a, fcByte4 b, fcByte4 c);
+FANCIER_STATIC fcByte4 fcByte4_mulHi(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_rhadd(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_rotate(fcByte4 a, fcByte4 b);
+FANCIER_STATIC fcByte4 fcByte4_subSat(fcByte4 a, fcByte4 b);
+
+FANCIER_STATIC fcByte8 fcByte8_create1(fcByte v);
+FANCIER_STATIC void fcByte8_set1(fcByte8* self, fcByte v);
+FANCIER_STATIC fcByte8 fcByte8_create11111111(fcByte a, fcByte b, fcByte c, fcByte d, fcByte e, fcByte f, fcByte g, fcByte h);
+FANCIER_STATIC void fcByte8_set11111111(fcByte8* self, fcByte a, fcByte b, fcByte c, fcByte d, fcByte e, fcByte f, fcByte g, fcByte h);
+FANCIER_STATIC fcByte8 fcByte8_create1111112(fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte2 vec1);
+FANCIER_STATIC void fcByte8_set1111112(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte2 vec1);
+FANCIER_STATIC fcByte8 fcByte8_create1111121(fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte2 vec1, fcByte s7);
+FANCIER_STATIC void fcByte8_set1111121(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte2 vec1, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create111113(fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte3 vec1);
+FANCIER_STATIC void fcByte8_set111113(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte3 vec1);
+FANCIER_STATIC fcByte8 fcByte8_create1111211(fcByte x, fcByte y, fcByte z, fcByte w, fcByte2 vec1, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set1111211(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte2 vec1, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create111122(fcByte x, fcByte y, fcByte z, fcByte w, fcByte2 vec1, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set111122(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte2 vec1, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create111131(fcByte x, fcByte y, fcByte z, fcByte w, fcByte3 vec1, fcByte s7);
+FANCIER_STATIC void fcByte8_set111131(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte3 vec1, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create11114(fcByte x, fcByte y, fcByte z, fcByte w, fcByte4 vec1);
+FANCIER_STATIC void fcByte8_set11114(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte4 vec1);
+FANCIER_STATIC fcByte8 fcByte8_create1112111(fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set1112111(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create111212(fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set111212(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create111221(fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set111221(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create11123(fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set11123(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create111311(fcByte x, fcByte y, fcByte z, fcByte3 vec1, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set111311(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte3 vec1, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create11132(fcByte x, fcByte y, fcByte z, fcByte3 vec1, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set11132(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte3 vec1, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create11141(fcByte x, fcByte y, fcByte z, fcByte4 vec1, fcByte s7);
+FANCIER_STATIC void fcByte8_set11141(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte4 vec1, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1121111(fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set1121111(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create112112(fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set112112(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create112121(fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set112121(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create11213(fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set11213(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create112211(fcByte x, fcByte y, fcByte2 vec1, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set112211(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create11222(fcByte x, fcByte y, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set11222(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create11231(fcByte x, fcByte y, fcByte2 vec1, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set11231(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1124(fcByte x, fcByte y, fcByte2 vec1, fcByte4 vec2);
+FANCIER_STATIC void fcByte8_set1124(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte4 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create113111(fcByte x, fcByte y, fcByte3 vec1, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set113111(fcByte8* self, fcByte x, fcByte y, fcByte3 vec1, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create11312(fcByte x, fcByte y, fcByte3 vec1, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set11312(fcByte8* self, fcByte x, fcByte y, fcByte3 vec1, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create11321(fcByte x, fcByte y, fcByte3 vec1, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set11321(fcByte8* self, fcByte x, fcByte y, fcByte3 vec1, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1133(fcByte x, fcByte y, fcByte3 vec1, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set1133(fcByte8* self, fcByte x, fcByte y, fcByte3 vec1, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create11411(fcByte x, fcByte y, fcByte4 vec1, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set11411(fcByte8* self, fcByte x, fcByte y, fcByte4 vec1, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1142(fcByte x, fcByte y, fcByte4 vec1, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set1142(fcByte8* self, fcByte x, fcByte y, fcByte4 vec1, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create1211111(fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set1211111(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create121112(fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set121112(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create121121(fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set121121(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create12113(fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set12113(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create121211(fcByte x, fcByte2 vec1, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set121211(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create12122(fcByte x, fcByte2 vec1, fcByte w, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set12122(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create12131(fcByte x, fcByte2 vec1, fcByte w, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set12131(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1214(fcByte x, fcByte2 vec1, fcByte w, fcByte4 vec2);
+FANCIER_STATIC void fcByte8_set1214(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte4 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create122111(fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set122111(fcByte8* self, fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create12212(fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set12212(fcByte8* self, fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create12221(fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC void fcByte8_set12221(fcByte8* self, fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1223(fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte3 vec3);
+FANCIER_STATIC void fcByte8_set1223(fcByte8* self, fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte3 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create12311(fcByte x, fcByte2 vec1, fcByte3 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set12311(fcByte8* self, fcByte x, fcByte2 vec1, fcByte3 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1232(fcByte x, fcByte2 vec1, fcByte3 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set1232(fcByte8* self, fcByte x, fcByte2 vec1, fcByte3 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create1241(fcByte x, fcByte2 vec1, fcByte4 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set1241(fcByte8* self, fcByte x, fcByte2 vec1, fcByte4 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create131111(fcByte x, fcByte3 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set131111(fcByte8* self, fcByte x, fcByte3 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create13112(fcByte x, fcByte3 vec1, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set13112(fcByte8* self, fcByte x, fcByte3 vec1, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create13121(fcByte x, fcByte3 vec1, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set13121(fcByte8* self, fcByte x, fcByte3 vec1, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1313(fcByte x, fcByte3 vec1, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set1313(fcByte8* self, fcByte x, fcByte3 vec1, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create13211(fcByte x, fcByte3 vec1, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set13211(fcByte8* self, fcByte x, fcByte3 vec1, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1322(fcByte x, fcByte3 vec1, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set1322(fcByte8* self, fcByte x, fcByte3 vec1, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create1331(fcByte x, fcByte3 vec1, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set1331(fcByte8* self, fcByte x, fcByte3 vec1, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create134(fcByte x, fcByte3 vec1, fcByte4 vec2);
+FANCIER_STATIC void fcByte8_set134(fcByte8* self, fcByte x, fcByte3 vec1, fcByte4 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create14111(fcByte x, fcByte4 vec1, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set14111(fcByte8* self, fcByte x, fcByte4 vec1, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create1412(fcByte x, fcByte4 vec1, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set1412(fcByte8* self, fcByte x, fcByte4 vec1, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create1421(fcByte x, fcByte4 vec1, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set1421(fcByte8* self, fcByte x, fcByte4 vec1, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create143(fcByte x, fcByte4 vec1, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set143(fcByte8* self, fcByte x, fcByte4 vec1, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create2111111(fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set2111111(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create211112(fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set211112(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create211121(fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set211121(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create21113(fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set21113(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create211211(fcByte2 vec1, fcByte z, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set211211(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create21122(fcByte2 vec1, fcByte z, fcByte w, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set21122(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create21131(fcByte2 vec1, fcByte z, fcByte w, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set21131(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create2114(fcByte2 vec1, fcByte z, fcByte w, fcByte4 vec2);
+FANCIER_STATIC void fcByte8_set2114(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte4 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create212111(fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set212111(fcByte8* self, fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create21212(fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set21212(fcByte8* self, fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create21221(fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC void fcByte8_set21221(fcByte8* self, fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create2123(fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte3 vec3);
+FANCIER_STATIC void fcByte8_set2123(fcByte8* self, fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte3 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create21311(fcByte2 vec1, fcByte z, fcByte3 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set21311(fcByte8* self, fcByte2 vec1, fcByte z, fcByte3 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create2132(fcByte2 vec1, fcByte z, fcByte3 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set2132(fcByte8* self, fcByte2 vec1, fcByte z, fcByte3 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create2141(fcByte2 vec1, fcByte z, fcByte4 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set2141(fcByte8* self, fcByte2 vec1, fcByte z, fcByte4 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create221111(fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set221111(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create22112(fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set22112(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create22121(fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC void fcByte8_set22121(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create2213(fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte3 vec3);
+FANCIER_STATIC void fcByte8_set2213(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte3 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create22211(fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set22211(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create2222(fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte2 vec4);
+FANCIER_STATIC void fcByte8_set2222(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte2 vec4);
+FANCIER_STATIC fcByte8 fcByte8_create2231(fcByte2 vec1, fcByte2 vec2, fcByte3 vec3, fcByte s7);
+FANCIER_STATIC void fcByte8_set2231(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte3 vec3, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create224(fcByte2 vec1, fcByte2 vec2, fcByte4 vec3);
+FANCIER_STATIC void fcByte8_set224(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte4 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create23111(fcByte2 vec1, fcByte3 vec2, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set23111(fcByte8* self, fcByte2 vec1, fcByte3 vec2, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create2312(fcByte2 vec1, fcByte3 vec2, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set2312(fcByte8* self, fcByte2 vec1, fcByte3 vec2, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create2321(fcByte2 vec1, fcByte3 vec2, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC void fcByte8_set2321(fcByte8* self, fcByte2 vec1, fcByte3 vec2, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create233(fcByte2 vec1, fcByte3 vec2, fcByte3 vec3);
+FANCIER_STATIC void fcByte8_set233(fcByte8* self, fcByte2 vec1, fcByte3 vec2, fcByte3 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create2411(fcByte2 vec1, fcByte4 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set2411(fcByte8* self, fcByte2 vec1, fcByte4 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create242(fcByte2 vec1, fcByte4 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set242(fcByte8* self, fcByte2 vec1, fcByte4 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create311111(fcByte3 vec1, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set311111(fcByte8* self, fcByte3 vec1, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create31112(fcByte3 vec1, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set31112(fcByte8* self, fcByte3 vec1, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create31121(fcByte3 vec1, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set31121(fcByte8* self, fcByte3 vec1, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create3113(fcByte3 vec1, fcByte w, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set3113(fcByte8* self, fcByte3 vec1, fcByte w, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create31211(fcByte3 vec1, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set31211(fcByte8* self, fcByte3 vec1, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create3122(fcByte3 vec1, fcByte w, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set3122(fcByte8* self, fcByte3 vec1, fcByte w, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create3131(fcByte3 vec1, fcByte w, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set3131(fcByte8* self, fcByte3 vec1, fcByte w, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create314(fcByte3 vec1, fcByte w, fcByte4 vec2);
+FANCIER_STATIC void fcByte8_set314(fcByte8* self, fcByte3 vec1, fcByte w, fcByte4 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create32111(fcByte3 vec1, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set32111(fcByte8* self, fcByte3 vec1, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create3212(fcByte3 vec1, fcByte2 vec2, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set3212(fcByte8* self, fcByte3 vec1, fcByte2 vec2, fcByte s5, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create3221(fcByte3 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC void fcByte8_set3221(fcByte8* self, fcByte3 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create323(fcByte3 vec1, fcByte2 vec2, fcByte3 vec3);
+FANCIER_STATIC void fcByte8_set323(fcByte8* self, fcByte3 vec1, fcByte2 vec2, fcByte3 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create3311(fcByte3 vec1, fcByte3 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set3311(fcByte8* self, fcByte3 vec1, fcByte3 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create332(fcByte3 vec1, fcByte3 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set332(fcByte8* self, fcByte3 vec1, fcByte3 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create341(fcByte3 vec1, fcByte4 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set341(fcByte8* self, fcByte3 vec1, fcByte4 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create41111(fcByte4 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set41111(fcByte8* self, fcByte4 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create4112(fcByte4 vec1, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC void fcByte8_set4112(fcByte8* self, fcByte4 vec1, fcByte s4, fcByte s5, fcByte2 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create4121(fcByte4 vec1, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set4121(fcByte8* self, fcByte4 vec1, fcByte s4, fcByte2 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create413(fcByte4 vec1, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC void fcByte8_set413(fcByte8* self, fcByte4 vec1, fcByte s4, fcByte3 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create4211(fcByte4 vec1, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC void fcByte8_set4211(fcByte8* self, fcByte4 vec1, fcByte2 vec2, fcByte s6, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create422(fcByte4 vec1, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC void fcByte8_set422(fcByte8* self, fcByte4 vec1, fcByte2 vec2, fcByte2 vec3);
+FANCIER_STATIC fcByte8 fcByte8_create431(fcByte4 vec1, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC void fcByte8_set431(fcByte8* self, fcByte4 vec1, fcByte3 vec2, fcByte s7);
+FANCIER_STATIC fcByte8 fcByte8_create44(fcByte4 vec1, fcByte4 vec2);
+FANCIER_STATIC void fcByte8_set44(fcByte8* self, fcByte4 vec1, fcByte4 vec2);
+FANCIER_STATIC fcByte8 fcByte8_create8(fcByte8 vec1);
+FANCIER_STATIC void fcByte8_set8(fcByte8* self, fcByte8 vec1);
+
+FANCIER_STATIC fcByte4 fcByte8_odd(fcByte8 a);
+FANCIER_STATIC fcByte4 fcByte8_even(fcByte8 a);
+
+FANCIER_STATIC fcShort8 fcByte8_convertShort8(fcByte8 a);
+FANCIER_STATIC fcInt8 fcByte8_convertInt8(fcByte8 a);
+FANCIER_STATIC fcLong8 fcByte8_convertLong8(fcByte8 a);
+FANCIER_STATIC fcFloat8 fcByte8_convertFloat8(fcByte8 a);
+FANCIER_STATIC fcDouble8 fcByte8_convertDouble8(fcByte8 a);
+FANCIER_STATIC fcByte2 fcByte8_asByte2(fcByte8 a);
+FANCIER_STATIC fcByte3 fcByte8_asByte3(fcByte8 a);
+FANCIER_STATIC fcByte4 fcByte8_asByte4(fcByte8 a);
+
+FANCIER_STATIC fcInt8 fcByte8_isEqual(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcInt8 fcByte8_isNotEqual(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcInt8 fcByte8_isGreater(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcInt8 fcByte8_isGreaterEqual(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcInt8 fcByte8_isLess(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcInt8 fcByte8_isLessEqual(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_select(fcByte8 a, fcByte8 b, fcInt8 c);
+
+FANCIER_STATIC fcInt fcByte8_any(fcByte8 a);
+FANCIER_STATIC fcInt fcByte8_all(fcByte8 a);
+
+FANCIER_STATIC fcByte8 fcByte8_neg(fcByte8 a);
+FANCIER_STATIC fcByte8 fcByte8_add(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_sub(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_mul(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcDouble8 fcByte8_muld(fcByte8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcByte8_mulf(fcByte8 a, fcFloat8 b);
+FANCIER_STATIC fcByte8 fcByte8_mulk(fcByte8 a, fcByte k);
+FANCIER_STATIC fcDouble8 fcByte8_mulkd(fcByte8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcByte8_mulkf(fcByte8 a, fcFloat k);
+FANCIER_STATIC fcByte8 fcByte8_div(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcDouble8 fcByte8_divd(fcByte8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcByte8_divf(fcByte8 a, fcFloat8 b);
+FANCIER_STATIC fcByte8 fcByte8_divk(fcByte8 a, fcByte k);
+FANCIER_STATIC fcDouble8 fcByte8_divkd(fcByte8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcByte8_divkf(fcByte8 a, fcFloat k);
+FANCIER_STATIC fcByte8 fcByte8_mod(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_modk(fcByte8 a, fcByte k);
+FANCIER_STATIC fcByte8 fcByte8_bitAnd(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_bitOr(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_bitXor(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_bitNot(fcByte8 a);
+
+FANCIER_STATIC fcByte8 fcByte8_abs(fcByte8 a);
+FANCIER_STATIC fcByte8 fcByte8_clamp(fcByte8 a, fcByte8 b, fcByte8 c);
+FANCIER_STATIC fcByte8 fcByte8_max(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_maxMag(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_min(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_minMag(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_mix(fcByte8 a, fcByte8 b, fcByte8 c);
+FANCIER_STATIC fcByte8 fcByte8_clampk(fcByte8 v, fcByte min, fcByte max);
+FANCIER_STATIC fcByte8 fcByte8_maxk(fcByte8 x, fcByte y);
+FANCIER_STATIC fcByte8 fcByte8_mink(fcByte8 x, fcByte y);
+FANCIER_STATIC fcByte8 fcByte8_mixk(fcByte8 x, fcByte8 y, fcByte a);
+FANCIER_STATIC fcByte8 fcByte8_absDiff(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_addSat(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_clz(fcByte8 a);
+FANCIER_STATIC fcByte8 fcByte8_hadd(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_madHi(fcByte8 a, fcByte8 b, fcByte8 c);
+FANCIER_STATIC fcByte8 fcByte8_madSat(fcByte8 a, fcByte8 b, fcByte8 c);
+FANCIER_STATIC fcByte8 fcByte8_mulHi(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_rhadd(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_rotate(fcByte8 a, fcByte8 b);
+FANCIER_STATIC fcByte8 fcByte8_subSat(fcByte8 a, fcByte8 b);
+
+FANCIER_STATIC fcShort2 fcShort2_create1(fcShort v);
+FANCIER_STATIC void fcShort2_set1(fcShort2* self, fcShort v);
+FANCIER_STATIC fcShort2 fcShort2_create11(fcShort a, fcShort b);
+FANCIER_STATIC void fcShort2_set11(fcShort2* self, fcShort a, fcShort b);
+FANCIER_STATIC fcShort2 fcShort2_create2(fcShort2 vec1);
+FANCIER_STATIC void fcShort2_set2(fcShort2* self, fcShort2 vec1);
+
+FANCIER_STATIC fcByte2 fcShort2_convertByte2(fcShort2 a);
+FANCIER_STATIC fcInt2 fcShort2_convertInt2(fcShort2 a);
+FANCIER_STATIC fcLong2 fcShort2_convertLong2(fcShort2 a);
+FANCIER_STATIC fcFloat2 fcShort2_convertFloat2(fcShort2 a);
+FANCIER_STATIC fcDouble2 fcShort2_convertDouble2(fcShort2 a);
+
+FANCIER_STATIC fcInt2 fcShort2_isEqual(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcInt2 fcShort2_isNotEqual(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcInt2 fcShort2_isGreater(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcInt2 fcShort2_isGreaterEqual(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcInt2 fcShort2_isLess(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcInt2 fcShort2_isLessEqual(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_select(fcShort2 a, fcShort2 b, fcInt2 c);
+
+FANCIER_STATIC fcInt fcShort2_any(fcShort2 a);
+FANCIER_STATIC fcInt fcShort2_all(fcShort2 a);
+
+FANCIER_STATIC fcShort2 fcShort2_neg(fcShort2 a);
+FANCIER_STATIC fcShort2 fcShort2_add(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_sub(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_mul(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcDouble2 fcShort2_muld(fcShort2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcShort2_mulf(fcShort2 a, fcFloat2 b);
+FANCIER_STATIC fcShort2 fcShort2_mulk(fcShort2 a, fcShort k);
+FANCIER_STATIC fcDouble2 fcShort2_mulkd(fcShort2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcShort2_mulkf(fcShort2 a, fcFloat k);
+FANCIER_STATIC fcShort2 fcShort2_div(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcDouble2 fcShort2_divd(fcShort2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcShort2_divf(fcShort2 a, fcFloat2 b);
+FANCIER_STATIC fcShort2 fcShort2_divk(fcShort2 a, fcShort k);
+FANCIER_STATIC fcDouble2 fcShort2_divkd(fcShort2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcShort2_divkf(fcShort2 a, fcFloat k);
+FANCIER_STATIC fcShort2 fcShort2_mod(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_modk(fcShort2 a, fcShort k);
+FANCIER_STATIC fcShort2 fcShort2_bitAnd(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_bitOr(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_bitXor(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_bitNot(fcShort2 a);
+
+FANCIER_STATIC fcShort2 fcShort2_abs(fcShort2 a);
+FANCIER_STATIC fcShort2 fcShort2_clamp(fcShort2 a, fcShort2 b, fcShort2 c);
+FANCIER_STATIC fcShort2 fcShort2_max(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_maxMag(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_min(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_minMag(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_mix(fcShort2 a, fcShort2 b, fcShort2 c);
+FANCIER_STATIC fcShort2 fcShort2_clampk(fcShort2 v, fcShort min, fcShort max);
+FANCIER_STATIC fcShort2 fcShort2_maxk(fcShort2 x, fcShort y);
+FANCIER_STATIC fcShort2 fcShort2_mink(fcShort2 x, fcShort y);
+FANCIER_STATIC fcShort2 fcShort2_mixk(fcShort2 x, fcShort2 y, fcShort a);
+FANCIER_STATIC fcShort2 fcShort2_absDiff(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_addSat(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_clz(fcShort2 a);
+FANCIER_STATIC fcShort2 fcShort2_hadd(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_madHi(fcShort2 a, fcShort2 b, fcShort2 c);
+FANCIER_STATIC fcShort2 fcShort2_madSat(fcShort2 a, fcShort2 b, fcShort2 c);
+FANCIER_STATIC fcShort2 fcShort2_mulHi(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_rhadd(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_rotate(fcShort2 a, fcShort2 b);
+FANCIER_STATIC fcShort2 fcShort2_subSat(fcShort2 a, fcShort2 b);
+
+FANCIER_STATIC fcShort3 fcShort3_create1(fcShort v);
+FANCIER_STATIC void fcShort3_set1(fcShort3* self, fcShort v);
+FANCIER_STATIC fcShort3 fcShort3_create111(fcShort a, fcShort b, fcShort c);
+FANCIER_STATIC void fcShort3_set111(fcShort3* self, fcShort a, fcShort b, fcShort c);
+FANCIER_STATIC fcShort3 fcShort3_create12(fcShort x, fcShort2 vec1);
+FANCIER_STATIC void fcShort3_set12(fcShort3* self, fcShort x, fcShort2 vec1);
+FANCIER_STATIC fcShort3 fcShort3_create21(fcShort2 vec1, fcShort z);
+FANCIER_STATIC void fcShort3_set21(fcShort3* self, fcShort2 vec1, fcShort z);
+FANCIER_STATIC fcShort3 fcShort3_create3(fcShort3 vec1);
+FANCIER_STATIC void fcShort3_set3(fcShort3* self, fcShort3 vec1);
+
+FANCIER_STATIC fcByte3 fcShort3_convertByte3(fcShort3 a);
+FANCIER_STATIC fcInt3 fcShort3_convertInt3(fcShort3 a);
+FANCIER_STATIC fcLong3 fcShort3_convertLong3(fcShort3 a);
+FANCIER_STATIC fcFloat3 fcShort3_convertFloat3(fcShort3 a);
+FANCIER_STATIC fcDouble3 fcShort3_convertDouble3(fcShort3 a);
+FANCIER_STATIC fcShort2 fcShort3_asShort2(fcShort3 a);
+
+FANCIER_STATIC fcInt3 fcShort3_isEqual(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcInt3 fcShort3_isNotEqual(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcInt3 fcShort3_isGreater(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcInt3 fcShort3_isGreaterEqual(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcInt3 fcShort3_isLess(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcInt3 fcShort3_isLessEqual(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_select(fcShort3 a, fcShort3 b, fcInt3 c);
+
+FANCIER_STATIC fcInt fcShort3_any(fcShort3 a);
+FANCIER_STATIC fcInt fcShort3_all(fcShort3 a);
+
+FANCIER_STATIC fcShort3 fcShort3_neg(fcShort3 a);
+FANCIER_STATIC fcShort3 fcShort3_add(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_sub(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_mul(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcDouble3 fcShort3_muld(fcShort3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcShort3_mulf(fcShort3 a, fcFloat3 b);
+FANCIER_STATIC fcShort3 fcShort3_mulk(fcShort3 a, fcShort k);
+FANCIER_STATIC fcDouble3 fcShort3_mulkd(fcShort3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcShort3_mulkf(fcShort3 a, fcFloat k);
+FANCIER_STATIC fcShort3 fcShort3_div(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcDouble3 fcShort3_divd(fcShort3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcShort3_divf(fcShort3 a, fcFloat3 b);
+FANCIER_STATIC fcShort3 fcShort3_divk(fcShort3 a, fcShort k);
+FANCIER_STATIC fcDouble3 fcShort3_divkd(fcShort3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcShort3_divkf(fcShort3 a, fcFloat k);
+FANCIER_STATIC fcShort3 fcShort3_mod(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_modk(fcShort3 a, fcShort k);
+FANCIER_STATIC fcShort3 fcShort3_bitAnd(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_bitOr(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_bitXor(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_bitNot(fcShort3 a);
+
+FANCIER_STATIC fcShort3 fcShort3_abs(fcShort3 a);
+FANCIER_STATIC fcShort3 fcShort3_clamp(fcShort3 a, fcShort3 b, fcShort3 c);
+FANCIER_STATIC fcShort3 fcShort3_max(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_maxMag(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_min(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_minMag(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_mix(fcShort3 a, fcShort3 b, fcShort3 c);
+FANCIER_STATIC fcShort3 fcShort3_clampk(fcShort3 v, fcShort min, fcShort max);
+FANCIER_STATIC fcShort3 fcShort3_maxk(fcShort3 x, fcShort y);
+FANCIER_STATIC fcShort3 fcShort3_mink(fcShort3 x, fcShort y);
+FANCIER_STATIC fcShort3 fcShort3_mixk(fcShort3 x, fcShort3 y, fcShort a);
+FANCIER_STATIC fcShort3 fcShort3_absDiff(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_addSat(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_clz(fcShort3 a);
+FANCIER_STATIC fcShort3 fcShort3_hadd(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_madHi(fcShort3 a, fcShort3 b, fcShort3 c);
+FANCIER_STATIC fcShort3 fcShort3_madSat(fcShort3 a, fcShort3 b, fcShort3 c);
+FANCIER_STATIC fcShort3 fcShort3_mulHi(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_rhadd(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_rotate(fcShort3 a, fcShort3 b);
+FANCIER_STATIC fcShort3 fcShort3_subSat(fcShort3 a, fcShort3 b);
+
+FANCIER_STATIC fcShort4 fcShort4_create1(fcShort v);
+FANCIER_STATIC void fcShort4_set1(fcShort4* self, fcShort v);
+FANCIER_STATIC fcShort4 fcShort4_create1111(fcShort a, fcShort b, fcShort c, fcShort d);
+FANCIER_STATIC void fcShort4_set1111(fcShort4* self, fcShort a, fcShort b, fcShort c, fcShort d);
+FANCIER_STATIC fcShort4 fcShort4_create112(fcShort x, fcShort y, fcShort2 vec1);
+FANCIER_STATIC void fcShort4_set112(fcShort4* self, fcShort x, fcShort y, fcShort2 vec1);
+FANCIER_STATIC fcShort4 fcShort4_create121(fcShort x, fcShort2 vec1, fcShort w);
+FANCIER_STATIC void fcShort4_set121(fcShort4* self, fcShort x, fcShort2 vec1, fcShort w);
+FANCIER_STATIC fcShort4 fcShort4_create13(fcShort x, fcShort3 vec1);
+FANCIER_STATIC void fcShort4_set13(fcShort4* self, fcShort x, fcShort3 vec1);
+FANCIER_STATIC fcShort4 fcShort4_create211(fcShort2 vec1, fcShort z, fcShort w);
+FANCIER_STATIC void fcShort4_set211(fcShort4* self, fcShort2 vec1, fcShort z, fcShort w);
+FANCIER_STATIC fcShort4 fcShort4_create22(fcShort2 vec1, fcShort2 vec2);
+FANCIER_STATIC void fcShort4_set22(fcShort4* self, fcShort2 vec1, fcShort2 vec2);
+FANCIER_STATIC fcShort4 fcShort4_create31(fcShort3 vec1, fcShort w);
+FANCIER_STATIC void fcShort4_set31(fcShort4* self, fcShort3 vec1, fcShort w);
+FANCIER_STATIC fcShort4 fcShort4_create4(fcShort4 vec1);
+FANCIER_STATIC void fcShort4_set4(fcShort4* self, fcShort4 vec1);
+
+FANCIER_STATIC fcShort2 fcShort4_odd(fcShort4 a);
+FANCIER_STATIC fcShort2 fcShort4_even(fcShort4 a);
+
+FANCIER_STATIC fcByte4 fcShort4_convertByte4(fcShort4 a);
+FANCIER_STATIC fcInt4 fcShort4_convertInt4(fcShort4 a);
+FANCIER_STATIC fcLong4 fcShort4_convertLong4(fcShort4 a);
+FANCIER_STATIC fcFloat4 fcShort4_convertFloat4(fcShort4 a);
+FANCIER_STATIC fcDouble4 fcShort4_convertDouble4(fcShort4 a);
+FANCIER_STATIC fcShort2 fcShort4_asShort2(fcShort4 a);
+FANCIER_STATIC fcShort3 fcShort4_asShort3(fcShort4 a);
+
+FANCIER_STATIC fcInt4 fcShort4_isEqual(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcInt4 fcShort4_isNotEqual(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcInt4 fcShort4_isGreater(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcInt4 fcShort4_isGreaterEqual(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcInt4 fcShort4_isLess(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcInt4 fcShort4_isLessEqual(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_select(fcShort4 a, fcShort4 b, fcInt4 c);
+
+FANCIER_STATIC fcInt fcShort4_any(fcShort4 a);
+FANCIER_STATIC fcInt fcShort4_all(fcShort4 a);
+
+FANCIER_STATIC fcShort4 fcShort4_neg(fcShort4 a);
+FANCIER_STATIC fcShort4 fcShort4_add(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_sub(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_mul(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcDouble4 fcShort4_muld(fcShort4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcShort4_mulf(fcShort4 a, fcFloat4 b);
+FANCIER_STATIC fcShort4 fcShort4_mulk(fcShort4 a, fcShort k);
+FANCIER_STATIC fcDouble4 fcShort4_mulkd(fcShort4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcShort4_mulkf(fcShort4 a, fcFloat k);
+FANCIER_STATIC fcShort4 fcShort4_div(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcDouble4 fcShort4_divd(fcShort4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcShort4_divf(fcShort4 a, fcFloat4 b);
+FANCIER_STATIC fcShort4 fcShort4_divk(fcShort4 a, fcShort k);
+FANCIER_STATIC fcDouble4 fcShort4_divkd(fcShort4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcShort4_divkf(fcShort4 a, fcFloat k);
+FANCIER_STATIC fcShort4 fcShort4_mod(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_modk(fcShort4 a, fcShort k);
+FANCIER_STATIC fcShort4 fcShort4_bitAnd(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_bitOr(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_bitXor(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_bitNot(fcShort4 a);
+
+FANCIER_STATIC fcShort4 fcShort4_abs(fcShort4 a);
+FANCIER_STATIC fcShort4 fcShort4_clamp(fcShort4 a, fcShort4 b, fcShort4 c);
+FANCIER_STATIC fcShort4 fcShort4_max(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_maxMag(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_min(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_minMag(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_mix(fcShort4 a, fcShort4 b, fcShort4 c);
+FANCIER_STATIC fcShort4 fcShort4_clampk(fcShort4 v, fcShort min, fcShort max);
+FANCIER_STATIC fcShort4 fcShort4_maxk(fcShort4 x, fcShort y);
+FANCIER_STATIC fcShort4 fcShort4_mink(fcShort4 x, fcShort y);
+FANCIER_STATIC fcShort4 fcShort4_mixk(fcShort4 x, fcShort4 y, fcShort a);
+FANCIER_STATIC fcShort4 fcShort4_absDiff(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_addSat(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_clz(fcShort4 a);
+FANCIER_STATIC fcShort4 fcShort4_hadd(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_madHi(fcShort4 a, fcShort4 b, fcShort4 c);
+FANCIER_STATIC fcShort4 fcShort4_madSat(fcShort4 a, fcShort4 b, fcShort4 c);
+FANCIER_STATIC fcShort4 fcShort4_mulHi(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_rhadd(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_rotate(fcShort4 a, fcShort4 b);
+FANCIER_STATIC fcShort4 fcShort4_subSat(fcShort4 a, fcShort4 b);
+
+FANCIER_STATIC fcShort8 fcShort8_create1(fcShort v);
+FANCIER_STATIC void fcShort8_set1(fcShort8* self, fcShort v);
+FANCIER_STATIC fcShort8 fcShort8_create11111111(fcShort a, fcShort b, fcShort c, fcShort d, fcShort e, fcShort f, fcShort g, fcShort h);
+FANCIER_STATIC void fcShort8_set11111111(fcShort8* self, fcShort a, fcShort b, fcShort c, fcShort d, fcShort e, fcShort f, fcShort g, fcShort h);
+FANCIER_STATIC fcShort8 fcShort8_create1111112(fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort2 vec1);
+FANCIER_STATIC void fcShort8_set1111112(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort2 vec1);
+FANCIER_STATIC fcShort8 fcShort8_create1111121(fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort2 vec1, fcShort s7);
+FANCIER_STATIC void fcShort8_set1111121(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort2 vec1, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create111113(fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort3 vec1);
+FANCIER_STATIC void fcShort8_set111113(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort3 vec1);
+FANCIER_STATIC fcShort8 fcShort8_create1111211(fcShort x, fcShort y, fcShort z, fcShort w, fcShort2 vec1, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set1111211(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort2 vec1, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create111122(fcShort x, fcShort y, fcShort z, fcShort w, fcShort2 vec1, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set111122(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort2 vec1, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create111131(fcShort x, fcShort y, fcShort z, fcShort w, fcShort3 vec1, fcShort s7);
+FANCIER_STATIC void fcShort8_set111131(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort3 vec1, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create11114(fcShort x, fcShort y, fcShort z, fcShort w, fcShort4 vec1);
+FANCIER_STATIC void fcShort8_set11114(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort4 vec1);
+FANCIER_STATIC fcShort8 fcShort8_create1112111(fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set1112111(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create111212(fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set111212(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create111221(fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set111221(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create11123(fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set11123(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create111311(fcShort x, fcShort y, fcShort z, fcShort3 vec1, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set111311(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort3 vec1, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create11132(fcShort x, fcShort y, fcShort z, fcShort3 vec1, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set11132(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort3 vec1, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create11141(fcShort x, fcShort y, fcShort z, fcShort4 vec1, fcShort s7);
+FANCIER_STATIC void fcShort8_set11141(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort4 vec1, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1121111(fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set1121111(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create112112(fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set112112(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create112121(fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set112121(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create11213(fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set11213(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create112211(fcShort x, fcShort y, fcShort2 vec1, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set112211(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create11222(fcShort x, fcShort y, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set11222(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create11231(fcShort x, fcShort y, fcShort2 vec1, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set11231(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1124(fcShort x, fcShort y, fcShort2 vec1, fcShort4 vec2);
+FANCIER_STATIC void fcShort8_set1124(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort4 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create113111(fcShort x, fcShort y, fcShort3 vec1, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set113111(fcShort8* self, fcShort x, fcShort y, fcShort3 vec1, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create11312(fcShort x, fcShort y, fcShort3 vec1, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set11312(fcShort8* self, fcShort x, fcShort y, fcShort3 vec1, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create11321(fcShort x, fcShort y, fcShort3 vec1, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set11321(fcShort8* self, fcShort x, fcShort y, fcShort3 vec1, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1133(fcShort x, fcShort y, fcShort3 vec1, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set1133(fcShort8* self, fcShort x, fcShort y, fcShort3 vec1, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create11411(fcShort x, fcShort y, fcShort4 vec1, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set11411(fcShort8* self, fcShort x, fcShort y, fcShort4 vec1, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1142(fcShort x, fcShort y, fcShort4 vec1, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set1142(fcShort8* self, fcShort x, fcShort y, fcShort4 vec1, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create1211111(fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set1211111(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create121112(fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set121112(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create121121(fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set121121(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create12113(fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set12113(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create121211(fcShort x, fcShort2 vec1, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set121211(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create12122(fcShort x, fcShort2 vec1, fcShort w, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set12122(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create12131(fcShort x, fcShort2 vec1, fcShort w, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set12131(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1214(fcShort x, fcShort2 vec1, fcShort w, fcShort4 vec2);
+FANCIER_STATIC void fcShort8_set1214(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort4 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create122111(fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set122111(fcShort8* self, fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create12212(fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set12212(fcShort8* self, fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create12221(fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC void fcShort8_set12221(fcShort8* self, fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1223(fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort3 vec3);
+FANCIER_STATIC void fcShort8_set1223(fcShort8* self, fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort3 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create12311(fcShort x, fcShort2 vec1, fcShort3 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set12311(fcShort8* self, fcShort x, fcShort2 vec1, fcShort3 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1232(fcShort x, fcShort2 vec1, fcShort3 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set1232(fcShort8* self, fcShort x, fcShort2 vec1, fcShort3 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create1241(fcShort x, fcShort2 vec1, fcShort4 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set1241(fcShort8* self, fcShort x, fcShort2 vec1, fcShort4 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create131111(fcShort x, fcShort3 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set131111(fcShort8* self, fcShort x, fcShort3 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create13112(fcShort x, fcShort3 vec1, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set13112(fcShort8* self, fcShort x, fcShort3 vec1, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create13121(fcShort x, fcShort3 vec1, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set13121(fcShort8* self, fcShort x, fcShort3 vec1, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1313(fcShort x, fcShort3 vec1, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set1313(fcShort8* self, fcShort x, fcShort3 vec1, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create13211(fcShort x, fcShort3 vec1, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set13211(fcShort8* self, fcShort x, fcShort3 vec1, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1322(fcShort x, fcShort3 vec1, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set1322(fcShort8* self, fcShort x, fcShort3 vec1, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create1331(fcShort x, fcShort3 vec1, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set1331(fcShort8* self, fcShort x, fcShort3 vec1, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create134(fcShort x, fcShort3 vec1, fcShort4 vec2);
+FANCIER_STATIC void fcShort8_set134(fcShort8* self, fcShort x, fcShort3 vec1, fcShort4 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create14111(fcShort x, fcShort4 vec1, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set14111(fcShort8* self, fcShort x, fcShort4 vec1, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create1412(fcShort x, fcShort4 vec1, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set1412(fcShort8* self, fcShort x, fcShort4 vec1, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create1421(fcShort x, fcShort4 vec1, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set1421(fcShort8* self, fcShort x, fcShort4 vec1, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create143(fcShort x, fcShort4 vec1, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set143(fcShort8* self, fcShort x, fcShort4 vec1, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create2111111(fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set2111111(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create211112(fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set211112(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create211121(fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set211121(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create21113(fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set21113(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create211211(fcShort2 vec1, fcShort z, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set211211(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create21122(fcShort2 vec1, fcShort z, fcShort w, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set21122(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create21131(fcShort2 vec1, fcShort z, fcShort w, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set21131(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create2114(fcShort2 vec1, fcShort z, fcShort w, fcShort4 vec2);
+FANCIER_STATIC void fcShort8_set2114(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort4 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create212111(fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set212111(fcShort8* self, fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create21212(fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set21212(fcShort8* self, fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create21221(fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC void fcShort8_set21221(fcShort8* self, fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create2123(fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort3 vec3);
+FANCIER_STATIC void fcShort8_set2123(fcShort8* self, fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort3 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create21311(fcShort2 vec1, fcShort z, fcShort3 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set21311(fcShort8* self, fcShort2 vec1, fcShort z, fcShort3 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create2132(fcShort2 vec1, fcShort z, fcShort3 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set2132(fcShort8* self, fcShort2 vec1, fcShort z, fcShort3 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create2141(fcShort2 vec1, fcShort z, fcShort4 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set2141(fcShort8* self, fcShort2 vec1, fcShort z, fcShort4 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create221111(fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set221111(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create22112(fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set22112(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create22121(fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC void fcShort8_set22121(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create2213(fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort3 vec3);
+FANCIER_STATIC void fcShort8_set2213(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort3 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create22211(fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set22211(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create2222(fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort2 vec4);
+FANCIER_STATIC void fcShort8_set2222(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort2 vec4);
+FANCIER_STATIC fcShort8 fcShort8_create2231(fcShort2 vec1, fcShort2 vec2, fcShort3 vec3, fcShort s7);
+FANCIER_STATIC void fcShort8_set2231(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort3 vec3, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create224(fcShort2 vec1, fcShort2 vec2, fcShort4 vec3);
+FANCIER_STATIC void fcShort8_set224(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort4 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create23111(fcShort2 vec1, fcShort3 vec2, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set23111(fcShort8* self, fcShort2 vec1, fcShort3 vec2, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create2312(fcShort2 vec1, fcShort3 vec2, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set2312(fcShort8* self, fcShort2 vec1, fcShort3 vec2, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create2321(fcShort2 vec1, fcShort3 vec2, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC void fcShort8_set2321(fcShort8* self, fcShort2 vec1, fcShort3 vec2, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create233(fcShort2 vec1, fcShort3 vec2, fcShort3 vec3);
+FANCIER_STATIC void fcShort8_set233(fcShort8* self, fcShort2 vec1, fcShort3 vec2, fcShort3 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create2411(fcShort2 vec1, fcShort4 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set2411(fcShort8* self, fcShort2 vec1, fcShort4 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create242(fcShort2 vec1, fcShort4 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set242(fcShort8* self, fcShort2 vec1, fcShort4 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create311111(fcShort3 vec1, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set311111(fcShort8* self, fcShort3 vec1, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create31112(fcShort3 vec1, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set31112(fcShort8* self, fcShort3 vec1, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create31121(fcShort3 vec1, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set31121(fcShort8* self, fcShort3 vec1, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create3113(fcShort3 vec1, fcShort w, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set3113(fcShort8* self, fcShort3 vec1, fcShort w, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create31211(fcShort3 vec1, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set31211(fcShort8* self, fcShort3 vec1, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create3122(fcShort3 vec1, fcShort w, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set3122(fcShort8* self, fcShort3 vec1, fcShort w, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create3131(fcShort3 vec1, fcShort w, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set3131(fcShort8* self, fcShort3 vec1, fcShort w, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create314(fcShort3 vec1, fcShort w, fcShort4 vec2);
+FANCIER_STATIC void fcShort8_set314(fcShort8* self, fcShort3 vec1, fcShort w, fcShort4 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create32111(fcShort3 vec1, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set32111(fcShort8* self, fcShort3 vec1, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create3212(fcShort3 vec1, fcShort2 vec2, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set3212(fcShort8* self, fcShort3 vec1, fcShort2 vec2, fcShort s5, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create3221(fcShort3 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC void fcShort8_set3221(fcShort8* self, fcShort3 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create323(fcShort3 vec1, fcShort2 vec2, fcShort3 vec3);
+FANCIER_STATIC void fcShort8_set323(fcShort8* self, fcShort3 vec1, fcShort2 vec2, fcShort3 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create3311(fcShort3 vec1, fcShort3 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set3311(fcShort8* self, fcShort3 vec1, fcShort3 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create332(fcShort3 vec1, fcShort3 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set332(fcShort8* self, fcShort3 vec1, fcShort3 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create341(fcShort3 vec1, fcShort4 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set341(fcShort8* self, fcShort3 vec1, fcShort4 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create41111(fcShort4 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set41111(fcShort8* self, fcShort4 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create4112(fcShort4 vec1, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC void fcShort8_set4112(fcShort8* self, fcShort4 vec1, fcShort s4, fcShort s5, fcShort2 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create4121(fcShort4 vec1, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set4121(fcShort8* self, fcShort4 vec1, fcShort s4, fcShort2 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create413(fcShort4 vec1, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC void fcShort8_set413(fcShort8* self, fcShort4 vec1, fcShort s4, fcShort3 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create4211(fcShort4 vec1, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC void fcShort8_set4211(fcShort8* self, fcShort4 vec1, fcShort2 vec2, fcShort s6, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create422(fcShort4 vec1, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC void fcShort8_set422(fcShort8* self, fcShort4 vec1, fcShort2 vec2, fcShort2 vec3);
+FANCIER_STATIC fcShort8 fcShort8_create431(fcShort4 vec1, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC void fcShort8_set431(fcShort8* self, fcShort4 vec1, fcShort3 vec2, fcShort s7);
+FANCIER_STATIC fcShort8 fcShort8_create44(fcShort4 vec1, fcShort4 vec2);
+FANCIER_STATIC void fcShort8_set44(fcShort8* self, fcShort4 vec1, fcShort4 vec2);
+FANCIER_STATIC fcShort8 fcShort8_create8(fcShort8 vec1);
+FANCIER_STATIC void fcShort8_set8(fcShort8* self, fcShort8 vec1);
+
+FANCIER_STATIC fcShort4 fcShort8_odd(fcShort8 a);
+FANCIER_STATIC fcShort4 fcShort8_even(fcShort8 a);
+
+FANCIER_STATIC fcByte8 fcShort8_convertByte8(fcShort8 a);
+FANCIER_STATIC fcInt8 fcShort8_convertInt8(fcShort8 a);
+FANCIER_STATIC fcLong8 fcShort8_convertLong8(fcShort8 a);
+FANCIER_STATIC fcFloat8 fcShort8_convertFloat8(fcShort8 a);
+FANCIER_STATIC fcDouble8 fcShort8_convertDouble8(fcShort8 a);
+FANCIER_STATIC fcShort2 fcShort8_asShort2(fcShort8 a);
+FANCIER_STATIC fcShort3 fcShort8_asShort3(fcShort8 a);
+FANCIER_STATIC fcShort4 fcShort8_asShort4(fcShort8 a);
+
+FANCIER_STATIC fcInt8 fcShort8_isEqual(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcInt8 fcShort8_isNotEqual(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcInt8 fcShort8_isGreater(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcInt8 fcShort8_isGreaterEqual(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcInt8 fcShort8_isLess(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcInt8 fcShort8_isLessEqual(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_select(fcShort8 a, fcShort8 b, fcInt8 c);
+
+FANCIER_STATIC fcInt fcShort8_any(fcShort8 a);
+FANCIER_STATIC fcInt fcShort8_all(fcShort8 a);
+
+FANCIER_STATIC fcShort8 fcShort8_neg(fcShort8 a);
+FANCIER_STATIC fcShort8 fcShort8_add(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_sub(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_mul(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcDouble8 fcShort8_muld(fcShort8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcShort8_mulf(fcShort8 a, fcFloat8 b);
+FANCIER_STATIC fcShort8 fcShort8_mulk(fcShort8 a, fcShort k);
+FANCIER_STATIC fcDouble8 fcShort8_mulkd(fcShort8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcShort8_mulkf(fcShort8 a, fcFloat k);
+FANCIER_STATIC fcShort8 fcShort8_div(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcDouble8 fcShort8_divd(fcShort8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcShort8_divf(fcShort8 a, fcFloat8 b);
+FANCIER_STATIC fcShort8 fcShort8_divk(fcShort8 a, fcShort k);
+FANCIER_STATIC fcDouble8 fcShort8_divkd(fcShort8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcShort8_divkf(fcShort8 a, fcFloat k);
+FANCIER_STATIC fcShort8 fcShort8_mod(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_modk(fcShort8 a, fcShort k);
+FANCIER_STATIC fcShort8 fcShort8_bitAnd(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_bitOr(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_bitXor(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_bitNot(fcShort8 a);
+
+FANCIER_STATIC fcShort8 fcShort8_abs(fcShort8 a);
+FANCIER_STATIC fcShort8 fcShort8_clamp(fcShort8 a, fcShort8 b, fcShort8 c);
+FANCIER_STATIC fcShort8 fcShort8_max(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_maxMag(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_min(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_minMag(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_mix(fcShort8 a, fcShort8 b, fcShort8 c);
+FANCIER_STATIC fcShort8 fcShort8_clampk(fcShort8 v, fcShort min, fcShort max);
+FANCIER_STATIC fcShort8 fcShort8_maxk(fcShort8 x, fcShort y);
+FANCIER_STATIC fcShort8 fcShort8_mink(fcShort8 x, fcShort y);
+FANCIER_STATIC fcShort8 fcShort8_mixk(fcShort8 x, fcShort8 y, fcShort a);
+FANCIER_STATIC fcShort8 fcShort8_absDiff(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_addSat(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_clz(fcShort8 a);
+FANCIER_STATIC fcShort8 fcShort8_hadd(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_madHi(fcShort8 a, fcShort8 b, fcShort8 c);
+FANCIER_STATIC fcShort8 fcShort8_madSat(fcShort8 a, fcShort8 b, fcShort8 c);
+FANCIER_STATIC fcShort8 fcShort8_mulHi(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_rhadd(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_rotate(fcShort8 a, fcShort8 b);
+FANCIER_STATIC fcShort8 fcShort8_subSat(fcShort8 a, fcShort8 b);
+
+FANCIER_STATIC fcInt2 fcInt2_create1(fcInt v);
+FANCIER_STATIC void fcInt2_set1(fcInt2* self, fcInt v);
+FANCIER_STATIC fcInt2 fcInt2_create11(fcInt a, fcInt b);
+FANCIER_STATIC void fcInt2_set11(fcInt2* self, fcInt a, fcInt b);
+FANCIER_STATIC fcInt2 fcInt2_create2(fcInt2 vec1);
+FANCIER_STATIC void fcInt2_set2(fcInt2* self, fcInt2 vec1);
+
+FANCIER_STATIC fcByte2 fcInt2_convertByte2(fcInt2 a);
+FANCIER_STATIC fcShort2 fcInt2_convertShort2(fcInt2 a);
+FANCIER_STATIC fcLong2 fcInt2_convertLong2(fcInt2 a);
+FANCIER_STATIC fcFloat2 fcInt2_convertFloat2(fcInt2 a);
+FANCIER_STATIC fcDouble2 fcInt2_convertDouble2(fcInt2 a);
+
+FANCIER_STATIC fcInt2 fcInt2_isEqual(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_isNotEqual(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_isGreater(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_isGreaterEqual(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_isLess(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_isLessEqual(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_select(fcInt2 a, fcInt2 b, fcInt2 c);
+
+FANCIER_STATIC fcInt fcInt2_any(fcInt2 a);
+FANCIER_STATIC fcInt fcInt2_all(fcInt2 a);
+
+FANCIER_STATIC fcInt2 fcInt2_neg(fcInt2 a);
+FANCIER_STATIC fcInt2 fcInt2_add(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_sub(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_mul(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcDouble2 fcInt2_muld(fcInt2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcInt2_mulf(fcInt2 a, fcFloat2 b);
+FANCIER_STATIC fcInt2 fcInt2_mulk(fcInt2 a, fcInt k);
+FANCIER_STATIC fcDouble2 fcInt2_mulkd(fcInt2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcInt2_mulkf(fcInt2 a, fcFloat k);
+FANCIER_STATIC fcInt2 fcInt2_div(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcDouble2 fcInt2_divd(fcInt2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcInt2_divf(fcInt2 a, fcFloat2 b);
+FANCIER_STATIC fcInt2 fcInt2_divk(fcInt2 a, fcInt k);
+FANCIER_STATIC fcDouble2 fcInt2_divkd(fcInt2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcInt2_divkf(fcInt2 a, fcFloat k);
+FANCIER_STATIC fcInt2 fcInt2_mod(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_modk(fcInt2 a, fcInt k);
+FANCIER_STATIC fcInt2 fcInt2_bitAnd(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_bitOr(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_bitXor(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_bitNot(fcInt2 a);
+
+FANCIER_STATIC fcInt2 fcInt2_abs(fcInt2 a);
+FANCIER_STATIC fcInt2 fcInt2_clamp(fcInt2 a, fcInt2 b, fcInt2 c);
+FANCIER_STATIC fcInt2 fcInt2_max(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_maxMag(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_min(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_minMag(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_mix(fcInt2 a, fcInt2 b, fcInt2 c);
+FANCIER_STATIC fcInt2 fcInt2_clampk(fcInt2 v, fcInt min, fcInt max);
+FANCIER_STATIC fcInt2 fcInt2_maxk(fcInt2 x, fcInt y);
+FANCIER_STATIC fcInt2 fcInt2_mink(fcInt2 x, fcInt y);
+FANCIER_STATIC fcInt2 fcInt2_mixk(fcInt2 x, fcInt2 y, fcInt a);
+FANCIER_STATIC fcInt2 fcInt2_absDiff(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_addSat(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_clz(fcInt2 a);
+FANCIER_STATIC fcInt2 fcInt2_hadd(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_madHi(fcInt2 a, fcInt2 b, fcInt2 c);
+FANCIER_STATIC fcInt2 fcInt2_madSat(fcInt2 a, fcInt2 b, fcInt2 c);
+FANCIER_STATIC fcInt2 fcInt2_mulHi(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_rhadd(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_rotate(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_subSat(fcInt2 a, fcInt2 b);
+FANCIER_STATIC fcInt2 fcInt2_mad24(fcInt2 a, fcInt2 b, fcInt2 c);
+FANCIER_STATIC fcInt2 fcInt2_mul24(fcInt2 a, fcInt2 b);
+
+FANCIER_STATIC fcInt3 fcInt3_create1(fcInt v);
+FANCIER_STATIC void fcInt3_set1(fcInt3* self, fcInt v);
+FANCIER_STATIC fcInt3 fcInt3_create111(fcInt a, fcInt b, fcInt c);
+FANCIER_STATIC void fcInt3_set111(fcInt3* self, fcInt a, fcInt b, fcInt c);
+FANCIER_STATIC fcInt3 fcInt3_create12(fcInt x, fcInt2 vec1);
+FANCIER_STATIC void fcInt3_set12(fcInt3* self, fcInt x, fcInt2 vec1);
+FANCIER_STATIC fcInt3 fcInt3_create21(fcInt2 vec1, fcInt z);
+FANCIER_STATIC void fcInt3_set21(fcInt3* self, fcInt2 vec1, fcInt z);
+FANCIER_STATIC fcInt3 fcInt3_create3(fcInt3 vec1);
+FANCIER_STATIC void fcInt3_set3(fcInt3* self, fcInt3 vec1);
+
+FANCIER_STATIC fcByte3 fcInt3_convertByte3(fcInt3 a);
+FANCIER_STATIC fcShort3 fcInt3_convertShort3(fcInt3 a);
+FANCIER_STATIC fcLong3 fcInt3_convertLong3(fcInt3 a);
+FANCIER_STATIC fcFloat3 fcInt3_convertFloat3(fcInt3 a);
+FANCIER_STATIC fcDouble3 fcInt3_convertDouble3(fcInt3 a);
+FANCIER_STATIC fcInt2 fcInt3_asInt2(fcInt3 a);
+
+FANCIER_STATIC fcInt3 fcInt3_isEqual(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_isNotEqual(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_isGreater(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_isGreaterEqual(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_isLess(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_isLessEqual(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_select(fcInt3 a, fcInt3 b, fcInt3 c);
+
+FANCIER_STATIC fcInt fcInt3_any(fcInt3 a);
+FANCIER_STATIC fcInt fcInt3_all(fcInt3 a);
+
+FANCIER_STATIC fcInt3 fcInt3_neg(fcInt3 a);
+FANCIER_STATIC fcInt3 fcInt3_add(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_sub(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_mul(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcDouble3 fcInt3_muld(fcInt3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcInt3_mulf(fcInt3 a, fcFloat3 b);
+FANCIER_STATIC fcInt3 fcInt3_mulk(fcInt3 a, fcInt k);
+FANCIER_STATIC fcDouble3 fcInt3_mulkd(fcInt3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcInt3_mulkf(fcInt3 a, fcFloat k);
+FANCIER_STATIC fcInt3 fcInt3_div(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcDouble3 fcInt3_divd(fcInt3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcInt3_divf(fcInt3 a, fcFloat3 b);
+FANCIER_STATIC fcInt3 fcInt3_divk(fcInt3 a, fcInt k);
+FANCIER_STATIC fcDouble3 fcInt3_divkd(fcInt3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcInt3_divkf(fcInt3 a, fcFloat k);
+FANCIER_STATIC fcInt3 fcInt3_mod(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_modk(fcInt3 a, fcInt k);
+FANCIER_STATIC fcInt3 fcInt3_bitAnd(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_bitOr(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_bitXor(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_bitNot(fcInt3 a);
+
+FANCIER_STATIC fcInt3 fcInt3_abs(fcInt3 a);
+FANCIER_STATIC fcInt3 fcInt3_clamp(fcInt3 a, fcInt3 b, fcInt3 c);
+FANCIER_STATIC fcInt3 fcInt3_max(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_maxMag(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_min(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_minMag(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_mix(fcInt3 a, fcInt3 b, fcInt3 c);
+FANCIER_STATIC fcInt3 fcInt3_clampk(fcInt3 v, fcInt min, fcInt max);
+FANCIER_STATIC fcInt3 fcInt3_maxk(fcInt3 x, fcInt y);
+FANCIER_STATIC fcInt3 fcInt3_mink(fcInt3 x, fcInt y);
+FANCIER_STATIC fcInt3 fcInt3_mixk(fcInt3 x, fcInt3 y, fcInt a);
+FANCIER_STATIC fcInt3 fcInt3_absDiff(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_addSat(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_clz(fcInt3 a);
+FANCIER_STATIC fcInt3 fcInt3_hadd(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_madHi(fcInt3 a, fcInt3 b, fcInt3 c);
+FANCIER_STATIC fcInt3 fcInt3_madSat(fcInt3 a, fcInt3 b, fcInt3 c);
+FANCIER_STATIC fcInt3 fcInt3_mulHi(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_rhadd(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_rotate(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_subSat(fcInt3 a, fcInt3 b);
+FANCIER_STATIC fcInt3 fcInt3_mad24(fcInt3 a, fcInt3 b, fcInt3 c);
+FANCIER_STATIC fcInt3 fcInt3_mul24(fcInt3 a, fcInt3 b);
+
+FANCIER_STATIC fcInt4 fcInt4_create1(fcInt v);
+FANCIER_STATIC void fcInt4_set1(fcInt4* self, fcInt v);
+FANCIER_STATIC fcInt4 fcInt4_create1111(fcInt a, fcInt b, fcInt c, fcInt d);
+FANCIER_STATIC void fcInt4_set1111(fcInt4* self, fcInt a, fcInt b, fcInt c, fcInt d);
+FANCIER_STATIC fcInt4 fcInt4_create112(fcInt x, fcInt y, fcInt2 vec1);
+FANCIER_STATIC void fcInt4_set112(fcInt4* self, fcInt x, fcInt y, fcInt2 vec1);
+FANCIER_STATIC fcInt4 fcInt4_create121(fcInt x, fcInt2 vec1, fcInt w);
+FANCIER_STATIC void fcInt4_set121(fcInt4* self, fcInt x, fcInt2 vec1, fcInt w);
+FANCIER_STATIC fcInt4 fcInt4_create13(fcInt x, fcInt3 vec1);
+FANCIER_STATIC void fcInt4_set13(fcInt4* self, fcInt x, fcInt3 vec1);
+FANCIER_STATIC fcInt4 fcInt4_create211(fcInt2 vec1, fcInt z, fcInt w);
+FANCIER_STATIC void fcInt4_set211(fcInt4* self, fcInt2 vec1, fcInt z, fcInt w);
+FANCIER_STATIC fcInt4 fcInt4_create22(fcInt2 vec1, fcInt2 vec2);
+FANCIER_STATIC void fcInt4_set22(fcInt4* self, fcInt2 vec1, fcInt2 vec2);
+FANCIER_STATIC fcInt4 fcInt4_create31(fcInt3 vec1, fcInt w);
+FANCIER_STATIC void fcInt4_set31(fcInt4* self, fcInt3 vec1, fcInt w);
+FANCIER_STATIC fcInt4 fcInt4_create4(fcInt4 vec1);
+FANCIER_STATIC void fcInt4_set4(fcInt4* self, fcInt4 vec1);
+
+FANCIER_STATIC fcInt2 fcInt4_odd(fcInt4 a);
+FANCIER_STATIC fcInt2 fcInt4_even(fcInt4 a);
+
+FANCIER_STATIC fcByte4 fcInt4_convertByte4(fcInt4 a);
+FANCIER_STATIC fcShort4 fcInt4_convertShort4(fcInt4 a);
+FANCIER_STATIC fcLong4 fcInt4_convertLong4(fcInt4 a);
+FANCIER_STATIC fcFloat4 fcInt4_convertFloat4(fcInt4 a);
+FANCIER_STATIC fcDouble4 fcInt4_convertDouble4(fcInt4 a);
+FANCIER_STATIC fcInt2 fcInt4_asInt2(fcInt4 a);
+FANCIER_STATIC fcInt3 fcInt4_asInt3(fcInt4 a);
+
+FANCIER_STATIC fcInt4 fcInt4_isEqual(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_isNotEqual(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_isGreater(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_isGreaterEqual(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_isLess(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_isLessEqual(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_select(fcInt4 a, fcInt4 b, fcInt4 c);
+
+FANCIER_STATIC fcInt fcInt4_any(fcInt4 a);
+FANCIER_STATIC fcInt fcInt4_all(fcInt4 a);
+
+FANCIER_STATIC fcInt4 fcInt4_neg(fcInt4 a);
+FANCIER_STATIC fcInt4 fcInt4_add(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_sub(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_mul(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcDouble4 fcInt4_muld(fcInt4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcInt4_mulf(fcInt4 a, fcFloat4 b);
+FANCIER_STATIC fcInt4 fcInt4_mulk(fcInt4 a, fcInt k);
+FANCIER_STATIC fcDouble4 fcInt4_mulkd(fcInt4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcInt4_mulkf(fcInt4 a, fcFloat k);
+FANCIER_STATIC fcInt4 fcInt4_div(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcDouble4 fcInt4_divd(fcInt4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcInt4_divf(fcInt4 a, fcFloat4 b);
+FANCIER_STATIC fcInt4 fcInt4_divk(fcInt4 a, fcInt k);
+FANCIER_STATIC fcDouble4 fcInt4_divkd(fcInt4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcInt4_divkf(fcInt4 a, fcFloat k);
+FANCIER_STATIC fcInt4 fcInt4_mod(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_modk(fcInt4 a, fcInt k);
+FANCIER_STATIC fcInt4 fcInt4_bitAnd(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_bitOr(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_bitXor(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_bitNot(fcInt4 a);
+
+FANCIER_STATIC fcInt4 fcInt4_abs(fcInt4 a);
+FANCIER_STATIC fcInt4 fcInt4_clamp(fcInt4 a, fcInt4 b, fcInt4 c);
+FANCIER_STATIC fcInt4 fcInt4_max(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_maxMag(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_min(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_minMag(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_mix(fcInt4 a, fcInt4 b, fcInt4 c);
+FANCIER_STATIC fcInt4 fcInt4_clampk(fcInt4 v, fcInt min, fcInt max);
+FANCIER_STATIC fcInt4 fcInt4_maxk(fcInt4 x, fcInt y);
+FANCIER_STATIC fcInt4 fcInt4_mink(fcInt4 x, fcInt y);
+FANCIER_STATIC fcInt4 fcInt4_mixk(fcInt4 x, fcInt4 y, fcInt a);
+FANCIER_STATIC fcInt4 fcInt4_absDiff(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_addSat(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_clz(fcInt4 a);
+FANCIER_STATIC fcInt4 fcInt4_hadd(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_madHi(fcInt4 a, fcInt4 b, fcInt4 c);
+FANCIER_STATIC fcInt4 fcInt4_madSat(fcInt4 a, fcInt4 b, fcInt4 c);
+FANCIER_STATIC fcInt4 fcInt4_mulHi(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_rhadd(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_rotate(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_subSat(fcInt4 a, fcInt4 b);
+FANCIER_STATIC fcInt4 fcInt4_mad24(fcInt4 a, fcInt4 b, fcInt4 c);
+FANCIER_STATIC fcInt4 fcInt4_mul24(fcInt4 a, fcInt4 b);
+
+FANCIER_STATIC fcInt8 fcInt8_create1(fcInt v);
+FANCIER_STATIC void fcInt8_set1(fcInt8* self, fcInt v);
+FANCIER_STATIC fcInt8 fcInt8_create11111111(fcInt a, fcInt b, fcInt c, fcInt d, fcInt e, fcInt f, fcInt g, fcInt h);
+FANCIER_STATIC void fcInt8_set11111111(fcInt8* self, fcInt a, fcInt b, fcInt c, fcInt d, fcInt e, fcInt f, fcInt g, fcInt h);
+FANCIER_STATIC fcInt8 fcInt8_create1111112(fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt2 vec1);
+FANCIER_STATIC void fcInt8_set1111112(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt2 vec1);
+FANCIER_STATIC fcInt8 fcInt8_create1111121(fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt2 vec1, fcInt s7);
+FANCIER_STATIC void fcInt8_set1111121(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt2 vec1, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create111113(fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt3 vec1);
+FANCIER_STATIC void fcInt8_set111113(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt3 vec1);
+FANCIER_STATIC fcInt8 fcInt8_create1111211(fcInt x, fcInt y, fcInt z, fcInt w, fcInt2 vec1, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set1111211(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt2 vec1, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create111122(fcInt x, fcInt y, fcInt z, fcInt w, fcInt2 vec1, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set111122(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt2 vec1, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create111131(fcInt x, fcInt y, fcInt z, fcInt w, fcInt3 vec1, fcInt s7);
+FANCIER_STATIC void fcInt8_set111131(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt3 vec1, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create11114(fcInt x, fcInt y, fcInt z, fcInt w, fcInt4 vec1);
+FANCIER_STATIC void fcInt8_set11114(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt4 vec1);
+FANCIER_STATIC fcInt8 fcInt8_create1112111(fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set1112111(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create111212(fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set111212(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create111221(fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set111221(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create11123(fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set11123(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create111311(fcInt x, fcInt y, fcInt z, fcInt3 vec1, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set111311(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt3 vec1, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create11132(fcInt x, fcInt y, fcInt z, fcInt3 vec1, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set11132(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt3 vec1, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create11141(fcInt x, fcInt y, fcInt z, fcInt4 vec1, fcInt s7);
+FANCIER_STATIC void fcInt8_set11141(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt4 vec1, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1121111(fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set1121111(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create112112(fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set112112(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create112121(fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set112121(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create11213(fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set11213(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create112211(fcInt x, fcInt y, fcInt2 vec1, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set112211(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create11222(fcInt x, fcInt y, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set11222(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create11231(fcInt x, fcInt y, fcInt2 vec1, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set11231(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1124(fcInt x, fcInt y, fcInt2 vec1, fcInt4 vec2);
+FANCIER_STATIC void fcInt8_set1124(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt4 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create113111(fcInt x, fcInt y, fcInt3 vec1, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set113111(fcInt8* self, fcInt x, fcInt y, fcInt3 vec1, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create11312(fcInt x, fcInt y, fcInt3 vec1, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set11312(fcInt8* self, fcInt x, fcInt y, fcInt3 vec1, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create11321(fcInt x, fcInt y, fcInt3 vec1, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set11321(fcInt8* self, fcInt x, fcInt y, fcInt3 vec1, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1133(fcInt x, fcInt y, fcInt3 vec1, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set1133(fcInt8* self, fcInt x, fcInt y, fcInt3 vec1, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create11411(fcInt x, fcInt y, fcInt4 vec1, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set11411(fcInt8* self, fcInt x, fcInt y, fcInt4 vec1, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1142(fcInt x, fcInt y, fcInt4 vec1, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set1142(fcInt8* self, fcInt x, fcInt y, fcInt4 vec1, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create1211111(fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set1211111(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create121112(fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set121112(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create121121(fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set121121(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create12113(fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set12113(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create121211(fcInt x, fcInt2 vec1, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set121211(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create12122(fcInt x, fcInt2 vec1, fcInt w, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set12122(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create12131(fcInt x, fcInt2 vec1, fcInt w, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set12131(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1214(fcInt x, fcInt2 vec1, fcInt w, fcInt4 vec2);
+FANCIER_STATIC void fcInt8_set1214(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt4 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create122111(fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set122111(fcInt8* self, fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create12212(fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set12212(fcInt8* self, fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create12221(fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC void fcInt8_set12221(fcInt8* self, fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1223(fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt3 vec3);
+FANCIER_STATIC void fcInt8_set1223(fcInt8* self, fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt3 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create12311(fcInt x, fcInt2 vec1, fcInt3 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set12311(fcInt8* self, fcInt x, fcInt2 vec1, fcInt3 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1232(fcInt x, fcInt2 vec1, fcInt3 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set1232(fcInt8* self, fcInt x, fcInt2 vec1, fcInt3 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create1241(fcInt x, fcInt2 vec1, fcInt4 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set1241(fcInt8* self, fcInt x, fcInt2 vec1, fcInt4 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create131111(fcInt x, fcInt3 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set131111(fcInt8* self, fcInt x, fcInt3 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create13112(fcInt x, fcInt3 vec1, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set13112(fcInt8* self, fcInt x, fcInt3 vec1, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create13121(fcInt x, fcInt3 vec1, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set13121(fcInt8* self, fcInt x, fcInt3 vec1, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1313(fcInt x, fcInt3 vec1, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set1313(fcInt8* self, fcInt x, fcInt3 vec1, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create13211(fcInt x, fcInt3 vec1, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set13211(fcInt8* self, fcInt x, fcInt3 vec1, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1322(fcInt x, fcInt3 vec1, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set1322(fcInt8* self, fcInt x, fcInt3 vec1, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create1331(fcInt x, fcInt3 vec1, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set1331(fcInt8* self, fcInt x, fcInt3 vec1, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create134(fcInt x, fcInt3 vec1, fcInt4 vec2);
+FANCIER_STATIC void fcInt8_set134(fcInt8* self, fcInt x, fcInt3 vec1, fcInt4 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create14111(fcInt x, fcInt4 vec1, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set14111(fcInt8* self, fcInt x, fcInt4 vec1, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create1412(fcInt x, fcInt4 vec1, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set1412(fcInt8* self, fcInt x, fcInt4 vec1, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create1421(fcInt x, fcInt4 vec1, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set1421(fcInt8* self, fcInt x, fcInt4 vec1, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create143(fcInt x, fcInt4 vec1, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set143(fcInt8* self, fcInt x, fcInt4 vec1, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create2111111(fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set2111111(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create211112(fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set211112(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create211121(fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set211121(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create21113(fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set21113(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create211211(fcInt2 vec1, fcInt z, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set211211(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create21122(fcInt2 vec1, fcInt z, fcInt w, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set21122(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create21131(fcInt2 vec1, fcInt z, fcInt w, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set21131(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create2114(fcInt2 vec1, fcInt z, fcInt w, fcInt4 vec2);
+FANCIER_STATIC void fcInt8_set2114(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt4 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create212111(fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set212111(fcInt8* self, fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create21212(fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set21212(fcInt8* self, fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create21221(fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC void fcInt8_set21221(fcInt8* self, fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create2123(fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt3 vec3);
+FANCIER_STATIC void fcInt8_set2123(fcInt8* self, fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt3 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create21311(fcInt2 vec1, fcInt z, fcInt3 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set21311(fcInt8* self, fcInt2 vec1, fcInt z, fcInt3 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create2132(fcInt2 vec1, fcInt z, fcInt3 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set2132(fcInt8* self, fcInt2 vec1, fcInt z, fcInt3 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create2141(fcInt2 vec1, fcInt z, fcInt4 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set2141(fcInt8* self, fcInt2 vec1, fcInt z, fcInt4 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create221111(fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set221111(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create22112(fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set22112(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create22121(fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC void fcInt8_set22121(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create2213(fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt3 vec3);
+FANCIER_STATIC void fcInt8_set2213(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt3 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create22211(fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set22211(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create2222(fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt2 vec4);
+FANCIER_STATIC void fcInt8_set2222(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt2 vec4);
+FANCIER_STATIC fcInt8 fcInt8_create2231(fcInt2 vec1, fcInt2 vec2, fcInt3 vec3, fcInt s7);
+FANCIER_STATIC void fcInt8_set2231(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt3 vec3, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create224(fcInt2 vec1, fcInt2 vec2, fcInt4 vec3);
+FANCIER_STATIC void fcInt8_set224(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt4 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create23111(fcInt2 vec1, fcInt3 vec2, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set23111(fcInt8* self, fcInt2 vec1, fcInt3 vec2, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create2312(fcInt2 vec1, fcInt3 vec2, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set2312(fcInt8* self, fcInt2 vec1, fcInt3 vec2, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create2321(fcInt2 vec1, fcInt3 vec2, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC void fcInt8_set2321(fcInt8* self, fcInt2 vec1, fcInt3 vec2, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create233(fcInt2 vec1, fcInt3 vec2, fcInt3 vec3);
+FANCIER_STATIC void fcInt8_set233(fcInt8* self, fcInt2 vec1, fcInt3 vec2, fcInt3 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create2411(fcInt2 vec1, fcInt4 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set2411(fcInt8* self, fcInt2 vec1, fcInt4 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create242(fcInt2 vec1, fcInt4 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set242(fcInt8* self, fcInt2 vec1, fcInt4 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create311111(fcInt3 vec1, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set311111(fcInt8* self, fcInt3 vec1, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create31112(fcInt3 vec1, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set31112(fcInt8* self, fcInt3 vec1, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create31121(fcInt3 vec1, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set31121(fcInt8* self, fcInt3 vec1, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create3113(fcInt3 vec1, fcInt w, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set3113(fcInt8* self, fcInt3 vec1, fcInt w, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create31211(fcInt3 vec1, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set31211(fcInt8* self, fcInt3 vec1, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create3122(fcInt3 vec1, fcInt w, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set3122(fcInt8* self, fcInt3 vec1, fcInt w, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create3131(fcInt3 vec1, fcInt w, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set3131(fcInt8* self, fcInt3 vec1, fcInt w, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create314(fcInt3 vec1, fcInt w, fcInt4 vec2);
+FANCIER_STATIC void fcInt8_set314(fcInt8* self, fcInt3 vec1, fcInt w, fcInt4 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create32111(fcInt3 vec1, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set32111(fcInt8* self, fcInt3 vec1, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create3212(fcInt3 vec1, fcInt2 vec2, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set3212(fcInt8* self, fcInt3 vec1, fcInt2 vec2, fcInt s5, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create3221(fcInt3 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC void fcInt8_set3221(fcInt8* self, fcInt3 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create323(fcInt3 vec1, fcInt2 vec2, fcInt3 vec3);
+FANCIER_STATIC void fcInt8_set323(fcInt8* self, fcInt3 vec1, fcInt2 vec2, fcInt3 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create3311(fcInt3 vec1, fcInt3 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set3311(fcInt8* self, fcInt3 vec1, fcInt3 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create332(fcInt3 vec1, fcInt3 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set332(fcInt8* self, fcInt3 vec1, fcInt3 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create341(fcInt3 vec1, fcInt4 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set341(fcInt8* self, fcInt3 vec1, fcInt4 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create41111(fcInt4 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set41111(fcInt8* self, fcInt4 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create4112(fcInt4 vec1, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC void fcInt8_set4112(fcInt8* self, fcInt4 vec1, fcInt s4, fcInt s5, fcInt2 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create4121(fcInt4 vec1, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set4121(fcInt8* self, fcInt4 vec1, fcInt s4, fcInt2 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create413(fcInt4 vec1, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC void fcInt8_set413(fcInt8* self, fcInt4 vec1, fcInt s4, fcInt3 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create4211(fcInt4 vec1, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC void fcInt8_set4211(fcInt8* self, fcInt4 vec1, fcInt2 vec2, fcInt s6, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create422(fcInt4 vec1, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC void fcInt8_set422(fcInt8* self, fcInt4 vec1, fcInt2 vec2, fcInt2 vec3);
+FANCIER_STATIC fcInt8 fcInt8_create431(fcInt4 vec1, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC void fcInt8_set431(fcInt8* self, fcInt4 vec1, fcInt3 vec2, fcInt s7);
+FANCIER_STATIC fcInt8 fcInt8_create44(fcInt4 vec1, fcInt4 vec2);
+FANCIER_STATIC void fcInt8_set44(fcInt8* self, fcInt4 vec1, fcInt4 vec2);
+FANCIER_STATIC fcInt8 fcInt8_create8(fcInt8 vec1);
+FANCIER_STATIC void fcInt8_set8(fcInt8* self, fcInt8 vec1);
+
+FANCIER_STATIC fcInt4 fcInt8_odd(fcInt8 a);
+FANCIER_STATIC fcInt4 fcInt8_even(fcInt8 a);
+
+FANCIER_STATIC fcByte8 fcInt8_convertByte8(fcInt8 a);
+FANCIER_STATIC fcShort8 fcInt8_convertShort8(fcInt8 a);
+FANCIER_STATIC fcLong8 fcInt8_convertLong8(fcInt8 a);
+FANCIER_STATIC fcFloat8 fcInt8_convertFloat8(fcInt8 a);
+FANCIER_STATIC fcDouble8 fcInt8_convertDouble8(fcInt8 a);
+FANCIER_STATIC fcInt2 fcInt8_asInt2(fcInt8 a);
+FANCIER_STATIC fcInt3 fcInt8_asInt3(fcInt8 a);
+FANCIER_STATIC fcInt4 fcInt8_asInt4(fcInt8 a);
+
+FANCIER_STATIC fcInt8 fcInt8_isEqual(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_isNotEqual(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_isGreater(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_isGreaterEqual(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_isLess(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_isLessEqual(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_select(fcInt8 a, fcInt8 b, fcInt8 c);
+
+FANCIER_STATIC fcInt fcInt8_any(fcInt8 a);
+FANCIER_STATIC fcInt fcInt8_all(fcInt8 a);
+
+FANCIER_STATIC fcInt8 fcInt8_neg(fcInt8 a);
+FANCIER_STATIC fcInt8 fcInt8_add(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_sub(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_mul(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcDouble8 fcInt8_muld(fcInt8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcInt8_mulf(fcInt8 a, fcFloat8 b);
+FANCIER_STATIC fcInt8 fcInt8_mulk(fcInt8 a, fcInt k);
+FANCIER_STATIC fcDouble8 fcInt8_mulkd(fcInt8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcInt8_mulkf(fcInt8 a, fcFloat k);
+FANCIER_STATIC fcInt8 fcInt8_div(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcDouble8 fcInt8_divd(fcInt8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcInt8_divf(fcInt8 a, fcFloat8 b);
+FANCIER_STATIC fcInt8 fcInt8_divk(fcInt8 a, fcInt k);
+FANCIER_STATIC fcDouble8 fcInt8_divkd(fcInt8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcInt8_divkf(fcInt8 a, fcFloat k);
+FANCIER_STATIC fcInt8 fcInt8_mod(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_modk(fcInt8 a, fcInt k);
+FANCIER_STATIC fcInt8 fcInt8_bitAnd(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_bitOr(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_bitXor(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_bitNot(fcInt8 a);
+
+FANCIER_STATIC fcInt8 fcInt8_abs(fcInt8 a);
+FANCIER_STATIC fcInt8 fcInt8_clamp(fcInt8 a, fcInt8 b, fcInt8 c);
+FANCIER_STATIC fcInt8 fcInt8_max(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_maxMag(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_min(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_minMag(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_mix(fcInt8 a, fcInt8 b, fcInt8 c);
+FANCIER_STATIC fcInt8 fcInt8_clampk(fcInt8 v, fcInt min, fcInt max);
+FANCIER_STATIC fcInt8 fcInt8_maxk(fcInt8 x, fcInt y);
+FANCIER_STATIC fcInt8 fcInt8_mink(fcInt8 x, fcInt y);
+FANCIER_STATIC fcInt8 fcInt8_mixk(fcInt8 x, fcInt8 y, fcInt a);
+FANCIER_STATIC fcInt8 fcInt8_absDiff(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_addSat(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_clz(fcInt8 a);
+FANCIER_STATIC fcInt8 fcInt8_hadd(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_madHi(fcInt8 a, fcInt8 b, fcInt8 c);
+FANCIER_STATIC fcInt8 fcInt8_madSat(fcInt8 a, fcInt8 b, fcInt8 c);
+FANCIER_STATIC fcInt8 fcInt8_mulHi(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_rhadd(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_rotate(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_subSat(fcInt8 a, fcInt8 b);
+FANCIER_STATIC fcInt8 fcInt8_mad24(fcInt8 a, fcInt8 b, fcInt8 c);
+FANCIER_STATIC fcInt8 fcInt8_mul24(fcInt8 a, fcInt8 b);
+
+FANCIER_STATIC fcLong2 fcLong2_create1(fcLong v);
+FANCIER_STATIC void fcLong2_set1(fcLong2* self, fcLong v);
+FANCIER_STATIC fcLong2 fcLong2_create11(fcLong a, fcLong b);
+FANCIER_STATIC void fcLong2_set11(fcLong2* self, fcLong a, fcLong b);
+FANCIER_STATIC fcLong2 fcLong2_create2(fcLong2 vec1);
+FANCIER_STATIC void fcLong2_set2(fcLong2* self, fcLong2 vec1);
+
+FANCIER_STATIC fcByte2 fcLong2_convertByte2(fcLong2 a);
+FANCIER_STATIC fcShort2 fcLong2_convertShort2(fcLong2 a);
+FANCIER_STATIC fcInt2 fcLong2_convertInt2(fcLong2 a);
+FANCIER_STATIC fcFloat2 fcLong2_convertFloat2(fcLong2 a);
+FANCIER_STATIC fcDouble2 fcLong2_convertDouble2(fcLong2 a);
+
+FANCIER_STATIC fcInt2 fcLong2_isEqual(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcInt2 fcLong2_isNotEqual(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcInt2 fcLong2_isGreater(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcInt2 fcLong2_isGreaterEqual(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcInt2 fcLong2_isLess(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcInt2 fcLong2_isLessEqual(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_select(fcLong2 a, fcLong2 b, fcInt2 c);
+
+FANCIER_STATIC fcInt fcLong2_any(fcLong2 a);
+FANCIER_STATIC fcInt fcLong2_all(fcLong2 a);
+
+FANCIER_STATIC fcLong2 fcLong2_neg(fcLong2 a);
+FANCIER_STATIC fcLong2 fcLong2_add(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_sub(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_mul(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcDouble2 fcLong2_muld(fcLong2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcLong2_mulf(fcLong2 a, fcFloat2 b);
+FANCIER_STATIC fcLong2 fcLong2_mulk(fcLong2 a, fcLong k);
+FANCIER_STATIC fcDouble2 fcLong2_mulkd(fcLong2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcLong2_mulkf(fcLong2 a, fcFloat k);
+FANCIER_STATIC fcLong2 fcLong2_div(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcDouble2 fcLong2_divd(fcLong2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcLong2_divf(fcLong2 a, fcFloat2 b);
+FANCIER_STATIC fcLong2 fcLong2_divk(fcLong2 a, fcLong k);
+FANCIER_STATIC fcDouble2 fcLong2_divkd(fcLong2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcLong2_divkf(fcLong2 a, fcFloat k);
+FANCIER_STATIC fcLong2 fcLong2_mod(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_modk(fcLong2 a, fcLong k);
+FANCIER_STATIC fcLong2 fcLong2_bitAnd(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_bitOr(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_bitXor(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_bitNot(fcLong2 a);
+
+FANCIER_STATIC fcLong2 fcLong2_abs(fcLong2 a);
+FANCIER_STATIC fcLong2 fcLong2_clamp(fcLong2 a, fcLong2 b, fcLong2 c);
+FANCIER_STATIC fcLong2 fcLong2_max(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_maxMag(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_min(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_minMag(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_mix(fcLong2 a, fcLong2 b, fcLong2 c);
+FANCIER_STATIC fcLong2 fcLong2_clampk(fcLong2 v, fcLong min, fcLong max);
+FANCIER_STATIC fcLong2 fcLong2_maxk(fcLong2 x, fcLong y);
+FANCIER_STATIC fcLong2 fcLong2_mink(fcLong2 x, fcLong y);
+FANCIER_STATIC fcLong2 fcLong2_mixk(fcLong2 x, fcLong2 y, fcLong a);
+FANCIER_STATIC fcLong2 fcLong2_absDiff(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_addSat(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_clz(fcLong2 a);
+FANCIER_STATIC fcLong2 fcLong2_hadd(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_madHi(fcLong2 a, fcLong2 b, fcLong2 c);
+FANCIER_STATIC fcLong2 fcLong2_madSat(fcLong2 a, fcLong2 b, fcLong2 c);
+FANCIER_STATIC fcLong2 fcLong2_mulHi(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_rhadd(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_rotate(fcLong2 a, fcLong2 b);
+FANCIER_STATIC fcLong2 fcLong2_subSat(fcLong2 a, fcLong2 b);
+
+FANCIER_STATIC fcLong3 fcLong3_create1(fcLong v);
+FANCIER_STATIC void fcLong3_set1(fcLong3* self, fcLong v);
+FANCIER_STATIC fcLong3 fcLong3_create111(fcLong a, fcLong b, fcLong c);
+FANCIER_STATIC void fcLong3_set111(fcLong3* self, fcLong a, fcLong b, fcLong c);
+FANCIER_STATIC fcLong3 fcLong3_create12(fcLong x, fcLong2 vec1);
+FANCIER_STATIC void fcLong3_set12(fcLong3* self, fcLong x, fcLong2 vec1);
+FANCIER_STATIC fcLong3 fcLong3_create21(fcLong2 vec1, fcLong z);
+FANCIER_STATIC void fcLong3_set21(fcLong3* self, fcLong2 vec1, fcLong z);
+FANCIER_STATIC fcLong3 fcLong3_create3(fcLong3 vec1);
+FANCIER_STATIC void fcLong3_set3(fcLong3* self, fcLong3 vec1);
+
+FANCIER_STATIC fcByte3 fcLong3_convertByte3(fcLong3 a);
+FANCIER_STATIC fcShort3 fcLong3_convertShort3(fcLong3 a);
+FANCIER_STATIC fcInt3 fcLong3_convertInt3(fcLong3 a);
+FANCIER_STATIC fcFloat3 fcLong3_convertFloat3(fcLong3 a);
+FANCIER_STATIC fcDouble3 fcLong3_convertDouble3(fcLong3 a);
+FANCIER_STATIC fcLong2 fcLong3_asLong2(fcLong3 a);
+
+FANCIER_STATIC fcInt3 fcLong3_isEqual(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcInt3 fcLong3_isNotEqual(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcInt3 fcLong3_isGreater(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcInt3 fcLong3_isGreaterEqual(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcInt3 fcLong3_isLess(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcInt3 fcLong3_isLessEqual(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_select(fcLong3 a, fcLong3 b, fcInt3 c);
+
+FANCIER_STATIC fcInt fcLong3_any(fcLong3 a);
+FANCIER_STATIC fcInt fcLong3_all(fcLong3 a);
+
+FANCIER_STATIC fcLong3 fcLong3_neg(fcLong3 a);
+FANCIER_STATIC fcLong3 fcLong3_add(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_sub(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_mul(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcDouble3 fcLong3_muld(fcLong3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcLong3_mulf(fcLong3 a, fcFloat3 b);
+FANCIER_STATIC fcLong3 fcLong3_mulk(fcLong3 a, fcLong k);
+FANCIER_STATIC fcDouble3 fcLong3_mulkd(fcLong3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcLong3_mulkf(fcLong3 a, fcFloat k);
+FANCIER_STATIC fcLong3 fcLong3_div(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcDouble3 fcLong3_divd(fcLong3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcLong3_divf(fcLong3 a, fcFloat3 b);
+FANCIER_STATIC fcLong3 fcLong3_divk(fcLong3 a, fcLong k);
+FANCIER_STATIC fcDouble3 fcLong3_divkd(fcLong3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcLong3_divkf(fcLong3 a, fcFloat k);
+FANCIER_STATIC fcLong3 fcLong3_mod(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_modk(fcLong3 a, fcLong k);
+FANCIER_STATIC fcLong3 fcLong3_bitAnd(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_bitOr(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_bitXor(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_bitNot(fcLong3 a);
+
+FANCIER_STATIC fcLong3 fcLong3_abs(fcLong3 a);
+FANCIER_STATIC fcLong3 fcLong3_clamp(fcLong3 a, fcLong3 b, fcLong3 c);
+FANCIER_STATIC fcLong3 fcLong3_max(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_maxMag(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_min(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_minMag(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_mix(fcLong3 a, fcLong3 b, fcLong3 c);
+FANCIER_STATIC fcLong3 fcLong3_clampk(fcLong3 v, fcLong min, fcLong max);
+FANCIER_STATIC fcLong3 fcLong3_maxk(fcLong3 x, fcLong y);
+FANCIER_STATIC fcLong3 fcLong3_mink(fcLong3 x, fcLong y);
+FANCIER_STATIC fcLong3 fcLong3_mixk(fcLong3 x, fcLong3 y, fcLong a);
+FANCIER_STATIC fcLong3 fcLong3_absDiff(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_addSat(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_clz(fcLong3 a);
+FANCIER_STATIC fcLong3 fcLong3_hadd(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_madHi(fcLong3 a, fcLong3 b, fcLong3 c);
+FANCIER_STATIC fcLong3 fcLong3_madSat(fcLong3 a, fcLong3 b, fcLong3 c);
+FANCIER_STATIC fcLong3 fcLong3_mulHi(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_rhadd(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_rotate(fcLong3 a, fcLong3 b);
+FANCIER_STATIC fcLong3 fcLong3_subSat(fcLong3 a, fcLong3 b);
+
+FANCIER_STATIC fcLong4 fcLong4_create1(fcLong v);
+FANCIER_STATIC void fcLong4_set1(fcLong4* self, fcLong v);
+FANCIER_STATIC fcLong4 fcLong4_create1111(fcLong a, fcLong b, fcLong c, fcLong d);
+FANCIER_STATIC void fcLong4_set1111(fcLong4* self, fcLong a, fcLong b, fcLong c, fcLong d);
+FANCIER_STATIC fcLong4 fcLong4_create112(fcLong x, fcLong y, fcLong2 vec1);
+FANCIER_STATIC void fcLong4_set112(fcLong4* self, fcLong x, fcLong y, fcLong2 vec1);
+FANCIER_STATIC fcLong4 fcLong4_create121(fcLong x, fcLong2 vec1, fcLong w);
+FANCIER_STATIC void fcLong4_set121(fcLong4* self, fcLong x, fcLong2 vec1, fcLong w);
+FANCIER_STATIC fcLong4 fcLong4_create13(fcLong x, fcLong3 vec1);
+FANCIER_STATIC void fcLong4_set13(fcLong4* self, fcLong x, fcLong3 vec1);
+FANCIER_STATIC fcLong4 fcLong4_create211(fcLong2 vec1, fcLong z, fcLong w);
+FANCIER_STATIC void fcLong4_set211(fcLong4* self, fcLong2 vec1, fcLong z, fcLong w);
+FANCIER_STATIC fcLong4 fcLong4_create22(fcLong2 vec1, fcLong2 vec2);
+FANCIER_STATIC void fcLong4_set22(fcLong4* self, fcLong2 vec1, fcLong2 vec2);
+FANCIER_STATIC fcLong4 fcLong4_create31(fcLong3 vec1, fcLong w);
+FANCIER_STATIC void fcLong4_set31(fcLong4* self, fcLong3 vec1, fcLong w);
+FANCIER_STATIC fcLong4 fcLong4_create4(fcLong4 vec1);
+FANCIER_STATIC void fcLong4_set4(fcLong4* self, fcLong4 vec1);
+
+FANCIER_STATIC fcLong2 fcLong4_odd(fcLong4 a);
+FANCIER_STATIC fcLong2 fcLong4_even(fcLong4 a);
+
+FANCIER_STATIC fcByte4 fcLong4_convertByte4(fcLong4 a);
+FANCIER_STATIC fcShort4 fcLong4_convertShort4(fcLong4 a);
+FANCIER_STATIC fcInt4 fcLong4_convertInt4(fcLong4 a);
+FANCIER_STATIC fcFloat4 fcLong4_convertFloat4(fcLong4 a);
+FANCIER_STATIC fcDouble4 fcLong4_convertDouble4(fcLong4 a);
+FANCIER_STATIC fcLong2 fcLong4_asLong2(fcLong4 a);
+FANCIER_STATIC fcLong3 fcLong4_asLong3(fcLong4 a);
+
+FANCIER_STATIC fcInt4 fcLong4_isEqual(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcInt4 fcLong4_isNotEqual(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcInt4 fcLong4_isGreater(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcInt4 fcLong4_isGreaterEqual(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcInt4 fcLong4_isLess(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcInt4 fcLong4_isLessEqual(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_select(fcLong4 a, fcLong4 b, fcInt4 c);
+
+FANCIER_STATIC fcInt fcLong4_any(fcLong4 a);
+FANCIER_STATIC fcInt fcLong4_all(fcLong4 a);
+
+FANCIER_STATIC fcLong4 fcLong4_neg(fcLong4 a);
+FANCIER_STATIC fcLong4 fcLong4_add(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_sub(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_mul(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcDouble4 fcLong4_muld(fcLong4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcLong4_mulf(fcLong4 a, fcFloat4 b);
+FANCIER_STATIC fcLong4 fcLong4_mulk(fcLong4 a, fcLong k);
+FANCIER_STATIC fcDouble4 fcLong4_mulkd(fcLong4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcLong4_mulkf(fcLong4 a, fcFloat k);
+FANCIER_STATIC fcLong4 fcLong4_div(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcDouble4 fcLong4_divd(fcLong4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcLong4_divf(fcLong4 a, fcFloat4 b);
+FANCIER_STATIC fcLong4 fcLong4_divk(fcLong4 a, fcLong k);
+FANCIER_STATIC fcDouble4 fcLong4_divkd(fcLong4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcLong4_divkf(fcLong4 a, fcFloat k);
+FANCIER_STATIC fcLong4 fcLong4_mod(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_modk(fcLong4 a, fcLong k);
+FANCIER_STATIC fcLong4 fcLong4_bitAnd(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_bitOr(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_bitXor(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_bitNot(fcLong4 a);
+
+FANCIER_STATIC fcLong4 fcLong4_abs(fcLong4 a);
+FANCIER_STATIC fcLong4 fcLong4_clamp(fcLong4 a, fcLong4 b, fcLong4 c);
+FANCIER_STATIC fcLong4 fcLong4_max(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_maxMag(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_min(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_minMag(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_mix(fcLong4 a, fcLong4 b, fcLong4 c);
+FANCIER_STATIC fcLong4 fcLong4_clampk(fcLong4 v, fcLong min, fcLong max);
+FANCIER_STATIC fcLong4 fcLong4_maxk(fcLong4 x, fcLong y);
+FANCIER_STATIC fcLong4 fcLong4_mink(fcLong4 x, fcLong y);
+FANCIER_STATIC fcLong4 fcLong4_mixk(fcLong4 x, fcLong4 y, fcLong a);
+FANCIER_STATIC fcLong4 fcLong4_absDiff(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_addSat(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_clz(fcLong4 a);
+FANCIER_STATIC fcLong4 fcLong4_hadd(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_madHi(fcLong4 a, fcLong4 b, fcLong4 c);
+FANCIER_STATIC fcLong4 fcLong4_madSat(fcLong4 a, fcLong4 b, fcLong4 c);
+FANCIER_STATIC fcLong4 fcLong4_mulHi(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_rhadd(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_rotate(fcLong4 a, fcLong4 b);
+FANCIER_STATIC fcLong4 fcLong4_subSat(fcLong4 a, fcLong4 b);
+
+FANCIER_STATIC fcLong8 fcLong8_create1(fcLong v);
+FANCIER_STATIC void fcLong8_set1(fcLong8* self, fcLong v);
+FANCIER_STATIC fcLong8 fcLong8_create11111111(fcLong a, fcLong b, fcLong c, fcLong d, fcLong e, fcLong f, fcLong g, fcLong h);
+FANCIER_STATIC void fcLong8_set11111111(fcLong8* self, fcLong a, fcLong b, fcLong c, fcLong d, fcLong e, fcLong f, fcLong g, fcLong h);
+FANCIER_STATIC fcLong8 fcLong8_create1111112(fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong2 vec1);
+FANCIER_STATIC void fcLong8_set1111112(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong2 vec1);
+FANCIER_STATIC fcLong8 fcLong8_create1111121(fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong2 vec1, fcLong s7);
+FANCIER_STATIC void fcLong8_set1111121(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong2 vec1, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create111113(fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong3 vec1);
+FANCIER_STATIC void fcLong8_set111113(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong3 vec1);
+FANCIER_STATIC fcLong8 fcLong8_create1111211(fcLong x, fcLong y, fcLong z, fcLong w, fcLong2 vec1, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set1111211(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong2 vec1, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create111122(fcLong x, fcLong y, fcLong z, fcLong w, fcLong2 vec1, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set111122(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong2 vec1, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create111131(fcLong x, fcLong y, fcLong z, fcLong w, fcLong3 vec1, fcLong s7);
+FANCIER_STATIC void fcLong8_set111131(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong3 vec1, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create11114(fcLong x, fcLong y, fcLong z, fcLong w, fcLong4 vec1);
+FANCIER_STATIC void fcLong8_set11114(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong4 vec1);
+FANCIER_STATIC fcLong8 fcLong8_create1112111(fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set1112111(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create111212(fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set111212(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create111221(fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set111221(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create11123(fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set11123(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create111311(fcLong x, fcLong y, fcLong z, fcLong3 vec1, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set111311(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong3 vec1, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create11132(fcLong x, fcLong y, fcLong z, fcLong3 vec1, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set11132(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong3 vec1, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create11141(fcLong x, fcLong y, fcLong z, fcLong4 vec1, fcLong s7);
+FANCIER_STATIC void fcLong8_set11141(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong4 vec1, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1121111(fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set1121111(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create112112(fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set112112(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create112121(fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set112121(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create11213(fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set11213(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create112211(fcLong x, fcLong y, fcLong2 vec1, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set112211(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create11222(fcLong x, fcLong y, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set11222(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create11231(fcLong x, fcLong y, fcLong2 vec1, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set11231(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1124(fcLong x, fcLong y, fcLong2 vec1, fcLong4 vec2);
+FANCIER_STATIC void fcLong8_set1124(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong4 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create113111(fcLong x, fcLong y, fcLong3 vec1, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set113111(fcLong8* self, fcLong x, fcLong y, fcLong3 vec1, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create11312(fcLong x, fcLong y, fcLong3 vec1, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set11312(fcLong8* self, fcLong x, fcLong y, fcLong3 vec1, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create11321(fcLong x, fcLong y, fcLong3 vec1, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set11321(fcLong8* self, fcLong x, fcLong y, fcLong3 vec1, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1133(fcLong x, fcLong y, fcLong3 vec1, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set1133(fcLong8* self, fcLong x, fcLong y, fcLong3 vec1, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create11411(fcLong x, fcLong y, fcLong4 vec1, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set11411(fcLong8* self, fcLong x, fcLong y, fcLong4 vec1, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1142(fcLong x, fcLong y, fcLong4 vec1, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set1142(fcLong8* self, fcLong x, fcLong y, fcLong4 vec1, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create1211111(fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set1211111(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create121112(fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set121112(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create121121(fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set121121(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create12113(fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set12113(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create121211(fcLong x, fcLong2 vec1, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set121211(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create12122(fcLong x, fcLong2 vec1, fcLong w, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set12122(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create12131(fcLong x, fcLong2 vec1, fcLong w, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set12131(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1214(fcLong x, fcLong2 vec1, fcLong w, fcLong4 vec2);
+FANCIER_STATIC void fcLong8_set1214(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong4 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create122111(fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set122111(fcLong8* self, fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create12212(fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set12212(fcLong8* self, fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create12221(fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC void fcLong8_set12221(fcLong8* self, fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1223(fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong3 vec3);
+FANCIER_STATIC void fcLong8_set1223(fcLong8* self, fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong3 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create12311(fcLong x, fcLong2 vec1, fcLong3 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set12311(fcLong8* self, fcLong x, fcLong2 vec1, fcLong3 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1232(fcLong x, fcLong2 vec1, fcLong3 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set1232(fcLong8* self, fcLong x, fcLong2 vec1, fcLong3 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create1241(fcLong x, fcLong2 vec1, fcLong4 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set1241(fcLong8* self, fcLong x, fcLong2 vec1, fcLong4 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create131111(fcLong x, fcLong3 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set131111(fcLong8* self, fcLong x, fcLong3 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create13112(fcLong x, fcLong3 vec1, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set13112(fcLong8* self, fcLong x, fcLong3 vec1, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create13121(fcLong x, fcLong3 vec1, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set13121(fcLong8* self, fcLong x, fcLong3 vec1, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1313(fcLong x, fcLong3 vec1, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set1313(fcLong8* self, fcLong x, fcLong3 vec1, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create13211(fcLong x, fcLong3 vec1, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set13211(fcLong8* self, fcLong x, fcLong3 vec1, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1322(fcLong x, fcLong3 vec1, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set1322(fcLong8* self, fcLong x, fcLong3 vec1, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create1331(fcLong x, fcLong3 vec1, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set1331(fcLong8* self, fcLong x, fcLong3 vec1, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create134(fcLong x, fcLong3 vec1, fcLong4 vec2);
+FANCIER_STATIC void fcLong8_set134(fcLong8* self, fcLong x, fcLong3 vec1, fcLong4 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create14111(fcLong x, fcLong4 vec1, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set14111(fcLong8* self, fcLong x, fcLong4 vec1, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create1412(fcLong x, fcLong4 vec1, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set1412(fcLong8* self, fcLong x, fcLong4 vec1, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create1421(fcLong x, fcLong4 vec1, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set1421(fcLong8* self, fcLong x, fcLong4 vec1, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create143(fcLong x, fcLong4 vec1, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set143(fcLong8* self, fcLong x, fcLong4 vec1, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create2111111(fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set2111111(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create211112(fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set211112(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create211121(fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set211121(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create21113(fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set21113(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create211211(fcLong2 vec1, fcLong z, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set211211(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create21122(fcLong2 vec1, fcLong z, fcLong w, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set21122(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create21131(fcLong2 vec1, fcLong z, fcLong w, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set21131(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create2114(fcLong2 vec1, fcLong z, fcLong w, fcLong4 vec2);
+FANCIER_STATIC void fcLong8_set2114(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong4 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create212111(fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set212111(fcLong8* self, fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create21212(fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set21212(fcLong8* self, fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create21221(fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC void fcLong8_set21221(fcLong8* self, fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create2123(fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong3 vec3);
+FANCIER_STATIC void fcLong8_set2123(fcLong8* self, fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong3 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create21311(fcLong2 vec1, fcLong z, fcLong3 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set21311(fcLong8* self, fcLong2 vec1, fcLong z, fcLong3 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create2132(fcLong2 vec1, fcLong z, fcLong3 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set2132(fcLong8* self, fcLong2 vec1, fcLong z, fcLong3 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create2141(fcLong2 vec1, fcLong z, fcLong4 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set2141(fcLong8* self, fcLong2 vec1, fcLong z, fcLong4 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create221111(fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set221111(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create22112(fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set22112(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create22121(fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC void fcLong8_set22121(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create2213(fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong3 vec3);
+FANCIER_STATIC void fcLong8_set2213(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong3 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create22211(fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set22211(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create2222(fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong2 vec4);
+FANCIER_STATIC void fcLong8_set2222(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong2 vec4);
+FANCIER_STATIC fcLong8 fcLong8_create2231(fcLong2 vec1, fcLong2 vec2, fcLong3 vec3, fcLong s7);
+FANCIER_STATIC void fcLong8_set2231(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong3 vec3, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create224(fcLong2 vec1, fcLong2 vec2, fcLong4 vec3);
+FANCIER_STATIC void fcLong8_set224(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong4 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create23111(fcLong2 vec1, fcLong3 vec2, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set23111(fcLong8* self, fcLong2 vec1, fcLong3 vec2, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create2312(fcLong2 vec1, fcLong3 vec2, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set2312(fcLong8* self, fcLong2 vec1, fcLong3 vec2, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create2321(fcLong2 vec1, fcLong3 vec2, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC void fcLong8_set2321(fcLong8* self, fcLong2 vec1, fcLong3 vec2, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create233(fcLong2 vec1, fcLong3 vec2, fcLong3 vec3);
+FANCIER_STATIC void fcLong8_set233(fcLong8* self, fcLong2 vec1, fcLong3 vec2, fcLong3 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create2411(fcLong2 vec1, fcLong4 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set2411(fcLong8* self, fcLong2 vec1, fcLong4 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create242(fcLong2 vec1, fcLong4 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set242(fcLong8* self, fcLong2 vec1, fcLong4 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create311111(fcLong3 vec1, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set311111(fcLong8* self, fcLong3 vec1, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create31112(fcLong3 vec1, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set31112(fcLong8* self, fcLong3 vec1, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create31121(fcLong3 vec1, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set31121(fcLong8* self, fcLong3 vec1, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create3113(fcLong3 vec1, fcLong w, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set3113(fcLong8* self, fcLong3 vec1, fcLong w, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create31211(fcLong3 vec1, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set31211(fcLong8* self, fcLong3 vec1, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create3122(fcLong3 vec1, fcLong w, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set3122(fcLong8* self, fcLong3 vec1, fcLong w, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create3131(fcLong3 vec1, fcLong w, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set3131(fcLong8* self, fcLong3 vec1, fcLong w, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create314(fcLong3 vec1, fcLong w, fcLong4 vec2);
+FANCIER_STATIC void fcLong8_set314(fcLong8* self, fcLong3 vec1, fcLong w, fcLong4 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create32111(fcLong3 vec1, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set32111(fcLong8* self, fcLong3 vec1, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create3212(fcLong3 vec1, fcLong2 vec2, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set3212(fcLong8* self, fcLong3 vec1, fcLong2 vec2, fcLong s5, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create3221(fcLong3 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC void fcLong8_set3221(fcLong8* self, fcLong3 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create323(fcLong3 vec1, fcLong2 vec2, fcLong3 vec3);
+FANCIER_STATIC void fcLong8_set323(fcLong8* self, fcLong3 vec1, fcLong2 vec2, fcLong3 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create3311(fcLong3 vec1, fcLong3 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set3311(fcLong8* self, fcLong3 vec1, fcLong3 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create332(fcLong3 vec1, fcLong3 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set332(fcLong8* self, fcLong3 vec1, fcLong3 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create341(fcLong3 vec1, fcLong4 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set341(fcLong8* self, fcLong3 vec1, fcLong4 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create41111(fcLong4 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set41111(fcLong8* self, fcLong4 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create4112(fcLong4 vec1, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC void fcLong8_set4112(fcLong8* self, fcLong4 vec1, fcLong s4, fcLong s5, fcLong2 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create4121(fcLong4 vec1, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set4121(fcLong8* self, fcLong4 vec1, fcLong s4, fcLong2 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create413(fcLong4 vec1, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC void fcLong8_set413(fcLong8* self, fcLong4 vec1, fcLong s4, fcLong3 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create4211(fcLong4 vec1, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC void fcLong8_set4211(fcLong8* self, fcLong4 vec1, fcLong2 vec2, fcLong s6, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create422(fcLong4 vec1, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC void fcLong8_set422(fcLong8* self, fcLong4 vec1, fcLong2 vec2, fcLong2 vec3);
+FANCIER_STATIC fcLong8 fcLong8_create431(fcLong4 vec1, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC void fcLong8_set431(fcLong8* self, fcLong4 vec1, fcLong3 vec2, fcLong s7);
+FANCIER_STATIC fcLong8 fcLong8_create44(fcLong4 vec1, fcLong4 vec2);
+FANCIER_STATIC void fcLong8_set44(fcLong8* self, fcLong4 vec1, fcLong4 vec2);
+FANCIER_STATIC fcLong8 fcLong8_create8(fcLong8 vec1);
+FANCIER_STATIC void fcLong8_set8(fcLong8* self, fcLong8 vec1);
+
+FANCIER_STATIC fcLong4 fcLong8_odd(fcLong8 a);
+FANCIER_STATIC fcLong4 fcLong8_even(fcLong8 a);
+
+FANCIER_STATIC fcByte8 fcLong8_convertByte8(fcLong8 a);
+FANCIER_STATIC fcShort8 fcLong8_convertShort8(fcLong8 a);
+FANCIER_STATIC fcInt8 fcLong8_convertInt8(fcLong8 a);
+FANCIER_STATIC fcFloat8 fcLong8_convertFloat8(fcLong8 a);
+FANCIER_STATIC fcDouble8 fcLong8_convertDouble8(fcLong8 a);
+FANCIER_STATIC fcLong2 fcLong8_asLong2(fcLong8 a);
+FANCIER_STATIC fcLong3 fcLong8_asLong3(fcLong8 a);
+FANCIER_STATIC fcLong4 fcLong8_asLong4(fcLong8 a);
+
+FANCIER_STATIC fcInt8 fcLong8_isEqual(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcInt8 fcLong8_isNotEqual(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcInt8 fcLong8_isGreater(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcInt8 fcLong8_isGreaterEqual(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcInt8 fcLong8_isLess(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcInt8 fcLong8_isLessEqual(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_select(fcLong8 a, fcLong8 b, fcInt8 c);
+
+FANCIER_STATIC fcInt fcLong8_any(fcLong8 a);
+FANCIER_STATIC fcInt fcLong8_all(fcLong8 a);
+
+FANCIER_STATIC fcLong8 fcLong8_neg(fcLong8 a);
+FANCIER_STATIC fcLong8 fcLong8_add(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_sub(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_mul(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcDouble8 fcLong8_muld(fcLong8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcLong8_mulf(fcLong8 a, fcFloat8 b);
+FANCIER_STATIC fcLong8 fcLong8_mulk(fcLong8 a, fcLong k);
+FANCIER_STATIC fcDouble8 fcLong8_mulkd(fcLong8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcLong8_mulkf(fcLong8 a, fcFloat k);
+FANCIER_STATIC fcLong8 fcLong8_div(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcDouble8 fcLong8_divd(fcLong8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcLong8_divf(fcLong8 a, fcFloat8 b);
+FANCIER_STATIC fcLong8 fcLong8_divk(fcLong8 a, fcLong k);
+FANCIER_STATIC fcDouble8 fcLong8_divkd(fcLong8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcLong8_divkf(fcLong8 a, fcFloat k);
+FANCIER_STATIC fcLong8 fcLong8_mod(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_modk(fcLong8 a, fcLong k);
+FANCIER_STATIC fcLong8 fcLong8_bitAnd(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_bitOr(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_bitXor(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_bitNot(fcLong8 a);
+
+FANCIER_STATIC fcLong8 fcLong8_abs(fcLong8 a);
+FANCIER_STATIC fcLong8 fcLong8_clamp(fcLong8 a, fcLong8 b, fcLong8 c);
+FANCIER_STATIC fcLong8 fcLong8_max(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_maxMag(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_min(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_minMag(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_mix(fcLong8 a, fcLong8 b, fcLong8 c);
+FANCIER_STATIC fcLong8 fcLong8_clampk(fcLong8 v, fcLong min, fcLong max);
+FANCIER_STATIC fcLong8 fcLong8_maxk(fcLong8 x, fcLong y);
+FANCIER_STATIC fcLong8 fcLong8_mink(fcLong8 x, fcLong y);
+FANCIER_STATIC fcLong8 fcLong8_mixk(fcLong8 x, fcLong8 y, fcLong a);
+FANCIER_STATIC fcLong8 fcLong8_absDiff(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_addSat(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_clz(fcLong8 a);
+FANCIER_STATIC fcLong8 fcLong8_hadd(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_madHi(fcLong8 a, fcLong8 b, fcLong8 c);
+FANCIER_STATIC fcLong8 fcLong8_madSat(fcLong8 a, fcLong8 b, fcLong8 c);
+FANCIER_STATIC fcLong8 fcLong8_mulHi(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_rhadd(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_rotate(fcLong8 a, fcLong8 b);
+FANCIER_STATIC fcLong8 fcLong8_subSat(fcLong8 a, fcLong8 b);
+
+FANCIER_STATIC fcFloat2 fcFloat2_create1(fcFloat v);
+FANCIER_STATIC void fcFloat2_set1(fcFloat2* self, fcFloat v);
+FANCIER_STATIC fcFloat2 fcFloat2_create11(fcFloat a, fcFloat b);
+FANCIER_STATIC void fcFloat2_set11(fcFloat2* self, fcFloat a, fcFloat b);
+FANCIER_STATIC fcFloat2 fcFloat2_create2(fcFloat2 vec1);
+FANCIER_STATIC void fcFloat2_set2(fcFloat2* self, fcFloat2 vec1);
+
+FANCIER_STATIC fcByte2 fcFloat2_convertByte2(fcFloat2 a);
+FANCIER_STATIC fcShort2 fcFloat2_convertShort2(fcFloat2 a);
+FANCIER_STATIC fcInt2 fcFloat2_convertInt2(fcFloat2 a);
+FANCIER_STATIC fcLong2 fcFloat2_convertLong2(fcFloat2 a);
+FANCIER_STATIC fcDouble2 fcFloat2_convertDouble2(fcFloat2 a);
+
+FANCIER_STATIC fcInt2 fcFloat2_isEqual(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcInt2 fcFloat2_isNotEqual(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcInt2 fcFloat2_isGreater(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcInt2 fcFloat2_isGreaterEqual(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcInt2 fcFloat2_isLess(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcInt2 fcFloat2_isLessEqual(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_select(fcFloat2 a, fcFloat2 b, fcInt2 c);
+FANCIER_STATIC fcInt2 fcFloat2_isFinite(fcFloat2 a);
+FANCIER_STATIC fcInt2 fcFloat2_isInf(fcFloat2 a);
+FANCIER_STATIC fcInt2 fcFloat2_isNaN(fcFloat2 a);
+FANCIER_STATIC fcInt2 fcFloat2_isNormal(fcFloat2 a);
+FANCIER_STATIC fcInt2 fcFloat2_isOrdered(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcInt2 fcFloat2_isUnordered(fcFloat2 a, fcFloat2 b);
+
+FANCIER_STATIC fcInt fcFloat2_any(fcFloat2 a);
+FANCIER_STATIC fcInt fcFloat2_all(fcFloat2 a);
+
+FANCIER_STATIC fcFloat2 fcFloat2_neg(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_add(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_sub(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcDouble2 fcFloat2_muld(fcFloat2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_mulf(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcDouble2 fcFloat2_mulkd(fcFloat2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcFloat2_mulkf(fcFloat2 a, fcFloat k);
+FANCIER_STATIC fcDouble2 fcFloat2_divd(fcFloat2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_divf(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcDouble2 fcFloat2_divkd(fcFloat2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcFloat2_divkf(fcFloat2 a, fcFloat k);
+FANCIER_STATIC fcFloat fcFloat2_dot(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcDouble fcFloat2_distance(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcDouble fcFloat2_length(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_normalize(fcFloat2 a);
+
+FANCIER_STATIC fcFloat2 fcFloat2_abs(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_clamp(fcFloat2 a, fcFloat2 b, fcFloat2 c);
+FANCIER_STATIC fcFloat2 fcFloat2_max(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_maxMag(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_min(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_minMag(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_mix(fcFloat2 a, fcFloat2 b, fcFloat2 c);
+FANCIER_STATIC fcFloat2 fcFloat2_clampk(fcFloat2 v, fcFloat min, fcFloat max);
+FANCIER_STATIC fcFloat2 fcFloat2_maxk(fcFloat2 x, fcFloat y);
+FANCIER_STATIC fcFloat2 fcFloat2_mink(fcFloat2 x, fcFloat y);
+FANCIER_STATIC fcFloat2 fcFloat2_mixk(fcFloat2 x, fcFloat2 y, fcFloat a);
+FANCIER_STATIC fcFloat2 fcFloat2_acos(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_acosh(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_asin(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_asinh(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_atan(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_atan2(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_atanh(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_cbrt(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_ceil(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_copySign(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_cos(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_cosh(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_erf(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_erfc(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_exp(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_exp10(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_exp2(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_expm1(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_fdim(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_floor(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_fma(fcFloat2 a, fcFloat2 b, fcFloat2 c);
+FANCIER_STATIC fcFloat2 fcFloat2_fmod(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_fract(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_frexp(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_getExponent(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_hypot(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_lgamma(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_log(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_log10(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_log1p(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_log2(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_logb(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_mad(fcFloat2 a, fcFloat2 b, fcFloat2 c);
+FANCIER_STATIC fcFloat2 fcFloat2_nextAfter(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_pow(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_powr(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_remainder(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_rint(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_round(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_rsqrt(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_signum(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_sin(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_sinh(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_smoothStep(fcFloat2 a, fcFloat2 b, fcFloat2 c);
+FANCIER_STATIC fcFloat2 fcFloat2_sqrt(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_step(fcFloat2 a, fcFloat2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_tan(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_tanh(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_tgamma(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_toDegrees(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_toRadians(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_trunc(fcFloat2 a);
+FANCIER_STATIC fcFloat2 fcFloat2_scalb(fcFloat2 a, fcInt2 n);
+FANCIER_STATIC fcFloat2 fcFloat2_ldexp(fcFloat2 a, fcInt2 n);
+FANCIER_STATIC fcFloat2 fcFloat2_pown(fcFloat2 a, fcInt2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_rootn(fcFloat2 a, fcInt2 b);
+FANCIER_STATIC fcFloat2 fcFloat2_smoothStepk(fcFloat2 a, fcFloat2 b, fcFloat c);
+
+FANCIER_STATIC fcFloat3 fcFloat3_create1(fcFloat v);
+FANCIER_STATIC void fcFloat3_set1(fcFloat3* self, fcFloat v);
+FANCIER_STATIC fcFloat3 fcFloat3_create111(fcFloat a, fcFloat b, fcFloat c);
+FANCIER_STATIC void fcFloat3_set111(fcFloat3* self, fcFloat a, fcFloat b, fcFloat c);
+FANCIER_STATIC fcFloat3 fcFloat3_create12(fcFloat x, fcFloat2 vec1);
+FANCIER_STATIC void fcFloat3_set12(fcFloat3* self, fcFloat x, fcFloat2 vec1);
+FANCIER_STATIC fcFloat3 fcFloat3_create21(fcFloat2 vec1, fcFloat z);
+FANCIER_STATIC void fcFloat3_set21(fcFloat3* self, fcFloat2 vec1, fcFloat z);
+FANCIER_STATIC fcFloat3 fcFloat3_create3(fcFloat3 vec1);
+FANCIER_STATIC void fcFloat3_set3(fcFloat3* self, fcFloat3 vec1);
+
+FANCIER_STATIC fcByte3 fcFloat3_convertByte3(fcFloat3 a);
+FANCIER_STATIC fcShort3 fcFloat3_convertShort3(fcFloat3 a);
+FANCIER_STATIC fcInt3 fcFloat3_convertInt3(fcFloat3 a);
+FANCIER_STATIC fcLong3 fcFloat3_convertLong3(fcFloat3 a);
+FANCIER_STATIC fcDouble3 fcFloat3_convertDouble3(fcFloat3 a);
+FANCIER_STATIC fcFloat2 fcFloat3_asFloat2(fcFloat3 a);
+
+FANCIER_STATIC fcInt3 fcFloat3_isEqual(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcInt3 fcFloat3_isNotEqual(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcInt3 fcFloat3_isGreater(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcInt3 fcFloat3_isGreaterEqual(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcInt3 fcFloat3_isLess(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcInt3 fcFloat3_isLessEqual(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_select(fcFloat3 a, fcFloat3 b, fcInt3 c);
+FANCIER_STATIC fcInt3 fcFloat3_isFinite(fcFloat3 a);
+FANCIER_STATIC fcInt3 fcFloat3_isInf(fcFloat3 a);
+FANCIER_STATIC fcInt3 fcFloat3_isNaN(fcFloat3 a);
+FANCIER_STATIC fcInt3 fcFloat3_isNormal(fcFloat3 a);
+FANCIER_STATIC fcInt3 fcFloat3_isOrdered(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcInt3 fcFloat3_isUnordered(fcFloat3 a, fcFloat3 b);
+
+FANCIER_STATIC fcInt fcFloat3_any(fcFloat3 a);
+FANCIER_STATIC fcInt fcFloat3_all(fcFloat3 a);
+
+FANCIER_STATIC fcFloat3 fcFloat3_neg(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_add(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_sub(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcDouble3 fcFloat3_muld(fcFloat3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_mulf(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcDouble3 fcFloat3_mulkd(fcFloat3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcFloat3_mulkf(fcFloat3 a, fcFloat k);
+FANCIER_STATIC fcDouble3 fcFloat3_divd(fcFloat3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_divf(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcDouble3 fcFloat3_divkd(fcFloat3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcFloat3_divkf(fcFloat3 a, fcFloat k);
+FANCIER_STATIC fcFloat3 fcFloat3_cross(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat fcFloat3_dot(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcDouble fcFloat3_distance(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcDouble fcFloat3_length(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_normalize(fcFloat3 a);
+
+FANCIER_STATIC fcFloat3 fcFloat3_abs(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_clamp(fcFloat3 a, fcFloat3 b, fcFloat3 c);
+FANCIER_STATIC fcFloat3 fcFloat3_max(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_maxMag(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_min(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_minMag(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_mix(fcFloat3 a, fcFloat3 b, fcFloat3 c);
+FANCIER_STATIC fcFloat3 fcFloat3_clampk(fcFloat3 v, fcFloat min, fcFloat max);
+FANCIER_STATIC fcFloat3 fcFloat3_maxk(fcFloat3 x, fcFloat y);
+FANCIER_STATIC fcFloat3 fcFloat3_mink(fcFloat3 x, fcFloat y);
+FANCIER_STATIC fcFloat3 fcFloat3_mixk(fcFloat3 x, fcFloat3 y, fcFloat a);
+FANCIER_STATIC fcFloat3 fcFloat3_acos(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_acosh(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_asin(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_asinh(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_atan(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_atan2(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_atanh(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_cbrt(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_ceil(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_copySign(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_cos(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_cosh(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_erf(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_erfc(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_exp(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_exp10(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_exp2(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_expm1(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_fdim(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_floor(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_fma(fcFloat3 a, fcFloat3 b, fcFloat3 c);
+FANCIER_STATIC fcFloat3 fcFloat3_fmod(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_fract(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_frexp(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_getExponent(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_hypot(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_lgamma(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_log(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_log10(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_log1p(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_log2(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_logb(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_mad(fcFloat3 a, fcFloat3 b, fcFloat3 c);
+FANCIER_STATIC fcFloat3 fcFloat3_nextAfter(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_pow(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_powr(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_remainder(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_rint(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_round(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_rsqrt(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_signum(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_sin(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_sinh(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_smoothStep(fcFloat3 a, fcFloat3 b, fcFloat3 c);
+FANCIER_STATIC fcFloat3 fcFloat3_sqrt(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_step(fcFloat3 a, fcFloat3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_tan(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_tanh(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_tgamma(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_toDegrees(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_toRadians(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_trunc(fcFloat3 a);
+FANCIER_STATIC fcFloat3 fcFloat3_scalb(fcFloat3 a, fcInt3 n);
+FANCIER_STATIC fcFloat3 fcFloat3_ldexp(fcFloat3 a, fcInt3 n);
+FANCIER_STATIC fcFloat3 fcFloat3_pown(fcFloat3 a, fcInt3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_rootn(fcFloat3 a, fcInt3 b);
+FANCIER_STATIC fcFloat3 fcFloat3_smoothStepk(fcFloat3 a, fcFloat3 b, fcFloat c);
+
+FANCIER_STATIC fcFloat4 fcFloat4_create1(fcFloat v);
+FANCIER_STATIC void fcFloat4_set1(fcFloat4* self, fcFloat v);
+FANCIER_STATIC fcFloat4 fcFloat4_create1111(fcFloat a, fcFloat b, fcFloat c, fcFloat d);
+FANCIER_STATIC void fcFloat4_set1111(fcFloat4* self, fcFloat a, fcFloat b, fcFloat c, fcFloat d);
+FANCIER_STATIC fcFloat4 fcFloat4_create112(fcFloat x, fcFloat y, fcFloat2 vec1);
+FANCIER_STATIC void fcFloat4_set112(fcFloat4* self, fcFloat x, fcFloat y, fcFloat2 vec1);
+FANCIER_STATIC fcFloat4 fcFloat4_create121(fcFloat x, fcFloat2 vec1, fcFloat w);
+FANCIER_STATIC void fcFloat4_set121(fcFloat4* self, fcFloat x, fcFloat2 vec1, fcFloat w);
+FANCIER_STATIC fcFloat4 fcFloat4_create13(fcFloat x, fcFloat3 vec1);
+FANCIER_STATIC void fcFloat4_set13(fcFloat4* self, fcFloat x, fcFloat3 vec1);
+FANCIER_STATIC fcFloat4 fcFloat4_create211(fcFloat2 vec1, fcFloat z, fcFloat w);
+FANCIER_STATIC void fcFloat4_set211(fcFloat4* self, fcFloat2 vec1, fcFloat z, fcFloat w);
+FANCIER_STATIC fcFloat4 fcFloat4_create22(fcFloat2 vec1, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat4_set22(fcFloat4* self, fcFloat2 vec1, fcFloat2 vec2);
+FANCIER_STATIC fcFloat4 fcFloat4_create31(fcFloat3 vec1, fcFloat w);
+FANCIER_STATIC void fcFloat4_set31(fcFloat4* self, fcFloat3 vec1, fcFloat w);
+FANCIER_STATIC fcFloat4 fcFloat4_create4(fcFloat4 vec1);
+FANCIER_STATIC void fcFloat4_set4(fcFloat4* self, fcFloat4 vec1);
+
+FANCIER_STATIC fcFloat2 fcFloat4_odd(fcFloat4 a);
+FANCIER_STATIC fcFloat2 fcFloat4_even(fcFloat4 a);
+
+FANCIER_STATIC fcByte4 fcFloat4_convertByte4(fcFloat4 a);
+FANCIER_STATIC fcShort4 fcFloat4_convertShort4(fcFloat4 a);
+FANCIER_STATIC fcInt4 fcFloat4_convertInt4(fcFloat4 a);
+FANCIER_STATIC fcLong4 fcFloat4_convertLong4(fcFloat4 a);
+FANCIER_STATIC fcDouble4 fcFloat4_convertDouble4(fcFloat4 a);
+FANCIER_STATIC fcFloat2 fcFloat4_asFloat2(fcFloat4 a);
+FANCIER_STATIC fcFloat3 fcFloat4_asFloat3(fcFloat4 a);
+
+FANCIER_STATIC fcInt4 fcFloat4_isEqual(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcInt4 fcFloat4_isNotEqual(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcInt4 fcFloat4_isGreater(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcInt4 fcFloat4_isGreaterEqual(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcInt4 fcFloat4_isLess(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcInt4 fcFloat4_isLessEqual(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_select(fcFloat4 a, fcFloat4 b, fcInt4 c);
+FANCIER_STATIC fcInt4 fcFloat4_isFinite(fcFloat4 a);
+FANCIER_STATIC fcInt4 fcFloat4_isInf(fcFloat4 a);
+FANCIER_STATIC fcInt4 fcFloat4_isNaN(fcFloat4 a);
+FANCIER_STATIC fcInt4 fcFloat4_isNormal(fcFloat4 a);
+FANCIER_STATIC fcInt4 fcFloat4_isOrdered(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcInt4 fcFloat4_isUnordered(fcFloat4 a, fcFloat4 b);
+
+FANCIER_STATIC fcInt fcFloat4_any(fcFloat4 a);
+FANCIER_STATIC fcInt fcFloat4_all(fcFloat4 a);
+
+FANCIER_STATIC fcFloat4 fcFloat4_neg(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_add(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_sub(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcDouble4 fcFloat4_muld(fcFloat4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_mulf(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcDouble4 fcFloat4_mulkd(fcFloat4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcFloat4_mulkf(fcFloat4 a, fcFloat k);
+FANCIER_STATIC fcDouble4 fcFloat4_divd(fcFloat4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_divf(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcDouble4 fcFloat4_divkd(fcFloat4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcFloat4_divkf(fcFloat4 a, fcFloat k);
+FANCIER_STATIC fcFloat4 fcFloat4_cross(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat fcFloat4_dot(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcDouble fcFloat4_distance(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcDouble fcFloat4_length(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_normalize(fcFloat4 a);
+
+FANCIER_STATIC fcFloat4 fcFloat4_abs(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_clamp(fcFloat4 a, fcFloat4 b, fcFloat4 c);
+FANCIER_STATIC fcFloat4 fcFloat4_max(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_maxMag(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_min(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_minMag(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_mix(fcFloat4 a, fcFloat4 b, fcFloat4 c);
+FANCIER_STATIC fcFloat4 fcFloat4_clampk(fcFloat4 v, fcFloat min, fcFloat max);
+FANCIER_STATIC fcFloat4 fcFloat4_maxk(fcFloat4 x, fcFloat y);
+FANCIER_STATIC fcFloat4 fcFloat4_mink(fcFloat4 x, fcFloat y);
+FANCIER_STATIC fcFloat4 fcFloat4_mixk(fcFloat4 x, fcFloat4 y, fcFloat a);
+FANCIER_STATIC fcFloat4 fcFloat4_acos(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_acosh(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_asin(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_asinh(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_atan(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_atan2(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_atanh(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_cbrt(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_ceil(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_copySign(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_cos(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_cosh(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_erf(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_erfc(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_exp(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_exp10(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_exp2(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_expm1(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_fdim(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_floor(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_fma(fcFloat4 a, fcFloat4 b, fcFloat4 c);
+FANCIER_STATIC fcFloat4 fcFloat4_fmod(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_fract(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_frexp(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_getExponent(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_hypot(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_lgamma(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_log(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_log10(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_log1p(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_log2(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_logb(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_mad(fcFloat4 a, fcFloat4 b, fcFloat4 c);
+FANCIER_STATIC fcFloat4 fcFloat4_nextAfter(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_pow(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_powr(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_remainder(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_rint(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_round(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_rsqrt(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_signum(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_sin(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_sinh(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_smoothStep(fcFloat4 a, fcFloat4 b, fcFloat4 c);
+FANCIER_STATIC fcFloat4 fcFloat4_sqrt(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_step(fcFloat4 a, fcFloat4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_tan(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_tanh(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_tgamma(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_toDegrees(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_toRadians(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_trunc(fcFloat4 a);
+FANCIER_STATIC fcFloat4 fcFloat4_scalb(fcFloat4 a, fcInt4 n);
+FANCIER_STATIC fcFloat4 fcFloat4_ldexp(fcFloat4 a, fcInt4 n);
+FANCIER_STATIC fcFloat4 fcFloat4_pown(fcFloat4 a, fcInt4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_rootn(fcFloat4 a, fcInt4 b);
+FANCIER_STATIC fcFloat4 fcFloat4_smoothStepk(fcFloat4 a, fcFloat4 b, fcFloat c);
+
+FANCIER_STATIC fcFloat8 fcFloat8_create1(fcFloat v);
+FANCIER_STATIC void fcFloat8_set1(fcFloat8* self, fcFloat v);
+FANCIER_STATIC fcFloat8 fcFloat8_create11111111(fcFloat a, fcFloat b, fcFloat c, fcFloat d, fcFloat e, fcFloat f, fcFloat g, fcFloat h);
+FANCIER_STATIC void fcFloat8_set11111111(fcFloat8* self, fcFloat a, fcFloat b, fcFloat c, fcFloat d, fcFloat e, fcFloat f, fcFloat g, fcFloat h);
+FANCIER_STATIC fcFloat8 fcFloat8_create1111112(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec1);
+FANCIER_STATIC void fcFloat8_set1111112(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec1);
+FANCIER_STATIC fcFloat8 fcFloat8_create1111121(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat2 vec1, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set1111121(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat2 vec1, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create111113(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat3 vec1);
+FANCIER_STATIC void fcFloat8_set111113(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat3 vec1);
+FANCIER_STATIC fcFloat8 fcFloat8_create1111211(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat2 vec1, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set1111211(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat2 vec1, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create111122(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat2 vec1, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set111122(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat2 vec1, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create111131(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat3 vec1, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set111131(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat3 vec1, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create11114(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat4 vec1);
+FANCIER_STATIC void fcFloat8_set11114(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat4 vec1);
+FANCIER_STATIC fcFloat8 fcFloat8_create1112111(fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set1112111(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create111212(fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set111212(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create111221(fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set111221(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create11123(fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set11123(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create111311(fcFloat x, fcFloat y, fcFloat z, fcFloat3 vec1, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set111311(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat3 vec1, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create11132(fcFloat x, fcFloat y, fcFloat z, fcFloat3 vec1, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set11132(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat3 vec1, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create11141(fcFloat x, fcFloat y, fcFloat z, fcFloat4 vec1, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set11141(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat4 vec1, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1121111(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set1121111(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create112112(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set112112(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create112121(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set112121(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create11213(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set11213(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create112211(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set112211(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create11222(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set11222(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create11231(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set11231(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1124(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat4 vec2);
+FANCIER_STATIC void fcFloat8_set1124(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat4 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create113111(fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set113111(fcFloat8* self, fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create11312(fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set11312(fcFloat8* self, fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create11321(fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set11321(fcFloat8* self, fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1133(fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set1133(fcFloat8* self, fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create11411(fcFloat x, fcFloat y, fcFloat4 vec1, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set11411(fcFloat8* self, fcFloat x, fcFloat y, fcFloat4 vec1, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1142(fcFloat x, fcFloat y, fcFloat4 vec1, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set1142(fcFloat8* self, fcFloat x, fcFloat y, fcFloat4 vec1, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create1211111(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set1211111(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create121112(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set121112(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create121121(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set121121(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create12113(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set12113(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create121211(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set121211(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create12122(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set12122(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create12131(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set12131(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1214(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat4 vec2);
+FANCIER_STATIC void fcFloat8_set1214(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat4 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create122111(fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set122111(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create12212(fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set12212(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create12221(fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set12221(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1223(fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat3 vec3);
+FANCIER_STATIC void fcFloat8_set1223(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat3 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create12311(fcFloat x, fcFloat2 vec1, fcFloat3 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set12311(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat3 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1232(fcFloat x, fcFloat2 vec1, fcFloat3 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set1232(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat3 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create1241(fcFloat x, fcFloat2 vec1, fcFloat4 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set1241(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat4 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create131111(fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set131111(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create13112(fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set13112(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create13121(fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set13121(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1313(fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set1313(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create13211(fcFloat x, fcFloat3 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set13211(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1322(fcFloat x, fcFloat3 vec1, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set1322(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create1331(fcFloat x, fcFloat3 vec1, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set1331(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create134(fcFloat x, fcFloat3 vec1, fcFloat4 vec2);
+FANCIER_STATIC void fcFloat8_set134(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat4 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create14111(fcFloat x, fcFloat4 vec1, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set14111(fcFloat8* self, fcFloat x, fcFloat4 vec1, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create1412(fcFloat x, fcFloat4 vec1, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set1412(fcFloat8* self, fcFloat x, fcFloat4 vec1, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create1421(fcFloat x, fcFloat4 vec1, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set1421(fcFloat8* self, fcFloat x, fcFloat4 vec1, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create143(fcFloat x, fcFloat4 vec1, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set143(fcFloat8* self, fcFloat x, fcFloat4 vec1, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create2111111(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set2111111(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create211112(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set211112(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create211121(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set211121(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create21113(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set21113(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create211211(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set211211(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create21122(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set21122(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create21131(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set21131(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create2114(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat4 vec2);
+FANCIER_STATIC void fcFloat8_set2114(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat4 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create212111(fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set212111(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create21212(fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set21212(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create21221(fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set21221(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create2123(fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat3 vec3);
+FANCIER_STATIC void fcFloat8_set2123(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat3 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create21311(fcFloat2 vec1, fcFloat z, fcFloat3 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set21311(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat3 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create2132(fcFloat2 vec1, fcFloat z, fcFloat3 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set2132(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat3 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create2141(fcFloat2 vec1, fcFloat z, fcFloat4 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set2141(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat4 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create221111(fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set221111(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create22112(fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set22112(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create22121(fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set22121(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create2213(fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat3 vec3);
+FANCIER_STATIC void fcFloat8_set2213(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat3 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create22211(fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set22211(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create2222(fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat2 vec4);
+FANCIER_STATIC void fcFloat8_set2222(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat2 vec4);
+FANCIER_STATIC fcFloat8 fcFloat8_create2231(fcFloat2 vec1, fcFloat2 vec2, fcFloat3 vec3, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set2231(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat3 vec3, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create224(fcFloat2 vec1, fcFloat2 vec2, fcFloat4 vec3);
+FANCIER_STATIC void fcFloat8_set224(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat4 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create23111(fcFloat2 vec1, fcFloat3 vec2, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set23111(fcFloat8* self, fcFloat2 vec1, fcFloat3 vec2, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create2312(fcFloat2 vec1, fcFloat3 vec2, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set2312(fcFloat8* self, fcFloat2 vec1, fcFloat3 vec2, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create2321(fcFloat2 vec1, fcFloat3 vec2, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set2321(fcFloat8* self, fcFloat2 vec1, fcFloat3 vec2, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create233(fcFloat2 vec1, fcFloat3 vec2, fcFloat3 vec3);
+FANCIER_STATIC void fcFloat8_set233(fcFloat8* self, fcFloat2 vec1, fcFloat3 vec2, fcFloat3 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create2411(fcFloat2 vec1, fcFloat4 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set2411(fcFloat8* self, fcFloat2 vec1, fcFloat4 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create242(fcFloat2 vec1, fcFloat4 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set242(fcFloat8* self, fcFloat2 vec1, fcFloat4 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create311111(fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set311111(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create31112(fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set31112(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create31121(fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set31121(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create3113(fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set3113(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create31211(fcFloat3 vec1, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set31211(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create3122(fcFloat3 vec1, fcFloat w, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set3122(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create3131(fcFloat3 vec1, fcFloat w, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set3131(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create314(fcFloat3 vec1, fcFloat w, fcFloat4 vec2);
+FANCIER_STATIC void fcFloat8_set314(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat4 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create32111(fcFloat3 vec1, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set32111(fcFloat8* self, fcFloat3 vec1, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create3212(fcFloat3 vec1, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set3212(fcFloat8* self, fcFloat3 vec1, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create3221(fcFloat3 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set3221(fcFloat8* self, fcFloat3 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create323(fcFloat3 vec1, fcFloat2 vec2, fcFloat3 vec3);
+FANCIER_STATIC void fcFloat8_set323(fcFloat8* self, fcFloat3 vec1, fcFloat2 vec2, fcFloat3 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create3311(fcFloat3 vec1, fcFloat3 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set3311(fcFloat8* self, fcFloat3 vec1, fcFloat3 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create332(fcFloat3 vec1, fcFloat3 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set332(fcFloat8* self, fcFloat3 vec1, fcFloat3 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create341(fcFloat3 vec1, fcFloat4 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set341(fcFloat8* self, fcFloat3 vec1, fcFloat4 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create41111(fcFloat4 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set41111(fcFloat8* self, fcFloat4 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create4112(fcFloat4 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC void fcFloat8_set4112(fcFloat8* self, fcFloat4 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create4121(fcFloat4 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set4121(fcFloat8* self, fcFloat4 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create413(fcFloat4 vec1, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC void fcFloat8_set413(fcFloat8* self, fcFloat4 vec1, fcFloat s4, fcFloat3 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create4211(fcFloat4 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set4211(fcFloat8* self, fcFloat4 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create422(fcFloat4 vec1, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC void fcFloat8_set422(fcFloat8* self, fcFloat4 vec1, fcFloat2 vec2, fcFloat2 vec3);
+FANCIER_STATIC fcFloat8 fcFloat8_create431(fcFloat4 vec1, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC void fcFloat8_set431(fcFloat8* self, fcFloat4 vec1, fcFloat3 vec2, fcFloat s7);
+FANCIER_STATIC fcFloat8 fcFloat8_create44(fcFloat4 vec1, fcFloat4 vec2);
+FANCIER_STATIC void fcFloat8_set44(fcFloat8* self, fcFloat4 vec1, fcFloat4 vec2);
+FANCIER_STATIC fcFloat8 fcFloat8_create8(fcFloat8 vec1);
+FANCIER_STATIC void fcFloat8_set8(fcFloat8* self, fcFloat8 vec1);
+
+FANCIER_STATIC fcFloat4 fcFloat8_odd(fcFloat8 a);
+FANCIER_STATIC fcFloat4 fcFloat8_even(fcFloat8 a);
+
+FANCIER_STATIC fcByte8 fcFloat8_convertByte8(fcFloat8 a);
+FANCIER_STATIC fcShort8 fcFloat8_convertShort8(fcFloat8 a);
+FANCIER_STATIC fcInt8 fcFloat8_convertInt8(fcFloat8 a);
+FANCIER_STATIC fcLong8 fcFloat8_convertLong8(fcFloat8 a);
+FANCIER_STATIC fcDouble8 fcFloat8_convertDouble8(fcFloat8 a);
+FANCIER_STATIC fcFloat2 fcFloat8_asFloat2(fcFloat8 a);
+FANCIER_STATIC fcFloat3 fcFloat8_asFloat3(fcFloat8 a);
+FANCIER_STATIC fcFloat4 fcFloat8_asFloat4(fcFloat8 a);
+
+FANCIER_STATIC fcInt8 fcFloat8_isEqual(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcInt8 fcFloat8_isNotEqual(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcInt8 fcFloat8_isGreater(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcInt8 fcFloat8_isGreaterEqual(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcInt8 fcFloat8_isLess(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcInt8 fcFloat8_isLessEqual(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_select(fcFloat8 a, fcFloat8 b, fcInt8 c);
+FANCIER_STATIC fcInt8 fcFloat8_isFinite(fcFloat8 a);
+FANCIER_STATIC fcInt8 fcFloat8_isInf(fcFloat8 a);
+FANCIER_STATIC fcInt8 fcFloat8_isNaN(fcFloat8 a);
+FANCIER_STATIC fcInt8 fcFloat8_isNormal(fcFloat8 a);
+FANCIER_STATIC fcInt8 fcFloat8_isOrdered(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcInt8 fcFloat8_isUnordered(fcFloat8 a, fcFloat8 b);
+
+FANCIER_STATIC fcInt fcFloat8_any(fcFloat8 a);
+FANCIER_STATIC fcInt fcFloat8_all(fcFloat8 a);
+
+FANCIER_STATIC fcFloat8 fcFloat8_neg(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_add(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_sub(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcDouble8 fcFloat8_muld(fcFloat8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_mulf(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcDouble8 fcFloat8_mulkd(fcFloat8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcFloat8_mulkf(fcFloat8 a, fcFloat k);
+FANCIER_STATIC fcDouble8 fcFloat8_divd(fcFloat8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_divf(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcDouble8 fcFloat8_divkd(fcFloat8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcFloat8_divkf(fcFloat8 a, fcFloat k);
+FANCIER_STATIC fcFloat fcFloat8_dot(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcDouble fcFloat8_distance(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcDouble fcFloat8_length(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_normalize(fcFloat8 a);
+
+FANCIER_STATIC fcFloat8 fcFloat8_abs(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_clamp(fcFloat8 a, fcFloat8 b, fcFloat8 c);
+FANCIER_STATIC fcFloat8 fcFloat8_max(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_maxMag(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_min(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_minMag(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_mix(fcFloat8 a, fcFloat8 b, fcFloat8 c);
+FANCIER_STATIC fcFloat8 fcFloat8_clampk(fcFloat8 v, fcFloat min, fcFloat max);
+FANCIER_STATIC fcFloat8 fcFloat8_maxk(fcFloat8 x, fcFloat y);
+FANCIER_STATIC fcFloat8 fcFloat8_mink(fcFloat8 x, fcFloat y);
+FANCIER_STATIC fcFloat8 fcFloat8_mixk(fcFloat8 x, fcFloat8 y, fcFloat a);
+FANCIER_STATIC fcFloat8 fcFloat8_acos(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_acosh(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_asin(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_asinh(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_atan(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_atan2(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_atanh(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_cbrt(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_ceil(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_copySign(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_cos(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_cosh(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_erf(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_erfc(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_exp(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_exp10(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_exp2(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_expm1(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_fdim(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_floor(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_fma(fcFloat8 a, fcFloat8 b, fcFloat8 c);
+FANCIER_STATIC fcFloat8 fcFloat8_fmod(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_fract(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_frexp(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_getExponent(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_hypot(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_lgamma(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_log(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_log10(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_log1p(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_log2(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_logb(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_mad(fcFloat8 a, fcFloat8 b, fcFloat8 c);
+FANCIER_STATIC fcFloat8 fcFloat8_nextAfter(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_pow(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_powr(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_remainder(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_rint(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_round(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_rsqrt(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_signum(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_sin(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_sinh(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_smoothStep(fcFloat8 a, fcFloat8 b, fcFloat8 c);
+FANCIER_STATIC fcFloat8 fcFloat8_sqrt(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_step(fcFloat8 a, fcFloat8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_tan(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_tanh(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_tgamma(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_toDegrees(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_toRadians(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_trunc(fcFloat8 a);
+FANCIER_STATIC fcFloat8 fcFloat8_scalb(fcFloat8 a, fcInt8 n);
+FANCIER_STATIC fcFloat8 fcFloat8_ldexp(fcFloat8 a, fcInt8 n);
+FANCIER_STATIC fcFloat8 fcFloat8_pown(fcFloat8 a, fcInt8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_rootn(fcFloat8 a, fcInt8 b);
+FANCIER_STATIC fcFloat8 fcFloat8_smoothStepk(fcFloat8 a, fcFloat8 b, fcFloat c);
+
+FANCIER_STATIC fcDouble2 fcDouble2_create1(fcDouble v);
+FANCIER_STATIC void fcDouble2_set1(fcDouble2* self, fcDouble v);
+FANCIER_STATIC fcDouble2 fcDouble2_create11(fcDouble a, fcDouble b);
+FANCIER_STATIC void fcDouble2_set11(fcDouble2* self, fcDouble a, fcDouble b);
+FANCIER_STATIC fcDouble2 fcDouble2_create2(fcDouble2 vec1);
+FANCIER_STATIC void fcDouble2_set2(fcDouble2* self, fcDouble2 vec1);
+
+FANCIER_STATIC fcByte2 fcDouble2_convertByte2(fcDouble2 a);
+FANCIER_STATIC fcShort2 fcDouble2_convertShort2(fcDouble2 a);
+FANCIER_STATIC fcInt2 fcDouble2_convertInt2(fcDouble2 a);
+FANCIER_STATIC fcLong2 fcDouble2_convertLong2(fcDouble2 a);
+FANCIER_STATIC fcFloat2 fcDouble2_convertFloat2(fcDouble2 a);
+
+FANCIER_STATIC fcInt2 fcDouble2_isEqual(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcInt2 fcDouble2_isNotEqual(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcInt2 fcDouble2_isGreater(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcInt2 fcDouble2_isGreaterEqual(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcInt2 fcDouble2_isLess(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcInt2 fcDouble2_isLessEqual(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_select(fcDouble2 a, fcDouble2 b, fcInt2 c);
+FANCIER_STATIC fcInt2 fcDouble2_isFinite(fcDouble2 a);
+FANCIER_STATIC fcInt2 fcDouble2_isInf(fcDouble2 a);
+FANCIER_STATIC fcInt2 fcDouble2_isNaN(fcDouble2 a);
+FANCIER_STATIC fcInt2 fcDouble2_isNormal(fcDouble2 a);
+FANCIER_STATIC fcInt2 fcDouble2_isOrdered(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcInt2 fcDouble2_isUnordered(fcDouble2 a, fcDouble2 b);
+
+FANCIER_STATIC fcInt fcDouble2_any(fcDouble2 a);
+FANCIER_STATIC fcInt fcDouble2_all(fcDouble2 a);
+
+FANCIER_STATIC fcDouble2 fcDouble2_neg(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_add(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_sub(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_muld(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcDouble2_mulf(fcDouble2 a, fcFloat2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_mulkd(fcDouble2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcDouble2_mulkf(fcDouble2 a, fcFloat k);
+FANCIER_STATIC fcDouble2 fcDouble2_divd(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcFloat2 fcDouble2_divf(fcDouble2 a, fcFloat2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_divkd(fcDouble2 a, fcDouble k);
+FANCIER_STATIC fcFloat2 fcDouble2_divkf(fcDouble2 a, fcFloat k);
+FANCIER_STATIC fcDouble fcDouble2_dot(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble fcDouble2_distance(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble fcDouble2_length(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_normalize(fcDouble2 a);
+
+FANCIER_STATIC fcDouble2 fcDouble2_abs(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_clamp(fcDouble2 a, fcDouble2 b, fcDouble2 c);
+FANCIER_STATIC fcDouble2 fcDouble2_max(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_maxMag(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_min(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_minMag(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_mix(fcDouble2 a, fcDouble2 b, fcDouble2 c);
+FANCIER_STATIC fcDouble2 fcDouble2_clampk(fcDouble2 v, fcDouble min, fcDouble max);
+FANCIER_STATIC fcDouble2 fcDouble2_maxk(fcDouble2 x, fcDouble y);
+FANCIER_STATIC fcDouble2 fcDouble2_mink(fcDouble2 x, fcDouble y);
+FANCIER_STATIC fcDouble2 fcDouble2_mixk(fcDouble2 x, fcDouble2 y, fcDouble a);
+FANCIER_STATIC fcDouble2 fcDouble2_acos(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_acosh(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_asin(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_asinh(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_atan(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_atan2(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_atanh(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_cbrt(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_ceil(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_copySign(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_cos(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_cosh(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_erf(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_erfc(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_exp(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_exp10(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_exp2(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_expm1(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_fdim(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_floor(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_fma(fcDouble2 a, fcDouble2 b, fcDouble2 c);
+FANCIER_STATIC fcDouble2 fcDouble2_fmod(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_fract(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_frexp(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_getExponent(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_hypot(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_lgamma(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_log(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_log10(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_log1p(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_log2(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_logb(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_mad(fcDouble2 a, fcDouble2 b, fcDouble2 c);
+FANCIER_STATIC fcDouble2 fcDouble2_nextAfter(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_pow(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_powr(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_remainder(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_rint(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_round(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_rsqrt(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_signum(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_sin(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_sinh(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_smoothStep(fcDouble2 a, fcDouble2 b, fcDouble2 c);
+FANCIER_STATIC fcDouble2 fcDouble2_sqrt(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_step(fcDouble2 a, fcDouble2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_tan(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_tanh(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_tgamma(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_toDegrees(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_toRadians(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_trunc(fcDouble2 a);
+FANCIER_STATIC fcDouble2 fcDouble2_scalb(fcDouble2 a, fcInt2 n);
+FANCIER_STATIC fcDouble2 fcDouble2_ldexp(fcDouble2 a, fcInt2 n);
+FANCIER_STATIC fcDouble2 fcDouble2_pown(fcDouble2 a, fcInt2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_rootn(fcDouble2 a, fcInt2 b);
+FANCIER_STATIC fcDouble2 fcDouble2_smoothStepk(fcDouble2 a, fcDouble2 b, fcDouble c);
+
+FANCIER_STATIC fcDouble3 fcDouble3_create1(fcDouble v);
+FANCIER_STATIC void fcDouble3_set1(fcDouble3* self, fcDouble v);
+FANCIER_STATIC fcDouble3 fcDouble3_create111(fcDouble a, fcDouble b, fcDouble c);
+FANCIER_STATIC void fcDouble3_set111(fcDouble3* self, fcDouble a, fcDouble b, fcDouble c);
+FANCIER_STATIC fcDouble3 fcDouble3_create12(fcDouble x, fcDouble2 vec1);
+FANCIER_STATIC void fcDouble3_set12(fcDouble3* self, fcDouble x, fcDouble2 vec1);
+FANCIER_STATIC fcDouble3 fcDouble3_create21(fcDouble2 vec1, fcDouble z);
+FANCIER_STATIC void fcDouble3_set21(fcDouble3* self, fcDouble2 vec1, fcDouble z);
+FANCIER_STATIC fcDouble3 fcDouble3_create3(fcDouble3 vec1);
+FANCIER_STATIC void fcDouble3_set3(fcDouble3* self, fcDouble3 vec1);
+
+FANCIER_STATIC fcByte3 fcDouble3_convertByte3(fcDouble3 a);
+FANCIER_STATIC fcShort3 fcDouble3_convertShort3(fcDouble3 a);
+FANCIER_STATIC fcInt3 fcDouble3_convertInt3(fcDouble3 a);
+FANCIER_STATIC fcLong3 fcDouble3_convertLong3(fcDouble3 a);
+FANCIER_STATIC fcFloat3 fcDouble3_convertFloat3(fcDouble3 a);
+FANCIER_STATIC fcDouble2 fcDouble3_asDouble2(fcDouble3 a);
+
+FANCIER_STATIC fcInt3 fcDouble3_isEqual(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcInt3 fcDouble3_isNotEqual(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcInt3 fcDouble3_isGreater(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcInt3 fcDouble3_isGreaterEqual(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcInt3 fcDouble3_isLess(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcInt3 fcDouble3_isLessEqual(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_select(fcDouble3 a, fcDouble3 b, fcInt3 c);
+FANCIER_STATIC fcInt3 fcDouble3_isFinite(fcDouble3 a);
+FANCIER_STATIC fcInt3 fcDouble3_isInf(fcDouble3 a);
+FANCIER_STATIC fcInt3 fcDouble3_isNaN(fcDouble3 a);
+FANCIER_STATIC fcInt3 fcDouble3_isNormal(fcDouble3 a);
+FANCIER_STATIC fcInt3 fcDouble3_isOrdered(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcInt3 fcDouble3_isUnordered(fcDouble3 a, fcDouble3 b);
+
+FANCIER_STATIC fcInt fcDouble3_any(fcDouble3 a);
+FANCIER_STATIC fcInt fcDouble3_all(fcDouble3 a);
+
+FANCIER_STATIC fcDouble3 fcDouble3_neg(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_add(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_sub(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_muld(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcDouble3_mulf(fcDouble3 a, fcFloat3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_mulkd(fcDouble3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcDouble3_mulkf(fcDouble3 a, fcFloat k);
+FANCIER_STATIC fcDouble3 fcDouble3_divd(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcFloat3 fcDouble3_divf(fcDouble3 a, fcFloat3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_divkd(fcDouble3 a, fcDouble k);
+FANCIER_STATIC fcFloat3 fcDouble3_divkf(fcDouble3 a, fcFloat k);
+FANCIER_STATIC fcDouble3 fcDouble3_cross(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble fcDouble3_dot(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble fcDouble3_distance(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble fcDouble3_length(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_normalize(fcDouble3 a);
+
+FANCIER_STATIC fcDouble3 fcDouble3_abs(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_clamp(fcDouble3 a, fcDouble3 b, fcDouble3 c);
+FANCIER_STATIC fcDouble3 fcDouble3_max(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_maxMag(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_min(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_minMag(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_mix(fcDouble3 a, fcDouble3 b, fcDouble3 c);
+FANCIER_STATIC fcDouble3 fcDouble3_clampk(fcDouble3 v, fcDouble min, fcDouble max);
+FANCIER_STATIC fcDouble3 fcDouble3_maxk(fcDouble3 x, fcDouble y);
+FANCIER_STATIC fcDouble3 fcDouble3_mink(fcDouble3 x, fcDouble y);
+FANCIER_STATIC fcDouble3 fcDouble3_mixk(fcDouble3 x, fcDouble3 y, fcDouble a);
+FANCIER_STATIC fcDouble3 fcDouble3_acos(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_acosh(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_asin(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_asinh(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_atan(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_atan2(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_atanh(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_cbrt(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_ceil(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_copySign(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_cos(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_cosh(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_erf(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_erfc(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_exp(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_exp10(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_exp2(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_expm1(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_fdim(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_floor(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_fma(fcDouble3 a, fcDouble3 b, fcDouble3 c);
+FANCIER_STATIC fcDouble3 fcDouble3_fmod(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_fract(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_frexp(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_getExponent(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_hypot(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_lgamma(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_log(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_log10(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_log1p(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_log2(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_logb(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_mad(fcDouble3 a, fcDouble3 b, fcDouble3 c);
+FANCIER_STATIC fcDouble3 fcDouble3_nextAfter(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_pow(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_powr(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_remainder(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_rint(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_round(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_rsqrt(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_signum(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_sin(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_sinh(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_smoothStep(fcDouble3 a, fcDouble3 b, fcDouble3 c);
+FANCIER_STATIC fcDouble3 fcDouble3_sqrt(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_step(fcDouble3 a, fcDouble3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_tan(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_tanh(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_tgamma(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_toDegrees(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_toRadians(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_trunc(fcDouble3 a);
+FANCIER_STATIC fcDouble3 fcDouble3_scalb(fcDouble3 a, fcInt3 n);
+FANCIER_STATIC fcDouble3 fcDouble3_ldexp(fcDouble3 a, fcInt3 n);
+FANCIER_STATIC fcDouble3 fcDouble3_pown(fcDouble3 a, fcInt3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_rootn(fcDouble3 a, fcInt3 b);
+FANCIER_STATIC fcDouble3 fcDouble3_smoothStepk(fcDouble3 a, fcDouble3 b, fcDouble c);
+
+FANCIER_STATIC fcDouble4 fcDouble4_create1(fcDouble v);
+FANCIER_STATIC void fcDouble4_set1(fcDouble4* self, fcDouble v);
+FANCIER_STATIC fcDouble4 fcDouble4_create1111(fcDouble a, fcDouble b, fcDouble c, fcDouble d);
+FANCIER_STATIC void fcDouble4_set1111(fcDouble4* self, fcDouble a, fcDouble b, fcDouble c, fcDouble d);
+FANCIER_STATIC fcDouble4 fcDouble4_create112(fcDouble x, fcDouble y, fcDouble2 vec1);
+FANCIER_STATIC void fcDouble4_set112(fcDouble4* self, fcDouble x, fcDouble y, fcDouble2 vec1);
+FANCIER_STATIC fcDouble4 fcDouble4_create121(fcDouble x, fcDouble2 vec1, fcDouble w);
+FANCIER_STATIC void fcDouble4_set121(fcDouble4* self, fcDouble x, fcDouble2 vec1, fcDouble w);
+FANCIER_STATIC fcDouble4 fcDouble4_create13(fcDouble x, fcDouble3 vec1);
+FANCIER_STATIC void fcDouble4_set13(fcDouble4* self, fcDouble x, fcDouble3 vec1);
+FANCIER_STATIC fcDouble4 fcDouble4_create211(fcDouble2 vec1, fcDouble z, fcDouble w);
+FANCIER_STATIC void fcDouble4_set211(fcDouble4* self, fcDouble2 vec1, fcDouble z, fcDouble w);
+FANCIER_STATIC fcDouble4 fcDouble4_create22(fcDouble2 vec1, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble4_set22(fcDouble4* self, fcDouble2 vec1, fcDouble2 vec2);
+FANCIER_STATIC fcDouble4 fcDouble4_create31(fcDouble3 vec1, fcDouble w);
+FANCIER_STATIC void fcDouble4_set31(fcDouble4* self, fcDouble3 vec1, fcDouble w);
+FANCIER_STATIC fcDouble4 fcDouble4_create4(fcDouble4 vec1);
+FANCIER_STATIC void fcDouble4_set4(fcDouble4* self, fcDouble4 vec1);
+
+FANCIER_STATIC fcDouble2 fcDouble4_odd(fcDouble4 a);
+FANCIER_STATIC fcDouble2 fcDouble4_even(fcDouble4 a);
+
+FANCIER_STATIC fcByte4 fcDouble4_convertByte4(fcDouble4 a);
+FANCIER_STATIC fcShort4 fcDouble4_convertShort4(fcDouble4 a);
+FANCIER_STATIC fcInt4 fcDouble4_convertInt4(fcDouble4 a);
+FANCIER_STATIC fcLong4 fcDouble4_convertLong4(fcDouble4 a);
+FANCIER_STATIC fcFloat4 fcDouble4_convertFloat4(fcDouble4 a);
+FANCIER_STATIC fcDouble2 fcDouble4_asDouble2(fcDouble4 a);
+FANCIER_STATIC fcDouble3 fcDouble4_asDouble3(fcDouble4 a);
+
+FANCIER_STATIC fcInt4 fcDouble4_isEqual(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcInt4 fcDouble4_isNotEqual(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcInt4 fcDouble4_isGreater(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcInt4 fcDouble4_isGreaterEqual(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcInt4 fcDouble4_isLess(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcInt4 fcDouble4_isLessEqual(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_select(fcDouble4 a, fcDouble4 b, fcInt4 c);
+FANCIER_STATIC fcInt4 fcDouble4_isFinite(fcDouble4 a);
+FANCIER_STATIC fcInt4 fcDouble4_isInf(fcDouble4 a);
+FANCIER_STATIC fcInt4 fcDouble4_isNaN(fcDouble4 a);
+FANCIER_STATIC fcInt4 fcDouble4_isNormal(fcDouble4 a);
+FANCIER_STATIC fcInt4 fcDouble4_isOrdered(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcInt4 fcDouble4_isUnordered(fcDouble4 a, fcDouble4 b);
+
+FANCIER_STATIC fcInt fcDouble4_any(fcDouble4 a);
+FANCIER_STATIC fcInt fcDouble4_all(fcDouble4 a);
+
+FANCIER_STATIC fcDouble4 fcDouble4_neg(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_add(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_sub(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_muld(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcDouble4_mulf(fcDouble4 a, fcFloat4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_mulkd(fcDouble4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcDouble4_mulkf(fcDouble4 a, fcFloat k);
+FANCIER_STATIC fcDouble4 fcDouble4_divd(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcFloat4 fcDouble4_divf(fcDouble4 a, fcFloat4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_divkd(fcDouble4 a, fcDouble k);
+FANCIER_STATIC fcFloat4 fcDouble4_divkf(fcDouble4 a, fcFloat k);
+FANCIER_STATIC fcDouble4 fcDouble4_cross(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble fcDouble4_dot(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble fcDouble4_distance(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble fcDouble4_length(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_normalize(fcDouble4 a);
+
+FANCIER_STATIC fcDouble4 fcDouble4_abs(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_clamp(fcDouble4 a, fcDouble4 b, fcDouble4 c);
+FANCIER_STATIC fcDouble4 fcDouble4_max(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_maxMag(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_min(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_minMag(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_mix(fcDouble4 a, fcDouble4 b, fcDouble4 c);
+FANCIER_STATIC fcDouble4 fcDouble4_clampk(fcDouble4 v, fcDouble min, fcDouble max);
+FANCIER_STATIC fcDouble4 fcDouble4_maxk(fcDouble4 x, fcDouble y);
+FANCIER_STATIC fcDouble4 fcDouble4_mink(fcDouble4 x, fcDouble y);
+FANCIER_STATIC fcDouble4 fcDouble4_mixk(fcDouble4 x, fcDouble4 y, fcDouble a);
+FANCIER_STATIC fcDouble4 fcDouble4_acos(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_acosh(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_asin(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_asinh(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_atan(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_atan2(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_atanh(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_cbrt(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_ceil(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_copySign(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_cos(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_cosh(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_erf(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_erfc(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_exp(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_exp10(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_exp2(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_expm1(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_fdim(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_floor(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_fma(fcDouble4 a, fcDouble4 b, fcDouble4 c);
+FANCIER_STATIC fcDouble4 fcDouble4_fmod(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_fract(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_frexp(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_getExponent(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_hypot(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_lgamma(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_log(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_log10(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_log1p(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_log2(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_logb(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_mad(fcDouble4 a, fcDouble4 b, fcDouble4 c);
+FANCIER_STATIC fcDouble4 fcDouble4_nextAfter(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_pow(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_powr(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_remainder(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_rint(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_round(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_rsqrt(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_signum(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_sin(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_sinh(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_smoothStep(fcDouble4 a, fcDouble4 b, fcDouble4 c);
+FANCIER_STATIC fcDouble4 fcDouble4_sqrt(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_step(fcDouble4 a, fcDouble4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_tan(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_tanh(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_tgamma(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_toDegrees(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_toRadians(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_trunc(fcDouble4 a);
+FANCIER_STATIC fcDouble4 fcDouble4_scalb(fcDouble4 a, fcInt4 n);
+FANCIER_STATIC fcDouble4 fcDouble4_ldexp(fcDouble4 a, fcInt4 n);
+FANCIER_STATIC fcDouble4 fcDouble4_pown(fcDouble4 a, fcInt4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_rootn(fcDouble4 a, fcInt4 b);
+FANCIER_STATIC fcDouble4 fcDouble4_smoothStepk(fcDouble4 a, fcDouble4 b, fcDouble c);
+
+FANCIER_STATIC fcDouble8 fcDouble8_create1(fcDouble v);
+FANCIER_STATIC void fcDouble8_set1(fcDouble8* self, fcDouble v);
+FANCIER_STATIC fcDouble8 fcDouble8_create11111111(fcDouble a, fcDouble b, fcDouble c, fcDouble d, fcDouble e, fcDouble f, fcDouble g, fcDouble h);
+FANCIER_STATIC void fcDouble8_set11111111(fcDouble8* self, fcDouble a, fcDouble b, fcDouble c, fcDouble d, fcDouble e, fcDouble f, fcDouble g, fcDouble h);
+FANCIER_STATIC fcDouble8 fcDouble8_create1111112(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec1);
+FANCIER_STATIC void fcDouble8_set1111112(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec1);
+FANCIER_STATIC fcDouble8 fcDouble8_create1111121(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble2 vec1, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set1111121(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble2 vec1, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create111113(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble3 vec1);
+FANCIER_STATIC void fcDouble8_set111113(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble3 vec1);
+FANCIER_STATIC fcDouble8 fcDouble8_create1111211(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble2 vec1, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set1111211(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble2 vec1, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create111122(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble2 vec1, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set111122(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble2 vec1, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create111131(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble3 vec1, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set111131(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble3 vec1, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create11114(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble4 vec1);
+FANCIER_STATIC void fcDouble8_set11114(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble4 vec1);
+FANCIER_STATIC fcDouble8 fcDouble8_create1112111(fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set1112111(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create111212(fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set111212(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create111221(fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set111221(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create11123(fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set11123(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create111311(fcDouble x, fcDouble y, fcDouble z, fcDouble3 vec1, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set111311(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble3 vec1, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create11132(fcDouble x, fcDouble y, fcDouble z, fcDouble3 vec1, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set11132(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble3 vec1, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create11141(fcDouble x, fcDouble y, fcDouble z, fcDouble4 vec1, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set11141(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble4 vec1, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1121111(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set1121111(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create112112(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set112112(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create112121(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set112121(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create11213(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set11213(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create112211(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set112211(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create11222(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set11222(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create11231(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set11231(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1124(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble4 vec2);
+FANCIER_STATIC void fcDouble8_set1124(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble4 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create113111(fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set113111(fcDouble8* self, fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create11312(fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set11312(fcDouble8* self, fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create11321(fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set11321(fcDouble8* self, fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1133(fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set1133(fcDouble8* self, fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create11411(fcDouble x, fcDouble y, fcDouble4 vec1, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set11411(fcDouble8* self, fcDouble x, fcDouble y, fcDouble4 vec1, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1142(fcDouble x, fcDouble y, fcDouble4 vec1, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set1142(fcDouble8* self, fcDouble x, fcDouble y, fcDouble4 vec1, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create1211111(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set1211111(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create121112(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set121112(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create121121(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set121121(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create12113(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set12113(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create121211(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set121211(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create12122(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set12122(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create12131(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set12131(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1214(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble4 vec2);
+FANCIER_STATIC void fcDouble8_set1214(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble4 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create122111(fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set122111(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create12212(fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set12212(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create12221(fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set12221(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1223(fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble3 vec3);
+FANCIER_STATIC void fcDouble8_set1223(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble3 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create12311(fcDouble x, fcDouble2 vec1, fcDouble3 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set12311(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble3 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1232(fcDouble x, fcDouble2 vec1, fcDouble3 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set1232(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble3 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create1241(fcDouble x, fcDouble2 vec1, fcDouble4 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set1241(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble4 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create131111(fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set131111(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create13112(fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set13112(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create13121(fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set13121(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1313(fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set1313(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create13211(fcDouble x, fcDouble3 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set13211(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1322(fcDouble x, fcDouble3 vec1, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set1322(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create1331(fcDouble x, fcDouble3 vec1, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set1331(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create134(fcDouble x, fcDouble3 vec1, fcDouble4 vec2);
+FANCIER_STATIC void fcDouble8_set134(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble4 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create14111(fcDouble x, fcDouble4 vec1, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set14111(fcDouble8* self, fcDouble x, fcDouble4 vec1, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create1412(fcDouble x, fcDouble4 vec1, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set1412(fcDouble8* self, fcDouble x, fcDouble4 vec1, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create1421(fcDouble x, fcDouble4 vec1, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set1421(fcDouble8* self, fcDouble x, fcDouble4 vec1, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create143(fcDouble x, fcDouble4 vec1, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set143(fcDouble8* self, fcDouble x, fcDouble4 vec1, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create2111111(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set2111111(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create211112(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set211112(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create211121(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set211121(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create21113(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set21113(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create211211(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set211211(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create21122(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set21122(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create21131(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set21131(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create2114(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble4 vec2);
+FANCIER_STATIC void fcDouble8_set2114(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble4 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create212111(fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set212111(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create21212(fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set21212(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create21221(fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set21221(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create2123(fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble3 vec3);
+FANCIER_STATIC void fcDouble8_set2123(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble3 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create21311(fcDouble2 vec1, fcDouble z, fcDouble3 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set21311(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble3 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create2132(fcDouble2 vec1, fcDouble z, fcDouble3 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set2132(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble3 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create2141(fcDouble2 vec1, fcDouble z, fcDouble4 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set2141(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble4 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create221111(fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set221111(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create22112(fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set22112(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create22121(fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set22121(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create2213(fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble3 vec3);
+FANCIER_STATIC void fcDouble8_set2213(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble3 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create22211(fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set22211(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create2222(fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble2 vec4);
+FANCIER_STATIC void fcDouble8_set2222(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble2 vec4);
+FANCIER_STATIC fcDouble8 fcDouble8_create2231(fcDouble2 vec1, fcDouble2 vec2, fcDouble3 vec3, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set2231(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble3 vec3, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create224(fcDouble2 vec1, fcDouble2 vec2, fcDouble4 vec3);
+FANCIER_STATIC void fcDouble8_set224(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble4 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create23111(fcDouble2 vec1, fcDouble3 vec2, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set23111(fcDouble8* self, fcDouble2 vec1, fcDouble3 vec2, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create2312(fcDouble2 vec1, fcDouble3 vec2, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set2312(fcDouble8* self, fcDouble2 vec1, fcDouble3 vec2, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create2321(fcDouble2 vec1, fcDouble3 vec2, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set2321(fcDouble8* self, fcDouble2 vec1, fcDouble3 vec2, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create233(fcDouble2 vec1, fcDouble3 vec2, fcDouble3 vec3);
+FANCIER_STATIC void fcDouble8_set233(fcDouble8* self, fcDouble2 vec1, fcDouble3 vec2, fcDouble3 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create2411(fcDouble2 vec1, fcDouble4 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set2411(fcDouble8* self, fcDouble2 vec1, fcDouble4 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create242(fcDouble2 vec1, fcDouble4 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set242(fcDouble8* self, fcDouble2 vec1, fcDouble4 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create311111(fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set311111(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create31112(fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set31112(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create31121(fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set31121(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create3113(fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set3113(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create31211(fcDouble3 vec1, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set31211(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create3122(fcDouble3 vec1, fcDouble w, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set3122(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create3131(fcDouble3 vec1, fcDouble w, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set3131(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create314(fcDouble3 vec1, fcDouble w, fcDouble4 vec2);
+FANCIER_STATIC void fcDouble8_set314(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble4 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create32111(fcDouble3 vec1, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set32111(fcDouble8* self, fcDouble3 vec1, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create3212(fcDouble3 vec1, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set3212(fcDouble8* self, fcDouble3 vec1, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create3221(fcDouble3 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set3221(fcDouble8* self, fcDouble3 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create323(fcDouble3 vec1, fcDouble2 vec2, fcDouble3 vec3);
+FANCIER_STATIC void fcDouble8_set323(fcDouble8* self, fcDouble3 vec1, fcDouble2 vec2, fcDouble3 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create3311(fcDouble3 vec1, fcDouble3 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set3311(fcDouble8* self, fcDouble3 vec1, fcDouble3 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create332(fcDouble3 vec1, fcDouble3 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set332(fcDouble8* self, fcDouble3 vec1, fcDouble3 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create341(fcDouble3 vec1, fcDouble4 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set341(fcDouble8* self, fcDouble3 vec1, fcDouble4 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create41111(fcDouble4 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set41111(fcDouble8* self, fcDouble4 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create4112(fcDouble4 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC void fcDouble8_set4112(fcDouble8* self, fcDouble4 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create4121(fcDouble4 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set4121(fcDouble8* self, fcDouble4 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create413(fcDouble4 vec1, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC void fcDouble8_set413(fcDouble8* self, fcDouble4 vec1, fcDouble s4, fcDouble3 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create4211(fcDouble4 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set4211(fcDouble8* self, fcDouble4 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create422(fcDouble4 vec1, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC void fcDouble8_set422(fcDouble8* self, fcDouble4 vec1, fcDouble2 vec2, fcDouble2 vec3);
+FANCIER_STATIC fcDouble8 fcDouble8_create431(fcDouble4 vec1, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC void fcDouble8_set431(fcDouble8* self, fcDouble4 vec1, fcDouble3 vec2, fcDouble s7);
+FANCIER_STATIC fcDouble8 fcDouble8_create44(fcDouble4 vec1, fcDouble4 vec2);
+FANCIER_STATIC void fcDouble8_set44(fcDouble8* self, fcDouble4 vec1, fcDouble4 vec2);
+FANCIER_STATIC fcDouble8 fcDouble8_create8(fcDouble8 vec1);
+FANCIER_STATIC void fcDouble8_set8(fcDouble8* self, fcDouble8 vec1);
+
+FANCIER_STATIC fcDouble4 fcDouble8_odd(fcDouble8 a);
+FANCIER_STATIC fcDouble4 fcDouble8_even(fcDouble8 a);
+
+FANCIER_STATIC fcByte8 fcDouble8_convertByte8(fcDouble8 a);
+FANCIER_STATIC fcShort8 fcDouble8_convertShort8(fcDouble8 a);
+FANCIER_STATIC fcInt8 fcDouble8_convertInt8(fcDouble8 a);
+FANCIER_STATIC fcLong8 fcDouble8_convertLong8(fcDouble8 a);
+FANCIER_STATIC fcFloat8 fcDouble8_convertFloat8(fcDouble8 a);
+FANCIER_STATIC fcDouble2 fcDouble8_asDouble2(fcDouble8 a);
+FANCIER_STATIC fcDouble3 fcDouble8_asDouble3(fcDouble8 a);
+FANCIER_STATIC fcDouble4 fcDouble8_asDouble4(fcDouble8 a);
+
+FANCIER_STATIC fcInt8 fcDouble8_isEqual(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcInt8 fcDouble8_isNotEqual(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcInt8 fcDouble8_isGreater(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcInt8 fcDouble8_isGreaterEqual(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcInt8 fcDouble8_isLess(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcInt8 fcDouble8_isLessEqual(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_select(fcDouble8 a, fcDouble8 b, fcInt8 c);
+FANCIER_STATIC fcInt8 fcDouble8_isFinite(fcDouble8 a);
+FANCIER_STATIC fcInt8 fcDouble8_isInf(fcDouble8 a);
+FANCIER_STATIC fcInt8 fcDouble8_isNaN(fcDouble8 a);
+FANCIER_STATIC fcInt8 fcDouble8_isNormal(fcDouble8 a);
+FANCIER_STATIC fcInt8 fcDouble8_isOrdered(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcInt8 fcDouble8_isUnordered(fcDouble8 a, fcDouble8 b);
+
+FANCIER_STATIC fcInt fcDouble8_any(fcDouble8 a);
+FANCIER_STATIC fcInt fcDouble8_all(fcDouble8 a);
+
+FANCIER_STATIC fcDouble8 fcDouble8_neg(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_add(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_sub(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_muld(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcDouble8_mulf(fcDouble8 a, fcFloat8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_mulkd(fcDouble8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcDouble8_mulkf(fcDouble8 a, fcFloat k);
+FANCIER_STATIC fcDouble8 fcDouble8_divd(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcFloat8 fcDouble8_divf(fcDouble8 a, fcFloat8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_divkd(fcDouble8 a, fcDouble k);
+FANCIER_STATIC fcFloat8 fcDouble8_divkf(fcDouble8 a, fcFloat k);
+FANCIER_STATIC fcDouble fcDouble8_dot(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble fcDouble8_distance(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble fcDouble8_length(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_normalize(fcDouble8 a);
+
+FANCIER_STATIC fcDouble8 fcDouble8_abs(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_clamp(fcDouble8 a, fcDouble8 b, fcDouble8 c);
+FANCIER_STATIC fcDouble8 fcDouble8_max(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_maxMag(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_min(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_minMag(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_mix(fcDouble8 a, fcDouble8 b, fcDouble8 c);
+FANCIER_STATIC fcDouble8 fcDouble8_clampk(fcDouble8 v, fcDouble min, fcDouble max);
+FANCIER_STATIC fcDouble8 fcDouble8_maxk(fcDouble8 x, fcDouble y);
+FANCIER_STATIC fcDouble8 fcDouble8_mink(fcDouble8 x, fcDouble y);
+FANCIER_STATIC fcDouble8 fcDouble8_mixk(fcDouble8 x, fcDouble8 y, fcDouble a);
+FANCIER_STATIC fcDouble8 fcDouble8_acos(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_acosh(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_asin(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_asinh(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_atan(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_atan2(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_atanh(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_cbrt(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_ceil(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_copySign(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_cos(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_cosh(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_erf(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_erfc(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_exp(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_exp10(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_exp2(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_expm1(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_fdim(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_floor(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_fma(fcDouble8 a, fcDouble8 b, fcDouble8 c);
+FANCIER_STATIC fcDouble8 fcDouble8_fmod(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_fract(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_frexp(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_getExponent(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_hypot(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_lgamma(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_log(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_log10(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_log1p(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_log2(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_logb(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_mad(fcDouble8 a, fcDouble8 b, fcDouble8 c);
+FANCIER_STATIC fcDouble8 fcDouble8_nextAfter(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_pow(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_powr(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_remainder(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_rint(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_round(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_rsqrt(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_signum(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_sin(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_sinh(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_smoothStep(fcDouble8 a, fcDouble8 b, fcDouble8 c);
+FANCIER_STATIC fcDouble8 fcDouble8_sqrt(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_step(fcDouble8 a, fcDouble8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_tan(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_tanh(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_tgamma(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_toDegrees(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_toRadians(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_trunc(fcDouble8 a);
+FANCIER_STATIC fcDouble8 fcDouble8_scalb(fcDouble8 a, fcInt8 n);
+FANCIER_STATIC fcDouble8 fcDouble8_ldexp(fcDouble8 a, fcInt8 n);
+FANCIER_STATIC fcDouble8 fcDouble8_pown(fcDouble8 a, fcInt8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_rootn(fcDouble8 a, fcInt8 b);
+FANCIER_STATIC fcDouble8 fcDouble8_smoothStepk(fcDouble8 a, fcDouble8 b, fcDouble c);
+
+
+// Native implementations
+
+//
+// fcByte2
+//
+
+fcByte2 fcByte2_create1(fcByte v) {
+ return fcByte2_create11(v, v);
+}
+
+void fcByte2_set1(fcByte2* self, fcByte v) {
+ fcByte2_set11(self, v, v);
+}
+
+fcByte2 fcByte2_create11(fcByte x, fcByte y) {
+ fcByte2 result = {{x, y}};
+ return result;
+}
+
+void fcByte2_set11(fcByte2* self, fcByte x, fcByte y) {
+ self->s[0] = x;
+ self->s[1] = y;
+}
+
+fcByte2 fcByte2_create2(fcByte2 vec1) {
+ return fcByte2_create11(vec1.s[0], vec1.s[1]);
+}
+
+void fcByte2_set2(fcByte2* self, fcByte2 vec1) {
+ fcByte2_set11(self, vec1.s[0], vec1.s[1]);
+}
+
+fcShort2 fcByte2_convertShort2(fcByte2 a) {
+ return fcShort2_create11((fcShort)(a.s[0] & 0xff), (fcShort)(a.s[1] & 0xff));
+}
+
+fcInt2 fcByte2_convertInt2(fcByte2 a) {
+ return fcInt2_create11((fcInt)(a.s[0] & 0xff), (fcInt)(a.s[1] & 0xff));
+}
+
+fcLong2 fcByte2_convertLong2(fcByte2 a) {
+ return fcLong2_create11((fcLong)(a.s[0] & 0xff), (fcLong)(a.s[1] & 0xff));
+}
+
+fcFloat2 fcByte2_convertFloat2(fcByte2 a) {
+ return fcFloat2_create11((fcFloat)(a.s[0] & 0xff), (fcFloat)(a.s[1] & 0xff));
+}
+
+fcDouble2 fcByte2_convertDouble2(fcByte2 a) {
+ return fcDouble2_create11((fcDouble)(a.s[0] & 0xff), (fcDouble)(a.s[1] & 0xff));
+}
+
+fcInt2 fcByte2_isEqual(fcByte2 a, fcByte2 b) {
+ return fcInt2_create11(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0);
+}
+
+fcInt2 fcByte2_isNotEqual(fcByte2 a, fcByte2 b) {
+ return fcInt2_create11(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0);
+}
+
+fcInt2 fcByte2_isGreater(fcByte2 a, fcByte2 b) {
+ return fcInt2_create11(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0);
+}
+
+fcInt2 fcByte2_isGreaterEqual(fcByte2 a, fcByte2 b) {
+ return fcInt2_create11(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0);
+}
+
+fcInt2 fcByte2_isLess(fcByte2 a, fcByte2 b) {
+ return fcInt2_create11(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0);
+}
+
+fcInt2 fcByte2_isLessEqual(fcByte2 a, fcByte2 b) {
+ return fcInt2_create11(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0);
+}
+
+fcByte2 fcByte2_select(fcByte2 a, fcByte2 b, fcInt2 c) {
+ return fcByte2_create11(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt fcByte2_any(fcByte2 a) {
+ return a.s[0] != '\0' || a.s[1] != '\0';
+}
+
+fcInt fcByte2_all(fcByte2 a) {
+ return !(a.s[0] == '\0' || a.s[1] == '\0');
+}
+
+fcByte2 fcByte2_neg(fcByte2 a) {
+ return fcByte2_create11(-a.s[0], -a.s[1]);
+}
+
+fcByte2 fcByte2_add(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(a.s[0] + b.s[0], a.s[1] + b.s[1]);
+}
+
+fcByte2 fcByte2_sub(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(a.s[0] - b.s[0], a.s[1] - b.s[1]);
+}
+
+fcByte2 fcByte2_mul(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(a.s[0] * b.s[0], a.s[1] * b.s[1]);
+}
+
+fcDouble2 fcByte2_muld(fcByte2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]));
+}
+
+fcFloat2 fcByte2_mulf(fcByte2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]));
+}
+
+fcByte2 fcByte2_mulk(fcByte2 a, fcByte k) {
+ return fcByte2_create11(a.s[0] * k, a.s[1] * k);
+}
+
+fcDouble2 fcByte2_mulkd(fcByte2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k));
+}
+
+fcFloat2 fcByte2_mulkf(fcByte2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k));
+}
+
+fcByte2 fcByte2_div(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(a.s[0] / b.s[0], a.s[1] / b.s[1]);
+}
+
+fcDouble2 fcByte2_divd(fcByte2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]));
+}
+
+fcFloat2 fcByte2_divf(fcByte2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]));
+}
+
+fcByte2 fcByte2_divk(fcByte2 a, fcByte k) {
+ return fcByte2_create11(a.s[0] / k, a.s[1] / k);
+}
+
+fcDouble2 fcByte2_divkd(fcByte2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k));
+}
+
+fcFloat2 fcByte2_divkf(fcByte2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k));
+}
+
+fcByte2 fcByte2_mod(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(a.s[0] % b.s[0], a.s[1] % b.s[1]);
+}
+
+fcByte2 fcByte2_modk(fcByte2 a, fcByte k) {
+ return fcByte2_create11(a.s[0] % k, a.s[1] % k);
+}
+
+fcByte2 fcByte2_bitAnd(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(a.s[0] & b.s[0], a.s[1] & b.s[1]);
+}
+
+fcByte2 fcByte2_bitOr(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(a.s[0] | b.s[0], a.s[1] | b.s[1]);
+}
+
+fcByte2 fcByte2_bitXor(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1]);
+}
+
+fcByte2 fcByte2_bitNot(fcByte2 a) {
+ return fcByte2_create11(~a.s[0], ~a.s[1]);
+}
+
+fcByte2 fcByte2_abs(fcByte2 a) {
+ return fcByte2_create11(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]));
+}
+
+fcByte2 fcByte2_clamp(fcByte2 a, fcByte2 b, fcByte2 c) {
+ return fcByte2_create11(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]));
+}
+
+fcByte2 fcByte2_max(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_maxMag(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_min(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_minMag(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_mix(fcByte2 a, fcByte2 b, fcByte2 c) {
+ return fcByte2_create11(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]));
+}
+
+fcByte2 fcByte2_clampk(fcByte2 v, fcByte min, fcByte max) {
+ return fcByte2_create11(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max));
+}
+
+fcByte2 fcByte2_maxk(fcByte2 x, fcByte y) {
+ return fcByte2_create11(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y));
+}
+
+fcByte2 fcByte2_mink(fcByte2 x, fcByte y) {
+ return fcByte2_create11(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y));
+}
+
+fcByte2 fcByte2_mixk(fcByte2 x, fcByte2 y, fcByte a) {
+ return fcByte2_create11(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a));
+}
+
+fcByte2 fcByte2_absDiff(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_addSat(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_addSatc(a.s[0], b.s[0]), fcMath_addSatc(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_clz(fcByte2 a) {
+ return fcByte2_create11(fcMath_clzc(a.s[0]), fcMath_clzc(a.s[1]));
+}
+
+fcByte2 fcByte2_hadd(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_haddc(a.s[0], b.s[0]), fcMath_haddc(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_madHi(fcByte2 a, fcByte2 b, fcByte2 c) {
+ return fcByte2_create11(fcMath_madHic(a.s[0], b.s[0], c.s[0]), fcMath_madHic(a.s[1], b.s[1], c.s[1]));
+}
+
+fcByte2 fcByte2_madSat(fcByte2 a, fcByte2 b, fcByte2 c) {
+ return fcByte2_create11(fcMath_madSatc(a.s[0], b.s[0], c.s[0]), fcMath_madSatc(a.s[1], b.s[1], c.s[1]));
+}
+
+fcByte2 fcByte2_mulHi(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_mulHic(a.s[0], b.s[0]), fcMath_mulHic(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_rhadd(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_rhaddc(a.s[0], b.s[0]), fcMath_rhaddc(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_rotate(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_rotatec(a.s[0], b.s[0]), fcMath_rotatec(a.s[1], b.s[1]));
+}
+
+fcByte2 fcByte2_subSat(fcByte2 a, fcByte2 b) {
+ return fcByte2_create11(fcMath_subSatc(a.s[0], b.s[0]), fcMath_subSatc(a.s[1], b.s[1]));
+}
+
+
+//
+// fcByte3
+//
+
+fcByte3 fcByte3_create1(fcByte v) {
+ return fcByte3_create111(v, v, v);
+}
+
+void fcByte3_set1(fcByte3* self, fcByte v) {
+ fcByte3_set111(self, v, v, v);
+}
+
+fcByte3 fcByte3_create111(fcByte x, fcByte y, fcByte z) {
+ fcByte3 result = {{x, y, z}};
+ return result;
+}
+
+void fcByte3_set111(fcByte3* self, fcByte x, fcByte y, fcByte z) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+}
+
+fcByte3 fcByte3_create12(fcByte x, fcByte2 vec1) {
+ return fcByte3_create111(x, vec1.s[0], vec1.s[1]);
+}
+
+void fcByte3_set12(fcByte3* self, fcByte x, fcByte2 vec1) {
+ fcByte3_set111(self, x, vec1.s[0], vec1.s[1]);
+}
+
+fcByte3 fcByte3_create21(fcByte2 vec1, fcByte z) {
+ return fcByte3_create111(vec1.s[0], vec1.s[1], z);
+}
+
+void fcByte3_set21(fcByte3* self, fcByte2 vec1, fcByte z) {
+ fcByte3_set111(self, vec1.s[0], vec1.s[1], z);
+}
+
+fcByte3 fcByte3_create3(fcByte3 vec1) {
+ return fcByte3_create111(vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcByte3_set3(fcByte3* self, fcByte3 vec1) {
+ fcByte3_set111(self, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcShort3 fcByte3_convertShort3(fcByte3 a) {
+ return fcShort3_create111((fcShort)(a.s[0] & 0xff), (fcShort)(a.s[1] & 0xff), (fcShort)(a.s[2] & 0xff));
+}
+
+fcInt3 fcByte3_convertInt3(fcByte3 a) {
+ return fcInt3_create111((fcInt)(a.s[0] & 0xff), (fcInt)(a.s[1] & 0xff), (fcInt)(a.s[2] & 0xff));
+}
+
+fcLong3 fcByte3_convertLong3(fcByte3 a) {
+ return fcLong3_create111((fcLong)(a.s[0] & 0xff), (fcLong)(a.s[1] & 0xff), (fcLong)(a.s[2] & 0xff));
+}
+
+fcFloat3 fcByte3_convertFloat3(fcByte3 a) {
+ return fcFloat3_create111((fcFloat)(a.s[0] & 0xff), (fcFloat)(a.s[1] & 0xff), (fcFloat)(a.s[2] & 0xff));
+}
+
+fcDouble3 fcByte3_convertDouble3(fcByte3 a) {
+ return fcDouble3_create111((fcDouble)(a.s[0] & 0xff), (fcDouble)(a.s[1] & 0xff), (fcDouble)(a.s[2] & 0xff));
+}
+
+fcByte2 fcByte3_asByte2(fcByte3 a) {
+ return fcByte2_create11(a.s[0], a.s[1]);
+}
+
+fcInt3 fcByte3_isEqual(fcByte3 a, fcByte3 b) {
+ return fcInt3_create111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0);
+}
+
+fcInt3 fcByte3_isNotEqual(fcByte3 a, fcByte3 b) {
+ return fcInt3_create111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0);
+}
+
+fcInt3 fcByte3_isGreater(fcByte3 a, fcByte3 b) {
+ return fcInt3_create111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0);
+}
+
+fcInt3 fcByte3_isGreaterEqual(fcByte3 a, fcByte3 b) {
+ return fcInt3_create111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0);
+}
+
+fcInt3 fcByte3_isLess(fcByte3 a, fcByte3 b) {
+ return fcInt3_create111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0);
+}
+
+fcInt3 fcByte3_isLessEqual(fcByte3 a, fcByte3 b) {
+ return fcInt3_create111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0);
+}
+
+fcByte3 fcByte3_select(fcByte3 a, fcByte3 b, fcInt3 c) {
+ return fcByte3_create111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt fcByte3_any(fcByte3 a) {
+ return a.s[0] != '\0' || a.s[1] != '\0' || a.s[2] != '\0';
+}
+
+fcInt fcByte3_all(fcByte3 a) {
+ return !(a.s[0] == '\0' || a.s[1] == '\0' || a.s[2] == '\0');
+}
+
+fcByte3 fcByte3_neg(fcByte3 a) {
+ return fcByte3_create111(-a.s[0], -a.s[1], -a.s[2]);
+}
+
+fcByte3 fcByte3_add(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2]);
+}
+
+fcByte3 fcByte3_sub(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2]);
+}
+
+fcByte3 fcByte3_mul(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2]);
+}
+
+fcDouble3 fcByte3_muld(fcByte3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]));
+}
+
+fcFloat3 fcByte3_mulf(fcByte3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]));
+}
+
+fcByte3 fcByte3_mulk(fcByte3 a, fcByte k) {
+ return fcByte3_create111(a.s[0] * k, a.s[1] * k, a.s[2] * k);
+}
+
+fcDouble3 fcByte3_mulkd(fcByte3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k));
+}
+
+fcFloat3 fcByte3_mulkf(fcByte3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k));
+}
+
+fcByte3 fcByte3_div(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2]);
+}
+
+fcDouble3 fcByte3_divd(fcByte3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]));
+}
+
+fcFloat3 fcByte3_divf(fcByte3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]));
+}
+
+fcByte3 fcByte3_divk(fcByte3 a, fcByte k) {
+ return fcByte3_create111(a.s[0] / k, a.s[1] / k, a.s[2] / k);
+}
+
+fcDouble3 fcByte3_divkd(fcByte3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k));
+}
+
+fcFloat3 fcByte3_divkf(fcByte3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k));
+}
+
+fcByte3 fcByte3_mod(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2]);
+}
+
+fcByte3 fcByte3_modk(fcByte3 a, fcByte k) {
+ return fcByte3_create111(a.s[0] % k, a.s[1] % k, a.s[2] % k);
+}
+
+fcByte3 fcByte3_bitAnd(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2]);
+}
+
+fcByte3 fcByte3_bitOr(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2]);
+}
+
+fcByte3 fcByte3_bitXor(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2]);
+}
+
+fcByte3 fcByte3_bitNot(fcByte3 a) {
+ return fcByte3_create111(~a.s[0], ~a.s[1], ~a.s[2]);
+}
+
+fcByte3 fcByte3_abs(fcByte3 a) {
+ return fcByte3_create111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]));
+}
+
+fcByte3 fcByte3_clamp(fcByte3 a, fcByte3 b, fcByte3 c) {
+ return fcByte3_create111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]));
+}
+
+fcByte3 fcByte3_max(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_maxMag(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_min(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_minMag(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_mix(fcByte3 a, fcByte3 b, fcByte3 c) {
+ return fcByte3_create111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]));
+}
+
+fcByte3 fcByte3_clampk(fcByte3 v, fcByte min, fcByte max) {
+ return fcByte3_create111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max));
+}
+
+fcByte3 fcByte3_maxk(fcByte3 x, fcByte y) {
+ return fcByte3_create111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y));
+}
+
+fcByte3 fcByte3_mink(fcByte3 x, fcByte y) {
+ return fcByte3_create111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y));
+}
+
+fcByte3 fcByte3_mixk(fcByte3 x, fcByte3 y, fcByte a) {
+ return fcByte3_create111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a));
+}
+
+fcByte3 fcByte3_absDiff(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_addSat(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_addSatc(a.s[0], b.s[0]), fcMath_addSatc(a.s[1], b.s[1]), fcMath_addSatc(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_clz(fcByte3 a) {
+ return fcByte3_create111(fcMath_clzc(a.s[0]), fcMath_clzc(a.s[1]), fcMath_clzc(a.s[2]));
+}
+
+fcByte3 fcByte3_hadd(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_haddc(a.s[0], b.s[0]), fcMath_haddc(a.s[1], b.s[1]), fcMath_haddc(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_madHi(fcByte3 a, fcByte3 b, fcByte3 c) {
+ return fcByte3_create111(fcMath_madHic(a.s[0], b.s[0], c.s[0]), fcMath_madHic(a.s[1], b.s[1], c.s[1]), fcMath_madHic(a.s[2], b.s[2], c.s[2]));
+}
+
+fcByte3 fcByte3_madSat(fcByte3 a, fcByte3 b, fcByte3 c) {
+ return fcByte3_create111(fcMath_madSatc(a.s[0], b.s[0], c.s[0]), fcMath_madSatc(a.s[1], b.s[1], c.s[1]), fcMath_madSatc(a.s[2], b.s[2], c.s[2]));
+}
+
+fcByte3 fcByte3_mulHi(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_mulHic(a.s[0], b.s[0]), fcMath_mulHic(a.s[1], b.s[1]), fcMath_mulHic(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_rhadd(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_rhaddc(a.s[0], b.s[0]), fcMath_rhaddc(a.s[1], b.s[1]), fcMath_rhaddc(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_rotate(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_rotatec(a.s[0], b.s[0]), fcMath_rotatec(a.s[1], b.s[1]), fcMath_rotatec(a.s[2], b.s[2]));
+}
+
+fcByte3 fcByte3_subSat(fcByte3 a, fcByte3 b) {
+ return fcByte3_create111(fcMath_subSatc(a.s[0], b.s[0]), fcMath_subSatc(a.s[1], b.s[1]), fcMath_subSatc(a.s[2], b.s[2]));
+}
+
+
+//
+// fcByte4
+//
+
+fcByte4 fcByte4_create1(fcByte v) {
+ return fcByte4_create1111(v, v, v, v);
+}
+
+void fcByte4_set1(fcByte4* self, fcByte v) {
+ fcByte4_set1111(self, v, v, v, v);
+}
+
+fcByte4 fcByte4_create1111(fcByte x, fcByte y, fcByte z, fcByte w) {
+ fcByte4 result = {{x, y, z, w}};
+ return result;
+}
+
+void fcByte4_set1111(fcByte4* self, fcByte x, fcByte y, fcByte z, fcByte w) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+}
+
+fcByte4 fcByte4_create112(fcByte x, fcByte y, fcByte2 vec1) {
+ return fcByte4_create1111(x, y, vec1.s[0], vec1.s[1]);
+}
+
+void fcByte4_set112(fcByte4* self, fcByte x, fcByte y, fcByte2 vec1) {
+ fcByte4_set1111(self, x, y, vec1.s[0], vec1.s[1]);
+}
+
+fcByte4 fcByte4_create121(fcByte x, fcByte2 vec1, fcByte w) {
+ return fcByte4_create1111(x, vec1.s[0], vec1.s[1], w);
+}
+
+void fcByte4_set121(fcByte4* self, fcByte x, fcByte2 vec1, fcByte w) {
+ fcByte4_set1111(self, x, vec1.s[0], vec1.s[1], w);
+}
+
+fcByte4 fcByte4_create13(fcByte x, fcByte3 vec1) {
+ return fcByte4_create1111(x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcByte4_set13(fcByte4* self, fcByte x, fcByte3 vec1) {
+ fcByte4_set1111(self, x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcByte4 fcByte4_create211(fcByte2 vec1, fcByte z, fcByte w) {
+ return fcByte4_create1111(vec1.s[0], vec1.s[1], z, w);
+}
+
+void fcByte4_set211(fcByte4* self, fcByte2 vec1, fcByte z, fcByte w) {
+ fcByte4_set1111(self, vec1.s[0], vec1.s[1], z, w);
+}
+
+fcByte4 fcByte4_create22(fcByte2 vec1, fcByte2 vec2) {
+ return fcByte4_create1111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcByte4_set22(fcByte4* self, fcByte2 vec1, fcByte2 vec2) {
+ fcByte4_set1111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcByte4 fcByte4_create31(fcByte3 vec1, fcByte w) {
+ return fcByte4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+void fcByte4_set31(fcByte4* self, fcByte3 vec1, fcByte w) {
+ fcByte4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+fcByte4 fcByte4_create4(fcByte4 vec1) {
+ return fcByte4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcByte4_set4(fcByte4* self, fcByte4 vec1) {
+ fcByte4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcByte2 fcByte4_odd(fcByte4 a) {
+ return fcByte2_create11(a.s[1], a.s[3]);
+}
+
+fcByte2 fcByte4_even(fcByte4 a) {
+ return fcByte2_create11(a.s[0], a.s[2]);
+}
+
+fcShort4 fcByte4_convertShort4(fcByte4 a) {
+ return fcShort4_create1111((fcShort)(a.s[0] & 0xff), (fcShort)(a.s[1] & 0xff), (fcShort)(a.s[2] & 0xff), (fcShort)(a.s[3] & 0xff));
+}
+
+fcInt4 fcByte4_convertInt4(fcByte4 a) {
+ return fcInt4_create1111((fcInt)(a.s[0] & 0xff), (fcInt)(a.s[1] & 0xff), (fcInt)(a.s[2] & 0xff), (fcInt)(a.s[3] & 0xff));
+}
+
+fcLong4 fcByte4_convertLong4(fcByte4 a) {
+ return fcLong4_create1111((fcLong)(a.s[0] & 0xff), (fcLong)(a.s[1] & 0xff), (fcLong)(a.s[2] & 0xff), (fcLong)(a.s[3] & 0xff));
+}
+
+fcFloat4 fcByte4_convertFloat4(fcByte4 a) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] & 0xff), (fcFloat)(a.s[1] & 0xff), (fcFloat)(a.s[2] & 0xff), (fcFloat)(a.s[3] & 0xff));
+}
+
+fcDouble4 fcByte4_convertDouble4(fcByte4 a) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] & 0xff), (fcDouble)(a.s[1] & 0xff), (fcDouble)(a.s[2] & 0xff), (fcDouble)(a.s[3] & 0xff));
+}
+
+fcByte2 fcByte4_asByte2(fcByte4 a) {
+ return fcByte2_create11(a.s[0], a.s[1]);
+}
+
+fcByte3 fcByte4_asByte3(fcByte4 a) {
+ return fcByte3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcInt4 fcByte4_isEqual(fcByte4 a, fcByte4 b) {
+ return fcInt4_create1111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
+}
+
+fcInt4 fcByte4_isNotEqual(fcByte4 a, fcByte4 b) {
+ return fcInt4_create1111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
+}
+
+fcInt4 fcByte4_isGreater(fcByte4 a, fcByte4 b) {
+ return fcInt4_create1111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
+}
+
+fcInt4 fcByte4_isGreaterEqual(fcByte4 a, fcByte4 b) {
+ return fcInt4_create1111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
+}
+
+fcInt4 fcByte4_isLess(fcByte4 a, fcByte4 b) {
+ return fcInt4_create1111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
+}
+
+fcInt4 fcByte4_isLessEqual(fcByte4 a, fcByte4 b) {
+ return fcInt4_create1111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
+}
+
+fcByte4 fcByte4_select(fcByte4 a, fcByte4 b, fcInt4 c) {
+ return fcByte4_create1111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt fcByte4_any(fcByte4 a) {
+ return a.s[0] != '\0' || a.s[1] != '\0' || a.s[2] != '\0' || a.s[3] != '\0';
+}
+
+fcInt fcByte4_all(fcByte4 a) {
+ return !(a.s[0] == '\0' || a.s[1] == '\0' || a.s[2] == '\0' || a.s[3] == '\0');
+}
+
+fcByte4 fcByte4_neg(fcByte4 a) {
+ return fcByte4_create1111(-a.s[0], -a.s[1], -a.s[2], -a.s[3]);
+}
+
+fcByte4 fcByte4_add(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3]);
+}
+
+fcByte4 fcByte4_sub(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3]);
+}
+
+fcByte4 fcByte4_mul(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2], a.s[3] * b.s[3]);
+}
+
+fcDouble4 fcByte4_muld(fcByte4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]));
+}
+
+fcFloat4 fcByte4_mulf(fcByte4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]));
+}
+
+fcByte4 fcByte4_mulk(fcByte4 a, fcByte k) {
+ return fcByte4_create1111(a.s[0] * k, a.s[1] * k, a.s[2] * k, a.s[3] * k);
+}
+
+fcDouble4 fcByte4_mulkd(fcByte4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k));
+}
+
+fcFloat4 fcByte4_mulkf(fcByte4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k));
+}
+
+fcByte4 fcByte4_div(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2], a.s[3] / b.s[3]);
+}
+
+fcDouble4 fcByte4_divd(fcByte4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]));
+}
+
+fcFloat4 fcByte4_divf(fcByte4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]));
+}
+
+fcByte4 fcByte4_divk(fcByte4 a, fcByte k) {
+ return fcByte4_create1111(a.s[0] / k, a.s[1] / k, a.s[2] / k, a.s[3] / k);
+}
+
+fcDouble4 fcByte4_divkd(fcByte4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k));
+}
+
+fcFloat4 fcByte4_divkf(fcByte4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k));
+}
+
+fcByte4 fcByte4_mod(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2], a.s[3] % b.s[3]);
+}
+
+fcByte4 fcByte4_modk(fcByte4 a, fcByte k) {
+ return fcByte4_create1111(a.s[0] % k, a.s[1] % k, a.s[2] % k, a.s[3] % k);
+}
+
+fcByte4 fcByte4_bitAnd(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2], a.s[3] & b.s[3]);
+}
+
+fcByte4 fcByte4_bitOr(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2], a.s[3] | b.s[3]);
+}
+
+fcByte4 fcByte4_bitXor(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2], a.s[3] ^ b.s[3]);
+}
+
+fcByte4 fcByte4_bitNot(fcByte4 a) {
+ return fcByte4_create1111(~a.s[0], ~a.s[1], ~a.s[2], ~a.s[3]);
+}
+
+fcByte4 fcByte4_abs(fcByte4 a) {
+ return fcByte4_create1111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]));
+}
+
+fcByte4 fcByte4_clamp(fcByte4 a, fcByte4 b, fcByte4 c) {
+ return fcByte4_create1111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]));
+}
+
+fcByte4 fcByte4_max(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_maxMag(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_min(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_minMag(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_mix(fcByte4 a, fcByte4 b, fcByte4 c) {
+ return fcByte4_create1111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]));
+}
+
+fcByte4 fcByte4_clampk(fcByte4 v, fcByte min, fcByte max) {
+ return fcByte4_create1111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max));
+}
+
+fcByte4 fcByte4_maxk(fcByte4 x, fcByte y) {
+ return fcByte4_create1111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y));
+}
+
+fcByte4 fcByte4_mink(fcByte4 x, fcByte y) {
+ return fcByte4_create1111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y));
+}
+
+fcByte4 fcByte4_mixk(fcByte4 x, fcByte4 y, fcByte a) {
+ return fcByte4_create1111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a));
+}
+
+fcByte4 fcByte4_absDiff(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]), fcMath_absDiff(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_addSat(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_addSatc(a.s[0], b.s[0]), fcMath_addSatc(a.s[1], b.s[1]), fcMath_addSatc(a.s[2], b.s[2]), fcMath_addSatc(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_clz(fcByte4 a) {
+ return fcByte4_create1111(fcMath_clzc(a.s[0]), fcMath_clzc(a.s[1]), fcMath_clzc(a.s[2]), fcMath_clzc(a.s[3]));
+}
+
+fcByte4 fcByte4_hadd(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_haddc(a.s[0], b.s[0]), fcMath_haddc(a.s[1], b.s[1]), fcMath_haddc(a.s[2], b.s[2]), fcMath_haddc(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_madHi(fcByte4 a, fcByte4 b, fcByte4 c) {
+ return fcByte4_create1111(fcMath_madHic(a.s[0], b.s[0], c.s[0]), fcMath_madHic(a.s[1], b.s[1], c.s[1]), fcMath_madHic(a.s[2], b.s[2], c.s[2]), fcMath_madHic(a.s[3], b.s[3], c.s[3]));
+}
+
+fcByte4 fcByte4_madSat(fcByte4 a, fcByte4 b, fcByte4 c) {
+ return fcByte4_create1111(fcMath_madSatc(a.s[0], b.s[0], c.s[0]), fcMath_madSatc(a.s[1], b.s[1], c.s[1]), fcMath_madSatc(a.s[2], b.s[2], c.s[2]), fcMath_madSatc(a.s[3], b.s[3], c.s[3]));
+}
+
+fcByte4 fcByte4_mulHi(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_mulHic(a.s[0], b.s[0]), fcMath_mulHic(a.s[1], b.s[1]), fcMath_mulHic(a.s[2], b.s[2]), fcMath_mulHic(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_rhadd(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_rhaddc(a.s[0], b.s[0]), fcMath_rhaddc(a.s[1], b.s[1]), fcMath_rhaddc(a.s[2], b.s[2]), fcMath_rhaddc(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_rotate(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_rotatec(a.s[0], b.s[0]), fcMath_rotatec(a.s[1], b.s[1]), fcMath_rotatec(a.s[2], b.s[2]), fcMath_rotatec(a.s[3], b.s[3]));
+}
+
+fcByte4 fcByte4_subSat(fcByte4 a, fcByte4 b) {
+ return fcByte4_create1111(fcMath_subSatc(a.s[0], b.s[0]), fcMath_subSatc(a.s[1], b.s[1]), fcMath_subSatc(a.s[2], b.s[2]), fcMath_subSatc(a.s[3], b.s[3]));
+}
+
+
+//
+// fcByte8
+//
+
+fcByte8 fcByte8_create1(fcByte v) {
+ return fcByte8_create11111111(v, v, v, v, v, v, v, v);
+}
+
+void fcByte8_set1(fcByte8* self, fcByte v) {
+ fcByte8_set11111111(self, v, v, v, v, v, v, v, v);
+}
+
+fcByte8 fcByte8_create11111111(fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8 result = {{x, y, z, w, s4, s5, s6, s7}};
+ return result;
+}
+
+void fcByte8_set11111111(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+ self->s[4] = s4;
+ self->s[5] = s5;
+ self->s[6] = s6;
+ self->s[7] = s7;
+}
+
+fcByte8 fcByte8_create1111112(fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte2 vec1) {
+ return fcByte8_create11111111(x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+void fcByte8_set1111112(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte2 vec1) {
+ fcByte8_set11111111(self, x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+fcByte8 fcByte8_create1111121(fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte2 vec1, fcByte s7) {
+ return fcByte8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+void fcByte8_set1111121(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte2 vec1, fcByte s7) {
+ fcByte8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+fcByte8 fcByte8_create111113(fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte3 vec1) {
+ return fcByte8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcByte8_set111113(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte s4, fcByte3 vec1) {
+ fcByte8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcByte8 fcByte8_create1111211(fcByte x, fcByte y, fcByte z, fcByte w, fcByte2 vec1, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+void fcByte8_set1111211(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte2 vec1, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+fcByte8 fcByte8_create111122(fcByte x, fcByte y, fcByte z, fcByte w, fcByte2 vec1, fcByte2 vec2) {
+ return fcByte8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set111122(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte2 vec1, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create111131(fcByte x, fcByte y, fcByte z, fcByte w, fcByte3 vec1, fcByte s7) {
+ return fcByte8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+void fcByte8_set111131(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte3 vec1, fcByte s7) {
+ fcByte8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+fcByte8 fcByte8_create11114(fcByte x, fcByte y, fcByte z, fcByte w, fcByte4 vec1) {
+ return fcByte8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcByte8_set11114(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte w, fcByte4 vec1) {
+ fcByte8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcByte8 fcByte8_create1112111(fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+void fcByte8_set1112111(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+fcByte8 fcByte8_create111212(fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set111212(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create111221(fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set111221(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create11123(fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte3 vec2) {
+ return fcByte8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set11123(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte2 vec1, fcByte3 vec2) {
+ fcByte8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create111311(fcByte x, fcByte y, fcByte z, fcByte3 vec1, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+void fcByte8_set111311(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte3 vec1, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+fcByte8 fcByte8_create11132(fcByte x, fcByte y, fcByte z, fcByte3 vec1, fcByte2 vec2) {
+ return fcByte8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set11132(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte3 vec1, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create11141(fcByte x, fcByte y, fcByte z, fcByte4 vec1, fcByte s7) {
+ return fcByte8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+void fcByte8_set11141(fcByte8* self, fcByte x, fcByte y, fcByte z, fcByte4 vec1, fcByte s7) {
+ fcByte8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+fcByte8 fcByte8_create1121111(fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+void fcByte8_set1121111(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+fcByte8 fcByte8_create112112(fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set112112(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create112121(fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set112121(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create11213(fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte3 vec2) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set11213(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte s4, fcByte3 vec2) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create112211(fcByte x, fcByte y, fcByte2 vec1, fcByte2 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcByte8_set112211(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte2 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcByte8 fcByte8_create11222(fcByte x, fcByte y, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set11222(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create11231(fcByte x, fcByte y, fcByte2 vec1, fcByte3 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcByte8_set11231(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte3 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcByte8 fcByte8_create1124(fcByte x, fcByte y, fcByte2 vec1, fcByte4 vec2) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcByte8_set1124(fcByte8* self, fcByte x, fcByte y, fcByte2 vec1, fcByte4 vec2) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcByte8 fcByte8_create113111(fcByte x, fcByte y, fcByte3 vec1, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+void fcByte8_set113111(fcByte8* self, fcByte x, fcByte y, fcByte3 vec1, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+fcByte8 fcByte8_create11312(fcByte x, fcByte y, fcByte3 vec1, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set11312(fcByte8* self, fcByte x, fcByte y, fcByte3 vec1, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create11321(fcByte x, fcByte y, fcByte3 vec1, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set11321(fcByte8* self, fcByte x, fcByte y, fcByte3 vec1, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create1133(fcByte x, fcByte y, fcByte3 vec1, fcByte3 vec2) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set1133(fcByte8* self, fcByte x, fcByte y, fcByte3 vec1, fcByte3 vec2) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create11411(fcByte x, fcByte y, fcByte4 vec1, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+void fcByte8_set11411(fcByte8* self, fcByte x, fcByte y, fcByte4 vec1, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+fcByte8 fcByte8_create1142(fcByte x, fcByte y, fcByte4 vec1, fcByte2 vec2) {
+ return fcByte8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set1142(fcByte8* self, fcByte x, fcByte y, fcByte4 vec1, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create1211111(fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+void fcByte8_set1211111(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+fcByte8 fcByte8_create121112(fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set121112(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create121121(fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set121121(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create12113(fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte3 vec2) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set12113(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte s4, fcByte3 vec2) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create121211(fcByte x, fcByte2 vec1, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcByte8_set121211(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcByte8 fcByte8_create12122(fcByte x, fcByte2 vec1, fcByte w, fcByte2 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set12122(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte2 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create12131(fcByte x, fcByte2 vec1, fcByte w, fcByte3 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcByte8_set12131(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte3 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcByte8 fcByte8_create1214(fcByte x, fcByte2 vec1, fcByte w, fcByte4 vec2) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcByte8_set1214(fcByte8* self, fcByte x, fcByte2 vec1, fcByte w, fcByte4 vec2) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcByte8 fcByte8_create122111(fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcByte8_set122111(fcByte8* self, fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcByte8 fcByte8_create12212(fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte s5, fcByte2 vec3) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set12212(fcByte8* self, fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte s5, fcByte2 vec3) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create12221(fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcByte8_set12221(fcByte8* self, fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcByte8 fcByte8_create1223(fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte3 vec3) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcByte8_set1223(fcByte8* self, fcByte x, fcByte2 vec1, fcByte2 vec2, fcByte3 vec3) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcByte8 fcByte8_create12311(fcByte x, fcByte2 vec1, fcByte3 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcByte8_set12311(fcByte8* self, fcByte x, fcByte2 vec1, fcByte3 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcByte8 fcByte8_create1232(fcByte x, fcByte2 vec1, fcByte3 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set1232(fcByte8* self, fcByte x, fcByte2 vec1, fcByte3 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create1241(fcByte x, fcByte2 vec1, fcByte4 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcByte8_set1241(fcByte8* self, fcByte x, fcByte2 vec1, fcByte4 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcByte8 fcByte8_create131111(fcByte x, fcByte3 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+void fcByte8_set131111(fcByte8* self, fcByte x, fcByte3 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+fcByte8 fcByte8_create13112(fcByte x, fcByte3 vec1, fcByte s4, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set13112(fcByte8* self, fcByte x, fcByte3 vec1, fcByte s4, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create13121(fcByte x, fcByte3 vec1, fcByte s4, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set13121(fcByte8* self, fcByte x, fcByte3 vec1, fcByte s4, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create1313(fcByte x, fcByte3 vec1, fcByte s4, fcByte3 vec2) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set1313(fcByte8* self, fcByte x, fcByte3 vec1, fcByte s4, fcByte3 vec2) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create13211(fcByte x, fcByte3 vec1, fcByte2 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcByte8_set13211(fcByte8* self, fcByte x, fcByte3 vec1, fcByte2 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcByte8 fcByte8_create1322(fcByte x, fcByte3 vec1, fcByte2 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set1322(fcByte8* self, fcByte x, fcByte3 vec1, fcByte2 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create1331(fcByte x, fcByte3 vec1, fcByte3 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcByte8_set1331(fcByte8* self, fcByte x, fcByte3 vec1, fcByte3 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcByte8 fcByte8_create134(fcByte x, fcByte3 vec1, fcByte4 vec2) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcByte8_set134(fcByte8* self, fcByte x, fcByte3 vec1, fcByte4 vec2) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcByte8 fcByte8_create14111(fcByte x, fcByte4 vec1, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+void fcByte8_set14111(fcByte8* self, fcByte x, fcByte4 vec1, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+fcByte8 fcByte8_create1412(fcByte x, fcByte4 vec1, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set1412(fcByte8* self, fcByte x, fcByte4 vec1, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create1421(fcByte x, fcByte4 vec1, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set1421(fcByte8* self, fcByte x, fcByte4 vec1, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create143(fcByte x, fcByte4 vec1, fcByte3 vec2) {
+ return fcByte8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set143(fcByte8* self, fcByte x, fcByte4 vec1, fcByte3 vec2) {
+ fcByte8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create2111111(fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+void fcByte8_set2111111(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+fcByte8 fcByte8_create211112(fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set211112(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create211121(fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set211121(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create21113(fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte3 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set21113(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte s4, fcByte3 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create211211(fcByte2 vec1, fcByte z, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcByte8_set211211(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcByte8 fcByte8_create21122(fcByte2 vec1, fcByte z, fcByte w, fcByte2 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set21122(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte2 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create21131(fcByte2 vec1, fcByte z, fcByte w, fcByte3 vec2, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcByte8_set21131(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte3 vec2, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcByte8 fcByte8_create2114(fcByte2 vec1, fcByte z, fcByte w, fcByte4 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcByte8_set2114(fcByte8* self, fcByte2 vec1, fcByte z, fcByte w, fcByte4 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcByte8 fcByte8_create212111(fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcByte8_set212111(fcByte8* self, fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcByte8 fcByte8_create21212(fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte s5, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set21212(fcByte8* self, fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte s5, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create21221(fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte2 vec3, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcByte8_set21221(fcByte8* self, fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte2 vec3, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcByte8 fcByte8_create2123(fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte3 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcByte8_set2123(fcByte8* self, fcByte2 vec1, fcByte z, fcByte2 vec2, fcByte3 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcByte8 fcByte8_create21311(fcByte2 vec1, fcByte z, fcByte3 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcByte8_set21311(fcByte8* self, fcByte2 vec1, fcByte z, fcByte3 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcByte8 fcByte8_create2132(fcByte2 vec1, fcByte z, fcByte3 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set2132(fcByte8* self, fcByte2 vec1, fcByte z, fcByte3 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create2141(fcByte2 vec1, fcByte z, fcByte4 vec2, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcByte8_set2141(fcByte8* self, fcByte2 vec1, fcByte z, fcByte4 vec2, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcByte8 fcByte8_create221111(fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+void fcByte8_set221111(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+fcByte8 fcByte8_create22112(fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte s5, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set22112(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte s5, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create22121(fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte2 vec3, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+void fcByte8_set22121(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte2 vec3, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+fcByte8 fcByte8_create2213(fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte3 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcByte8_set2213(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte s4, fcByte3 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcByte8 fcByte8_create22211(fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+void fcByte8_set22211(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+fcByte8 fcByte8_create2222(fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte2 vec4) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+void fcByte8_set2222(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte2 vec3, fcByte2 vec4) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+fcByte8 fcByte8_create2231(fcByte2 vec1, fcByte2 vec2, fcByte3 vec3, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+void fcByte8_set2231(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte3 vec3, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+fcByte8 fcByte8_create224(fcByte2 vec1, fcByte2 vec2, fcByte4 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+void fcByte8_set224(fcByte8* self, fcByte2 vec1, fcByte2 vec2, fcByte4 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+fcByte8 fcByte8_create23111(fcByte2 vec1, fcByte3 vec2, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+void fcByte8_set23111(fcByte8* self, fcByte2 vec1, fcByte3 vec2, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+fcByte8 fcByte8_create2312(fcByte2 vec1, fcByte3 vec2, fcByte s5, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set2312(fcByte8* self, fcByte2 vec1, fcByte3 vec2, fcByte s5, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create2321(fcByte2 vec1, fcByte3 vec2, fcByte2 vec3, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcByte8_set2321(fcByte8* self, fcByte2 vec1, fcByte3 vec2, fcByte2 vec3, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+fcByte8 fcByte8_create233(fcByte2 vec1, fcByte3 vec2, fcByte3 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcByte8_set233(fcByte8* self, fcByte2 vec1, fcByte3 vec2, fcByte3 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcByte8 fcByte8_create2411(fcByte2 vec1, fcByte4 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+void fcByte8_set2411(fcByte8* self, fcByte2 vec1, fcByte4 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+fcByte8 fcByte8_create242(fcByte2 vec1, fcByte4 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set242(fcByte8* self, fcByte2 vec1, fcByte4 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create311111(fcByte3 vec1, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+void fcByte8_set311111(fcByte8* self, fcByte3 vec1, fcByte w, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+fcByte8 fcByte8_create31112(fcByte3 vec1, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set31112(fcByte8* self, fcByte3 vec1, fcByte w, fcByte s4, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create31121(fcByte3 vec1, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set31121(fcByte8* self, fcByte3 vec1, fcByte w, fcByte s4, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create3113(fcByte3 vec1, fcByte w, fcByte s4, fcByte3 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set3113(fcByte8* self, fcByte3 vec1, fcByte w, fcByte s4, fcByte3 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create31211(fcByte3 vec1, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcByte8_set31211(fcByte8* self, fcByte3 vec1, fcByte w, fcByte2 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcByte8 fcByte8_create3122(fcByte3 vec1, fcByte w, fcByte2 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set3122(fcByte8* self, fcByte3 vec1, fcByte w, fcByte2 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create3131(fcByte3 vec1, fcByte w, fcByte3 vec2, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcByte8_set3131(fcByte8* self, fcByte3 vec1, fcByte w, fcByte3 vec2, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcByte8 fcByte8_create314(fcByte3 vec1, fcByte w, fcByte4 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcByte8_set314(fcByte8* self, fcByte3 vec1, fcByte w, fcByte4 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcByte8 fcByte8_create32111(fcByte3 vec1, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcByte8_set32111(fcByte8* self, fcByte3 vec1, fcByte2 vec2, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcByte8 fcByte8_create3212(fcByte3 vec1, fcByte2 vec2, fcByte s5, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set3212(fcByte8* self, fcByte3 vec1, fcByte2 vec2, fcByte s5, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create3221(fcByte3 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcByte8_set3221(fcByte8* self, fcByte3 vec1, fcByte2 vec2, fcByte2 vec3, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcByte8 fcByte8_create323(fcByte3 vec1, fcByte2 vec2, fcByte3 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcByte8_set323(fcByte8* self, fcByte3 vec1, fcByte2 vec2, fcByte3 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcByte8 fcByte8_create3311(fcByte3 vec1, fcByte3 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcByte8_set3311(fcByte8* self, fcByte3 vec1, fcByte3 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcByte8 fcByte8_create332(fcByte3 vec1, fcByte3 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set332(fcByte8* self, fcByte3 vec1, fcByte3 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create341(fcByte3 vec1, fcByte4 vec2, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcByte8_set341(fcByte8* self, fcByte3 vec1, fcByte4 vec2, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcByte8 fcByte8_create41111(fcByte4 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+void fcByte8_set41111(fcByte8* self, fcByte4 vec1, fcByte s4, fcByte s5, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+fcByte8 fcByte8_create4112(fcByte4 vec1, fcByte s4, fcByte s5, fcByte2 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcByte8_set4112(fcByte8* self, fcByte4 vec1, fcByte s4, fcByte s5, fcByte2 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcByte8 fcByte8_create4121(fcByte4 vec1, fcByte s4, fcByte2 vec2, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcByte8_set4121(fcByte8* self, fcByte4 vec1, fcByte s4, fcByte2 vec2, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcByte8 fcByte8_create413(fcByte4 vec1, fcByte s4, fcByte3 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcByte8_set413(fcByte8* self, fcByte4 vec1, fcByte s4, fcByte3 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcByte8 fcByte8_create4211(fcByte4 vec1, fcByte2 vec2, fcByte s6, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcByte8_set4211(fcByte8* self, fcByte4 vec1, fcByte2 vec2, fcByte s6, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcByte8 fcByte8_create422(fcByte4 vec1, fcByte2 vec2, fcByte2 vec3) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcByte8_set422(fcByte8* self, fcByte4 vec1, fcByte2 vec2, fcByte2 vec3) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcByte8 fcByte8_create431(fcByte4 vec1, fcByte3 vec2, fcByte s7) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcByte8_set431(fcByte8* self, fcByte4 vec1, fcByte3 vec2, fcByte s7) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcByte8 fcByte8_create44(fcByte4 vec1, fcByte4 vec2) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcByte8_set44(fcByte8* self, fcByte4 vec1, fcByte4 vec2) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcByte8 fcByte8_create8(fcByte8 vec1) {
+ return fcByte8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+void fcByte8_set8(fcByte8* self, fcByte8 vec1) {
+ fcByte8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+fcByte4 fcByte8_odd(fcByte8 a) {
+ return fcByte4_create1111(a.s[1], a.s[3], a.s[5], a.s[7]);
+}
+
+fcByte4 fcByte8_even(fcByte8 a) {
+ return fcByte4_create1111(a.s[0], a.s[2], a.s[4], a.s[6]);
+}
+
+fcShort8 fcByte8_convertShort8(fcByte8 a) {
+ return fcShort8_create11111111((fcShort)(a.s[0] & 0xff), (fcShort)(a.s[1] & 0xff), (fcShort)(a.s[2] & 0xff), (fcShort)(a.s[3] & 0xff), (fcShort)(a.s[4] & 0xff), (fcShort)(a.s[5] & 0xff), (fcShort)(a.s[6] & 0xff), (fcShort)(a.s[7] & 0xff));
+}
+
+fcInt8 fcByte8_convertInt8(fcByte8 a) {
+ return fcInt8_create11111111((fcInt)(a.s[0] & 0xff), (fcInt)(a.s[1] & 0xff), (fcInt)(a.s[2] & 0xff), (fcInt)(a.s[3] & 0xff), (fcInt)(a.s[4] & 0xff), (fcInt)(a.s[5] & 0xff), (fcInt)(a.s[6] & 0xff), (fcInt)(a.s[7] & 0xff));
+}
+
+fcLong8 fcByte8_convertLong8(fcByte8 a) {
+ return fcLong8_create11111111((fcLong)(a.s[0] & 0xff), (fcLong)(a.s[1] & 0xff), (fcLong)(a.s[2] & 0xff), (fcLong)(a.s[3] & 0xff), (fcLong)(a.s[4] & 0xff), (fcLong)(a.s[5] & 0xff), (fcLong)(a.s[6] & 0xff), (fcLong)(a.s[7] & 0xff));
+}
+
+fcFloat8 fcByte8_convertFloat8(fcByte8 a) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] & 0xff), (fcFloat)(a.s[1] & 0xff), (fcFloat)(a.s[2] & 0xff), (fcFloat)(a.s[3] & 0xff), (fcFloat)(a.s[4] & 0xff), (fcFloat)(a.s[5] & 0xff), (fcFloat)(a.s[6] & 0xff), (fcFloat)(a.s[7] & 0xff));
+}
+
+fcDouble8 fcByte8_convertDouble8(fcByte8 a) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] & 0xff), (fcDouble)(a.s[1] & 0xff), (fcDouble)(a.s[2] & 0xff), (fcDouble)(a.s[3] & 0xff), (fcDouble)(a.s[4] & 0xff), (fcDouble)(a.s[5] & 0xff), (fcDouble)(a.s[6] & 0xff), (fcDouble)(a.s[7] & 0xff));
+}
+
+fcByte2 fcByte8_asByte2(fcByte8 a) {
+ return fcByte2_create11(a.s[0], a.s[1]);
+}
+
+fcByte3 fcByte8_asByte3(fcByte8 a) {
+ return fcByte3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcByte4 fcByte8_asByte4(fcByte8 a) {
+ return fcByte4_create1111(a.s[0], a.s[1], a.s[2], a.s[3]);
+}
+
+fcInt8 fcByte8_isEqual(fcByte8 a, fcByte8 b) {
+ return fcInt8_create11111111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0, a.s[4] == b.s[4]? 1 : 0, a.s[5] == b.s[5]? 1 : 0, a.s[6] == b.s[6]? 1 : 0, a.s[7] == b.s[7]? 1 : 0);
+}
+
+fcInt8 fcByte8_isNotEqual(fcByte8 a, fcByte8 b) {
+ return fcInt8_create11111111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0, a.s[4] != b.s[4]? 1 : 0, a.s[5] != b.s[5]? 1 : 0, a.s[6] != b.s[6]? 1 : 0, a.s[7] != b.s[7]? 1 : 0);
+}
+
+fcInt8 fcByte8_isGreater(fcByte8 a, fcByte8 b) {
+ return fcInt8_create11111111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0, a.s[4] > b.s[4]? 1 : 0, a.s[5] > b.s[5]? 1 : 0, a.s[6] > b.s[6]? 1 : 0, a.s[7] > b.s[7]? 1 : 0);
+}
+
+fcInt8 fcByte8_isGreaterEqual(fcByte8 a, fcByte8 b) {
+ return fcInt8_create11111111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0, a.s[4] >= b.s[4]? 1 : 0, a.s[5] >= b.s[5]? 1 : 0, a.s[6] >= b.s[6]? 1 : 0, a.s[7] >= b.s[7]? 1 : 0);
+}
+
+fcInt8 fcByte8_isLess(fcByte8 a, fcByte8 b) {
+ return fcInt8_create11111111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0, a.s[4] < b.s[4]? 1 : 0, a.s[5] < b.s[5]? 1 : 0, a.s[6] < b.s[6]? 1 : 0, a.s[7] < b.s[7]? 1 : 0);
+}
+
+fcInt8 fcByte8_isLessEqual(fcByte8 a, fcByte8 b) {
+ return fcInt8_create11111111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0, a.s[4] <= b.s[4]? 1 : 0, a.s[5] <= b.s[5]? 1 : 0, a.s[6] <= b.s[6]? 1 : 0, a.s[7] <= b.s[7]? 1 : 0);
+}
+
+fcByte8 fcByte8_select(fcByte8 a, fcByte8 b, fcInt8 c) {
+ return fcByte8_create11111111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]), fcMath_select(a.s[4], b.s[4], c.s[4]), fcMath_select(a.s[5], b.s[5], c.s[5]), fcMath_select(a.s[6], b.s[6], c.s[6]), fcMath_select(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt fcByte8_any(fcByte8 a) {
+ return a.s[0] != '\0' || a.s[1] != '\0' || a.s[2] != '\0' || a.s[3] != '\0' || a.s[4] != '\0' || a.s[5] != '\0' || a.s[6] != '\0' || a.s[7] != '\0';
+}
+
+fcInt fcByte8_all(fcByte8 a) {
+ return !(a.s[0] == '\0' || a.s[1] == '\0' || a.s[2] == '\0' || a.s[3] == '\0' || a.s[4] == '\0' || a.s[5] == '\0' || a.s[6] == '\0' || a.s[7] == '\0');
+}
+
+fcByte8 fcByte8_neg(fcByte8 a) {
+ return fcByte8_create11111111(-a.s[0], -a.s[1], -a.s[2], -a.s[3], -a.s[4], -a.s[5], -a.s[6], -a.s[7]);
+}
+
+fcByte8 fcByte8_add(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3], a.s[4] + b.s[4], a.s[5] + b.s[5], a.s[6] + b.s[6], a.s[7] + b.s[7]);
+}
+
+fcByte8 fcByte8_sub(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3], a.s[4] - b.s[4], a.s[5] - b.s[5], a.s[6] - b.s[6], a.s[7] - b.s[7]);
+}
+
+fcByte8 fcByte8_mul(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2], a.s[3] * b.s[3], a.s[4] * b.s[4], a.s[5] * b.s[5], a.s[6] * b.s[6], a.s[7] * b.s[7]);
+}
+
+fcDouble8 fcByte8_muld(fcByte8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]), (fcDouble)(a.s[4] * b.s[4]), (fcDouble)(a.s[5] * b.s[5]), (fcDouble)(a.s[6] * b.s[6]), (fcDouble)(a.s[7] * b.s[7]));
+}
+
+fcFloat8 fcByte8_mulf(fcByte8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]), (fcFloat)(a.s[4] * b.s[4]), (fcFloat)(a.s[5] * b.s[5]), (fcFloat)(a.s[6] * b.s[6]), (fcFloat)(a.s[7] * b.s[7]));
+}
+
+fcByte8 fcByte8_mulk(fcByte8 a, fcByte k) {
+ return fcByte8_create11111111(a.s[0] * k, a.s[1] * k, a.s[2] * k, a.s[3] * k, a.s[4] * k, a.s[5] * k, a.s[6] * k, a.s[7] * k);
+}
+
+fcDouble8 fcByte8_mulkd(fcByte8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k), (fcDouble)(a.s[4] * k), (fcDouble)(a.s[5] * k), (fcDouble)(a.s[6] * k), (fcDouble)(a.s[7] * k));
+}
+
+fcFloat8 fcByte8_mulkf(fcByte8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k), (fcFloat)(a.s[4] * k), (fcFloat)(a.s[5] * k), (fcFloat)(a.s[6] * k), (fcFloat)(a.s[7] * k));
+}
+
+fcByte8 fcByte8_div(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2], a.s[3] / b.s[3], a.s[4] / b.s[4], a.s[5] / b.s[5], a.s[6] / b.s[6], a.s[7] / b.s[7]);
+}
+
+fcDouble8 fcByte8_divd(fcByte8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]), (fcDouble)(a.s[4] / b.s[4]), (fcDouble)(a.s[5] / b.s[5]), (fcDouble)(a.s[6] / b.s[6]), (fcDouble)(a.s[7] / b.s[7]));
+}
+
+fcFloat8 fcByte8_divf(fcByte8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]), (fcFloat)(a.s[4] / b.s[4]), (fcFloat)(a.s[5] / b.s[5]), (fcFloat)(a.s[6] / b.s[6]), (fcFloat)(a.s[7] / b.s[7]));
+}
+
+fcByte8 fcByte8_divk(fcByte8 a, fcByte k) {
+ return fcByte8_create11111111(a.s[0] / k, a.s[1] / k, a.s[2] / k, a.s[3] / k, a.s[4] / k, a.s[5] / k, a.s[6] / k, a.s[7] / k);
+}
+
+fcDouble8 fcByte8_divkd(fcByte8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k), (fcDouble)(a.s[4] / k), (fcDouble)(a.s[5] / k), (fcDouble)(a.s[6] / k), (fcDouble)(a.s[7] / k));
+}
+
+fcFloat8 fcByte8_divkf(fcByte8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k), (fcFloat)(a.s[4] / k), (fcFloat)(a.s[5] / k), (fcFloat)(a.s[6] / k), (fcFloat)(a.s[7] / k));
+}
+
+fcByte8 fcByte8_mod(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2], a.s[3] % b.s[3], a.s[4] % b.s[4], a.s[5] % b.s[5], a.s[6] % b.s[6], a.s[7] % b.s[7]);
+}
+
+fcByte8 fcByte8_modk(fcByte8 a, fcByte k) {
+ return fcByte8_create11111111(a.s[0] % k, a.s[1] % k, a.s[2] % k, a.s[3] % k, a.s[4] % k, a.s[5] % k, a.s[6] % k, a.s[7] % k);
+}
+
+fcByte8 fcByte8_bitAnd(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2], a.s[3] & b.s[3], a.s[4] & b.s[4], a.s[5] & b.s[5], a.s[6] & b.s[6], a.s[7] & b.s[7]);
+}
+
+fcByte8 fcByte8_bitOr(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2], a.s[3] | b.s[3], a.s[4] | b.s[4], a.s[5] | b.s[5], a.s[6] | b.s[6], a.s[7] | b.s[7]);
+}
+
+fcByte8 fcByte8_bitXor(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2], a.s[3] ^ b.s[3], a.s[4] ^ b.s[4], a.s[5] ^ b.s[5], a.s[6] ^ b.s[6], a.s[7] ^ b.s[7]);
+}
+
+fcByte8 fcByte8_bitNot(fcByte8 a) {
+ return fcByte8_create11111111(~a.s[0], ~a.s[1], ~a.s[2], ~a.s[3], ~a.s[4], ~a.s[5], ~a.s[6], ~a.s[7]);
+}
+
+fcByte8 fcByte8_abs(fcByte8 a) {
+ return fcByte8_create11111111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]), fcMath_abs(a.s[4]), fcMath_abs(a.s[5]), fcMath_abs(a.s[6]), fcMath_abs(a.s[7]));
+}
+
+fcByte8 fcByte8_clamp(fcByte8 a, fcByte8 b, fcByte8 c) {
+ return fcByte8_create11111111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]), fcMath_clamp(a.s[4], b.s[4], c.s[4]), fcMath_clamp(a.s[5], b.s[5], c.s[5]), fcMath_clamp(a.s[6], b.s[6], c.s[6]), fcMath_clamp(a.s[7], b.s[7], c.s[7]));
+}
+
+fcByte8 fcByte8_max(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]), fcMath_max(a.s[4], b.s[4]), fcMath_max(a.s[5], b.s[5]), fcMath_max(a.s[6], b.s[6]), fcMath_max(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_maxMag(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]), fcMath_maxMag(a.s[4], b.s[4]), fcMath_maxMag(a.s[5], b.s[5]), fcMath_maxMag(a.s[6], b.s[6]), fcMath_maxMag(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_min(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]), fcMath_min(a.s[4], b.s[4]), fcMath_min(a.s[5], b.s[5]), fcMath_min(a.s[6], b.s[6]), fcMath_min(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_minMag(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]), fcMath_minMag(a.s[4], b.s[4]), fcMath_minMag(a.s[5], b.s[5]), fcMath_minMag(a.s[6], b.s[6]), fcMath_minMag(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_mix(fcByte8 a, fcByte8 b, fcByte8 c) {
+ return fcByte8_create11111111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]), fcMath_mix(a.s[4], b.s[4], c.s[4]), fcMath_mix(a.s[5], b.s[5], c.s[5]), fcMath_mix(a.s[6], b.s[6], c.s[6]), fcMath_mix(a.s[7], b.s[7], c.s[7]));
+}
+
+fcByte8 fcByte8_clampk(fcByte8 v, fcByte min, fcByte max) {
+ return fcByte8_create11111111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max), fcMath_clamp(v.s[4], min, max), fcMath_clamp(v.s[5], min, max), fcMath_clamp(v.s[6], min, max), fcMath_clamp(v.s[7], min, max));
+}
+
+fcByte8 fcByte8_maxk(fcByte8 x, fcByte y) {
+ return fcByte8_create11111111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y), fcMath_max(x.s[4], y), fcMath_max(x.s[5], y), fcMath_max(x.s[6], y), fcMath_max(x.s[7], y));
+}
+
+fcByte8 fcByte8_mink(fcByte8 x, fcByte y) {
+ return fcByte8_create11111111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y), fcMath_min(x.s[4], y), fcMath_min(x.s[5], y), fcMath_min(x.s[6], y), fcMath_min(x.s[7], y));
+}
+
+fcByte8 fcByte8_mixk(fcByte8 x, fcByte8 y, fcByte a) {
+ return fcByte8_create11111111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a), fcMath_mix(x.s[4], y.s[4], a), fcMath_mix(x.s[5], y.s[5], a), fcMath_mix(x.s[6], y.s[6], a), fcMath_mix(x.s[7], y.s[7], a));
+}
+
+fcByte8 fcByte8_absDiff(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]), fcMath_absDiff(a.s[3], b.s[3]), fcMath_absDiff(a.s[4], b.s[4]), fcMath_absDiff(a.s[5], b.s[5]), fcMath_absDiff(a.s[6], b.s[6]), fcMath_absDiff(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_addSat(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_addSatc(a.s[0], b.s[0]), fcMath_addSatc(a.s[1], b.s[1]), fcMath_addSatc(a.s[2], b.s[2]), fcMath_addSatc(a.s[3], b.s[3]), fcMath_addSatc(a.s[4], b.s[4]), fcMath_addSatc(a.s[5], b.s[5]), fcMath_addSatc(a.s[6], b.s[6]), fcMath_addSatc(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_clz(fcByte8 a) {
+ return fcByte8_create11111111(fcMath_clzc(a.s[0]), fcMath_clzc(a.s[1]), fcMath_clzc(a.s[2]), fcMath_clzc(a.s[3]), fcMath_clzc(a.s[4]), fcMath_clzc(a.s[5]), fcMath_clzc(a.s[6]), fcMath_clzc(a.s[7]));
+}
+
+fcByte8 fcByte8_hadd(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_haddc(a.s[0], b.s[0]), fcMath_haddc(a.s[1], b.s[1]), fcMath_haddc(a.s[2], b.s[2]), fcMath_haddc(a.s[3], b.s[3]), fcMath_haddc(a.s[4], b.s[4]), fcMath_haddc(a.s[5], b.s[5]), fcMath_haddc(a.s[6], b.s[6]), fcMath_haddc(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_madHi(fcByte8 a, fcByte8 b, fcByte8 c) {
+ return fcByte8_create11111111(fcMath_madHic(a.s[0], b.s[0], c.s[0]), fcMath_madHic(a.s[1], b.s[1], c.s[1]), fcMath_madHic(a.s[2], b.s[2], c.s[2]), fcMath_madHic(a.s[3], b.s[3], c.s[3]), fcMath_madHic(a.s[4], b.s[4], c.s[4]), fcMath_madHic(a.s[5], b.s[5], c.s[5]), fcMath_madHic(a.s[6], b.s[6], c.s[6]), fcMath_madHic(a.s[7], b.s[7], c.s[7]));
+}
+
+fcByte8 fcByte8_madSat(fcByte8 a, fcByte8 b, fcByte8 c) {
+ return fcByte8_create11111111(fcMath_madSatc(a.s[0], b.s[0], c.s[0]), fcMath_madSatc(a.s[1], b.s[1], c.s[1]), fcMath_madSatc(a.s[2], b.s[2], c.s[2]), fcMath_madSatc(a.s[3], b.s[3], c.s[3]), fcMath_madSatc(a.s[4], b.s[4], c.s[4]), fcMath_madSatc(a.s[5], b.s[5], c.s[5]), fcMath_madSatc(a.s[6], b.s[6], c.s[6]), fcMath_madSatc(a.s[7], b.s[7], c.s[7]));
+}
+
+fcByte8 fcByte8_mulHi(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_mulHic(a.s[0], b.s[0]), fcMath_mulHic(a.s[1], b.s[1]), fcMath_mulHic(a.s[2], b.s[2]), fcMath_mulHic(a.s[3], b.s[3]), fcMath_mulHic(a.s[4], b.s[4]), fcMath_mulHic(a.s[5], b.s[5]), fcMath_mulHic(a.s[6], b.s[6]), fcMath_mulHic(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_rhadd(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_rhaddc(a.s[0], b.s[0]), fcMath_rhaddc(a.s[1], b.s[1]), fcMath_rhaddc(a.s[2], b.s[2]), fcMath_rhaddc(a.s[3], b.s[3]), fcMath_rhaddc(a.s[4], b.s[4]), fcMath_rhaddc(a.s[5], b.s[5]), fcMath_rhaddc(a.s[6], b.s[6]), fcMath_rhaddc(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_rotate(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_rotatec(a.s[0], b.s[0]), fcMath_rotatec(a.s[1], b.s[1]), fcMath_rotatec(a.s[2], b.s[2]), fcMath_rotatec(a.s[3], b.s[3]), fcMath_rotatec(a.s[4], b.s[4]), fcMath_rotatec(a.s[5], b.s[5]), fcMath_rotatec(a.s[6], b.s[6]), fcMath_rotatec(a.s[7], b.s[7]));
+}
+
+fcByte8 fcByte8_subSat(fcByte8 a, fcByte8 b) {
+ return fcByte8_create11111111(fcMath_subSatc(a.s[0], b.s[0]), fcMath_subSatc(a.s[1], b.s[1]), fcMath_subSatc(a.s[2], b.s[2]), fcMath_subSatc(a.s[3], b.s[3]), fcMath_subSatc(a.s[4], b.s[4]), fcMath_subSatc(a.s[5], b.s[5]), fcMath_subSatc(a.s[6], b.s[6]), fcMath_subSatc(a.s[7], b.s[7]));
+}
+
+
+//
+// fcShort2
+//
+
+fcShort2 fcShort2_create1(fcShort v) {
+ return fcShort2_create11(v, v);
+}
+
+void fcShort2_set1(fcShort2* self, fcShort v) {
+ fcShort2_set11(self, v, v);
+}
+
+fcShort2 fcShort2_create11(fcShort x, fcShort y) {
+ fcShort2 result = {{x, y}};
+ return result;
+}
+
+void fcShort2_set11(fcShort2* self, fcShort x, fcShort y) {
+ self->s[0] = x;
+ self->s[1] = y;
+}
+
+fcShort2 fcShort2_create2(fcShort2 vec1) {
+ return fcShort2_create11(vec1.s[0], vec1.s[1]);
+}
+
+void fcShort2_set2(fcShort2* self, fcShort2 vec1) {
+ fcShort2_set11(self, vec1.s[0], vec1.s[1]);
+}
+
+fcByte2 fcShort2_convertByte2(fcShort2 a) {
+ return fcByte2_create11((fcByte)(a.s[0]), (fcByte)(a.s[1]));
+}
+
+fcInt2 fcShort2_convertInt2(fcShort2 a) {
+ return fcInt2_create11((fcInt)(a.s[0]), (fcInt)(a.s[1]));
+}
+
+fcLong2 fcShort2_convertLong2(fcShort2 a) {
+ return fcLong2_create11((fcLong)(a.s[0]), (fcLong)(a.s[1]));
+}
+
+fcFloat2 fcShort2_convertFloat2(fcShort2 a) {
+ return fcFloat2_create11((fcFloat)(a.s[0]), (fcFloat)(a.s[1]));
+}
+
+fcDouble2 fcShort2_convertDouble2(fcShort2 a) {
+ return fcDouble2_create11((fcDouble)(a.s[0]), (fcDouble)(a.s[1]));
+}
+
+fcInt2 fcShort2_isEqual(fcShort2 a, fcShort2 b) {
+ return fcInt2_create11(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0);
+}
+
+fcInt2 fcShort2_isNotEqual(fcShort2 a, fcShort2 b) {
+ return fcInt2_create11(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0);
+}
+
+fcInt2 fcShort2_isGreater(fcShort2 a, fcShort2 b) {
+ return fcInt2_create11(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0);
+}
+
+fcInt2 fcShort2_isGreaterEqual(fcShort2 a, fcShort2 b) {
+ return fcInt2_create11(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0);
+}
+
+fcInt2 fcShort2_isLess(fcShort2 a, fcShort2 b) {
+ return fcInt2_create11(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0);
+}
+
+fcInt2 fcShort2_isLessEqual(fcShort2 a, fcShort2 b) {
+ return fcInt2_create11(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0);
+}
+
+fcShort2 fcShort2_select(fcShort2 a, fcShort2 b, fcInt2 c) {
+ return fcShort2_create11(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt fcShort2_any(fcShort2 a) {
+ return a.s[0] != 0 || a.s[1] != 0;
+}
+
+fcInt fcShort2_all(fcShort2 a) {
+ return !(a.s[0] == 0 || a.s[1] == 0);
+}
+
+fcShort2 fcShort2_neg(fcShort2 a) {
+ return fcShort2_create11(-a.s[0], -a.s[1]);
+}
+
+fcShort2 fcShort2_add(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(a.s[0] + b.s[0], a.s[1] + b.s[1]);
+}
+
+fcShort2 fcShort2_sub(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(a.s[0] - b.s[0], a.s[1] - b.s[1]);
+}
+
+fcShort2 fcShort2_mul(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(a.s[0] * b.s[0], a.s[1] * b.s[1]);
+}
+
+fcDouble2 fcShort2_muld(fcShort2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]));
+}
+
+fcFloat2 fcShort2_mulf(fcShort2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]));
+}
+
+fcShort2 fcShort2_mulk(fcShort2 a, fcShort k) {
+ return fcShort2_create11(a.s[0] * k, a.s[1] * k);
+}
+
+fcDouble2 fcShort2_mulkd(fcShort2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k));
+}
+
+fcFloat2 fcShort2_mulkf(fcShort2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k));
+}
+
+fcShort2 fcShort2_div(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(a.s[0] / b.s[0], a.s[1] / b.s[1]);
+}
+
+fcDouble2 fcShort2_divd(fcShort2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]));
+}
+
+fcFloat2 fcShort2_divf(fcShort2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]));
+}
+
+fcShort2 fcShort2_divk(fcShort2 a, fcShort k) {
+ return fcShort2_create11(a.s[0] / k, a.s[1] / k);
+}
+
+fcDouble2 fcShort2_divkd(fcShort2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k));
+}
+
+fcFloat2 fcShort2_divkf(fcShort2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k));
+}
+
+fcShort2 fcShort2_mod(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(a.s[0] % b.s[0], a.s[1] % b.s[1]);
+}
+
+fcShort2 fcShort2_modk(fcShort2 a, fcShort k) {
+ return fcShort2_create11(a.s[0] % k, a.s[1] % k);
+}
+
+fcShort2 fcShort2_bitAnd(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(a.s[0] & b.s[0], a.s[1] & b.s[1]);
+}
+
+fcShort2 fcShort2_bitOr(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(a.s[0] | b.s[0], a.s[1] | b.s[1]);
+}
+
+fcShort2 fcShort2_bitXor(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1]);
+}
+
+fcShort2 fcShort2_bitNot(fcShort2 a) {
+ return fcShort2_create11(~a.s[0], ~a.s[1]);
+}
+
+fcShort2 fcShort2_abs(fcShort2 a) {
+ return fcShort2_create11(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]));
+}
+
+fcShort2 fcShort2_clamp(fcShort2 a, fcShort2 b, fcShort2 c) {
+ return fcShort2_create11(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]));
+}
+
+fcShort2 fcShort2_max(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_maxMag(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_min(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_minMag(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_mix(fcShort2 a, fcShort2 b, fcShort2 c) {
+ return fcShort2_create11(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]));
+}
+
+fcShort2 fcShort2_clampk(fcShort2 v, fcShort min, fcShort max) {
+ return fcShort2_create11(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max));
+}
+
+fcShort2 fcShort2_maxk(fcShort2 x, fcShort y) {
+ return fcShort2_create11(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y));
+}
+
+fcShort2 fcShort2_mink(fcShort2 x, fcShort y) {
+ return fcShort2_create11(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y));
+}
+
+fcShort2 fcShort2_mixk(fcShort2 x, fcShort2 y, fcShort a) {
+ return fcShort2_create11(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a));
+}
+
+fcShort2 fcShort2_absDiff(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_addSat(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_addSats(a.s[0], b.s[0]), fcMath_addSats(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_clz(fcShort2 a) {
+ return fcShort2_create11(fcMath_clzs(a.s[0]), fcMath_clzs(a.s[1]));
+}
+
+fcShort2 fcShort2_hadd(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_hadds(a.s[0], b.s[0]), fcMath_hadds(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_madHi(fcShort2 a, fcShort2 b, fcShort2 c) {
+ return fcShort2_create11(fcMath_madHis(a.s[0], b.s[0], c.s[0]), fcMath_madHis(a.s[1], b.s[1], c.s[1]));
+}
+
+fcShort2 fcShort2_madSat(fcShort2 a, fcShort2 b, fcShort2 c) {
+ return fcShort2_create11(fcMath_madSats(a.s[0], b.s[0], c.s[0]), fcMath_madSats(a.s[1], b.s[1], c.s[1]));
+}
+
+fcShort2 fcShort2_mulHi(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_mulHis(a.s[0], b.s[0]), fcMath_mulHis(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_rhadd(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_rhadds(a.s[0], b.s[0]), fcMath_rhadds(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_rotate(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_rotates(a.s[0], b.s[0]), fcMath_rotates(a.s[1], b.s[1]));
+}
+
+fcShort2 fcShort2_subSat(fcShort2 a, fcShort2 b) {
+ return fcShort2_create11(fcMath_subSats(a.s[0], b.s[0]), fcMath_subSats(a.s[1], b.s[1]));
+}
+
+
+//
+// fcShort3
+//
+
+fcShort3 fcShort3_create1(fcShort v) {
+ return fcShort3_create111(v, v, v);
+}
+
+void fcShort3_set1(fcShort3* self, fcShort v) {
+ fcShort3_set111(self, v, v, v);
+}
+
+fcShort3 fcShort3_create111(fcShort x, fcShort y, fcShort z) {
+ fcShort3 result = {{x, y, z}};
+ return result;
+}
+
+void fcShort3_set111(fcShort3* self, fcShort x, fcShort y, fcShort z) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+}
+
+fcShort3 fcShort3_create12(fcShort x, fcShort2 vec1) {
+ return fcShort3_create111(x, vec1.s[0], vec1.s[1]);
+}
+
+void fcShort3_set12(fcShort3* self, fcShort x, fcShort2 vec1) {
+ fcShort3_set111(self, x, vec1.s[0], vec1.s[1]);
+}
+
+fcShort3 fcShort3_create21(fcShort2 vec1, fcShort z) {
+ return fcShort3_create111(vec1.s[0], vec1.s[1], z);
+}
+
+void fcShort3_set21(fcShort3* self, fcShort2 vec1, fcShort z) {
+ fcShort3_set111(self, vec1.s[0], vec1.s[1], z);
+}
+
+fcShort3 fcShort3_create3(fcShort3 vec1) {
+ return fcShort3_create111(vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcShort3_set3(fcShort3* self, fcShort3 vec1) {
+ fcShort3_set111(self, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcByte3 fcShort3_convertByte3(fcShort3 a) {
+ return fcByte3_create111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]));
+}
+
+fcInt3 fcShort3_convertInt3(fcShort3 a) {
+ return fcInt3_create111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]));
+}
+
+fcLong3 fcShort3_convertLong3(fcShort3 a) {
+ return fcLong3_create111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]));
+}
+
+fcFloat3 fcShort3_convertFloat3(fcShort3 a) {
+ return fcFloat3_create111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]));
+}
+
+fcDouble3 fcShort3_convertDouble3(fcShort3 a) {
+ return fcDouble3_create111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]));
+}
+
+fcShort2 fcShort3_asShort2(fcShort3 a) {
+ return fcShort2_create11(a.s[0], a.s[1]);
+}
+
+fcInt3 fcShort3_isEqual(fcShort3 a, fcShort3 b) {
+ return fcInt3_create111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0);
+}
+
+fcInt3 fcShort3_isNotEqual(fcShort3 a, fcShort3 b) {
+ return fcInt3_create111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0);
+}
+
+fcInt3 fcShort3_isGreater(fcShort3 a, fcShort3 b) {
+ return fcInt3_create111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0);
+}
+
+fcInt3 fcShort3_isGreaterEqual(fcShort3 a, fcShort3 b) {
+ return fcInt3_create111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0);
+}
+
+fcInt3 fcShort3_isLess(fcShort3 a, fcShort3 b) {
+ return fcInt3_create111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0);
+}
+
+fcInt3 fcShort3_isLessEqual(fcShort3 a, fcShort3 b) {
+ return fcInt3_create111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0);
+}
+
+fcShort3 fcShort3_select(fcShort3 a, fcShort3 b, fcInt3 c) {
+ return fcShort3_create111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt fcShort3_any(fcShort3 a) {
+ return a.s[0] != 0 || a.s[1] != 0 || a.s[2] != 0;
+}
+
+fcInt fcShort3_all(fcShort3 a) {
+ return !(a.s[0] == 0 || a.s[1] == 0 || a.s[2] == 0);
+}
+
+fcShort3 fcShort3_neg(fcShort3 a) {
+ return fcShort3_create111(-a.s[0], -a.s[1], -a.s[2]);
+}
+
+fcShort3 fcShort3_add(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2]);
+}
+
+fcShort3 fcShort3_sub(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2]);
+}
+
+fcShort3 fcShort3_mul(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2]);
+}
+
+fcDouble3 fcShort3_muld(fcShort3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]));
+}
+
+fcFloat3 fcShort3_mulf(fcShort3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]));
+}
+
+fcShort3 fcShort3_mulk(fcShort3 a, fcShort k) {
+ return fcShort3_create111(a.s[0] * k, a.s[1] * k, a.s[2] * k);
+}
+
+fcDouble3 fcShort3_mulkd(fcShort3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k));
+}
+
+fcFloat3 fcShort3_mulkf(fcShort3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k));
+}
+
+fcShort3 fcShort3_div(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2]);
+}
+
+fcDouble3 fcShort3_divd(fcShort3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]));
+}
+
+fcFloat3 fcShort3_divf(fcShort3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]));
+}
+
+fcShort3 fcShort3_divk(fcShort3 a, fcShort k) {
+ return fcShort3_create111(a.s[0] / k, a.s[1] / k, a.s[2] / k);
+}
+
+fcDouble3 fcShort3_divkd(fcShort3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k));
+}
+
+fcFloat3 fcShort3_divkf(fcShort3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k));
+}
+
+fcShort3 fcShort3_mod(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2]);
+}
+
+fcShort3 fcShort3_modk(fcShort3 a, fcShort k) {
+ return fcShort3_create111(a.s[0] % k, a.s[1] % k, a.s[2] % k);
+}
+
+fcShort3 fcShort3_bitAnd(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2]);
+}
+
+fcShort3 fcShort3_bitOr(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2]);
+}
+
+fcShort3 fcShort3_bitXor(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2]);
+}
+
+fcShort3 fcShort3_bitNot(fcShort3 a) {
+ return fcShort3_create111(~a.s[0], ~a.s[1], ~a.s[2]);
+}
+
+fcShort3 fcShort3_abs(fcShort3 a) {
+ return fcShort3_create111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]));
+}
+
+fcShort3 fcShort3_clamp(fcShort3 a, fcShort3 b, fcShort3 c) {
+ return fcShort3_create111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]));
+}
+
+fcShort3 fcShort3_max(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_maxMag(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_min(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_minMag(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_mix(fcShort3 a, fcShort3 b, fcShort3 c) {
+ return fcShort3_create111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]));
+}
+
+fcShort3 fcShort3_clampk(fcShort3 v, fcShort min, fcShort max) {
+ return fcShort3_create111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max));
+}
+
+fcShort3 fcShort3_maxk(fcShort3 x, fcShort y) {
+ return fcShort3_create111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y));
+}
+
+fcShort3 fcShort3_mink(fcShort3 x, fcShort y) {
+ return fcShort3_create111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y));
+}
+
+fcShort3 fcShort3_mixk(fcShort3 x, fcShort3 y, fcShort a) {
+ return fcShort3_create111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a));
+}
+
+fcShort3 fcShort3_absDiff(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_addSat(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_addSats(a.s[0], b.s[0]), fcMath_addSats(a.s[1], b.s[1]), fcMath_addSats(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_clz(fcShort3 a) {
+ return fcShort3_create111(fcMath_clzs(a.s[0]), fcMath_clzs(a.s[1]), fcMath_clzs(a.s[2]));
+}
+
+fcShort3 fcShort3_hadd(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_hadds(a.s[0], b.s[0]), fcMath_hadds(a.s[1], b.s[1]), fcMath_hadds(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_madHi(fcShort3 a, fcShort3 b, fcShort3 c) {
+ return fcShort3_create111(fcMath_madHis(a.s[0], b.s[0], c.s[0]), fcMath_madHis(a.s[1], b.s[1], c.s[1]), fcMath_madHis(a.s[2], b.s[2], c.s[2]));
+}
+
+fcShort3 fcShort3_madSat(fcShort3 a, fcShort3 b, fcShort3 c) {
+ return fcShort3_create111(fcMath_madSats(a.s[0], b.s[0], c.s[0]), fcMath_madSats(a.s[1], b.s[1], c.s[1]), fcMath_madSats(a.s[2], b.s[2], c.s[2]));
+}
+
+fcShort3 fcShort3_mulHi(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_mulHis(a.s[0], b.s[0]), fcMath_mulHis(a.s[1], b.s[1]), fcMath_mulHis(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_rhadd(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_rhadds(a.s[0], b.s[0]), fcMath_rhadds(a.s[1], b.s[1]), fcMath_rhadds(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_rotate(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_rotates(a.s[0], b.s[0]), fcMath_rotates(a.s[1], b.s[1]), fcMath_rotates(a.s[2], b.s[2]));
+}
+
+fcShort3 fcShort3_subSat(fcShort3 a, fcShort3 b) {
+ return fcShort3_create111(fcMath_subSats(a.s[0], b.s[0]), fcMath_subSats(a.s[1], b.s[1]), fcMath_subSats(a.s[2], b.s[2]));
+}
+
+
+//
+// fcShort4
+//
+
+fcShort4 fcShort4_create1(fcShort v) {
+ return fcShort4_create1111(v, v, v, v);
+}
+
+void fcShort4_set1(fcShort4* self, fcShort v) {
+ fcShort4_set1111(self, v, v, v, v);
+}
+
+fcShort4 fcShort4_create1111(fcShort x, fcShort y, fcShort z, fcShort w) {
+ fcShort4 result = {{x, y, z, w}};
+ return result;
+}
+
+void fcShort4_set1111(fcShort4* self, fcShort x, fcShort y, fcShort z, fcShort w) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+}
+
+fcShort4 fcShort4_create112(fcShort x, fcShort y, fcShort2 vec1) {
+ return fcShort4_create1111(x, y, vec1.s[0], vec1.s[1]);
+}
+
+void fcShort4_set112(fcShort4* self, fcShort x, fcShort y, fcShort2 vec1) {
+ fcShort4_set1111(self, x, y, vec1.s[0], vec1.s[1]);
+}
+
+fcShort4 fcShort4_create121(fcShort x, fcShort2 vec1, fcShort w) {
+ return fcShort4_create1111(x, vec1.s[0], vec1.s[1], w);
+}
+
+void fcShort4_set121(fcShort4* self, fcShort x, fcShort2 vec1, fcShort w) {
+ fcShort4_set1111(self, x, vec1.s[0], vec1.s[1], w);
+}
+
+fcShort4 fcShort4_create13(fcShort x, fcShort3 vec1) {
+ return fcShort4_create1111(x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcShort4_set13(fcShort4* self, fcShort x, fcShort3 vec1) {
+ fcShort4_set1111(self, x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcShort4 fcShort4_create211(fcShort2 vec1, fcShort z, fcShort w) {
+ return fcShort4_create1111(vec1.s[0], vec1.s[1], z, w);
+}
+
+void fcShort4_set211(fcShort4* self, fcShort2 vec1, fcShort z, fcShort w) {
+ fcShort4_set1111(self, vec1.s[0], vec1.s[1], z, w);
+}
+
+fcShort4 fcShort4_create22(fcShort2 vec1, fcShort2 vec2) {
+ return fcShort4_create1111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcShort4_set22(fcShort4* self, fcShort2 vec1, fcShort2 vec2) {
+ fcShort4_set1111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcShort4 fcShort4_create31(fcShort3 vec1, fcShort w) {
+ return fcShort4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+void fcShort4_set31(fcShort4* self, fcShort3 vec1, fcShort w) {
+ fcShort4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+fcShort4 fcShort4_create4(fcShort4 vec1) {
+ return fcShort4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcShort4_set4(fcShort4* self, fcShort4 vec1) {
+ fcShort4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcShort2 fcShort4_odd(fcShort4 a) {
+ return fcShort2_create11(a.s[1], a.s[3]);
+}
+
+fcShort2 fcShort4_even(fcShort4 a) {
+ return fcShort2_create11(a.s[0], a.s[2]);
+}
+
+fcByte4 fcShort4_convertByte4(fcShort4 a) {
+ return fcByte4_create1111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]));
+}
+
+fcInt4 fcShort4_convertInt4(fcShort4 a) {
+ return fcInt4_create1111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]), (fcInt)(a.s[3]));
+}
+
+fcLong4 fcShort4_convertLong4(fcShort4 a) {
+ return fcLong4_create1111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]), (fcLong)(a.s[3]));
+}
+
+fcFloat4 fcShort4_convertFloat4(fcShort4 a) {
+ return fcFloat4_create1111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]), (fcFloat)(a.s[3]));
+}
+
+fcDouble4 fcShort4_convertDouble4(fcShort4 a) {
+ return fcDouble4_create1111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]), (fcDouble)(a.s[3]));
+}
+
+fcShort2 fcShort4_asShort2(fcShort4 a) {
+ return fcShort2_create11(a.s[0], a.s[1]);
+}
+
+fcShort3 fcShort4_asShort3(fcShort4 a) {
+ return fcShort3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcInt4 fcShort4_isEqual(fcShort4 a, fcShort4 b) {
+ return fcInt4_create1111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
+}
+
+fcInt4 fcShort4_isNotEqual(fcShort4 a, fcShort4 b) {
+ return fcInt4_create1111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
+}
+
+fcInt4 fcShort4_isGreater(fcShort4 a, fcShort4 b) {
+ return fcInt4_create1111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
+}
+
+fcInt4 fcShort4_isGreaterEqual(fcShort4 a, fcShort4 b) {
+ return fcInt4_create1111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
+}
+
+fcInt4 fcShort4_isLess(fcShort4 a, fcShort4 b) {
+ return fcInt4_create1111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
+}
+
+fcInt4 fcShort4_isLessEqual(fcShort4 a, fcShort4 b) {
+ return fcInt4_create1111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
+}
+
+fcShort4 fcShort4_select(fcShort4 a, fcShort4 b, fcInt4 c) {
+ return fcShort4_create1111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt fcShort4_any(fcShort4 a) {
+ return a.s[0] != 0 || a.s[1] != 0 || a.s[2] != 0 || a.s[3] != 0;
+}
+
+fcInt fcShort4_all(fcShort4 a) {
+ return !(a.s[0] == 0 || a.s[1] == 0 || a.s[2] == 0 || a.s[3] == 0);
+}
+
+fcShort4 fcShort4_neg(fcShort4 a) {
+ return fcShort4_create1111(-a.s[0], -a.s[1], -a.s[2], -a.s[3]);
+}
+
+fcShort4 fcShort4_add(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3]);
+}
+
+fcShort4 fcShort4_sub(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3]);
+}
+
+fcShort4 fcShort4_mul(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2], a.s[3] * b.s[3]);
+}
+
+fcDouble4 fcShort4_muld(fcShort4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]));
+}
+
+fcFloat4 fcShort4_mulf(fcShort4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]));
+}
+
+fcShort4 fcShort4_mulk(fcShort4 a, fcShort k) {
+ return fcShort4_create1111(a.s[0] * k, a.s[1] * k, a.s[2] * k, a.s[3] * k);
+}
+
+fcDouble4 fcShort4_mulkd(fcShort4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k));
+}
+
+fcFloat4 fcShort4_mulkf(fcShort4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k));
+}
+
+fcShort4 fcShort4_div(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2], a.s[3] / b.s[3]);
+}
+
+fcDouble4 fcShort4_divd(fcShort4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]));
+}
+
+fcFloat4 fcShort4_divf(fcShort4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]));
+}
+
+fcShort4 fcShort4_divk(fcShort4 a, fcShort k) {
+ return fcShort4_create1111(a.s[0] / k, a.s[1] / k, a.s[2] / k, a.s[3] / k);
+}
+
+fcDouble4 fcShort4_divkd(fcShort4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k));
+}
+
+fcFloat4 fcShort4_divkf(fcShort4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k));
+}
+
+fcShort4 fcShort4_mod(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2], a.s[3] % b.s[3]);
+}
+
+fcShort4 fcShort4_modk(fcShort4 a, fcShort k) {
+ return fcShort4_create1111(a.s[0] % k, a.s[1] % k, a.s[2] % k, a.s[3] % k);
+}
+
+fcShort4 fcShort4_bitAnd(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2], a.s[3] & b.s[3]);
+}
+
+fcShort4 fcShort4_bitOr(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2], a.s[3] | b.s[3]);
+}
+
+fcShort4 fcShort4_bitXor(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2], a.s[3] ^ b.s[3]);
+}
+
+fcShort4 fcShort4_bitNot(fcShort4 a) {
+ return fcShort4_create1111(~a.s[0], ~a.s[1], ~a.s[2], ~a.s[3]);
+}
+
+fcShort4 fcShort4_abs(fcShort4 a) {
+ return fcShort4_create1111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]));
+}
+
+fcShort4 fcShort4_clamp(fcShort4 a, fcShort4 b, fcShort4 c) {
+ return fcShort4_create1111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]));
+}
+
+fcShort4 fcShort4_max(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_maxMag(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_min(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_minMag(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_mix(fcShort4 a, fcShort4 b, fcShort4 c) {
+ return fcShort4_create1111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]));
+}
+
+fcShort4 fcShort4_clampk(fcShort4 v, fcShort min, fcShort max) {
+ return fcShort4_create1111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max));
+}
+
+fcShort4 fcShort4_maxk(fcShort4 x, fcShort y) {
+ return fcShort4_create1111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y));
+}
+
+fcShort4 fcShort4_mink(fcShort4 x, fcShort y) {
+ return fcShort4_create1111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y));
+}
+
+fcShort4 fcShort4_mixk(fcShort4 x, fcShort4 y, fcShort a) {
+ return fcShort4_create1111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a));
+}
+
+fcShort4 fcShort4_absDiff(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]), fcMath_absDiff(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_addSat(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_addSats(a.s[0], b.s[0]), fcMath_addSats(a.s[1], b.s[1]), fcMath_addSats(a.s[2], b.s[2]), fcMath_addSats(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_clz(fcShort4 a) {
+ return fcShort4_create1111(fcMath_clzs(a.s[0]), fcMath_clzs(a.s[1]), fcMath_clzs(a.s[2]), fcMath_clzs(a.s[3]));
+}
+
+fcShort4 fcShort4_hadd(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_hadds(a.s[0], b.s[0]), fcMath_hadds(a.s[1], b.s[1]), fcMath_hadds(a.s[2], b.s[2]), fcMath_hadds(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_madHi(fcShort4 a, fcShort4 b, fcShort4 c) {
+ return fcShort4_create1111(fcMath_madHis(a.s[0], b.s[0], c.s[0]), fcMath_madHis(a.s[1], b.s[1], c.s[1]), fcMath_madHis(a.s[2], b.s[2], c.s[2]), fcMath_madHis(a.s[3], b.s[3], c.s[3]));
+}
+
+fcShort4 fcShort4_madSat(fcShort4 a, fcShort4 b, fcShort4 c) {
+ return fcShort4_create1111(fcMath_madSats(a.s[0], b.s[0], c.s[0]), fcMath_madSats(a.s[1], b.s[1], c.s[1]), fcMath_madSats(a.s[2], b.s[2], c.s[2]), fcMath_madSats(a.s[3], b.s[3], c.s[3]));
+}
+
+fcShort4 fcShort4_mulHi(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_mulHis(a.s[0], b.s[0]), fcMath_mulHis(a.s[1], b.s[1]), fcMath_mulHis(a.s[2], b.s[2]), fcMath_mulHis(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_rhadd(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_rhadds(a.s[0], b.s[0]), fcMath_rhadds(a.s[1], b.s[1]), fcMath_rhadds(a.s[2], b.s[2]), fcMath_rhadds(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_rotate(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_rotates(a.s[0], b.s[0]), fcMath_rotates(a.s[1], b.s[1]), fcMath_rotates(a.s[2], b.s[2]), fcMath_rotates(a.s[3], b.s[3]));
+}
+
+fcShort4 fcShort4_subSat(fcShort4 a, fcShort4 b) {
+ return fcShort4_create1111(fcMath_subSats(a.s[0], b.s[0]), fcMath_subSats(a.s[1], b.s[1]), fcMath_subSats(a.s[2], b.s[2]), fcMath_subSats(a.s[3], b.s[3]));
+}
+
+
+//
+// fcShort8
+//
+
+fcShort8 fcShort8_create1(fcShort v) {
+ return fcShort8_create11111111(v, v, v, v, v, v, v, v);
+}
+
+void fcShort8_set1(fcShort8* self, fcShort v) {
+ fcShort8_set11111111(self, v, v, v, v, v, v, v, v);
+}
+
+fcShort8 fcShort8_create11111111(fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8 result = {{x, y, z, w, s4, s5, s6, s7}};
+ return result;
+}
+
+void fcShort8_set11111111(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+ self->s[4] = s4;
+ self->s[5] = s5;
+ self->s[6] = s6;
+ self->s[7] = s7;
+}
+
+fcShort8 fcShort8_create1111112(fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort2 vec1) {
+ return fcShort8_create11111111(x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+void fcShort8_set1111112(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort2 vec1) {
+ fcShort8_set11111111(self, x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+fcShort8 fcShort8_create1111121(fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort2 vec1, fcShort s7) {
+ return fcShort8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+void fcShort8_set1111121(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort2 vec1, fcShort s7) {
+ fcShort8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+fcShort8 fcShort8_create111113(fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort3 vec1) {
+ return fcShort8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcShort8_set111113(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort s4, fcShort3 vec1) {
+ fcShort8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcShort8 fcShort8_create1111211(fcShort x, fcShort y, fcShort z, fcShort w, fcShort2 vec1, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+void fcShort8_set1111211(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort2 vec1, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+fcShort8 fcShort8_create111122(fcShort x, fcShort y, fcShort z, fcShort w, fcShort2 vec1, fcShort2 vec2) {
+ return fcShort8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set111122(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort2 vec1, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create111131(fcShort x, fcShort y, fcShort z, fcShort w, fcShort3 vec1, fcShort s7) {
+ return fcShort8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+void fcShort8_set111131(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort3 vec1, fcShort s7) {
+ fcShort8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+fcShort8 fcShort8_create11114(fcShort x, fcShort y, fcShort z, fcShort w, fcShort4 vec1) {
+ return fcShort8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcShort8_set11114(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort w, fcShort4 vec1) {
+ fcShort8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcShort8 fcShort8_create1112111(fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+void fcShort8_set1112111(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+fcShort8 fcShort8_create111212(fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set111212(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create111221(fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set111221(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create11123(fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort3 vec2) {
+ return fcShort8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set11123(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort2 vec1, fcShort3 vec2) {
+ fcShort8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create111311(fcShort x, fcShort y, fcShort z, fcShort3 vec1, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+void fcShort8_set111311(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort3 vec1, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+fcShort8 fcShort8_create11132(fcShort x, fcShort y, fcShort z, fcShort3 vec1, fcShort2 vec2) {
+ return fcShort8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set11132(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort3 vec1, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create11141(fcShort x, fcShort y, fcShort z, fcShort4 vec1, fcShort s7) {
+ return fcShort8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+void fcShort8_set11141(fcShort8* self, fcShort x, fcShort y, fcShort z, fcShort4 vec1, fcShort s7) {
+ fcShort8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+fcShort8 fcShort8_create1121111(fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+void fcShort8_set1121111(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+fcShort8 fcShort8_create112112(fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set112112(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create112121(fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set112121(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create11213(fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort3 vec2) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set11213(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort s4, fcShort3 vec2) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create112211(fcShort x, fcShort y, fcShort2 vec1, fcShort2 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcShort8_set112211(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort2 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcShort8 fcShort8_create11222(fcShort x, fcShort y, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set11222(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create11231(fcShort x, fcShort y, fcShort2 vec1, fcShort3 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcShort8_set11231(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort3 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcShort8 fcShort8_create1124(fcShort x, fcShort y, fcShort2 vec1, fcShort4 vec2) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcShort8_set1124(fcShort8* self, fcShort x, fcShort y, fcShort2 vec1, fcShort4 vec2) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcShort8 fcShort8_create113111(fcShort x, fcShort y, fcShort3 vec1, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+void fcShort8_set113111(fcShort8* self, fcShort x, fcShort y, fcShort3 vec1, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+fcShort8 fcShort8_create11312(fcShort x, fcShort y, fcShort3 vec1, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set11312(fcShort8* self, fcShort x, fcShort y, fcShort3 vec1, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create11321(fcShort x, fcShort y, fcShort3 vec1, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set11321(fcShort8* self, fcShort x, fcShort y, fcShort3 vec1, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create1133(fcShort x, fcShort y, fcShort3 vec1, fcShort3 vec2) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set1133(fcShort8* self, fcShort x, fcShort y, fcShort3 vec1, fcShort3 vec2) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create11411(fcShort x, fcShort y, fcShort4 vec1, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+void fcShort8_set11411(fcShort8* self, fcShort x, fcShort y, fcShort4 vec1, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+fcShort8 fcShort8_create1142(fcShort x, fcShort y, fcShort4 vec1, fcShort2 vec2) {
+ return fcShort8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set1142(fcShort8* self, fcShort x, fcShort y, fcShort4 vec1, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create1211111(fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+void fcShort8_set1211111(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+fcShort8 fcShort8_create121112(fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set121112(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create121121(fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set121121(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create12113(fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort3 vec2) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set12113(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort s4, fcShort3 vec2) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create121211(fcShort x, fcShort2 vec1, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcShort8_set121211(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcShort8 fcShort8_create12122(fcShort x, fcShort2 vec1, fcShort w, fcShort2 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set12122(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort2 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create12131(fcShort x, fcShort2 vec1, fcShort w, fcShort3 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcShort8_set12131(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort3 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcShort8 fcShort8_create1214(fcShort x, fcShort2 vec1, fcShort w, fcShort4 vec2) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcShort8_set1214(fcShort8* self, fcShort x, fcShort2 vec1, fcShort w, fcShort4 vec2) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcShort8 fcShort8_create122111(fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcShort8_set122111(fcShort8* self, fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcShort8 fcShort8_create12212(fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort s5, fcShort2 vec3) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set12212(fcShort8* self, fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort s5, fcShort2 vec3) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create12221(fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcShort8_set12221(fcShort8* self, fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcShort8 fcShort8_create1223(fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort3 vec3) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcShort8_set1223(fcShort8* self, fcShort x, fcShort2 vec1, fcShort2 vec2, fcShort3 vec3) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcShort8 fcShort8_create12311(fcShort x, fcShort2 vec1, fcShort3 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcShort8_set12311(fcShort8* self, fcShort x, fcShort2 vec1, fcShort3 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcShort8 fcShort8_create1232(fcShort x, fcShort2 vec1, fcShort3 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set1232(fcShort8* self, fcShort x, fcShort2 vec1, fcShort3 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create1241(fcShort x, fcShort2 vec1, fcShort4 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcShort8_set1241(fcShort8* self, fcShort x, fcShort2 vec1, fcShort4 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcShort8 fcShort8_create131111(fcShort x, fcShort3 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+void fcShort8_set131111(fcShort8* self, fcShort x, fcShort3 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+fcShort8 fcShort8_create13112(fcShort x, fcShort3 vec1, fcShort s4, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set13112(fcShort8* self, fcShort x, fcShort3 vec1, fcShort s4, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create13121(fcShort x, fcShort3 vec1, fcShort s4, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set13121(fcShort8* self, fcShort x, fcShort3 vec1, fcShort s4, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create1313(fcShort x, fcShort3 vec1, fcShort s4, fcShort3 vec2) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set1313(fcShort8* self, fcShort x, fcShort3 vec1, fcShort s4, fcShort3 vec2) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create13211(fcShort x, fcShort3 vec1, fcShort2 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcShort8_set13211(fcShort8* self, fcShort x, fcShort3 vec1, fcShort2 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcShort8 fcShort8_create1322(fcShort x, fcShort3 vec1, fcShort2 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set1322(fcShort8* self, fcShort x, fcShort3 vec1, fcShort2 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create1331(fcShort x, fcShort3 vec1, fcShort3 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcShort8_set1331(fcShort8* self, fcShort x, fcShort3 vec1, fcShort3 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcShort8 fcShort8_create134(fcShort x, fcShort3 vec1, fcShort4 vec2) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcShort8_set134(fcShort8* self, fcShort x, fcShort3 vec1, fcShort4 vec2) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcShort8 fcShort8_create14111(fcShort x, fcShort4 vec1, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+void fcShort8_set14111(fcShort8* self, fcShort x, fcShort4 vec1, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+fcShort8 fcShort8_create1412(fcShort x, fcShort4 vec1, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set1412(fcShort8* self, fcShort x, fcShort4 vec1, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create1421(fcShort x, fcShort4 vec1, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set1421(fcShort8* self, fcShort x, fcShort4 vec1, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create143(fcShort x, fcShort4 vec1, fcShort3 vec2) {
+ return fcShort8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set143(fcShort8* self, fcShort x, fcShort4 vec1, fcShort3 vec2) {
+ fcShort8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create2111111(fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+void fcShort8_set2111111(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+fcShort8 fcShort8_create211112(fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set211112(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create211121(fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set211121(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create21113(fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort3 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set21113(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort s4, fcShort3 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create211211(fcShort2 vec1, fcShort z, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcShort8_set211211(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcShort8 fcShort8_create21122(fcShort2 vec1, fcShort z, fcShort w, fcShort2 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set21122(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort2 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create21131(fcShort2 vec1, fcShort z, fcShort w, fcShort3 vec2, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcShort8_set21131(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort3 vec2, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcShort8 fcShort8_create2114(fcShort2 vec1, fcShort z, fcShort w, fcShort4 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcShort8_set2114(fcShort8* self, fcShort2 vec1, fcShort z, fcShort w, fcShort4 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcShort8 fcShort8_create212111(fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcShort8_set212111(fcShort8* self, fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcShort8 fcShort8_create21212(fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort s5, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set21212(fcShort8* self, fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort s5, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create21221(fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort2 vec3, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcShort8_set21221(fcShort8* self, fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort2 vec3, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcShort8 fcShort8_create2123(fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort3 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcShort8_set2123(fcShort8* self, fcShort2 vec1, fcShort z, fcShort2 vec2, fcShort3 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcShort8 fcShort8_create21311(fcShort2 vec1, fcShort z, fcShort3 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcShort8_set21311(fcShort8* self, fcShort2 vec1, fcShort z, fcShort3 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcShort8 fcShort8_create2132(fcShort2 vec1, fcShort z, fcShort3 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set2132(fcShort8* self, fcShort2 vec1, fcShort z, fcShort3 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create2141(fcShort2 vec1, fcShort z, fcShort4 vec2, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcShort8_set2141(fcShort8* self, fcShort2 vec1, fcShort z, fcShort4 vec2, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcShort8 fcShort8_create221111(fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+void fcShort8_set221111(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+fcShort8 fcShort8_create22112(fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort s5, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set22112(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort s5, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create22121(fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort2 vec3, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+void fcShort8_set22121(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort2 vec3, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+fcShort8 fcShort8_create2213(fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort3 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcShort8_set2213(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort s4, fcShort3 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcShort8 fcShort8_create22211(fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+void fcShort8_set22211(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+fcShort8 fcShort8_create2222(fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort2 vec4) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+void fcShort8_set2222(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort2 vec3, fcShort2 vec4) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+fcShort8 fcShort8_create2231(fcShort2 vec1, fcShort2 vec2, fcShort3 vec3, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+void fcShort8_set2231(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort3 vec3, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+fcShort8 fcShort8_create224(fcShort2 vec1, fcShort2 vec2, fcShort4 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+void fcShort8_set224(fcShort8* self, fcShort2 vec1, fcShort2 vec2, fcShort4 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+fcShort8 fcShort8_create23111(fcShort2 vec1, fcShort3 vec2, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+void fcShort8_set23111(fcShort8* self, fcShort2 vec1, fcShort3 vec2, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+fcShort8 fcShort8_create2312(fcShort2 vec1, fcShort3 vec2, fcShort s5, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set2312(fcShort8* self, fcShort2 vec1, fcShort3 vec2, fcShort s5, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create2321(fcShort2 vec1, fcShort3 vec2, fcShort2 vec3, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcShort8_set2321(fcShort8* self, fcShort2 vec1, fcShort3 vec2, fcShort2 vec3, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+fcShort8 fcShort8_create233(fcShort2 vec1, fcShort3 vec2, fcShort3 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcShort8_set233(fcShort8* self, fcShort2 vec1, fcShort3 vec2, fcShort3 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcShort8 fcShort8_create2411(fcShort2 vec1, fcShort4 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+void fcShort8_set2411(fcShort8* self, fcShort2 vec1, fcShort4 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+fcShort8 fcShort8_create242(fcShort2 vec1, fcShort4 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set242(fcShort8* self, fcShort2 vec1, fcShort4 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create311111(fcShort3 vec1, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+void fcShort8_set311111(fcShort8* self, fcShort3 vec1, fcShort w, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+fcShort8 fcShort8_create31112(fcShort3 vec1, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set31112(fcShort8* self, fcShort3 vec1, fcShort w, fcShort s4, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create31121(fcShort3 vec1, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set31121(fcShort8* self, fcShort3 vec1, fcShort w, fcShort s4, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create3113(fcShort3 vec1, fcShort w, fcShort s4, fcShort3 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set3113(fcShort8* self, fcShort3 vec1, fcShort w, fcShort s4, fcShort3 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create31211(fcShort3 vec1, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcShort8_set31211(fcShort8* self, fcShort3 vec1, fcShort w, fcShort2 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcShort8 fcShort8_create3122(fcShort3 vec1, fcShort w, fcShort2 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set3122(fcShort8* self, fcShort3 vec1, fcShort w, fcShort2 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create3131(fcShort3 vec1, fcShort w, fcShort3 vec2, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcShort8_set3131(fcShort8* self, fcShort3 vec1, fcShort w, fcShort3 vec2, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcShort8 fcShort8_create314(fcShort3 vec1, fcShort w, fcShort4 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcShort8_set314(fcShort8* self, fcShort3 vec1, fcShort w, fcShort4 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcShort8 fcShort8_create32111(fcShort3 vec1, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcShort8_set32111(fcShort8* self, fcShort3 vec1, fcShort2 vec2, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcShort8 fcShort8_create3212(fcShort3 vec1, fcShort2 vec2, fcShort s5, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set3212(fcShort8* self, fcShort3 vec1, fcShort2 vec2, fcShort s5, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create3221(fcShort3 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcShort8_set3221(fcShort8* self, fcShort3 vec1, fcShort2 vec2, fcShort2 vec3, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcShort8 fcShort8_create323(fcShort3 vec1, fcShort2 vec2, fcShort3 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcShort8_set323(fcShort8* self, fcShort3 vec1, fcShort2 vec2, fcShort3 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcShort8 fcShort8_create3311(fcShort3 vec1, fcShort3 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcShort8_set3311(fcShort8* self, fcShort3 vec1, fcShort3 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcShort8 fcShort8_create332(fcShort3 vec1, fcShort3 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set332(fcShort8* self, fcShort3 vec1, fcShort3 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create341(fcShort3 vec1, fcShort4 vec2, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcShort8_set341(fcShort8* self, fcShort3 vec1, fcShort4 vec2, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcShort8 fcShort8_create41111(fcShort4 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+void fcShort8_set41111(fcShort8* self, fcShort4 vec1, fcShort s4, fcShort s5, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+fcShort8 fcShort8_create4112(fcShort4 vec1, fcShort s4, fcShort s5, fcShort2 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcShort8_set4112(fcShort8* self, fcShort4 vec1, fcShort s4, fcShort s5, fcShort2 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcShort8 fcShort8_create4121(fcShort4 vec1, fcShort s4, fcShort2 vec2, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcShort8_set4121(fcShort8* self, fcShort4 vec1, fcShort s4, fcShort2 vec2, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcShort8 fcShort8_create413(fcShort4 vec1, fcShort s4, fcShort3 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcShort8_set413(fcShort8* self, fcShort4 vec1, fcShort s4, fcShort3 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcShort8 fcShort8_create4211(fcShort4 vec1, fcShort2 vec2, fcShort s6, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcShort8_set4211(fcShort8* self, fcShort4 vec1, fcShort2 vec2, fcShort s6, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcShort8 fcShort8_create422(fcShort4 vec1, fcShort2 vec2, fcShort2 vec3) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcShort8_set422(fcShort8* self, fcShort4 vec1, fcShort2 vec2, fcShort2 vec3) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcShort8 fcShort8_create431(fcShort4 vec1, fcShort3 vec2, fcShort s7) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcShort8_set431(fcShort8* self, fcShort4 vec1, fcShort3 vec2, fcShort s7) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcShort8 fcShort8_create44(fcShort4 vec1, fcShort4 vec2) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcShort8_set44(fcShort8* self, fcShort4 vec1, fcShort4 vec2) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcShort8 fcShort8_create8(fcShort8 vec1) {
+ return fcShort8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+void fcShort8_set8(fcShort8* self, fcShort8 vec1) {
+ fcShort8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+fcShort4 fcShort8_odd(fcShort8 a) {
+ return fcShort4_create1111(a.s[1], a.s[3], a.s[5], a.s[7]);
+}
+
+fcShort4 fcShort8_even(fcShort8 a) {
+ return fcShort4_create1111(a.s[0], a.s[2], a.s[4], a.s[6]);
+}
+
+fcByte8 fcShort8_convertByte8(fcShort8 a) {
+ return fcByte8_create11111111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]), (fcByte)(a.s[4]), (fcByte)(a.s[5]), (fcByte)(a.s[6]), (fcByte)(a.s[7]));
+}
+
+fcInt8 fcShort8_convertInt8(fcShort8 a) {
+ return fcInt8_create11111111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]), (fcInt)(a.s[3]), (fcInt)(a.s[4]), (fcInt)(a.s[5]), (fcInt)(a.s[6]), (fcInt)(a.s[7]));
+}
+
+fcLong8 fcShort8_convertLong8(fcShort8 a) {
+ return fcLong8_create11111111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]), (fcLong)(a.s[3]), (fcLong)(a.s[4]), (fcLong)(a.s[5]), (fcLong)(a.s[6]), (fcLong)(a.s[7]));
+}
+
+fcFloat8 fcShort8_convertFloat8(fcShort8 a) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]), (fcFloat)(a.s[3]), (fcFloat)(a.s[4]), (fcFloat)(a.s[5]), (fcFloat)(a.s[6]), (fcFloat)(a.s[7]));
+}
+
+fcDouble8 fcShort8_convertDouble8(fcShort8 a) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]), (fcDouble)(a.s[3]), (fcDouble)(a.s[4]), (fcDouble)(a.s[5]), (fcDouble)(a.s[6]), (fcDouble)(a.s[7]));
+}
+
+fcShort2 fcShort8_asShort2(fcShort8 a) {
+ return fcShort2_create11(a.s[0], a.s[1]);
+}
+
+fcShort3 fcShort8_asShort3(fcShort8 a) {
+ return fcShort3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcShort4 fcShort8_asShort4(fcShort8 a) {
+ return fcShort4_create1111(a.s[0], a.s[1], a.s[2], a.s[3]);
+}
+
+fcInt8 fcShort8_isEqual(fcShort8 a, fcShort8 b) {
+ return fcInt8_create11111111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0, a.s[4] == b.s[4]? 1 : 0, a.s[5] == b.s[5]? 1 : 0, a.s[6] == b.s[6]? 1 : 0, a.s[7] == b.s[7]? 1 : 0);
+}
+
+fcInt8 fcShort8_isNotEqual(fcShort8 a, fcShort8 b) {
+ return fcInt8_create11111111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0, a.s[4] != b.s[4]? 1 : 0, a.s[5] != b.s[5]? 1 : 0, a.s[6] != b.s[6]? 1 : 0, a.s[7] != b.s[7]? 1 : 0);
+}
+
+fcInt8 fcShort8_isGreater(fcShort8 a, fcShort8 b) {
+ return fcInt8_create11111111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0, a.s[4] > b.s[4]? 1 : 0, a.s[5] > b.s[5]? 1 : 0, a.s[6] > b.s[6]? 1 : 0, a.s[7] > b.s[7]? 1 : 0);
+}
+
+fcInt8 fcShort8_isGreaterEqual(fcShort8 a, fcShort8 b) {
+ return fcInt8_create11111111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0, a.s[4] >= b.s[4]? 1 : 0, a.s[5] >= b.s[5]? 1 : 0, a.s[6] >= b.s[6]? 1 : 0, a.s[7] >= b.s[7]? 1 : 0);
+}
+
+fcInt8 fcShort8_isLess(fcShort8 a, fcShort8 b) {
+ return fcInt8_create11111111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0, a.s[4] < b.s[4]? 1 : 0, a.s[5] < b.s[5]? 1 : 0, a.s[6] < b.s[6]? 1 : 0, a.s[7] < b.s[7]? 1 : 0);
+}
+
+fcInt8 fcShort8_isLessEqual(fcShort8 a, fcShort8 b) {
+ return fcInt8_create11111111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0, a.s[4] <= b.s[4]? 1 : 0, a.s[5] <= b.s[5]? 1 : 0, a.s[6] <= b.s[6]? 1 : 0, a.s[7] <= b.s[7]? 1 : 0);
+}
+
+fcShort8 fcShort8_select(fcShort8 a, fcShort8 b, fcInt8 c) {
+ return fcShort8_create11111111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]), fcMath_select(a.s[4], b.s[4], c.s[4]), fcMath_select(a.s[5], b.s[5], c.s[5]), fcMath_select(a.s[6], b.s[6], c.s[6]), fcMath_select(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt fcShort8_any(fcShort8 a) {
+ return a.s[0] != 0 || a.s[1] != 0 || a.s[2] != 0 || a.s[3] != 0 || a.s[4] != 0 || a.s[5] != 0 || a.s[6] != 0 || a.s[7] != 0;
+}
+
+fcInt fcShort8_all(fcShort8 a) {
+ return !(a.s[0] == 0 || a.s[1] == 0 || a.s[2] == 0 || a.s[3] == 0 || a.s[4] == 0 || a.s[5] == 0 || a.s[6] == 0 || a.s[7] == 0);
+}
+
+fcShort8 fcShort8_neg(fcShort8 a) {
+ return fcShort8_create11111111(-a.s[0], -a.s[1], -a.s[2], -a.s[3], -a.s[4], -a.s[5], -a.s[6], -a.s[7]);
+}
+
+fcShort8 fcShort8_add(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3], a.s[4] + b.s[4], a.s[5] + b.s[5], a.s[6] + b.s[6], a.s[7] + b.s[7]);
+}
+
+fcShort8 fcShort8_sub(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3], a.s[4] - b.s[4], a.s[5] - b.s[5], a.s[6] - b.s[6], a.s[7] - b.s[7]);
+}
+
+fcShort8 fcShort8_mul(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2], a.s[3] * b.s[3], a.s[4] * b.s[4], a.s[5] * b.s[5], a.s[6] * b.s[6], a.s[7] * b.s[7]);
+}
+
+fcDouble8 fcShort8_muld(fcShort8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]), (fcDouble)(a.s[4] * b.s[4]), (fcDouble)(a.s[5] * b.s[5]), (fcDouble)(a.s[6] * b.s[6]), (fcDouble)(a.s[7] * b.s[7]));
+}
+
+fcFloat8 fcShort8_mulf(fcShort8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]), (fcFloat)(a.s[4] * b.s[4]), (fcFloat)(a.s[5] * b.s[5]), (fcFloat)(a.s[6] * b.s[6]), (fcFloat)(a.s[7] * b.s[7]));
+}
+
+fcShort8 fcShort8_mulk(fcShort8 a, fcShort k) {
+ return fcShort8_create11111111(a.s[0] * k, a.s[1] * k, a.s[2] * k, a.s[3] * k, a.s[4] * k, a.s[5] * k, a.s[6] * k, a.s[7] * k);
+}
+
+fcDouble8 fcShort8_mulkd(fcShort8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k), (fcDouble)(a.s[4] * k), (fcDouble)(a.s[5] * k), (fcDouble)(a.s[6] * k), (fcDouble)(a.s[7] * k));
+}
+
+fcFloat8 fcShort8_mulkf(fcShort8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k), (fcFloat)(a.s[4] * k), (fcFloat)(a.s[5] * k), (fcFloat)(a.s[6] * k), (fcFloat)(a.s[7] * k));
+}
+
+fcShort8 fcShort8_div(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2], a.s[3] / b.s[3], a.s[4] / b.s[4], a.s[5] / b.s[5], a.s[6] / b.s[6], a.s[7] / b.s[7]);
+}
+
+fcDouble8 fcShort8_divd(fcShort8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]), (fcDouble)(a.s[4] / b.s[4]), (fcDouble)(a.s[5] / b.s[5]), (fcDouble)(a.s[6] / b.s[6]), (fcDouble)(a.s[7] / b.s[7]));
+}
+
+fcFloat8 fcShort8_divf(fcShort8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]), (fcFloat)(a.s[4] / b.s[4]), (fcFloat)(a.s[5] / b.s[5]), (fcFloat)(a.s[6] / b.s[6]), (fcFloat)(a.s[7] / b.s[7]));
+}
+
+fcShort8 fcShort8_divk(fcShort8 a, fcShort k) {
+ return fcShort8_create11111111(a.s[0] / k, a.s[1] / k, a.s[2] / k, a.s[3] / k, a.s[4] / k, a.s[5] / k, a.s[6] / k, a.s[7] / k);
+}
+
+fcDouble8 fcShort8_divkd(fcShort8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k), (fcDouble)(a.s[4] / k), (fcDouble)(a.s[5] / k), (fcDouble)(a.s[6] / k), (fcDouble)(a.s[7] / k));
+}
+
+fcFloat8 fcShort8_divkf(fcShort8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k), (fcFloat)(a.s[4] / k), (fcFloat)(a.s[5] / k), (fcFloat)(a.s[6] / k), (fcFloat)(a.s[7] / k));
+}
+
+fcShort8 fcShort8_mod(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2], a.s[3] % b.s[3], a.s[4] % b.s[4], a.s[5] % b.s[5], a.s[6] % b.s[6], a.s[7] % b.s[7]);
+}
+
+fcShort8 fcShort8_modk(fcShort8 a, fcShort k) {
+ return fcShort8_create11111111(a.s[0] % k, a.s[1] % k, a.s[2] % k, a.s[3] % k, a.s[4] % k, a.s[5] % k, a.s[6] % k, a.s[7] % k);
+}
+
+fcShort8 fcShort8_bitAnd(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2], a.s[3] & b.s[3], a.s[4] & b.s[4], a.s[5] & b.s[5], a.s[6] & b.s[6], a.s[7] & b.s[7]);
+}
+
+fcShort8 fcShort8_bitOr(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2], a.s[3] | b.s[3], a.s[4] | b.s[4], a.s[5] | b.s[5], a.s[6] | b.s[6], a.s[7] | b.s[7]);
+}
+
+fcShort8 fcShort8_bitXor(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2], a.s[3] ^ b.s[3], a.s[4] ^ b.s[4], a.s[5] ^ b.s[5], a.s[6] ^ b.s[6], a.s[7] ^ b.s[7]);
+}
+
+fcShort8 fcShort8_bitNot(fcShort8 a) {
+ return fcShort8_create11111111(~a.s[0], ~a.s[1], ~a.s[2], ~a.s[3], ~a.s[4], ~a.s[5], ~a.s[6], ~a.s[7]);
+}
+
+fcShort8 fcShort8_abs(fcShort8 a) {
+ return fcShort8_create11111111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]), fcMath_abs(a.s[4]), fcMath_abs(a.s[5]), fcMath_abs(a.s[6]), fcMath_abs(a.s[7]));
+}
+
+fcShort8 fcShort8_clamp(fcShort8 a, fcShort8 b, fcShort8 c) {
+ return fcShort8_create11111111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]), fcMath_clamp(a.s[4], b.s[4], c.s[4]), fcMath_clamp(a.s[5], b.s[5], c.s[5]), fcMath_clamp(a.s[6], b.s[6], c.s[6]), fcMath_clamp(a.s[7], b.s[7], c.s[7]));
+}
+
+fcShort8 fcShort8_max(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]), fcMath_max(a.s[4], b.s[4]), fcMath_max(a.s[5], b.s[5]), fcMath_max(a.s[6], b.s[6]), fcMath_max(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_maxMag(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]), fcMath_maxMag(a.s[4], b.s[4]), fcMath_maxMag(a.s[5], b.s[5]), fcMath_maxMag(a.s[6], b.s[6]), fcMath_maxMag(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_min(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]), fcMath_min(a.s[4], b.s[4]), fcMath_min(a.s[5], b.s[5]), fcMath_min(a.s[6], b.s[6]), fcMath_min(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_minMag(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]), fcMath_minMag(a.s[4], b.s[4]), fcMath_minMag(a.s[5], b.s[5]), fcMath_minMag(a.s[6], b.s[6]), fcMath_minMag(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_mix(fcShort8 a, fcShort8 b, fcShort8 c) {
+ return fcShort8_create11111111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]), fcMath_mix(a.s[4], b.s[4], c.s[4]), fcMath_mix(a.s[5], b.s[5], c.s[5]), fcMath_mix(a.s[6], b.s[6], c.s[6]), fcMath_mix(a.s[7], b.s[7], c.s[7]));
+}
+
+fcShort8 fcShort8_clampk(fcShort8 v, fcShort min, fcShort max) {
+ return fcShort8_create11111111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max), fcMath_clamp(v.s[4], min, max), fcMath_clamp(v.s[5], min, max), fcMath_clamp(v.s[6], min, max), fcMath_clamp(v.s[7], min, max));
+}
+
+fcShort8 fcShort8_maxk(fcShort8 x, fcShort y) {
+ return fcShort8_create11111111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y), fcMath_max(x.s[4], y), fcMath_max(x.s[5], y), fcMath_max(x.s[6], y), fcMath_max(x.s[7], y));
+}
+
+fcShort8 fcShort8_mink(fcShort8 x, fcShort y) {
+ return fcShort8_create11111111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y), fcMath_min(x.s[4], y), fcMath_min(x.s[5], y), fcMath_min(x.s[6], y), fcMath_min(x.s[7], y));
+}
+
+fcShort8 fcShort8_mixk(fcShort8 x, fcShort8 y, fcShort a) {
+ return fcShort8_create11111111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a), fcMath_mix(x.s[4], y.s[4], a), fcMath_mix(x.s[5], y.s[5], a), fcMath_mix(x.s[6], y.s[6], a), fcMath_mix(x.s[7], y.s[7], a));
+}
+
+fcShort8 fcShort8_absDiff(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]), fcMath_absDiff(a.s[3], b.s[3]), fcMath_absDiff(a.s[4], b.s[4]), fcMath_absDiff(a.s[5], b.s[5]), fcMath_absDiff(a.s[6], b.s[6]), fcMath_absDiff(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_addSat(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_addSats(a.s[0], b.s[0]), fcMath_addSats(a.s[1], b.s[1]), fcMath_addSats(a.s[2], b.s[2]), fcMath_addSats(a.s[3], b.s[3]), fcMath_addSats(a.s[4], b.s[4]), fcMath_addSats(a.s[5], b.s[5]), fcMath_addSats(a.s[6], b.s[6]), fcMath_addSats(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_clz(fcShort8 a) {
+ return fcShort8_create11111111(fcMath_clzs(a.s[0]), fcMath_clzs(a.s[1]), fcMath_clzs(a.s[2]), fcMath_clzs(a.s[3]), fcMath_clzs(a.s[4]), fcMath_clzs(a.s[5]), fcMath_clzs(a.s[6]), fcMath_clzs(a.s[7]));
+}
+
+fcShort8 fcShort8_hadd(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_hadds(a.s[0], b.s[0]), fcMath_hadds(a.s[1], b.s[1]), fcMath_hadds(a.s[2], b.s[2]), fcMath_hadds(a.s[3], b.s[3]), fcMath_hadds(a.s[4], b.s[4]), fcMath_hadds(a.s[5], b.s[5]), fcMath_hadds(a.s[6], b.s[6]), fcMath_hadds(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_madHi(fcShort8 a, fcShort8 b, fcShort8 c) {
+ return fcShort8_create11111111(fcMath_madHis(a.s[0], b.s[0], c.s[0]), fcMath_madHis(a.s[1], b.s[1], c.s[1]), fcMath_madHis(a.s[2], b.s[2], c.s[2]), fcMath_madHis(a.s[3], b.s[3], c.s[3]), fcMath_madHis(a.s[4], b.s[4], c.s[4]), fcMath_madHis(a.s[5], b.s[5], c.s[5]), fcMath_madHis(a.s[6], b.s[6], c.s[6]), fcMath_madHis(a.s[7], b.s[7], c.s[7]));
+}
+
+fcShort8 fcShort8_madSat(fcShort8 a, fcShort8 b, fcShort8 c) {
+ return fcShort8_create11111111(fcMath_madSats(a.s[0], b.s[0], c.s[0]), fcMath_madSats(a.s[1], b.s[1], c.s[1]), fcMath_madSats(a.s[2], b.s[2], c.s[2]), fcMath_madSats(a.s[3], b.s[3], c.s[3]), fcMath_madSats(a.s[4], b.s[4], c.s[4]), fcMath_madSats(a.s[5], b.s[5], c.s[5]), fcMath_madSats(a.s[6], b.s[6], c.s[6]), fcMath_madSats(a.s[7], b.s[7], c.s[7]));
+}
+
+fcShort8 fcShort8_mulHi(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_mulHis(a.s[0], b.s[0]), fcMath_mulHis(a.s[1], b.s[1]), fcMath_mulHis(a.s[2], b.s[2]), fcMath_mulHis(a.s[3], b.s[3]), fcMath_mulHis(a.s[4], b.s[4]), fcMath_mulHis(a.s[5], b.s[5]), fcMath_mulHis(a.s[6], b.s[6]), fcMath_mulHis(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_rhadd(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_rhadds(a.s[0], b.s[0]), fcMath_rhadds(a.s[1], b.s[1]), fcMath_rhadds(a.s[2], b.s[2]), fcMath_rhadds(a.s[3], b.s[3]), fcMath_rhadds(a.s[4], b.s[4]), fcMath_rhadds(a.s[5], b.s[5]), fcMath_rhadds(a.s[6], b.s[6]), fcMath_rhadds(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_rotate(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_rotates(a.s[0], b.s[0]), fcMath_rotates(a.s[1], b.s[1]), fcMath_rotates(a.s[2], b.s[2]), fcMath_rotates(a.s[3], b.s[3]), fcMath_rotates(a.s[4], b.s[4]), fcMath_rotates(a.s[5], b.s[5]), fcMath_rotates(a.s[6], b.s[6]), fcMath_rotates(a.s[7], b.s[7]));
+}
+
+fcShort8 fcShort8_subSat(fcShort8 a, fcShort8 b) {
+ return fcShort8_create11111111(fcMath_subSats(a.s[0], b.s[0]), fcMath_subSats(a.s[1], b.s[1]), fcMath_subSats(a.s[2], b.s[2]), fcMath_subSats(a.s[3], b.s[3]), fcMath_subSats(a.s[4], b.s[4]), fcMath_subSats(a.s[5], b.s[5]), fcMath_subSats(a.s[6], b.s[6]), fcMath_subSats(a.s[7], b.s[7]));
+}
+
+
+//
+// fcInt2
+//
+
+fcInt2 fcInt2_create1(fcInt v) {
+ return fcInt2_create11(v, v);
+}
+
+void fcInt2_set1(fcInt2* self, fcInt v) {
+ fcInt2_set11(self, v, v);
+}
+
+fcInt2 fcInt2_create11(fcInt x, fcInt y) {
+ fcInt2 result = {{x, y}};
+ return result;
+}
+
+void fcInt2_set11(fcInt2* self, fcInt x, fcInt y) {
+ self->s[0] = x;
+ self->s[1] = y;
+}
+
+fcInt2 fcInt2_create2(fcInt2 vec1) {
+ return fcInt2_create11(vec1.s[0], vec1.s[1]);
+}
+
+void fcInt2_set2(fcInt2* self, fcInt2 vec1) {
+ fcInt2_set11(self, vec1.s[0], vec1.s[1]);
+}
+
+fcByte2 fcInt2_convertByte2(fcInt2 a) {
+ return fcByte2_create11((fcByte)(a.s[0]), (fcByte)(a.s[1]));
+}
+
+fcShort2 fcInt2_convertShort2(fcInt2 a) {
+ return fcShort2_create11((fcShort)(a.s[0]), (fcShort)(a.s[1]));
+}
+
+fcLong2 fcInt2_convertLong2(fcInt2 a) {
+ return fcLong2_create11((fcLong)(a.s[0]), (fcLong)(a.s[1]));
+}
+
+fcFloat2 fcInt2_convertFloat2(fcInt2 a) {
+ return fcFloat2_create11((fcFloat)(a.s[0]), (fcFloat)(a.s[1]));
+}
+
+fcDouble2 fcInt2_convertDouble2(fcInt2 a) {
+ return fcDouble2_create11((fcDouble)(a.s[0]), (fcDouble)(a.s[1]));
+}
+
+fcInt2 fcInt2_isEqual(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0);
+}
+
+fcInt2 fcInt2_isNotEqual(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0);
+}
+
+fcInt2 fcInt2_isGreater(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0);
+}
+
+fcInt2 fcInt2_isGreaterEqual(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0);
+}
+
+fcInt2 fcInt2_isLess(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0);
+}
+
+fcInt2 fcInt2_isLessEqual(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0);
+}
+
+fcInt2 fcInt2_select(fcInt2 a, fcInt2 b, fcInt2 c) {
+ return fcInt2_create11(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt fcInt2_any(fcInt2 a) {
+ return a.s[0] != 0 || a.s[1] != 0;
+}
+
+fcInt fcInt2_all(fcInt2 a) {
+ return !(a.s[0] == 0 || a.s[1] == 0);
+}
+
+fcInt2 fcInt2_neg(fcInt2 a) {
+ return fcInt2_create11(-a.s[0], -a.s[1]);
+}
+
+fcInt2 fcInt2_add(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] + b.s[0], a.s[1] + b.s[1]);
+}
+
+fcInt2 fcInt2_sub(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] - b.s[0], a.s[1] - b.s[1]);
+}
+
+fcInt2 fcInt2_mul(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] * b.s[0], a.s[1] * b.s[1]);
+}
+
+fcDouble2 fcInt2_muld(fcInt2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]));
+}
+
+fcFloat2 fcInt2_mulf(fcInt2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]));
+}
+
+fcInt2 fcInt2_mulk(fcInt2 a, fcInt k) {
+ return fcInt2_create11(a.s[0] * k, a.s[1] * k);
+}
+
+fcDouble2 fcInt2_mulkd(fcInt2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k));
+}
+
+fcFloat2 fcInt2_mulkf(fcInt2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k));
+}
+
+fcInt2 fcInt2_div(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] / b.s[0], a.s[1] / b.s[1]);
+}
+
+fcDouble2 fcInt2_divd(fcInt2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]));
+}
+
+fcFloat2 fcInt2_divf(fcInt2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]));
+}
+
+fcInt2 fcInt2_divk(fcInt2 a, fcInt k) {
+ return fcInt2_create11(a.s[0] / k, a.s[1] / k);
+}
+
+fcDouble2 fcInt2_divkd(fcInt2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k));
+}
+
+fcFloat2 fcInt2_divkf(fcInt2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k));
+}
+
+fcInt2 fcInt2_mod(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] % b.s[0], a.s[1] % b.s[1]);
+}
+
+fcInt2 fcInt2_modk(fcInt2 a, fcInt k) {
+ return fcInt2_create11(a.s[0] % k, a.s[1] % k);
+}
+
+fcInt2 fcInt2_bitAnd(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] & b.s[0], a.s[1] & b.s[1]);
+}
+
+fcInt2 fcInt2_bitOr(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] | b.s[0], a.s[1] | b.s[1]);
+}
+
+fcInt2 fcInt2_bitXor(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1]);
+}
+
+fcInt2 fcInt2_bitNot(fcInt2 a) {
+ return fcInt2_create11(~a.s[0], ~a.s[1]);
+}
+
+fcInt2 fcInt2_abs(fcInt2 a) {
+ return fcInt2_create11(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]));
+}
+
+fcInt2 fcInt2_clamp(fcInt2 a, fcInt2 b, fcInt2 c) {
+ return fcInt2_create11(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt2 fcInt2_max(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_maxMag(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_min(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_minMag(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_mix(fcInt2 a, fcInt2 b, fcInt2 c) {
+ return fcInt2_create11(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt2 fcInt2_clampk(fcInt2 v, fcInt min, fcInt max) {
+ return fcInt2_create11(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max));
+}
+
+fcInt2 fcInt2_maxk(fcInt2 x, fcInt y) {
+ return fcInt2_create11(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y));
+}
+
+fcInt2 fcInt2_mink(fcInt2 x, fcInt y) {
+ return fcInt2_create11(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y));
+}
+
+fcInt2 fcInt2_mixk(fcInt2 x, fcInt2 y, fcInt a) {
+ return fcInt2_create11(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a));
+}
+
+fcInt2 fcInt2_absDiff(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_addSat(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_addSat(a.s[0], b.s[0]), fcMath_addSat(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_clz(fcInt2 a) {
+ return fcInt2_create11(fcMath_clz(a.s[0]), fcMath_clz(a.s[1]));
+}
+
+fcInt2 fcInt2_hadd(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_hadd(a.s[0], b.s[0]), fcMath_hadd(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_madHi(fcInt2 a, fcInt2 b, fcInt2 c) {
+ return fcInt2_create11(fcMath_madHi(a.s[0], b.s[0], c.s[0]), fcMath_madHi(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt2 fcInt2_madSat(fcInt2 a, fcInt2 b, fcInt2 c) {
+ return fcInt2_create11(fcMath_madSat(a.s[0], b.s[0], c.s[0]), fcMath_madSat(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt2 fcInt2_mulHi(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_mulHi(a.s[0], b.s[0]), fcMath_mulHi(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_rhadd(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_rhadd(a.s[0], b.s[0]), fcMath_rhadd(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_rotate(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_rotate(a.s[0], b.s[0]), fcMath_rotate(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_subSat(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_subSat(a.s[0], b.s[0]), fcMath_subSat(a.s[1], b.s[1]));
+}
+
+fcInt2 fcInt2_mad24(fcInt2 a, fcInt2 b, fcInt2 c) {
+ return fcInt2_create11(fcMath_mad24(a.s[0], b.s[0], c.s[0]), fcMath_mad24(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt2 fcInt2_mul24(fcInt2 a, fcInt2 b) {
+ return fcInt2_create11(fcMath_mul24(a.s[0], b.s[0]), fcMath_mul24(a.s[1], b.s[1]));
+}
+
+
+//
+// fcInt3
+//
+
+fcInt3 fcInt3_create1(fcInt v) {
+ return fcInt3_create111(v, v, v);
+}
+
+void fcInt3_set1(fcInt3* self, fcInt v) {
+ fcInt3_set111(self, v, v, v);
+}
+
+fcInt3 fcInt3_create111(fcInt x, fcInt y, fcInt z) {
+ fcInt3 result = {{x, y, z}};
+ return result;
+}
+
+void fcInt3_set111(fcInt3* self, fcInt x, fcInt y, fcInt z) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+}
+
+fcInt3 fcInt3_create12(fcInt x, fcInt2 vec1) {
+ return fcInt3_create111(x, vec1.s[0], vec1.s[1]);
+}
+
+void fcInt3_set12(fcInt3* self, fcInt x, fcInt2 vec1) {
+ fcInt3_set111(self, x, vec1.s[0], vec1.s[1]);
+}
+
+fcInt3 fcInt3_create21(fcInt2 vec1, fcInt z) {
+ return fcInt3_create111(vec1.s[0], vec1.s[1], z);
+}
+
+void fcInt3_set21(fcInt3* self, fcInt2 vec1, fcInt z) {
+ fcInt3_set111(self, vec1.s[0], vec1.s[1], z);
+}
+
+fcInt3 fcInt3_create3(fcInt3 vec1) {
+ return fcInt3_create111(vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcInt3_set3(fcInt3* self, fcInt3 vec1) {
+ fcInt3_set111(self, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcByte3 fcInt3_convertByte3(fcInt3 a) {
+ return fcByte3_create111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]));
+}
+
+fcShort3 fcInt3_convertShort3(fcInt3 a) {
+ return fcShort3_create111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]));
+}
+
+fcLong3 fcInt3_convertLong3(fcInt3 a) {
+ return fcLong3_create111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]));
+}
+
+fcFloat3 fcInt3_convertFloat3(fcInt3 a) {
+ return fcFloat3_create111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]));
+}
+
+fcDouble3 fcInt3_convertDouble3(fcInt3 a) {
+ return fcDouble3_create111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]));
+}
+
+fcInt2 fcInt3_asInt2(fcInt3 a) {
+ return fcInt2_create11(a.s[0], a.s[1]);
+}
+
+fcInt3 fcInt3_isEqual(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0);
+}
+
+fcInt3 fcInt3_isNotEqual(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0);
+}
+
+fcInt3 fcInt3_isGreater(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0);
+}
+
+fcInt3 fcInt3_isGreaterEqual(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0);
+}
+
+fcInt3 fcInt3_isLess(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0);
+}
+
+fcInt3 fcInt3_isLessEqual(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0);
+}
+
+fcInt3 fcInt3_select(fcInt3 a, fcInt3 b, fcInt3 c) {
+ return fcInt3_create111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt fcInt3_any(fcInt3 a) {
+ return a.s[0] != 0 || a.s[1] != 0 || a.s[2] != 0;
+}
+
+fcInt fcInt3_all(fcInt3 a) {
+ return !(a.s[0] == 0 || a.s[1] == 0 || a.s[2] == 0);
+}
+
+fcInt3 fcInt3_neg(fcInt3 a) {
+ return fcInt3_create111(-a.s[0], -a.s[1], -a.s[2]);
+}
+
+fcInt3 fcInt3_add(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2]);
+}
+
+fcInt3 fcInt3_sub(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2]);
+}
+
+fcInt3 fcInt3_mul(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2]);
+}
+
+fcDouble3 fcInt3_muld(fcInt3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]));
+}
+
+fcFloat3 fcInt3_mulf(fcInt3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]));
+}
+
+fcInt3 fcInt3_mulk(fcInt3 a, fcInt k) {
+ return fcInt3_create111(a.s[0] * k, a.s[1] * k, a.s[2] * k);
+}
+
+fcDouble3 fcInt3_mulkd(fcInt3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k));
+}
+
+fcFloat3 fcInt3_mulkf(fcInt3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k));
+}
+
+fcInt3 fcInt3_div(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2]);
+}
+
+fcDouble3 fcInt3_divd(fcInt3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]));
+}
+
+fcFloat3 fcInt3_divf(fcInt3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]));
+}
+
+fcInt3 fcInt3_divk(fcInt3 a, fcInt k) {
+ return fcInt3_create111(a.s[0] / k, a.s[1] / k, a.s[2] / k);
+}
+
+fcDouble3 fcInt3_divkd(fcInt3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k));
+}
+
+fcFloat3 fcInt3_divkf(fcInt3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k));
+}
+
+fcInt3 fcInt3_mod(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2]);
+}
+
+fcInt3 fcInt3_modk(fcInt3 a, fcInt k) {
+ return fcInt3_create111(a.s[0] % k, a.s[1] % k, a.s[2] % k);
+}
+
+fcInt3 fcInt3_bitAnd(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2]);
+}
+
+fcInt3 fcInt3_bitOr(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2]);
+}
+
+fcInt3 fcInt3_bitXor(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2]);
+}
+
+fcInt3 fcInt3_bitNot(fcInt3 a) {
+ return fcInt3_create111(~a.s[0], ~a.s[1], ~a.s[2]);
+}
+
+fcInt3 fcInt3_abs(fcInt3 a) {
+ return fcInt3_create111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]));
+}
+
+fcInt3 fcInt3_clamp(fcInt3 a, fcInt3 b, fcInt3 c) {
+ return fcInt3_create111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt3 fcInt3_max(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_maxMag(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_min(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_minMag(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_mix(fcInt3 a, fcInt3 b, fcInt3 c) {
+ return fcInt3_create111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt3 fcInt3_clampk(fcInt3 v, fcInt min, fcInt max) {
+ return fcInt3_create111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max));
+}
+
+fcInt3 fcInt3_maxk(fcInt3 x, fcInt y) {
+ return fcInt3_create111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y));
+}
+
+fcInt3 fcInt3_mink(fcInt3 x, fcInt y) {
+ return fcInt3_create111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y));
+}
+
+fcInt3 fcInt3_mixk(fcInt3 x, fcInt3 y, fcInt a) {
+ return fcInt3_create111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a));
+}
+
+fcInt3 fcInt3_absDiff(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_addSat(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_addSat(a.s[0], b.s[0]), fcMath_addSat(a.s[1], b.s[1]), fcMath_addSat(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_clz(fcInt3 a) {
+ return fcInt3_create111(fcMath_clz(a.s[0]), fcMath_clz(a.s[1]), fcMath_clz(a.s[2]));
+}
+
+fcInt3 fcInt3_hadd(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_hadd(a.s[0], b.s[0]), fcMath_hadd(a.s[1], b.s[1]), fcMath_hadd(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_madHi(fcInt3 a, fcInt3 b, fcInt3 c) {
+ return fcInt3_create111(fcMath_madHi(a.s[0], b.s[0], c.s[0]), fcMath_madHi(a.s[1], b.s[1], c.s[1]), fcMath_madHi(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt3 fcInt3_madSat(fcInt3 a, fcInt3 b, fcInt3 c) {
+ return fcInt3_create111(fcMath_madSat(a.s[0], b.s[0], c.s[0]), fcMath_madSat(a.s[1], b.s[1], c.s[1]), fcMath_madSat(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt3 fcInt3_mulHi(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_mulHi(a.s[0], b.s[0]), fcMath_mulHi(a.s[1], b.s[1]), fcMath_mulHi(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_rhadd(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_rhadd(a.s[0], b.s[0]), fcMath_rhadd(a.s[1], b.s[1]), fcMath_rhadd(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_rotate(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_rotate(a.s[0], b.s[0]), fcMath_rotate(a.s[1], b.s[1]), fcMath_rotate(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_subSat(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_subSat(a.s[0], b.s[0]), fcMath_subSat(a.s[1], b.s[1]), fcMath_subSat(a.s[2], b.s[2]));
+}
+
+fcInt3 fcInt3_mad24(fcInt3 a, fcInt3 b, fcInt3 c) {
+ return fcInt3_create111(fcMath_mad24(a.s[0], b.s[0], c.s[0]), fcMath_mad24(a.s[1], b.s[1], c.s[1]), fcMath_mad24(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt3 fcInt3_mul24(fcInt3 a, fcInt3 b) {
+ return fcInt3_create111(fcMath_mul24(a.s[0], b.s[0]), fcMath_mul24(a.s[1], b.s[1]), fcMath_mul24(a.s[2], b.s[2]));
+}
+
+
+//
+// fcInt4
+//
+
+fcInt4 fcInt4_create1(fcInt v) {
+ return fcInt4_create1111(v, v, v, v);
+}
+
+void fcInt4_set1(fcInt4* self, fcInt v) {
+ fcInt4_set1111(self, v, v, v, v);
+}
+
+fcInt4 fcInt4_create1111(fcInt x, fcInt y, fcInt z, fcInt w) {
+ fcInt4 result = {{x, y, z, w}};
+ return result;
+}
+
+void fcInt4_set1111(fcInt4* self, fcInt x, fcInt y, fcInt z, fcInt w) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+}
+
+fcInt4 fcInt4_create112(fcInt x, fcInt y, fcInt2 vec1) {
+ return fcInt4_create1111(x, y, vec1.s[0], vec1.s[1]);
+}
+
+void fcInt4_set112(fcInt4* self, fcInt x, fcInt y, fcInt2 vec1) {
+ fcInt4_set1111(self, x, y, vec1.s[0], vec1.s[1]);
+}
+
+fcInt4 fcInt4_create121(fcInt x, fcInt2 vec1, fcInt w) {
+ return fcInt4_create1111(x, vec1.s[0], vec1.s[1], w);
+}
+
+void fcInt4_set121(fcInt4* self, fcInt x, fcInt2 vec1, fcInt w) {
+ fcInt4_set1111(self, x, vec1.s[0], vec1.s[1], w);
+}
+
+fcInt4 fcInt4_create13(fcInt x, fcInt3 vec1) {
+ return fcInt4_create1111(x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcInt4_set13(fcInt4* self, fcInt x, fcInt3 vec1) {
+ fcInt4_set1111(self, x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcInt4 fcInt4_create211(fcInt2 vec1, fcInt z, fcInt w) {
+ return fcInt4_create1111(vec1.s[0], vec1.s[1], z, w);
+}
+
+void fcInt4_set211(fcInt4* self, fcInt2 vec1, fcInt z, fcInt w) {
+ fcInt4_set1111(self, vec1.s[0], vec1.s[1], z, w);
+}
+
+fcInt4 fcInt4_create22(fcInt2 vec1, fcInt2 vec2) {
+ return fcInt4_create1111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcInt4_set22(fcInt4* self, fcInt2 vec1, fcInt2 vec2) {
+ fcInt4_set1111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcInt4 fcInt4_create31(fcInt3 vec1, fcInt w) {
+ return fcInt4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+void fcInt4_set31(fcInt4* self, fcInt3 vec1, fcInt w) {
+ fcInt4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+fcInt4 fcInt4_create4(fcInt4 vec1) {
+ return fcInt4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcInt4_set4(fcInt4* self, fcInt4 vec1) {
+ fcInt4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcInt2 fcInt4_odd(fcInt4 a) {
+ return fcInt2_create11(a.s[1], a.s[3]);
+}
+
+fcInt2 fcInt4_even(fcInt4 a) {
+ return fcInt2_create11(a.s[0], a.s[2]);
+}
+
+fcByte4 fcInt4_convertByte4(fcInt4 a) {
+ return fcByte4_create1111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]));
+}
+
+fcShort4 fcInt4_convertShort4(fcInt4 a) {
+ return fcShort4_create1111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]), (fcShort)(a.s[3]));
+}
+
+fcLong4 fcInt4_convertLong4(fcInt4 a) {
+ return fcLong4_create1111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]), (fcLong)(a.s[3]));
+}
+
+fcFloat4 fcInt4_convertFloat4(fcInt4 a) {
+ return fcFloat4_create1111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]), (fcFloat)(a.s[3]));
+}
+
+fcDouble4 fcInt4_convertDouble4(fcInt4 a) {
+ return fcDouble4_create1111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]), (fcDouble)(a.s[3]));
+}
+
+fcInt2 fcInt4_asInt2(fcInt4 a) {
+ return fcInt2_create11(a.s[0], a.s[1]);
+}
+
+fcInt3 fcInt4_asInt3(fcInt4 a) {
+ return fcInt3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcInt4 fcInt4_isEqual(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
+}
+
+fcInt4 fcInt4_isNotEqual(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
+}
+
+fcInt4 fcInt4_isGreater(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
+}
+
+fcInt4 fcInt4_isGreaterEqual(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
+}
+
+fcInt4 fcInt4_isLess(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
+}
+
+fcInt4 fcInt4_isLessEqual(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
+}
+
+fcInt4 fcInt4_select(fcInt4 a, fcInt4 b, fcInt4 c) {
+ return fcInt4_create1111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt fcInt4_any(fcInt4 a) {
+ return a.s[0] != 0 || a.s[1] != 0 || a.s[2] != 0 || a.s[3] != 0;
+}
+
+fcInt fcInt4_all(fcInt4 a) {
+ return !(a.s[0] == 0 || a.s[1] == 0 || a.s[2] == 0 || a.s[3] == 0);
+}
+
+fcInt4 fcInt4_neg(fcInt4 a) {
+ return fcInt4_create1111(-a.s[0], -a.s[1], -a.s[2], -a.s[3]);
+}
+
+fcInt4 fcInt4_add(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3]);
+}
+
+fcInt4 fcInt4_sub(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3]);
+}
+
+fcInt4 fcInt4_mul(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2], a.s[3] * b.s[3]);
+}
+
+fcDouble4 fcInt4_muld(fcInt4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]));
+}
+
+fcFloat4 fcInt4_mulf(fcInt4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]));
+}
+
+fcInt4 fcInt4_mulk(fcInt4 a, fcInt k) {
+ return fcInt4_create1111(a.s[0] * k, a.s[1] * k, a.s[2] * k, a.s[3] * k);
+}
+
+fcDouble4 fcInt4_mulkd(fcInt4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k));
+}
+
+fcFloat4 fcInt4_mulkf(fcInt4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k));
+}
+
+fcInt4 fcInt4_div(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2], a.s[3] / b.s[3]);
+}
+
+fcDouble4 fcInt4_divd(fcInt4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]));
+}
+
+fcFloat4 fcInt4_divf(fcInt4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]));
+}
+
+fcInt4 fcInt4_divk(fcInt4 a, fcInt k) {
+ return fcInt4_create1111(a.s[0] / k, a.s[1] / k, a.s[2] / k, a.s[3] / k);
+}
+
+fcDouble4 fcInt4_divkd(fcInt4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k));
+}
+
+fcFloat4 fcInt4_divkf(fcInt4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k));
+}
+
+fcInt4 fcInt4_mod(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2], a.s[3] % b.s[3]);
+}
+
+fcInt4 fcInt4_modk(fcInt4 a, fcInt k) {
+ return fcInt4_create1111(a.s[0] % k, a.s[1] % k, a.s[2] % k, a.s[3] % k);
+}
+
+fcInt4 fcInt4_bitAnd(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2], a.s[3] & b.s[3]);
+}
+
+fcInt4 fcInt4_bitOr(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2], a.s[3] | b.s[3]);
+}
+
+fcInt4 fcInt4_bitXor(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2], a.s[3] ^ b.s[3]);
+}
+
+fcInt4 fcInt4_bitNot(fcInt4 a) {
+ return fcInt4_create1111(~a.s[0], ~a.s[1], ~a.s[2], ~a.s[3]);
+}
+
+fcInt4 fcInt4_abs(fcInt4 a) {
+ return fcInt4_create1111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]));
+}
+
+fcInt4 fcInt4_clamp(fcInt4 a, fcInt4 b, fcInt4 c) {
+ return fcInt4_create1111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt4 fcInt4_max(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_maxMag(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_min(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_minMag(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_mix(fcInt4 a, fcInt4 b, fcInt4 c) {
+ return fcInt4_create1111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt4 fcInt4_clampk(fcInt4 v, fcInt min, fcInt max) {
+ return fcInt4_create1111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max));
+}
+
+fcInt4 fcInt4_maxk(fcInt4 x, fcInt y) {
+ return fcInt4_create1111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y));
+}
+
+fcInt4 fcInt4_mink(fcInt4 x, fcInt y) {
+ return fcInt4_create1111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y));
+}
+
+fcInt4 fcInt4_mixk(fcInt4 x, fcInt4 y, fcInt a) {
+ return fcInt4_create1111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a));
+}
+
+fcInt4 fcInt4_absDiff(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]), fcMath_absDiff(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_addSat(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_addSat(a.s[0], b.s[0]), fcMath_addSat(a.s[1], b.s[1]), fcMath_addSat(a.s[2], b.s[2]), fcMath_addSat(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_clz(fcInt4 a) {
+ return fcInt4_create1111(fcMath_clz(a.s[0]), fcMath_clz(a.s[1]), fcMath_clz(a.s[2]), fcMath_clz(a.s[3]));
+}
+
+fcInt4 fcInt4_hadd(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_hadd(a.s[0], b.s[0]), fcMath_hadd(a.s[1], b.s[1]), fcMath_hadd(a.s[2], b.s[2]), fcMath_hadd(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_madHi(fcInt4 a, fcInt4 b, fcInt4 c) {
+ return fcInt4_create1111(fcMath_madHi(a.s[0], b.s[0], c.s[0]), fcMath_madHi(a.s[1], b.s[1], c.s[1]), fcMath_madHi(a.s[2], b.s[2], c.s[2]), fcMath_madHi(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt4 fcInt4_madSat(fcInt4 a, fcInt4 b, fcInt4 c) {
+ return fcInt4_create1111(fcMath_madSat(a.s[0], b.s[0], c.s[0]), fcMath_madSat(a.s[1], b.s[1], c.s[1]), fcMath_madSat(a.s[2], b.s[2], c.s[2]), fcMath_madSat(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt4 fcInt4_mulHi(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_mulHi(a.s[0], b.s[0]), fcMath_mulHi(a.s[1], b.s[1]), fcMath_mulHi(a.s[2], b.s[2]), fcMath_mulHi(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_rhadd(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_rhadd(a.s[0], b.s[0]), fcMath_rhadd(a.s[1], b.s[1]), fcMath_rhadd(a.s[2], b.s[2]), fcMath_rhadd(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_rotate(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_rotate(a.s[0], b.s[0]), fcMath_rotate(a.s[1], b.s[1]), fcMath_rotate(a.s[2], b.s[2]), fcMath_rotate(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_subSat(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_subSat(a.s[0], b.s[0]), fcMath_subSat(a.s[1], b.s[1]), fcMath_subSat(a.s[2], b.s[2]), fcMath_subSat(a.s[3], b.s[3]));
+}
+
+fcInt4 fcInt4_mad24(fcInt4 a, fcInt4 b, fcInt4 c) {
+ return fcInt4_create1111(fcMath_mad24(a.s[0], b.s[0], c.s[0]), fcMath_mad24(a.s[1], b.s[1], c.s[1]), fcMath_mad24(a.s[2], b.s[2], c.s[2]), fcMath_mad24(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt4 fcInt4_mul24(fcInt4 a, fcInt4 b) {
+ return fcInt4_create1111(fcMath_mul24(a.s[0], b.s[0]), fcMath_mul24(a.s[1], b.s[1]), fcMath_mul24(a.s[2], b.s[2]), fcMath_mul24(a.s[3], b.s[3]));
+}
+
+
+//
+// fcInt8
+//
+
+fcInt8 fcInt8_create1(fcInt v) {
+ return fcInt8_create11111111(v, v, v, v, v, v, v, v);
+}
+
+void fcInt8_set1(fcInt8* self, fcInt v) {
+ fcInt8_set11111111(self, v, v, v, v, v, v, v, v);
+}
+
+fcInt8 fcInt8_create11111111(fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8 result = {{x, y, z, w, s4, s5, s6, s7}};
+ return result;
+}
+
+void fcInt8_set11111111(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+ self->s[4] = s4;
+ self->s[5] = s5;
+ self->s[6] = s6;
+ self->s[7] = s7;
+}
+
+fcInt8 fcInt8_create1111112(fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt2 vec1) {
+ return fcInt8_create11111111(x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+void fcInt8_set1111112(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt2 vec1) {
+ fcInt8_set11111111(self, x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+fcInt8 fcInt8_create1111121(fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt2 vec1, fcInt s7) {
+ return fcInt8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+void fcInt8_set1111121(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt2 vec1, fcInt s7) {
+ fcInt8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+fcInt8 fcInt8_create111113(fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt3 vec1) {
+ return fcInt8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcInt8_set111113(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt s4, fcInt3 vec1) {
+ fcInt8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcInt8 fcInt8_create1111211(fcInt x, fcInt y, fcInt z, fcInt w, fcInt2 vec1, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+void fcInt8_set1111211(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt2 vec1, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+fcInt8 fcInt8_create111122(fcInt x, fcInt y, fcInt z, fcInt w, fcInt2 vec1, fcInt2 vec2) {
+ return fcInt8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set111122(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt2 vec1, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create111131(fcInt x, fcInt y, fcInt z, fcInt w, fcInt3 vec1, fcInt s7) {
+ return fcInt8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+void fcInt8_set111131(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt3 vec1, fcInt s7) {
+ fcInt8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+fcInt8 fcInt8_create11114(fcInt x, fcInt y, fcInt z, fcInt w, fcInt4 vec1) {
+ return fcInt8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcInt8_set11114(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt w, fcInt4 vec1) {
+ fcInt8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcInt8 fcInt8_create1112111(fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+void fcInt8_set1112111(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+fcInt8 fcInt8_create111212(fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set111212(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create111221(fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set111221(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create11123(fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt3 vec2) {
+ return fcInt8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set11123(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt2 vec1, fcInt3 vec2) {
+ fcInt8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create111311(fcInt x, fcInt y, fcInt z, fcInt3 vec1, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+void fcInt8_set111311(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt3 vec1, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+fcInt8 fcInt8_create11132(fcInt x, fcInt y, fcInt z, fcInt3 vec1, fcInt2 vec2) {
+ return fcInt8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set11132(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt3 vec1, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create11141(fcInt x, fcInt y, fcInt z, fcInt4 vec1, fcInt s7) {
+ return fcInt8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+void fcInt8_set11141(fcInt8* self, fcInt x, fcInt y, fcInt z, fcInt4 vec1, fcInt s7) {
+ fcInt8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+fcInt8 fcInt8_create1121111(fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+void fcInt8_set1121111(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+fcInt8 fcInt8_create112112(fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set112112(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create112121(fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set112121(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create11213(fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt3 vec2) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set11213(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt s4, fcInt3 vec2) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create112211(fcInt x, fcInt y, fcInt2 vec1, fcInt2 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcInt8_set112211(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt2 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcInt8 fcInt8_create11222(fcInt x, fcInt y, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set11222(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create11231(fcInt x, fcInt y, fcInt2 vec1, fcInt3 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcInt8_set11231(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt3 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcInt8 fcInt8_create1124(fcInt x, fcInt y, fcInt2 vec1, fcInt4 vec2) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcInt8_set1124(fcInt8* self, fcInt x, fcInt y, fcInt2 vec1, fcInt4 vec2) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcInt8 fcInt8_create113111(fcInt x, fcInt y, fcInt3 vec1, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+void fcInt8_set113111(fcInt8* self, fcInt x, fcInt y, fcInt3 vec1, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+fcInt8 fcInt8_create11312(fcInt x, fcInt y, fcInt3 vec1, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set11312(fcInt8* self, fcInt x, fcInt y, fcInt3 vec1, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create11321(fcInt x, fcInt y, fcInt3 vec1, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set11321(fcInt8* self, fcInt x, fcInt y, fcInt3 vec1, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create1133(fcInt x, fcInt y, fcInt3 vec1, fcInt3 vec2) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set1133(fcInt8* self, fcInt x, fcInt y, fcInt3 vec1, fcInt3 vec2) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create11411(fcInt x, fcInt y, fcInt4 vec1, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+void fcInt8_set11411(fcInt8* self, fcInt x, fcInt y, fcInt4 vec1, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+fcInt8 fcInt8_create1142(fcInt x, fcInt y, fcInt4 vec1, fcInt2 vec2) {
+ return fcInt8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set1142(fcInt8* self, fcInt x, fcInt y, fcInt4 vec1, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create1211111(fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+void fcInt8_set1211111(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+fcInt8 fcInt8_create121112(fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set121112(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create121121(fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set121121(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create12113(fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt3 vec2) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set12113(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt s4, fcInt3 vec2) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create121211(fcInt x, fcInt2 vec1, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcInt8_set121211(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcInt8 fcInt8_create12122(fcInt x, fcInt2 vec1, fcInt w, fcInt2 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set12122(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt2 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create12131(fcInt x, fcInt2 vec1, fcInt w, fcInt3 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcInt8_set12131(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt3 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcInt8 fcInt8_create1214(fcInt x, fcInt2 vec1, fcInt w, fcInt4 vec2) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcInt8_set1214(fcInt8* self, fcInt x, fcInt2 vec1, fcInt w, fcInt4 vec2) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcInt8 fcInt8_create122111(fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcInt8_set122111(fcInt8* self, fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcInt8 fcInt8_create12212(fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt s5, fcInt2 vec3) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set12212(fcInt8* self, fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt s5, fcInt2 vec3) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create12221(fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcInt8_set12221(fcInt8* self, fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcInt8 fcInt8_create1223(fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt3 vec3) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcInt8_set1223(fcInt8* self, fcInt x, fcInt2 vec1, fcInt2 vec2, fcInt3 vec3) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcInt8 fcInt8_create12311(fcInt x, fcInt2 vec1, fcInt3 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcInt8_set12311(fcInt8* self, fcInt x, fcInt2 vec1, fcInt3 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcInt8 fcInt8_create1232(fcInt x, fcInt2 vec1, fcInt3 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set1232(fcInt8* self, fcInt x, fcInt2 vec1, fcInt3 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create1241(fcInt x, fcInt2 vec1, fcInt4 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcInt8_set1241(fcInt8* self, fcInt x, fcInt2 vec1, fcInt4 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcInt8 fcInt8_create131111(fcInt x, fcInt3 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+void fcInt8_set131111(fcInt8* self, fcInt x, fcInt3 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+fcInt8 fcInt8_create13112(fcInt x, fcInt3 vec1, fcInt s4, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set13112(fcInt8* self, fcInt x, fcInt3 vec1, fcInt s4, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create13121(fcInt x, fcInt3 vec1, fcInt s4, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set13121(fcInt8* self, fcInt x, fcInt3 vec1, fcInt s4, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create1313(fcInt x, fcInt3 vec1, fcInt s4, fcInt3 vec2) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set1313(fcInt8* self, fcInt x, fcInt3 vec1, fcInt s4, fcInt3 vec2) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create13211(fcInt x, fcInt3 vec1, fcInt2 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcInt8_set13211(fcInt8* self, fcInt x, fcInt3 vec1, fcInt2 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcInt8 fcInt8_create1322(fcInt x, fcInt3 vec1, fcInt2 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set1322(fcInt8* self, fcInt x, fcInt3 vec1, fcInt2 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create1331(fcInt x, fcInt3 vec1, fcInt3 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcInt8_set1331(fcInt8* self, fcInt x, fcInt3 vec1, fcInt3 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcInt8 fcInt8_create134(fcInt x, fcInt3 vec1, fcInt4 vec2) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcInt8_set134(fcInt8* self, fcInt x, fcInt3 vec1, fcInt4 vec2) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcInt8 fcInt8_create14111(fcInt x, fcInt4 vec1, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+void fcInt8_set14111(fcInt8* self, fcInt x, fcInt4 vec1, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+fcInt8 fcInt8_create1412(fcInt x, fcInt4 vec1, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set1412(fcInt8* self, fcInt x, fcInt4 vec1, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create1421(fcInt x, fcInt4 vec1, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set1421(fcInt8* self, fcInt x, fcInt4 vec1, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create143(fcInt x, fcInt4 vec1, fcInt3 vec2) {
+ return fcInt8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set143(fcInt8* self, fcInt x, fcInt4 vec1, fcInt3 vec2) {
+ fcInt8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create2111111(fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+void fcInt8_set2111111(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+fcInt8 fcInt8_create211112(fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set211112(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create211121(fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set211121(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create21113(fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt3 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set21113(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt s4, fcInt3 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create211211(fcInt2 vec1, fcInt z, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcInt8_set211211(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcInt8 fcInt8_create21122(fcInt2 vec1, fcInt z, fcInt w, fcInt2 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set21122(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt2 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create21131(fcInt2 vec1, fcInt z, fcInt w, fcInt3 vec2, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcInt8_set21131(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt3 vec2, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcInt8 fcInt8_create2114(fcInt2 vec1, fcInt z, fcInt w, fcInt4 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcInt8_set2114(fcInt8* self, fcInt2 vec1, fcInt z, fcInt w, fcInt4 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcInt8 fcInt8_create212111(fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcInt8_set212111(fcInt8* self, fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcInt8 fcInt8_create21212(fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt s5, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set21212(fcInt8* self, fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt s5, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create21221(fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt2 vec3, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcInt8_set21221(fcInt8* self, fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt2 vec3, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcInt8 fcInt8_create2123(fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt3 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcInt8_set2123(fcInt8* self, fcInt2 vec1, fcInt z, fcInt2 vec2, fcInt3 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcInt8 fcInt8_create21311(fcInt2 vec1, fcInt z, fcInt3 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcInt8_set21311(fcInt8* self, fcInt2 vec1, fcInt z, fcInt3 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcInt8 fcInt8_create2132(fcInt2 vec1, fcInt z, fcInt3 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set2132(fcInt8* self, fcInt2 vec1, fcInt z, fcInt3 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create2141(fcInt2 vec1, fcInt z, fcInt4 vec2, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcInt8_set2141(fcInt8* self, fcInt2 vec1, fcInt z, fcInt4 vec2, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcInt8 fcInt8_create221111(fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+void fcInt8_set221111(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+fcInt8 fcInt8_create22112(fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt s5, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set22112(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt s5, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create22121(fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt2 vec3, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+void fcInt8_set22121(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt2 vec3, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+fcInt8 fcInt8_create2213(fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt3 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcInt8_set2213(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt s4, fcInt3 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcInt8 fcInt8_create22211(fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+void fcInt8_set22211(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+fcInt8 fcInt8_create2222(fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt2 vec4) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+void fcInt8_set2222(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt2 vec3, fcInt2 vec4) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+fcInt8 fcInt8_create2231(fcInt2 vec1, fcInt2 vec2, fcInt3 vec3, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+void fcInt8_set2231(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt3 vec3, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+fcInt8 fcInt8_create224(fcInt2 vec1, fcInt2 vec2, fcInt4 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+void fcInt8_set224(fcInt8* self, fcInt2 vec1, fcInt2 vec2, fcInt4 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+fcInt8 fcInt8_create23111(fcInt2 vec1, fcInt3 vec2, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+void fcInt8_set23111(fcInt8* self, fcInt2 vec1, fcInt3 vec2, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+fcInt8 fcInt8_create2312(fcInt2 vec1, fcInt3 vec2, fcInt s5, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set2312(fcInt8* self, fcInt2 vec1, fcInt3 vec2, fcInt s5, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create2321(fcInt2 vec1, fcInt3 vec2, fcInt2 vec3, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcInt8_set2321(fcInt8* self, fcInt2 vec1, fcInt3 vec2, fcInt2 vec3, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+fcInt8 fcInt8_create233(fcInt2 vec1, fcInt3 vec2, fcInt3 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcInt8_set233(fcInt8* self, fcInt2 vec1, fcInt3 vec2, fcInt3 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcInt8 fcInt8_create2411(fcInt2 vec1, fcInt4 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+void fcInt8_set2411(fcInt8* self, fcInt2 vec1, fcInt4 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+fcInt8 fcInt8_create242(fcInt2 vec1, fcInt4 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set242(fcInt8* self, fcInt2 vec1, fcInt4 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create311111(fcInt3 vec1, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+void fcInt8_set311111(fcInt8* self, fcInt3 vec1, fcInt w, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+fcInt8 fcInt8_create31112(fcInt3 vec1, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set31112(fcInt8* self, fcInt3 vec1, fcInt w, fcInt s4, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create31121(fcInt3 vec1, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set31121(fcInt8* self, fcInt3 vec1, fcInt w, fcInt s4, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create3113(fcInt3 vec1, fcInt w, fcInt s4, fcInt3 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set3113(fcInt8* self, fcInt3 vec1, fcInt w, fcInt s4, fcInt3 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create31211(fcInt3 vec1, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcInt8_set31211(fcInt8* self, fcInt3 vec1, fcInt w, fcInt2 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcInt8 fcInt8_create3122(fcInt3 vec1, fcInt w, fcInt2 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set3122(fcInt8* self, fcInt3 vec1, fcInt w, fcInt2 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create3131(fcInt3 vec1, fcInt w, fcInt3 vec2, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcInt8_set3131(fcInt8* self, fcInt3 vec1, fcInt w, fcInt3 vec2, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcInt8 fcInt8_create314(fcInt3 vec1, fcInt w, fcInt4 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcInt8_set314(fcInt8* self, fcInt3 vec1, fcInt w, fcInt4 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcInt8 fcInt8_create32111(fcInt3 vec1, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcInt8_set32111(fcInt8* self, fcInt3 vec1, fcInt2 vec2, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcInt8 fcInt8_create3212(fcInt3 vec1, fcInt2 vec2, fcInt s5, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set3212(fcInt8* self, fcInt3 vec1, fcInt2 vec2, fcInt s5, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create3221(fcInt3 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcInt8_set3221(fcInt8* self, fcInt3 vec1, fcInt2 vec2, fcInt2 vec3, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcInt8 fcInt8_create323(fcInt3 vec1, fcInt2 vec2, fcInt3 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcInt8_set323(fcInt8* self, fcInt3 vec1, fcInt2 vec2, fcInt3 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcInt8 fcInt8_create3311(fcInt3 vec1, fcInt3 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcInt8_set3311(fcInt8* self, fcInt3 vec1, fcInt3 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcInt8 fcInt8_create332(fcInt3 vec1, fcInt3 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set332(fcInt8* self, fcInt3 vec1, fcInt3 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create341(fcInt3 vec1, fcInt4 vec2, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcInt8_set341(fcInt8* self, fcInt3 vec1, fcInt4 vec2, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcInt8 fcInt8_create41111(fcInt4 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+void fcInt8_set41111(fcInt8* self, fcInt4 vec1, fcInt s4, fcInt s5, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+fcInt8 fcInt8_create4112(fcInt4 vec1, fcInt s4, fcInt s5, fcInt2 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcInt8_set4112(fcInt8* self, fcInt4 vec1, fcInt s4, fcInt s5, fcInt2 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcInt8 fcInt8_create4121(fcInt4 vec1, fcInt s4, fcInt2 vec2, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcInt8_set4121(fcInt8* self, fcInt4 vec1, fcInt s4, fcInt2 vec2, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcInt8 fcInt8_create413(fcInt4 vec1, fcInt s4, fcInt3 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcInt8_set413(fcInt8* self, fcInt4 vec1, fcInt s4, fcInt3 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcInt8 fcInt8_create4211(fcInt4 vec1, fcInt2 vec2, fcInt s6, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcInt8_set4211(fcInt8* self, fcInt4 vec1, fcInt2 vec2, fcInt s6, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcInt8 fcInt8_create422(fcInt4 vec1, fcInt2 vec2, fcInt2 vec3) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcInt8_set422(fcInt8* self, fcInt4 vec1, fcInt2 vec2, fcInt2 vec3) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcInt8 fcInt8_create431(fcInt4 vec1, fcInt3 vec2, fcInt s7) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcInt8_set431(fcInt8* self, fcInt4 vec1, fcInt3 vec2, fcInt s7) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcInt8 fcInt8_create44(fcInt4 vec1, fcInt4 vec2) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcInt8_set44(fcInt8* self, fcInt4 vec1, fcInt4 vec2) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcInt8 fcInt8_create8(fcInt8 vec1) {
+ return fcInt8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+void fcInt8_set8(fcInt8* self, fcInt8 vec1) {
+ fcInt8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+fcInt4 fcInt8_odd(fcInt8 a) {
+ return fcInt4_create1111(a.s[1], a.s[3], a.s[5], a.s[7]);
+}
+
+fcInt4 fcInt8_even(fcInt8 a) {
+ return fcInt4_create1111(a.s[0], a.s[2], a.s[4], a.s[6]);
+}
+
+fcByte8 fcInt8_convertByte8(fcInt8 a) {
+ return fcByte8_create11111111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]), (fcByte)(a.s[4]), (fcByte)(a.s[5]), (fcByte)(a.s[6]), (fcByte)(a.s[7]));
+}
+
+fcShort8 fcInt8_convertShort8(fcInt8 a) {
+ return fcShort8_create11111111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]), (fcShort)(a.s[3]), (fcShort)(a.s[4]), (fcShort)(a.s[5]), (fcShort)(a.s[6]), (fcShort)(a.s[7]));
+}
+
+fcLong8 fcInt8_convertLong8(fcInt8 a) {
+ return fcLong8_create11111111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]), (fcLong)(a.s[3]), (fcLong)(a.s[4]), (fcLong)(a.s[5]), (fcLong)(a.s[6]), (fcLong)(a.s[7]));
+}
+
+fcFloat8 fcInt8_convertFloat8(fcInt8 a) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]), (fcFloat)(a.s[3]), (fcFloat)(a.s[4]), (fcFloat)(a.s[5]), (fcFloat)(a.s[6]), (fcFloat)(a.s[7]));
+}
+
+fcDouble8 fcInt8_convertDouble8(fcInt8 a) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]), (fcDouble)(a.s[3]), (fcDouble)(a.s[4]), (fcDouble)(a.s[5]), (fcDouble)(a.s[6]), (fcDouble)(a.s[7]));
+}
+
+fcInt2 fcInt8_asInt2(fcInt8 a) {
+ return fcInt2_create11(a.s[0], a.s[1]);
+}
+
+fcInt3 fcInt8_asInt3(fcInt8 a) {
+ return fcInt3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcInt4 fcInt8_asInt4(fcInt8 a) {
+ return fcInt4_create1111(a.s[0], a.s[1], a.s[2], a.s[3]);
+}
+
+fcInt8 fcInt8_isEqual(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0, a.s[4] == b.s[4]? 1 : 0, a.s[5] == b.s[5]? 1 : 0, a.s[6] == b.s[6]? 1 : 0, a.s[7] == b.s[7]? 1 : 0);
+}
+
+fcInt8 fcInt8_isNotEqual(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0, a.s[4] != b.s[4]? 1 : 0, a.s[5] != b.s[5]? 1 : 0, a.s[6] != b.s[6]? 1 : 0, a.s[7] != b.s[7]? 1 : 0);
+}
+
+fcInt8 fcInt8_isGreater(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0, a.s[4] > b.s[4]? 1 : 0, a.s[5] > b.s[5]? 1 : 0, a.s[6] > b.s[6]? 1 : 0, a.s[7] > b.s[7]? 1 : 0);
+}
+
+fcInt8 fcInt8_isGreaterEqual(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0, a.s[4] >= b.s[4]? 1 : 0, a.s[5] >= b.s[5]? 1 : 0, a.s[6] >= b.s[6]? 1 : 0, a.s[7] >= b.s[7]? 1 : 0);
+}
+
+fcInt8 fcInt8_isLess(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0, a.s[4] < b.s[4]? 1 : 0, a.s[5] < b.s[5]? 1 : 0, a.s[6] < b.s[6]? 1 : 0, a.s[7] < b.s[7]? 1 : 0);
+}
+
+fcInt8 fcInt8_isLessEqual(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0, a.s[4] <= b.s[4]? 1 : 0, a.s[5] <= b.s[5]? 1 : 0, a.s[6] <= b.s[6]? 1 : 0, a.s[7] <= b.s[7]? 1 : 0);
+}
+
+fcInt8 fcInt8_select(fcInt8 a, fcInt8 b, fcInt8 c) {
+ return fcInt8_create11111111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]), fcMath_select(a.s[4], b.s[4], c.s[4]), fcMath_select(a.s[5], b.s[5], c.s[5]), fcMath_select(a.s[6], b.s[6], c.s[6]), fcMath_select(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt fcInt8_any(fcInt8 a) {
+ return a.s[0] != 0 || a.s[1] != 0 || a.s[2] != 0 || a.s[3] != 0 || a.s[4] != 0 || a.s[5] != 0 || a.s[6] != 0 || a.s[7] != 0;
+}
+
+fcInt fcInt8_all(fcInt8 a) {
+ return !(a.s[0] == 0 || a.s[1] == 0 || a.s[2] == 0 || a.s[3] == 0 || a.s[4] == 0 || a.s[5] == 0 || a.s[6] == 0 || a.s[7] == 0);
+}
+
+fcInt8 fcInt8_neg(fcInt8 a) {
+ return fcInt8_create11111111(-a.s[0], -a.s[1], -a.s[2], -a.s[3], -a.s[4], -a.s[5], -a.s[6], -a.s[7]);
+}
+
+fcInt8 fcInt8_add(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3], a.s[4] + b.s[4], a.s[5] + b.s[5], a.s[6] + b.s[6], a.s[7] + b.s[7]);
+}
+
+fcInt8 fcInt8_sub(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3], a.s[4] - b.s[4], a.s[5] - b.s[5], a.s[6] - b.s[6], a.s[7] - b.s[7]);
+}
+
+fcInt8 fcInt8_mul(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2], a.s[3] * b.s[3], a.s[4] * b.s[4], a.s[5] * b.s[5], a.s[6] * b.s[6], a.s[7] * b.s[7]);
+}
+
+fcDouble8 fcInt8_muld(fcInt8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]), (fcDouble)(a.s[4] * b.s[4]), (fcDouble)(a.s[5] * b.s[5]), (fcDouble)(a.s[6] * b.s[6]), (fcDouble)(a.s[7] * b.s[7]));
+}
+
+fcFloat8 fcInt8_mulf(fcInt8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]), (fcFloat)(a.s[4] * b.s[4]), (fcFloat)(a.s[5] * b.s[5]), (fcFloat)(a.s[6] * b.s[6]), (fcFloat)(a.s[7] * b.s[7]));
+}
+
+fcInt8 fcInt8_mulk(fcInt8 a, fcInt k) {
+ return fcInt8_create11111111(a.s[0] * k, a.s[1] * k, a.s[2] * k, a.s[3] * k, a.s[4] * k, a.s[5] * k, a.s[6] * k, a.s[7] * k);
+}
+
+fcDouble8 fcInt8_mulkd(fcInt8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k), (fcDouble)(a.s[4] * k), (fcDouble)(a.s[5] * k), (fcDouble)(a.s[6] * k), (fcDouble)(a.s[7] * k));
+}
+
+fcFloat8 fcInt8_mulkf(fcInt8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k), (fcFloat)(a.s[4] * k), (fcFloat)(a.s[5] * k), (fcFloat)(a.s[6] * k), (fcFloat)(a.s[7] * k));
+}
+
+fcInt8 fcInt8_div(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2], a.s[3] / b.s[3], a.s[4] / b.s[4], a.s[5] / b.s[5], a.s[6] / b.s[6], a.s[7] / b.s[7]);
+}
+
+fcDouble8 fcInt8_divd(fcInt8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]), (fcDouble)(a.s[4] / b.s[4]), (fcDouble)(a.s[5] / b.s[5]), (fcDouble)(a.s[6] / b.s[6]), (fcDouble)(a.s[7] / b.s[7]));
+}
+
+fcFloat8 fcInt8_divf(fcInt8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]), (fcFloat)(a.s[4] / b.s[4]), (fcFloat)(a.s[5] / b.s[5]), (fcFloat)(a.s[6] / b.s[6]), (fcFloat)(a.s[7] / b.s[7]));
+}
+
+fcInt8 fcInt8_divk(fcInt8 a, fcInt k) {
+ return fcInt8_create11111111(a.s[0] / k, a.s[1] / k, a.s[2] / k, a.s[3] / k, a.s[4] / k, a.s[5] / k, a.s[6] / k, a.s[7] / k);
+}
+
+fcDouble8 fcInt8_divkd(fcInt8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k), (fcDouble)(a.s[4] / k), (fcDouble)(a.s[5] / k), (fcDouble)(a.s[6] / k), (fcDouble)(a.s[7] / k));
+}
+
+fcFloat8 fcInt8_divkf(fcInt8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k), (fcFloat)(a.s[4] / k), (fcFloat)(a.s[5] / k), (fcFloat)(a.s[6] / k), (fcFloat)(a.s[7] / k));
+}
+
+fcInt8 fcInt8_mod(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2], a.s[3] % b.s[3], a.s[4] % b.s[4], a.s[5] % b.s[5], a.s[6] % b.s[6], a.s[7] % b.s[7]);
+}
+
+fcInt8 fcInt8_modk(fcInt8 a, fcInt k) {
+ return fcInt8_create11111111(a.s[0] % k, a.s[1] % k, a.s[2] % k, a.s[3] % k, a.s[4] % k, a.s[5] % k, a.s[6] % k, a.s[7] % k);
+}
+
+fcInt8 fcInt8_bitAnd(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2], a.s[3] & b.s[3], a.s[4] & b.s[4], a.s[5] & b.s[5], a.s[6] & b.s[6], a.s[7] & b.s[7]);
+}
+
+fcInt8 fcInt8_bitOr(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2], a.s[3] | b.s[3], a.s[4] | b.s[4], a.s[5] | b.s[5], a.s[6] | b.s[6], a.s[7] | b.s[7]);
+}
+
+fcInt8 fcInt8_bitXor(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2], a.s[3] ^ b.s[3], a.s[4] ^ b.s[4], a.s[5] ^ b.s[5], a.s[6] ^ b.s[6], a.s[7] ^ b.s[7]);
+}
+
+fcInt8 fcInt8_bitNot(fcInt8 a) {
+ return fcInt8_create11111111(~a.s[0], ~a.s[1], ~a.s[2], ~a.s[3], ~a.s[4], ~a.s[5], ~a.s[6], ~a.s[7]);
+}
+
+fcInt8 fcInt8_abs(fcInt8 a) {
+ return fcInt8_create11111111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]), fcMath_abs(a.s[4]), fcMath_abs(a.s[5]), fcMath_abs(a.s[6]), fcMath_abs(a.s[7]));
+}
+
+fcInt8 fcInt8_clamp(fcInt8 a, fcInt8 b, fcInt8 c) {
+ return fcInt8_create11111111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]), fcMath_clamp(a.s[4], b.s[4], c.s[4]), fcMath_clamp(a.s[5], b.s[5], c.s[5]), fcMath_clamp(a.s[6], b.s[6], c.s[6]), fcMath_clamp(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt8 fcInt8_max(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]), fcMath_max(a.s[4], b.s[4]), fcMath_max(a.s[5], b.s[5]), fcMath_max(a.s[6], b.s[6]), fcMath_max(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_maxMag(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]), fcMath_maxMag(a.s[4], b.s[4]), fcMath_maxMag(a.s[5], b.s[5]), fcMath_maxMag(a.s[6], b.s[6]), fcMath_maxMag(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_min(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]), fcMath_min(a.s[4], b.s[4]), fcMath_min(a.s[5], b.s[5]), fcMath_min(a.s[6], b.s[6]), fcMath_min(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_minMag(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]), fcMath_minMag(a.s[4], b.s[4]), fcMath_minMag(a.s[5], b.s[5]), fcMath_minMag(a.s[6], b.s[6]), fcMath_minMag(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_mix(fcInt8 a, fcInt8 b, fcInt8 c) {
+ return fcInt8_create11111111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]), fcMath_mix(a.s[4], b.s[4], c.s[4]), fcMath_mix(a.s[5], b.s[5], c.s[5]), fcMath_mix(a.s[6], b.s[6], c.s[6]), fcMath_mix(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt8 fcInt8_clampk(fcInt8 v, fcInt min, fcInt max) {
+ return fcInt8_create11111111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max), fcMath_clamp(v.s[4], min, max), fcMath_clamp(v.s[5], min, max), fcMath_clamp(v.s[6], min, max), fcMath_clamp(v.s[7], min, max));
+}
+
+fcInt8 fcInt8_maxk(fcInt8 x, fcInt y) {
+ return fcInt8_create11111111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y), fcMath_max(x.s[4], y), fcMath_max(x.s[5], y), fcMath_max(x.s[6], y), fcMath_max(x.s[7], y));
+}
+
+fcInt8 fcInt8_mink(fcInt8 x, fcInt y) {
+ return fcInt8_create11111111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y), fcMath_min(x.s[4], y), fcMath_min(x.s[5], y), fcMath_min(x.s[6], y), fcMath_min(x.s[7], y));
+}
+
+fcInt8 fcInt8_mixk(fcInt8 x, fcInt8 y, fcInt a) {
+ return fcInt8_create11111111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a), fcMath_mix(x.s[4], y.s[4], a), fcMath_mix(x.s[5], y.s[5], a), fcMath_mix(x.s[6], y.s[6], a), fcMath_mix(x.s[7], y.s[7], a));
+}
+
+fcInt8 fcInt8_absDiff(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]), fcMath_absDiff(a.s[3], b.s[3]), fcMath_absDiff(a.s[4], b.s[4]), fcMath_absDiff(a.s[5], b.s[5]), fcMath_absDiff(a.s[6], b.s[6]), fcMath_absDiff(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_addSat(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_addSat(a.s[0], b.s[0]), fcMath_addSat(a.s[1], b.s[1]), fcMath_addSat(a.s[2], b.s[2]), fcMath_addSat(a.s[3], b.s[3]), fcMath_addSat(a.s[4], b.s[4]), fcMath_addSat(a.s[5], b.s[5]), fcMath_addSat(a.s[6], b.s[6]), fcMath_addSat(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_clz(fcInt8 a) {
+ return fcInt8_create11111111(fcMath_clz(a.s[0]), fcMath_clz(a.s[1]), fcMath_clz(a.s[2]), fcMath_clz(a.s[3]), fcMath_clz(a.s[4]), fcMath_clz(a.s[5]), fcMath_clz(a.s[6]), fcMath_clz(a.s[7]));
+}
+
+fcInt8 fcInt8_hadd(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_hadd(a.s[0], b.s[0]), fcMath_hadd(a.s[1], b.s[1]), fcMath_hadd(a.s[2], b.s[2]), fcMath_hadd(a.s[3], b.s[3]), fcMath_hadd(a.s[4], b.s[4]), fcMath_hadd(a.s[5], b.s[5]), fcMath_hadd(a.s[6], b.s[6]), fcMath_hadd(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_madHi(fcInt8 a, fcInt8 b, fcInt8 c) {
+ return fcInt8_create11111111(fcMath_madHi(a.s[0], b.s[0], c.s[0]), fcMath_madHi(a.s[1], b.s[1], c.s[1]), fcMath_madHi(a.s[2], b.s[2], c.s[2]), fcMath_madHi(a.s[3], b.s[3], c.s[3]), fcMath_madHi(a.s[4], b.s[4], c.s[4]), fcMath_madHi(a.s[5], b.s[5], c.s[5]), fcMath_madHi(a.s[6], b.s[6], c.s[6]), fcMath_madHi(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt8 fcInt8_madSat(fcInt8 a, fcInt8 b, fcInt8 c) {
+ return fcInt8_create11111111(fcMath_madSat(a.s[0], b.s[0], c.s[0]), fcMath_madSat(a.s[1], b.s[1], c.s[1]), fcMath_madSat(a.s[2], b.s[2], c.s[2]), fcMath_madSat(a.s[3], b.s[3], c.s[3]), fcMath_madSat(a.s[4], b.s[4], c.s[4]), fcMath_madSat(a.s[5], b.s[5], c.s[5]), fcMath_madSat(a.s[6], b.s[6], c.s[6]), fcMath_madSat(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt8 fcInt8_mulHi(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_mulHi(a.s[0], b.s[0]), fcMath_mulHi(a.s[1], b.s[1]), fcMath_mulHi(a.s[2], b.s[2]), fcMath_mulHi(a.s[3], b.s[3]), fcMath_mulHi(a.s[4], b.s[4]), fcMath_mulHi(a.s[5], b.s[5]), fcMath_mulHi(a.s[6], b.s[6]), fcMath_mulHi(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_rhadd(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_rhadd(a.s[0], b.s[0]), fcMath_rhadd(a.s[1], b.s[1]), fcMath_rhadd(a.s[2], b.s[2]), fcMath_rhadd(a.s[3], b.s[3]), fcMath_rhadd(a.s[4], b.s[4]), fcMath_rhadd(a.s[5], b.s[5]), fcMath_rhadd(a.s[6], b.s[6]), fcMath_rhadd(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_rotate(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_rotate(a.s[0], b.s[0]), fcMath_rotate(a.s[1], b.s[1]), fcMath_rotate(a.s[2], b.s[2]), fcMath_rotate(a.s[3], b.s[3]), fcMath_rotate(a.s[4], b.s[4]), fcMath_rotate(a.s[5], b.s[5]), fcMath_rotate(a.s[6], b.s[6]), fcMath_rotate(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_subSat(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_subSat(a.s[0], b.s[0]), fcMath_subSat(a.s[1], b.s[1]), fcMath_subSat(a.s[2], b.s[2]), fcMath_subSat(a.s[3], b.s[3]), fcMath_subSat(a.s[4], b.s[4]), fcMath_subSat(a.s[5], b.s[5]), fcMath_subSat(a.s[6], b.s[6]), fcMath_subSat(a.s[7], b.s[7]));
+}
+
+fcInt8 fcInt8_mad24(fcInt8 a, fcInt8 b, fcInt8 c) {
+ return fcInt8_create11111111(fcMath_mad24(a.s[0], b.s[0], c.s[0]), fcMath_mad24(a.s[1], b.s[1], c.s[1]), fcMath_mad24(a.s[2], b.s[2], c.s[2]), fcMath_mad24(a.s[3], b.s[3], c.s[3]), fcMath_mad24(a.s[4], b.s[4], c.s[4]), fcMath_mad24(a.s[5], b.s[5], c.s[5]), fcMath_mad24(a.s[6], b.s[6], c.s[6]), fcMath_mad24(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt8 fcInt8_mul24(fcInt8 a, fcInt8 b) {
+ return fcInt8_create11111111(fcMath_mul24(a.s[0], b.s[0]), fcMath_mul24(a.s[1], b.s[1]), fcMath_mul24(a.s[2], b.s[2]), fcMath_mul24(a.s[3], b.s[3]), fcMath_mul24(a.s[4], b.s[4]), fcMath_mul24(a.s[5], b.s[5]), fcMath_mul24(a.s[6], b.s[6]), fcMath_mul24(a.s[7], b.s[7]));
+}
+
+
+//
+// fcLong2
+//
+
+fcLong2 fcLong2_create1(fcLong v) {
+ return fcLong2_create11(v, v);
+}
+
+void fcLong2_set1(fcLong2* self, fcLong v) {
+ fcLong2_set11(self, v, v);
+}
+
+fcLong2 fcLong2_create11(fcLong x, fcLong y) {
+ fcLong2 result = {{x, y}};
+ return result;
+}
+
+void fcLong2_set11(fcLong2* self, fcLong x, fcLong y) {
+ self->s[0] = x;
+ self->s[1] = y;
+}
+
+fcLong2 fcLong2_create2(fcLong2 vec1) {
+ return fcLong2_create11(vec1.s[0], vec1.s[1]);
+}
+
+void fcLong2_set2(fcLong2* self, fcLong2 vec1) {
+ fcLong2_set11(self, vec1.s[0], vec1.s[1]);
+}
+
+fcByte2 fcLong2_convertByte2(fcLong2 a) {
+ return fcByte2_create11((fcByte)(a.s[0]), (fcByte)(a.s[1]));
+}
+
+fcShort2 fcLong2_convertShort2(fcLong2 a) {
+ return fcShort2_create11((fcShort)(a.s[0]), (fcShort)(a.s[1]));
+}
+
+fcInt2 fcLong2_convertInt2(fcLong2 a) {
+ return fcInt2_create11((fcInt)(a.s[0]), (fcInt)(a.s[1]));
+}
+
+fcFloat2 fcLong2_convertFloat2(fcLong2 a) {
+ return fcFloat2_create11((fcFloat)(a.s[0]), (fcFloat)(a.s[1]));
+}
+
+fcDouble2 fcLong2_convertDouble2(fcLong2 a) {
+ return fcDouble2_create11((fcDouble)(a.s[0]), (fcDouble)(a.s[1]));
+}
+
+fcInt2 fcLong2_isEqual(fcLong2 a, fcLong2 b) {
+ return fcInt2_create11(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0);
+}
+
+fcInt2 fcLong2_isNotEqual(fcLong2 a, fcLong2 b) {
+ return fcInt2_create11(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0);
+}
+
+fcInt2 fcLong2_isGreater(fcLong2 a, fcLong2 b) {
+ return fcInt2_create11(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0);
+}
+
+fcInt2 fcLong2_isGreaterEqual(fcLong2 a, fcLong2 b) {
+ return fcInt2_create11(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0);
+}
+
+fcInt2 fcLong2_isLess(fcLong2 a, fcLong2 b) {
+ return fcInt2_create11(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0);
+}
+
+fcInt2 fcLong2_isLessEqual(fcLong2 a, fcLong2 b) {
+ return fcInt2_create11(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0);
+}
+
+fcLong2 fcLong2_select(fcLong2 a, fcLong2 b, fcInt2 c) {
+ return fcLong2_create11(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt fcLong2_any(fcLong2 a) {
+ return a.s[0] != 0L || a.s[1] != 0L;
+}
+
+fcInt fcLong2_all(fcLong2 a) {
+ return !(a.s[0] == 0L || a.s[1] == 0L);
+}
+
+fcLong2 fcLong2_neg(fcLong2 a) {
+ return fcLong2_create11(-a.s[0], -a.s[1]);
+}
+
+fcLong2 fcLong2_add(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(a.s[0] + b.s[0], a.s[1] + b.s[1]);
+}
+
+fcLong2 fcLong2_sub(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(a.s[0] - b.s[0], a.s[1] - b.s[1]);
+}
+
+fcLong2 fcLong2_mul(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(a.s[0] * b.s[0], a.s[1] * b.s[1]);
+}
+
+fcDouble2 fcLong2_muld(fcLong2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]));
+}
+
+fcFloat2 fcLong2_mulf(fcLong2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]));
+}
+
+fcLong2 fcLong2_mulk(fcLong2 a, fcLong k) {
+ return fcLong2_create11(a.s[0] * k, a.s[1] * k);
+}
+
+fcDouble2 fcLong2_mulkd(fcLong2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k));
+}
+
+fcFloat2 fcLong2_mulkf(fcLong2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k));
+}
+
+fcLong2 fcLong2_div(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(a.s[0] / b.s[0], a.s[1] / b.s[1]);
+}
+
+fcDouble2 fcLong2_divd(fcLong2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]));
+}
+
+fcFloat2 fcLong2_divf(fcLong2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]));
+}
+
+fcLong2 fcLong2_divk(fcLong2 a, fcLong k) {
+ return fcLong2_create11(a.s[0] / k, a.s[1] / k);
+}
+
+fcDouble2 fcLong2_divkd(fcLong2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k));
+}
+
+fcFloat2 fcLong2_divkf(fcLong2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k));
+}
+
+fcLong2 fcLong2_mod(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(a.s[0] % b.s[0], a.s[1] % b.s[1]);
+}
+
+fcLong2 fcLong2_modk(fcLong2 a, fcLong k) {
+ return fcLong2_create11(a.s[0] % k, a.s[1] % k);
+}
+
+fcLong2 fcLong2_bitAnd(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(a.s[0] & b.s[0], a.s[1] & b.s[1]);
+}
+
+fcLong2 fcLong2_bitOr(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(a.s[0] | b.s[0], a.s[1] | b.s[1]);
+}
+
+fcLong2 fcLong2_bitXor(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1]);
+}
+
+fcLong2 fcLong2_bitNot(fcLong2 a) {
+ return fcLong2_create11(~a.s[0], ~a.s[1]);
+}
+
+fcLong2 fcLong2_abs(fcLong2 a) {
+ return fcLong2_create11(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]));
+}
+
+fcLong2 fcLong2_clamp(fcLong2 a, fcLong2 b, fcLong2 c) {
+ return fcLong2_create11(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]));
+}
+
+fcLong2 fcLong2_max(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_maxMag(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_min(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_minMag(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_mix(fcLong2 a, fcLong2 b, fcLong2 c) {
+ return fcLong2_create11(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]));
+}
+
+fcLong2 fcLong2_clampk(fcLong2 v, fcLong min, fcLong max) {
+ return fcLong2_create11(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max));
+}
+
+fcLong2 fcLong2_maxk(fcLong2 x, fcLong y) {
+ return fcLong2_create11(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y));
+}
+
+fcLong2 fcLong2_mink(fcLong2 x, fcLong y) {
+ return fcLong2_create11(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y));
+}
+
+fcLong2 fcLong2_mixk(fcLong2 x, fcLong2 y, fcLong a) {
+ return fcLong2_create11(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a));
+}
+
+fcLong2 fcLong2_absDiff(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_addSat(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_addSatl(a.s[0], b.s[0]), fcMath_addSatl(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_clz(fcLong2 a) {
+ return fcLong2_create11(fcMath_clzl(a.s[0]), fcMath_clzl(a.s[1]));
+}
+
+fcLong2 fcLong2_hadd(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_haddl(a.s[0], b.s[0]), fcMath_haddl(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_madHi(fcLong2 a, fcLong2 b, fcLong2 c) {
+ return fcLong2_create11(fcMath_madHil(a.s[0], b.s[0], c.s[0]), fcMath_madHil(a.s[1], b.s[1], c.s[1]));
+}
+
+fcLong2 fcLong2_madSat(fcLong2 a, fcLong2 b, fcLong2 c) {
+ return fcLong2_create11(fcMath_madSatl(a.s[0], b.s[0], c.s[0]), fcMath_madSatl(a.s[1], b.s[1], c.s[1]));
+}
+
+fcLong2 fcLong2_mulHi(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_mulHil(a.s[0], b.s[0]), fcMath_mulHil(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_rhadd(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_rhaddl(a.s[0], b.s[0]), fcMath_rhaddl(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_rotate(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_rotatel(a.s[0], b.s[0]), fcMath_rotatel(a.s[1], b.s[1]));
+}
+
+fcLong2 fcLong2_subSat(fcLong2 a, fcLong2 b) {
+ return fcLong2_create11(fcMath_subSatl(a.s[0], b.s[0]), fcMath_subSatl(a.s[1], b.s[1]));
+}
+
+
+//
+// fcLong3
+//
+
+fcLong3 fcLong3_create1(fcLong v) {
+ return fcLong3_create111(v, v, v);
+}
+
+void fcLong3_set1(fcLong3* self, fcLong v) {
+ fcLong3_set111(self, v, v, v);
+}
+
+fcLong3 fcLong3_create111(fcLong x, fcLong y, fcLong z) {
+ fcLong3 result = {{x, y, z}};
+ return result;
+}
+
+void fcLong3_set111(fcLong3* self, fcLong x, fcLong y, fcLong z) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+}
+
+fcLong3 fcLong3_create12(fcLong x, fcLong2 vec1) {
+ return fcLong3_create111(x, vec1.s[0], vec1.s[1]);
+}
+
+void fcLong3_set12(fcLong3* self, fcLong x, fcLong2 vec1) {
+ fcLong3_set111(self, x, vec1.s[0], vec1.s[1]);
+}
+
+fcLong3 fcLong3_create21(fcLong2 vec1, fcLong z) {
+ return fcLong3_create111(vec1.s[0], vec1.s[1], z);
+}
+
+void fcLong3_set21(fcLong3* self, fcLong2 vec1, fcLong z) {
+ fcLong3_set111(self, vec1.s[0], vec1.s[1], z);
+}
+
+fcLong3 fcLong3_create3(fcLong3 vec1) {
+ return fcLong3_create111(vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcLong3_set3(fcLong3* self, fcLong3 vec1) {
+ fcLong3_set111(self, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcByte3 fcLong3_convertByte3(fcLong3 a) {
+ return fcByte3_create111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]));
+}
+
+fcShort3 fcLong3_convertShort3(fcLong3 a) {
+ return fcShort3_create111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]));
+}
+
+fcInt3 fcLong3_convertInt3(fcLong3 a) {
+ return fcInt3_create111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]));
+}
+
+fcFloat3 fcLong3_convertFloat3(fcLong3 a) {
+ return fcFloat3_create111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]));
+}
+
+fcDouble3 fcLong3_convertDouble3(fcLong3 a) {
+ return fcDouble3_create111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]));
+}
+
+fcLong2 fcLong3_asLong2(fcLong3 a) {
+ return fcLong2_create11(a.s[0], a.s[1]);
+}
+
+fcInt3 fcLong3_isEqual(fcLong3 a, fcLong3 b) {
+ return fcInt3_create111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0);
+}
+
+fcInt3 fcLong3_isNotEqual(fcLong3 a, fcLong3 b) {
+ return fcInt3_create111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0);
+}
+
+fcInt3 fcLong3_isGreater(fcLong3 a, fcLong3 b) {
+ return fcInt3_create111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0);
+}
+
+fcInt3 fcLong3_isGreaterEqual(fcLong3 a, fcLong3 b) {
+ return fcInt3_create111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0);
+}
+
+fcInt3 fcLong3_isLess(fcLong3 a, fcLong3 b) {
+ return fcInt3_create111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0);
+}
+
+fcInt3 fcLong3_isLessEqual(fcLong3 a, fcLong3 b) {
+ return fcInt3_create111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0);
+}
+
+fcLong3 fcLong3_select(fcLong3 a, fcLong3 b, fcInt3 c) {
+ return fcLong3_create111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt fcLong3_any(fcLong3 a) {
+ return a.s[0] != 0L || a.s[1] != 0L || a.s[2] != 0L;
+}
+
+fcInt fcLong3_all(fcLong3 a) {
+ return !(a.s[0] == 0L || a.s[1] == 0L || a.s[2] == 0L);
+}
+
+fcLong3 fcLong3_neg(fcLong3 a) {
+ return fcLong3_create111(-a.s[0], -a.s[1], -a.s[2]);
+}
+
+fcLong3 fcLong3_add(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2]);
+}
+
+fcLong3 fcLong3_sub(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2]);
+}
+
+fcLong3 fcLong3_mul(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2]);
+}
+
+fcDouble3 fcLong3_muld(fcLong3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]));
+}
+
+fcFloat3 fcLong3_mulf(fcLong3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]));
+}
+
+fcLong3 fcLong3_mulk(fcLong3 a, fcLong k) {
+ return fcLong3_create111(a.s[0] * k, a.s[1] * k, a.s[2] * k);
+}
+
+fcDouble3 fcLong3_mulkd(fcLong3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k));
+}
+
+fcFloat3 fcLong3_mulkf(fcLong3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k));
+}
+
+fcLong3 fcLong3_div(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2]);
+}
+
+fcDouble3 fcLong3_divd(fcLong3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]));
+}
+
+fcFloat3 fcLong3_divf(fcLong3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]));
+}
+
+fcLong3 fcLong3_divk(fcLong3 a, fcLong k) {
+ return fcLong3_create111(a.s[0] / k, a.s[1] / k, a.s[2] / k);
+}
+
+fcDouble3 fcLong3_divkd(fcLong3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k));
+}
+
+fcFloat3 fcLong3_divkf(fcLong3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k));
+}
+
+fcLong3 fcLong3_mod(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2]);
+}
+
+fcLong3 fcLong3_modk(fcLong3 a, fcLong k) {
+ return fcLong3_create111(a.s[0] % k, a.s[1] % k, a.s[2] % k);
+}
+
+fcLong3 fcLong3_bitAnd(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2]);
+}
+
+fcLong3 fcLong3_bitOr(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2]);
+}
+
+fcLong3 fcLong3_bitXor(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2]);
+}
+
+fcLong3 fcLong3_bitNot(fcLong3 a) {
+ return fcLong3_create111(~a.s[0], ~a.s[1], ~a.s[2]);
+}
+
+fcLong3 fcLong3_abs(fcLong3 a) {
+ return fcLong3_create111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]));
+}
+
+fcLong3 fcLong3_clamp(fcLong3 a, fcLong3 b, fcLong3 c) {
+ return fcLong3_create111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]));
+}
+
+fcLong3 fcLong3_max(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_maxMag(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_min(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_minMag(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_mix(fcLong3 a, fcLong3 b, fcLong3 c) {
+ return fcLong3_create111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]));
+}
+
+fcLong3 fcLong3_clampk(fcLong3 v, fcLong min, fcLong max) {
+ return fcLong3_create111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max));
+}
+
+fcLong3 fcLong3_maxk(fcLong3 x, fcLong y) {
+ return fcLong3_create111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y));
+}
+
+fcLong3 fcLong3_mink(fcLong3 x, fcLong y) {
+ return fcLong3_create111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y));
+}
+
+fcLong3 fcLong3_mixk(fcLong3 x, fcLong3 y, fcLong a) {
+ return fcLong3_create111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a));
+}
+
+fcLong3 fcLong3_absDiff(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_addSat(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_addSatl(a.s[0], b.s[0]), fcMath_addSatl(a.s[1], b.s[1]), fcMath_addSatl(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_clz(fcLong3 a) {
+ return fcLong3_create111(fcMath_clzl(a.s[0]), fcMath_clzl(a.s[1]), fcMath_clzl(a.s[2]));
+}
+
+fcLong3 fcLong3_hadd(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_haddl(a.s[0], b.s[0]), fcMath_haddl(a.s[1], b.s[1]), fcMath_haddl(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_madHi(fcLong3 a, fcLong3 b, fcLong3 c) {
+ return fcLong3_create111(fcMath_madHil(a.s[0], b.s[0], c.s[0]), fcMath_madHil(a.s[1], b.s[1], c.s[1]), fcMath_madHil(a.s[2], b.s[2], c.s[2]));
+}
+
+fcLong3 fcLong3_madSat(fcLong3 a, fcLong3 b, fcLong3 c) {
+ return fcLong3_create111(fcMath_madSatl(a.s[0], b.s[0], c.s[0]), fcMath_madSatl(a.s[1], b.s[1], c.s[1]), fcMath_madSatl(a.s[2], b.s[2], c.s[2]));
+}
+
+fcLong3 fcLong3_mulHi(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_mulHil(a.s[0], b.s[0]), fcMath_mulHil(a.s[1], b.s[1]), fcMath_mulHil(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_rhadd(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_rhaddl(a.s[0], b.s[0]), fcMath_rhaddl(a.s[1], b.s[1]), fcMath_rhaddl(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_rotate(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_rotatel(a.s[0], b.s[0]), fcMath_rotatel(a.s[1], b.s[1]), fcMath_rotatel(a.s[2], b.s[2]));
+}
+
+fcLong3 fcLong3_subSat(fcLong3 a, fcLong3 b) {
+ return fcLong3_create111(fcMath_subSatl(a.s[0], b.s[0]), fcMath_subSatl(a.s[1], b.s[1]), fcMath_subSatl(a.s[2], b.s[2]));
+}
+
+
+//
+// fcLong4
+//
+
+fcLong4 fcLong4_create1(fcLong v) {
+ return fcLong4_create1111(v, v, v, v);
+}
+
+void fcLong4_set1(fcLong4* self, fcLong v) {
+ fcLong4_set1111(self, v, v, v, v);
+}
+
+fcLong4 fcLong4_create1111(fcLong x, fcLong y, fcLong z, fcLong w) {
+ fcLong4 result = {{x, y, z, w}};
+ return result;
+}
+
+void fcLong4_set1111(fcLong4* self, fcLong x, fcLong y, fcLong z, fcLong w) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+}
+
+fcLong4 fcLong4_create112(fcLong x, fcLong y, fcLong2 vec1) {
+ return fcLong4_create1111(x, y, vec1.s[0], vec1.s[1]);
+}
+
+void fcLong4_set112(fcLong4* self, fcLong x, fcLong y, fcLong2 vec1) {
+ fcLong4_set1111(self, x, y, vec1.s[0], vec1.s[1]);
+}
+
+fcLong4 fcLong4_create121(fcLong x, fcLong2 vec1, fcLong w) {
+ return fcLong4_create1111(x, vec1.s[0], vec1.s[1], w);
+}
+
+void fcLong4_set121(fcLong4* self, fcLong x, fcLong2 vec1, fcLong w) {
+ fcLong4_set1111(self, x, vec1.s[0], vec1.s[1], w);
+}
+
+fcLong4 fcLong4_create13(fcLong x, fcLong3 vec1) {
+ return fcLong4_create1111(x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcLong4_set13(fcLong4* self, fcLong x, fcLong3 vec1) {
+ fcLong4_set1111(self, x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcLong4 fcLong4_create211(fcLong2 vec1, fcLong z, fcLong w) {
+ return fcLong4_create1111(vec1.s[0], vec1.s[1], z, w);
+}
+
+void fcLong4_set211(fcLong4* self, fcLong2 vec1, fcLong z, fcLong w) {
+ fcLong4_set1111(self, vec1.s[0], vec1.s[1], z, w);
+}
+
+fcLong4 fcLong4_create22(fcLong2 vec1, fcLong2 vec2) {
+ return fcLong4_create1111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcLong4_set22(fcLong4* self, fcLong2 vec1, fcLong2 vec2) {
+ fcLong4_set1111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcLong4 fcLong4_create31(fcLong3 vec1, fcLong w) {
+ return fcLong4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+void fcLong4_set31(fcLong4* self, fcLong3 vec1, fcLong w) {
+ fcLong4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+fcLong4 fcLong4_create4(fcLong4 vec1) {
+ return fcLong4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcLong4_set4(fcLong4* self, fcLong4 vec1) {
+ fcLong4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcLong2 fcLong4_odd(fcLong4 a) {
+ return fcLong2_create11(a.s[1], a.s[3]);
+}
+
+fcLong2 fcLong4_even(fcLong4 a) {
+ return fcLong2_create11(a.s[0], a.s[2]);
+}
+
+fcByte4 fcLong4_convertByte4(fcLong4 a) {
+ return fcByte4_create1111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]));
+}
+
+fcShort4 fcLong4_convertShort4(fcLong4 a) {
+ return fcShort4_create1111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]), (fcShort)(a.s[3]));
+}
+
+fcInt4 fcLong4_convertInt4(fcLong4 a) {
+ return fcInt4_create1111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]), (fcInt)(a.s[3]));
+}
+
+fcFloat4 fcLong4_convertFloat4(fcLong4 a) {
+ return fcFloat4_create1111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]), (fcFloat)(a.s[3]));
+}
+
+fcDouble4 fcLong4_convertDouble4(fcLong4 a) {
+ return fcDouble4_create1111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]), (fcDouble)(a.s[3]));
+}
+
+fcLong2 fcLong4_asLong2(fcLong4 a) {
+ return fcLong2_create11(a.s[0], a.s[1]);
+}
+
+fcLong3 fcLong4_asLong3(fcLong4 a) {
+ return fcLong3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcInt4 fcLong4_isEqual(fcLong4 a, fcLong4 b) {
+ return fcInt4_create1111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
+}
+
+fcInt4 fcLong4_isNotEqual(fcLong4 a, fcLong4 b) {
+ return fcInt4_create1111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
+}
+
+fcInt4 fcLong4_isGreater(fcLong4 a, fcLong4 b) {
+ return fcInt4_create1111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
+}
+
+fcInt4 fcLong4_isGreaterEqual(fcLong4 a, fcLong4 b) {
+ return fcInt4_create1111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
+}
+
+fcInt4 fcLong4_isLess(fcLong4 a, fcLong4 b) {
+ return fcInt4_create1111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
+}
+
+fcInt4 fcLong4_isLessEqual(fcLong4 a, fcLong4 b) {
+ return fcInt4_create1111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
+}
+
+fcLong4 fcLong4_select(fcLong4 a, fcLong4 b, fcInt4 c) {
+ return fcLong4_create1111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt fcLong4_any(fcLong4 a) {
+ return a.s[0] != 0L || a.s[1] != 0L || a.s[2] != 0L || a.s[3] != 0L;
+}
+
+fcInt fcLong4_all(fcLong4 a) {
+ return !(a.s[0] == 0L || a.s[1] == 0L || a.s[2] == 0L || a.s[3] == 0L);
+}
+
+fcLong4 fcLong4_neg(fcLong4 a) {
+ return fcLong4_create1111(-a.s[0], -a.s[1], -a.s[2], -a.s[3]);
+}
+
+fcLong4 fcLong4_add(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3]);
+}
+
+fcLong4 fcLong4_sub(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3]);
+}
+
+fcLong4 fcLong4_mul(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2], a.s[3] * b.s[3]);
+}
+
+fcDouble4 fcLong4_muld(fcLong4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]));
+}
+
+fcFloat4 fcLong4_mulf(fcLong4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]));
+}
+
+fcLong4 fcLong4_mulk(fcLong4 a, fcLong k) {
+ return fcLong4_create1111(a.s[0] * k, a.s[1] * k, a.s[2] * k, a.s[3] * k);
+}
+
+fcDouble4 fcLong4_mulkd(fcLong4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k));
+}
+
+fcFloat4 fcLong4_mulkf(fcLong4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k));
+}
+
+fcLong4 fcLong4_div(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2], a.s[3] / b.s[3]);
+}
+
+fcDouble4 fcLong4_divd(fcLong4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]));
+}
+
+fcFloat4 fcLong4_divf(fcLong4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]));
+}
+
+fcLong4 fcLong4_divk(fcLong4 a, fcLong k) {
+ return fcLong4_create1111(a.s[0] / k, a.s[1] / k, a.s[2] / k, a.s[3] / k);
+}
+
+fcDouble4 fcLong4_divkd(fcLong4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k));
+}
+
+fcFloat4 fcLong4_divkf(fcLong4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k));
+}
+
+fcLong4 fcLong4_mod(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2], a.s[3] % b.s[3]);
+}
+
+fcLong4 fcLong4_modk(fcLong4 a, fcLong k) {
+ return fcLong4_create1111(a.s[0] % k, a.s[1] % k, a.s[2] % k, a.s[3] % k);
+}
+
+fcLong4 fcLong4_bitAnd(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2], a.s[3] & b.s[3]);
+}
+
+fcLong4 fcLong4_bitOr(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2], a.s[3] | b.s[3]);
+}
+
+fcLong4 fcLong4_bitXor(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2], a.s[3] ^ b.s[3]);
+}
+
+fcLong4 fcLong4_bitNot(fcLong4 a) {
+ return fcLong4_create1111(~a.s[0], ~a.s[1], ~a.s[2], ~a.s[3]);
+}
+
+fcLong4 fcLong4_abs(fcLong4 a) {
+ return fcLong4_create1111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]));
+}
+
+fcLong4 fcLong4_clamp(fcLong4 a, fcLong4 b, fcLong4 c) {
+ return fcLong4_create1111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]));
+}
+
+fcLong4 fcLong4_max(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_maxMag(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_min(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_minMag(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_mix(fcLong4 a, fcLong4 b, fcLong4 c) {
+ return fcLong4_create1111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]));
+}
+
+fcLong4 fcLong4_clampk(fcLong4 v, fcLong min, fcLong max) {
+ return fcLong4_create1111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max));
+}
+
+fcLong4 fcLong4_maxk(fcLong4 x, fcLong y) {
+ return fcLong4_create1111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y));
+}
+
+fcLong4 fcLong4_mink(fcLong4 x, fcLong y) {
+ return fcLong4_create1111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y));
+}
+
+fcLong4 fcLong4_mixk(fcLong4 x, fcLong4 y, fcLong a) {
+ return fcLong4_create1111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a));
+}
+
+fcLong4 fcLong4_absDiff(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]), fcMath_absDiff(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_addSat(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_addSatl(a.s[0], b.s[0]), fcMath_addSatl(a.s[1], b.s[1]), fcMath_addSatl(a.s[2], b.s[2]), fcMath_addSatl(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_clz(fcLong4 a) {
+ return fcLong4_create1111(fcMath_clzl(a.s[0]), fcMath_clzl(a.s[1]), fcMath_clzl(a.s[2]), fcMath_clzl(a.s[3]));
+}
+
+fcLong4 fcLong4_hadd(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_haddl(a.s[0], b.s[0]), fcMath_haddl(a.s[1], b.s[1]), fcMath_haddl(a.s[2], b.s[2]), fcMath_haddl(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_madHi(fcLong4 a, fcLong4 b, fcLong4 c) {
+ return fcLong4_create1111(fcMath_madHil(a.s[0], b.s[0], c.s[0]), fcMath_madHil(a.s[1], b.s[1], c.s[1]), fcMath_madHil(a.s[2], b.s[2], c.s[2]), fcMath_madHil(a.s[3], b.s[3], c.s[3]));
+}
+
+fcLong4 fcLong4_madSat(fcLong4 a, fcLong4 b, fcLong4 c) {
+ return fcLong4_create1111(fcMath_madSatl(a.s[0], b.s[0], c.s[0]), fcMath_madSatl(a.s[1], b.s[1], c.s[1]), fcMath_madSatl(a.s[2], b.s[2], c.s[2]), fcMath_madSatl(a.s[3], b.s[3], c.s[3]));
+}
+
+fcLong4 fcLong4_mulHi(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_mulHil(a.s[0], b.s[0]), fcMath_mulHil(a.s[1], b.s[1]), fcMath_mulHil(a.s[2], b.s[2]), fcMath_mulHil(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_rhadd(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_rhaddl(a.s[0], b.s[0]), fcMath_rhaddl(a.s[1], b.s[1]), fcMath_rhaddl(a.s[2], b.s[2]), fcMath_rhaddl(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_rotate(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_rotatel(a.s[0], b.s[0]), fcMath_rotatel(a.s[1], b.s[1]), fcMath_rotatel(a.s[2], b.s[2]), fcMath_rotatel(a.s[3], b.s[3]));
+}
+
+fcLong4 fcLong4_subSat(fcLong4 a, fcLong4 b) {
+ return fcLong4_create1111(fcMath_subSatl(a.s[0], b.s[0]), fcMath_subSatl(a.s[1], b.s[1]), fcMath_subSatl(a.s[2], b.s[2]), fcMath_subSatl(a.s[3], b.s[3]));
+}
+
+
+//
+// fcLong8
+//
+
+fcLong8 fcLong8_create1(fcLong v) {
+ return fcLong8_create11111111(v, v, v, v, v, v, v, v);
+}
+
+void fcLong8_set1(fcLong8* self, fcLong v) {
+ fcLong8_set11111111(self, v, v, v, v, v, v, v, v);
+}
+
+fcLong8 fcLong8_create11111111(fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8 result = {{x, y, z, w, s4, s5, s6, s7}};
+ return result;
+}
+
+void fcLong8_set11111111(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+ self->s[4] = s4;
+ self->s[5] = s5;
+ self->s[6] = s6;
+ self->s[7] = s7;
+}
+
+fcLong8 fcLong8_create1111112(fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong2 vec1) {
+ return fcLong8_create11111111(x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+void fcLong8_set1111112(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong2 vec1) {
+ fcLong8_set11111111(self, x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+fcLong8 fcLong8_create1111121(fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong2 vec1, fcLong s7) {
+ return fcLong8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+void fcLong8_set1111121(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong2 vec1, fcLong s7) {
+ fcLong8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+fcLong8 fcLong8_create111113(fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong3 vec1) {
+ return fcLong8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcLong8_set111113(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong s4, fcLong3 vec1) {
+ fcLong8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcLong8 fcLong8_create1111211(fcLong x, fcLong y, fcLong z, fcLong w, fcLong2 vec1, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+void fcLong8_set1111211(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong2 vec1, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+fcLong8 fcLong8_create111122(fcLong x, fcLong y, fcLong z, fcLong w, fcLong2 vec1, fcLong2 vec2) {
+ return fcLong8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set111122(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong2 vec1, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create111131(fcLong x, fcLong y, fcLong z, fcLong w, fcLong3 vec1, fcLong s7) {
+ return fcLong8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+void fcLong8_set111131(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong3 vec1, fcLong s7) {
+ fcLong8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+fcLong8 fcLong8_create11114(fcLong x, fcLong y, fcLong z, fcLong w, fcLong4 vec1) {
+ return fcLong8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcLong8_set11114(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong w, fcLong4 vec1) {
+ fcLong8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcLong8 fcLong8_create1112111(fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+void fcLong8_set1112111(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+fcLong8 fcLong8_create111212(fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set111212(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create111221(fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set111221(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create11123(fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong3 vec2) {
+ return fcLong8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set11123(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong2 vec1, fcLong3 vec2) {
+ fcLong8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create111311(fcLong x, fcLong y, fcLong z, fcLong3 vec1, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+void fcLong8_set111311(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong3 vec1, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+fcLong8 fcLong8_create11132(fcLong x, fcLong y, fcLong z, fcLong3 vec1, fcLong2 vec2) {
+ return fcLong8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set11132(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong3 vec1, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create11141(fcLong x, fcLong y, fcLong z, fcLong4 vec1, fcLong s7) {
+ return fcLong8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+void fcLong8_set11141(fcLong8* self, fcLong x, fcLong y, fcLong z, fcLong4 vec1, fcLong s7) {
+ fcLong8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+fcLong8 fcLong8_create1121111(fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+void fcLong8_set1121111(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+fcLong8 fcLong8_create112112(fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set112112(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create112121(fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set112121(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create11213(fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong3 vec2) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set11213(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong s4, fcLong3 vec2) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create112211(fcLong x, fcLong y, fcLong2 vec1, fcLong2 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcLong8_set112211(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong2 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcLong8 fcLong8_create11222(fcLong x, fcLong y, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set11222(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create11231(fcLong x, fcLong y, fcLong2 vec1, fcLong3 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcLong8_set11231(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong3 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcLong8 fcLong8_create1124(fcLong x, fcLong y, fcLong2 vec1, fcLong4 vec2) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcLong8_set1124(fcLong8* self, fcLong x, fcLong y, fcLong2 vec1, fcLong4 vec2) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcLong8 fcLong8_create113111(fcLong x, fcLong y, fcLong3 vec1, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+void fcLong8_set113111(fcLong8* self, fcLong x, fcLong y, fcLong3 vec1, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+fcLong8 fcLong8_create11312(fcLong x, fcLong y, fcLong3 vec1, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set11312(fcLong8* self, fcLong x, fcLong y, fcLong3 vec1, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create11321(fcLong x, fcLong y, fcLong3 vec1, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set11321(fcLong8* self, fcLong x, fcLong y, fcLong3 vec1, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create1133(fcLong x, fcLong y, fcLong3 vec1, fcLong3 vec2) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set1133(fcLong8* self, fcLong x, fcLong y, fcLong3 vec1, fcLong3 vec2) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create11411(fcLong x, fcLong y, fcLong4 vec1, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+void fcLong8_set11411(fcLong8* self, fcLong x, fcLong y, fcLong4 vec1, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+fcLong8 fcLong8_create1142(fcLong x, fcLong y, fcLong4 vec1, fcLong2 vec2) {
+ return fcLong8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set1142(fcLong8* self, fcLong x, fcLong y, fcLong4 vec1, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create1211111(fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+void fcLong8_set1211111(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+fcLong8 fcLong8_create121112(fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set121112(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create121121(fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set121121(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create12113(fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong3 vec2) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set12113(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong s4, fcLong3 vec2) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create121211(fcLong x, fcLong2 vec1, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcLong8_set121211(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcLong8 fcLong8_create12122(fcLong x, fcLong2 vec1, fcLong w, fcLong2 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set12122(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong2 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create12131(fcLong x, fcLong2 vec1, fcLong w, fcLong3 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcLong8_set12131(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong3 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcLong8 fcLong8_create1214(fcLong x, fcLong2 vec1, fcLong w, fcLong4 vec2) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcLong8_set1214(fcLong8* self, fcLong x, fcLong2 vec1, fcLong w, fcLong4 vec2) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcLong8 fcLong8_create122111(fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcLong8_set122111(fcLong8* self, fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcLong8 fcLong8_create12212(fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong s5, fcLong2 vec3) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set12212(fcLong8* self, fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong s5, fcLong2 vec3) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create12221(fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcLong8_set12221(fcLong8* self, fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcLong8 fcLong8_create1223(fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong3 vec3) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcLong8_set1223(fcLong8* self, fcLong x, fcLong2 vec1, fcLong2 vec2, fcLong3 vec3) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcLong8 fcLong8_create12311(fcLong x, fcLong2 vec1, fcLong3 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcLong8_set12311(fcLong8* self, fcLong x, fcLong2 vec1, fcLong3 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcLong8 fcLong8_create1232(fcLong x, fcLong2 vec1, fcLong3 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set1232(fcLong8* self, fcLong x, fcLong2 vec1, fcLong3 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create1241(fcLong x, fcLong2 vec1, fcLong4 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcLong8_set1241(fcLong8* self, fcLong x, fcLong2 vec1, fcLong4 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcLong8 fcLong8_create131111(fcLong x, fcLong3 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+void fcLong8_set131111(fcLong8* self, fcLong x, fcLong3 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+fcLong8 fcLong8_create13112(fcLong x, fcLong3 vec1, fcLong s4, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set13112(fcLong8* self, fcLong x, fcLong3 vec1, fcLong s4, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create13121(fcLong x, fcLong3 vec1, fcLong s4, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set13121(fcLong8* self, fcLong x, fcLong3 vec1, fcLong s4, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create1313(fcLong x, fcLong3 vec1, fcLong s4, fcLong3 vec2) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set1313(fcLong8* self, fcLong x, fcLong3 vec1, fcLong s4, fcLong3 vec2) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create13211(fcLong x, fcLong3 vec1, fcLong2 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcLong8_set13211(fcLong8* self, fcLong x, fcLong3 vec1, fcLong2 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcLong8 fcLong8_create1322(fcLong x, fcLong3 vec1, fcLong2 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set1322(fcLong8* self, fcLong x, fcLong3 vec1, fcLong2 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create1331(fcLong x, fcLong3 vec1, fcLong3 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcLong8_set1331(fcLong8* self, fcLong x, fcLong3 vec1, fcLong3 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcLong8 fcLong8_create134(fcLong x, fcLong3 vec1, fcLong4 vec2) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcLong8_set134(fcLong8* self, fcLong x, fcLong3 vec1, fcLong4 vec2) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcLong8 fcLong8_create14111(fcLong x, fcLong4 vec1, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+void fcLong8_set14111(fcLong8* self, fcLong x, fcLong4 vec1, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+fcLong8 fcLong8_create1412(fcLong x, fcLong4 vec1, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set1412(fcLong8* self, fcLong x, fcLong4 vec1, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create1421(fcLong x, fcLong4 vec1, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set1421(fcLong8* self, fcLong x, fcLong4 vec1, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create143(fcLong x, fcLong4 vec1, fcLong3 vec2) {
+ return fcLong8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set143(fcLong8* self, fcLong x, fcLong4 vec1, fcLong3 vec2) {
+ fcLong8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create2111111(fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+void fcLong8_set2111111(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+fcLong8 fcLong8_create211112(fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set211112(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create211121(fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set211121(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create21113(fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong3 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set21113(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong s4, fcLong3 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create211211(fcLong2 vec1, fcLong z, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcLong8_set211211(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcLong8 fcLong8_create21122(fcLong2 vec1, fcLong z, fcLong w, fcLong2 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set21122(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong2 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create21131(fcLong2 vec1, fcLong z, fcLong w, fcLong3 vec2, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcLong8_set21131(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong3 vec2, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcLong8 fcLong8_create2114(fcLong2 vec1, fcLong z, fcLong w, fcLong4 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcLong8_set2114(fcLong8* self, fcLong2 vec1, fcLong z, fcLong w, fcLong4 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcLong8 fcLong8_create212111(fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcLong8_set212111(fcLong8* self, fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcLong8 fcLong8_create21212(fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong s5, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set21212(fcLong8* self, fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong s5, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create21221(fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong2 vec3, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcLong8_set21221(fcLong8* self, fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong2 vec3, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcLong8 fcLong8_create2123(fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong3 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcLong8_set2123(fcLong8* self, fcLong2 vec1, fcLong z, fcLong2 vec2, fcLong3 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcLong8 fcLong8_create21311(fcLong2 vec1, fcLong z, fcLong3 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcLong8_set21311(fcLong8* self, fcLong2 vec1, fcLong z, fcLong3 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcLong8 fcLong8_create2132(fcLong2 vec1, fcLong z, fcLong3 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set2132(fcLong8* self, fcLong2 vec1, fcLong z, fcLong3 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create2141(fcLong2 vec1, fcLong z, fcLong4 vec2, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcLong8_set2141(fcLong8* self, fcLong2 vec1, fcLong z, fcLong4 vec2, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcLong8 fcLong8_create221111(fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+void fcLong8_set221111(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+fcLong8 fcLong8_create22112(fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong s5, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set22112(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong s5, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create22121(fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong2 vec3, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+void fcLong8_set22121(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong2 vec3, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+fcLong8 fcLong8_create2213(fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong3 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcLong8_set2213(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong s4, fcLong3 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcLong8 fcLong8_create22211(fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+void fcLong8_set22211(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+fcLong8 fcLong8_create2222(fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong2 vec4) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+void fcLong8_set2222(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong2 vec3, fcLong2 vec4) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+fcLong8 fcLong8_create2231(fcLong2 vec1, fcLong2 vec2, fcLong3 vec3, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+void fcLong8_set2231(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong3 vec3, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+fcLong8 fcLong8_create224(fcLong2 vec1, fcLong2 vec2, fcLong4 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+void fcLong8_set224(fcLong8* self, fcLong2 vec1, fcLong2 vec2, fcLong4 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+fcLong8 fcLong8_create23111(fcLong2 vec1, fcLong3 vec2, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+void fcLong8_set23111(fcLong8* self, fcLong2 vec1, fcLong3 vec2, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+fcLong8 fcLong8_create2312(fcLong2 vec1, fcLong3 vec2, fcLong s5, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set2312(fcLong8* self, fcLong2 vec1, fcLong3 vec2, fcLong s5, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create2321(fcLong2 vec1, fcLong3 vec2, fcLong2 vec3, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcLong8_set2321(fcLong8* self, fcLong2 vec1, fcLong3 vec2, fcLong2 vec3, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+fcLong8 fcLong8_create233(fcLong2 vec1, fcLong3 vec2, fcLong3 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcLong8_set233(fcLong8* self, fcLong2 vec1, fcLong3 vec2, fcLong3 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcLong8 fcLong8_create2411(fcLong2 vec1, fcLong4 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+void fcLong8_set2411(fcLong8* self, fcLong2 vec1, fcLong4 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+fcLong8 fcLong8_create242(fcLong2 vec1, fcLong4 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set242(fcLong8* self, fcLong2 vec1, fcLong4 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create311111(fcLong3 vec1, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+void fcLong8_set311111(fcLong8* self, fcLong3 vec1, fcLong w, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+fcLong8 fcLong8_create31112(fcLong3 vec1, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set31112(fcLong8* self, fcLong3 vec1, fcLong w, fcLong s4, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create31121(fcLong3 vec1, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set31121(fcLong8* self, fcLong3 vec1, fcLong w, fcLong s4, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create3113(fcLong3 vec1, fcLong w, fcLong s4, fcLong3 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set3113(fcLong8* self, fcLong3 vec1, fcLong w, fcLong s4, fcLong3 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create31211(fcLong3 vec1, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcLong8_set31211(fcLong8* self, fcLong3 vec1, fcLong w, fcLong2 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcLong8 fcLong8_create3122(fcLong3 vec1, fcLong w, fcLong2 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set3122(fcLong8* self, fcLong3 vec1, fcLong w, fcLong2 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create3131(fcLong3 vec1, fcLong w, fcLong3 vec2, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcLong8_set3131(fcLong8* self, fcLong3 vec1, fcLong w, fcLong3 vec2, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcLong8 fcLong8_create314(fcLong3 vec1, fcLong w, fcLong4 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcLong8_set314(fcLong8* self, fcLong3 vec1, fcLong w, fcLong4 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcLong8 fcLong8_create32111(fcLong3 vec1, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcLong8_set32111(fcLong8* self, fcLong3 vec1, fcLong2 vec2, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcLong8 fcLong8_create3212(fcLong3 vec1, fcLong2 vec2, fcLong s5, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set3212(fcLong8* self, fcLong3 vec1, fcLong2 vec2, fcLong s5, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create3221(fcLong3 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcLong8_set3221(fcLong8* self, fcLong3 vec1, fcLong2 vec2, fcLong2 vec3, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcLong8 fcLong8_create323(fcLong3 vec1, fcLong2 vec2, fcLong3 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcLong8_set323(fcLong8* self, fcLong3 vec1, fcLong2 vec2, fcLong3 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcLong8 fcLong8_create3311(fcLong3 vec1, fcLong3 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcLong8_set3311(fcLong8* self, fcLong3 vec1, fcLong3 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcLong8 fcLong8_create332(fcLong3 vec1, fcLong3 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set332(fcLong8* self, fcLong3 vec1, fcLong3 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create341(fcLong3 vec1, fcLong4 vec2, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcLong8_set341(fcLong8* self, fcLong3 vec1, fcLong4 vec2, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcLong8 fcLong8_create41111(fcLong4 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+void fcLong8_set41111(fcLong8* self, fcLong4 vec1, fcLong s4, fcLong s5, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+fcLong8 fcLong8_create4112(fcLong4 vec1, fcLong s4, fcLong s5, fcLong2 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcLong8_set4112(fcLong8* self, fcLong4 vec1, fcLong s4, fcLong s5, fcLong2 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcLong8 fcLong8_create4121(fcLong4 vec1, fcLong s4, fcLong2 vec2, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcLong8_set4121(fcLong8* self, fcLong4 vec1, fcLong s4, fcLong2 vec2, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcLong8 fcLong8_create413(fcLong4 vec1, fcLong s4, fcLong3 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcLong8_set413(fcLong8* self, fcLong4 vec1, fcLong s4, fcLong3 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcLong8 fcLong8_create4211(fcLong4 vec1, fcLong2 vec2, fcLong s6, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcLong8_set4211(fcLong8* self, fcLong4 vec1, fcLong2 vec2, fcLong s6, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcLong8 fcLong8_create422(fcLong4 vec1, fcLong2 vec2, fcLong2 vec3) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcLong8_set422(fcLong8* self, fcLong4 vec1, fcLong2 vec2, fcLong2 vec3) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcLong8 fcLong8_create431(fcLong4 vec1, fcLong3 vec2, fcLong s7) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcLong8_set431(fcLong8* self, fcLong4 vec1, fcLong3 vec2, fcLong s7) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcLong8 fcLong8_create44(fcLong4 vec1, fcLong4 vec2) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcLong8_set44(fcLong8* self, fcLong4 vec1, fcLong4 vec2) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcLong8 fcLong8_create8(fcLong8 vec1) {
+ return fcLong8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+void fcLong8_set8(fcLong8* self, fcLong8 vec1) {
+ fcLong8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+fcLong4 fcLong8_odd(fcLong8 a) {
+ return fcLong4_create1111(a.s[1], a.s[3], a.s[5], a.s[7]);
+}
+
+fcLong4 fcLong8_even(fcLong8 a) {
+ return fcLong4_create1111(a.s[0], a.s[2], a.s[4], a.s[6]);
+}
+
+fcByte8 fcLong8_convertByte8(fcLong8 a) {
+ return fcByte8_create11111111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]), (fcByte)(a.s[4]), (fcByte)(a.s[5]), (fcByte)(a.s[6]), (fcByte)(a.s[7]));
+}
+
+fcShort8 fcLong8_convertShort8(fcLong8 a) {
+ return fcShort8_create11111111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]), (fcShort)(a.s[3]), (fcShort)(a.s[4]), (fcShort)(a.s[5]), (fcShort)(a.s[6]), (fcShort)(a.s[7]));
+}
+
+fcInt8 fcLong8_convertInt8(fcLong8 a) {
+ return fcInt8_create11111111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]), (fcInt)(a.s[3]), (fcInt)(a.s[4]), (fcInt)(a.s[5]), (fcInt)(a.s[6]), (fcInt)(a.s[7]));
+}
+
+fcFloat8 fcLong8_convertFloat8(fcLong8 a) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]), (fcFloat)(a.s[3]), (fcFloat)(a.s[4]), (fcFloat)(a.s[5]), (fcFloat)(a.s[6]), (fcFloat)(a.s[7]));
+}
+
+fcDouble8 fcLong8_convertDouble8(fcLong8 a) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]), (fcDouble)(a.s[3]), (fcDouble)(a.s[4]), (fcDouble)(a.s[5]), (fcDouble)(a.s[6]), (fcDouble)(a.s[7]));
+}
+
+fcLong2 fcLong8_asLong2(fcLong8 a) {
+ return fcLong2_create11(a.s[0], a.s[1]);
+}
+
+fcLong3 fcLong8_asLong3(fcLong8 a) {
+ return fcLong3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcLong4 fcLong8_asLong4(fcLong8 a) {
+ return fcLong4_create1111(a.s[0], a.s[1], a.s[2], a.s[3]);
+}
+
+fcInt8 fcLong8_isEqual(fcLong8 a, fcLong8 b) {
+ return fcInt8_create11111111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0, a.s[4] == b.s[4]? 1 : 0, a.s[5] == b.s[5]? 1 : 0, a.s[6] == b.s[6]? 1 : 0, a.s[7] == b.s[7]? 1 : 0);
+}
+
+fcInt8 fcLong8_isNotEqual(fcLong8 a, fcLong8 b) {
+ return fcInt8_create11111111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0, a.s[4] != b.s[4]? 1 : 0, a.s[5] != b.s[5]? 1 : 0, a.s[6] != b.s[6]? 1 : 0, a.s[7] != b.s[7]? 1 : 0);
+}
+
+fcInt8 fcLong8_isGreater(fcLong8 a, fcLong8 b) {
+ return fcInt8_create11111111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0, a.s[4] > b.s[4]? 1 : 0, a.s[5] > b.s[5]? 1 : 0, a.s[6] > b.s[6]? 1 : 0, a.s[7] > b.s[7]? 1 : 0);
+}
+
+fcInt8 fcLong8_isGreaterEqual(fcLong8 a, fcLong8 b) {
+ return fcInt8_create11111111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0, a.s[4] >= b.s[4]? 1 : 0, a.s[5] >= b.s[5]? 1 : 0, a.s[6] >= b.s[6]? 1 : 0, a.s[7] >= b.s[7]? 1 : 0);
+}
+
+fcInt8 fcLong8_isLess(fcLong8 a, fcLong8 b) {
+ return fcInt8_create11111111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0, a.s[4] < b.s[4]? 1 : 0, a.s[5] < b.s[5]? 1 : 0, a.s[6] < b.s[6]? 1 : 0, a.s[7] < b.s[7]? 1 : 0);
+}
+
+fcInt8 fcLong8_isLessEqual(fcLong8 a, fcLong8 b) {
+ return fcInt8_create11111111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0, a.s[4] <= b.s[4]? 1 : 0, a.s[5] <= b.s[5]? 1 : 0, a.s[6] <= b.s[6]? 1 : 0, a.s[7] <= b.s[7]? 1 : 0);
+}
+
+fcLong8 fcLong8_select(fcLong8 a, fcLong8 b, fcInt8 c) {
+ return fcLong8_create11111111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]), fcMath_select(a.s[4], b.s[4], c.s[4]), fcMath_select(a.s[5], b.s[5], c.s[5]), fcMath_select(a.s[6], b.s[6], c.s[6]), fcMath_select(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt fcLong8_any(fcLong8 a) {
+ return a.s[0] != 0L || a.s[1] != 0L || a.s[2] != 0L || a.s[3] != 0L || a.s[4] != 0L || a.s[5] != 0L || a.s[6] != 0L || a.s[7] != 0L;
+}
+
+fcInt fcLong8_all(fcLong8 a) {
+ return !(a.s[0] == 0L || a.s[1] == 0L || a.s[2] == 0L || a.s[3] == 0L || a.s[4] == 0L || a.s[5] == 0L || a.s[6] == 0L || a.s[7] == 0L);
+}
+
+fcLong8 fcLong8_neg(fcLong8 a) {
+ return fcLong8_create11111111(-a.s[0], -a.s[1], -a.s[2], -a.s[3], -a.s[4], -a.s[5], -a.s[6], -a.s[7]);
+}
+
+fcLong8 fcLong8_add(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3], a.s[4] + b.s[4], a.s[5] + b.s[5], a.s[6] + b.s[6], a.s[7] + b.s[7]);
+}
+
+fcLong8 fcLong8_sub(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3], a.s[4] - b.s[4], a.s[5] - b.s[5], a.s[6] - b.s[6], a.s[7] - b.s[7]);
+}
+
+fcLong8 fcLong8_mul(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(a.s[0] * b.s[0], a.s[1] * b.s[1], a.s[2] * b.s[2], a.s[3] * b.s[3], a.s[4] * b.s[4], a.s[5] * b.s[5], a.s[6] * b.s[6], a.s[7] * b.s[7]);
+}
+
+fcDouble8 fcLong8_muld(fcLong8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]), (fcDouble)(a.s[4] * b.s[4]), (fcDouble)(a.s[5] * b.s[5]), (fcDouble)(a.s[6] * b.s[6]), (fcDouble)(a.s[7] * b.s[7]));
+}
+
+fcFloat8 fcLong8_mulf(fcLong8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]), (fcFloat)(a.s[4] * b.s[4]), (fcFloat)(a.s[5] * b.s[5]), (fcFloat)(a.s[6] * b.s[6]), (fcFloat)(a.s[7] * b.s[7]));
+}
+
+fcLong8 fcLong8_mulk(fcLong8 a, fcLong k) {
+ return fcLong8_create11111111(a.s[0] * k, a.s[1] * k, a.s[2] * k, a.s[3] * k, a.s[4] * k, a.s[5] * k, a.s[6] * k, a.s[7] * k);
+}
+
+fcDouble8 fcLong8_mulkd(fcLong8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k), (fcDouble)(a.s[4] * k), (fcDouble)(a.s[5] * k), (fcDouble)(a.s[6] * k), (fcDouble)(a.s[7] * k));
+}
+
+fcFloat8 fcLong8_mulkf(fcLong8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k), (fcFloat)(a.s[4] * k), (fcFloat)(a.s[5] * k), (fcFloat)(a.s[6] * k), (fcFloat)(a.s[7] * k));
+}
+
+fcLong8 fcLong8_div(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(a.s[0] / b.s[0], a.s[1] / b.s[1], a.s[2] / b.s[2], a.s[3] / b.s[3], a.s[4] / b.s[4], a.s[5] / b.s[5], a.s[6] / b.s[6], a.s[7] / b.s[7]);
+}
+
+fcDouble8 fcLong8_divd(fcLong8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]), (fcDouble)(a.s[4] / b.s[4]), (fcDouble)(a.s[5] / b.s[5]), (fcDouble)(a.s[6] / b.s[6]), (fcDouble)(a.s[7] / b.s[7]));
+}
+
+fcFloat8 fcLong8_divf(fcLong8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]), (fcFloat)(a.s[4] / b.s[4]), (fcFloat)(a.s[5] / b.s[5]), (fcFloat)(a.s[6] / b.s[6]), (fcFloat)(a.s[7] / b.s[7]));
+}
+
+fcLong8 fcLong8_divk(fcLong8 a, fcLong k) {
+ return fcLong8_create11111111(a.s[0] / k, a.s[1] / k, a.s[2] / k, a.s[3] / k, a.s[4] / k, a.s[5] / k, a.s[6] / k, a.s[7] / k);
+}
+
+fcDouble8 fcLong8_divkd(fcLong8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k), (fcDouble)(a.s[4] / k), (fcDouble)(a.s[5] / k), (fcDouble)(a.s[6] / k), (fcDouble)(a.s[7] / k));
+}
+
+fcFloat8 fcLong8_divkf(fcLong8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k), (fcFloat)(a.s[4] / k), (fcFloat)(a.s[5] / k), (fcFloat)(a.s[6] / k), (fcFloat)(a.s[7] / k));
+}
+
+fcLong8 fcLong8_mod(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(a.s[0] % b.s[0], a.s[1] % b.s[1], a.s[2] % b.s[2], a.s[3] % b.s[3], a.s[4] % b.s[4], a.s[5] % b.s[5], a.s[6] % b.s[6], a.s[7] % b.s[7]);
+}
+
+fcLong8 fcLong8_modk(fcLong8 a, fcLong k) {
+ return fcLong8_create11111111(a.s[0] % k, a.s[1] % k, a.s[2] % k, a.s[3] % k, a.s[4] % k, a.s[5] % k, a.s[6] % k, a.s[7] % k);
+}
+
+fcLong8 fcLong8_bitAnd(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(a.s[0] & b.s[0], a.s[1] & b.s[1], a.s[2] & b.s[2], a.s[3] & b.s[3], a.s[4] & b.s[4], a.s[5] & b.s[5], a.s[6] & b.s[6], a.s[7] & b.s[7]);
+}
+
+fcLong8 fcLong8_bitOr(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(a.s[0] | b.s[0], a.s[1] | b.s[1], a.s[2] | b.s[2], a.s[3] | b.s[3], a.s[4] | b.s[4], a.s[5] | b.s[5], a.s[6] | b.s[6], a.s[7] | b.s[7]);
+}
+
+fcLong8 fcLong8_bitXor(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(a.s[0] ^ b.s[0], a.s[1] ^ b.s[1], a.s[2] ^ b.s[2], a.s[3] ^ b.s[3], a.s[4] ^ b.s[4], a.s[5] ^ b.s[5], a.s[6] ^ b.s[6], a.s[7] ^ b.s[7]);
+}
+
+fcLong8 fcLong8_bitNot(fcLong8 a) {
+ return fcLong8_create11111111(~a.s[0], ~a.s[1], ~a.s[2], ~a.s[3], ~a.s[4], ~a.s[5], ~a.s[6], ~a.s[7]);
+}
+
+fcLong8 fcLong8_abs(fcLong8 a) {
+ return fcLong8_create11111111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]), fcMath_abs(a.s[4]), fcMath_abs(a.s[5]), fcMath_abs(a.s[6]), fcMath_abs(a.s[7]));
+}
+
+fcLong8 fcLong8_clamp(fcLong8 a, fcLong8 b, fcLong8 c) {
+ return fcLong8_create11111111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]), fcMath_clamp(a.s[4], b.s[4], c.s[4]), fcMath_clamp(a.s[5], b.s[5], c.s[5]), fcMath_clamp(a.s[6], b.s[6], c.s[6]), fcMath_clamp(a.s[7], b.s[7], c.s[7]));
+}
+
+fcLong8 fcLong8_max(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]), fcMath_max(a.s[4], b.s[4]), fcMath_max(a.s[5], b.s[5]), fcMath_max(a.s[6], b.s[6]), fcMath_max(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_maxMag(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]), fcMath_maxMag(a.s[4], b.s[4]), fcMath_maxMag(a.s[5], b.s[5]), fcMath_maxMag(a.s[6], b.s[6]), fcMath_maxMag(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_min(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]), fcMath_min(a.s[4], b.s[4]), fcMath_min(a.s[5], b.s[5]), fcMath_min(a.s[6], b.s[6]), fcMath_min(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_minMag(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]), fcMath_minMag(a.s[4], b.s[4]), fcMath_minMag(a.s[5], b.s[5]), fcMath_minMag(a.s[6], b.s[6]), fcMath_minMag(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_mix(fcLong8 a, fcLong8 b, fcLong8 c) {
+ return fcLong8_create11111111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]), fcMath_mix(a.s[4], b.s[4], c.s[4]), fcMath_mix(a.s[5], b.s[5], c.s[5]), fcMath_mix(a.s[6], b.s[6], c.s[6]), fcMath_mix(a.s[7], b.s[7], c.s[7]));
+}
+
+fcLong8 fcLong8_clampk(fcLong8 v, fcLong min, fcLong max) {
+ return fcLong8_create11111111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max), fcMath_clamp(v.s[4], min, max), fcMath_clamp(v.s[5], min, max), fcMath_clamp(v.s[6], min, max), fcMath_clamp(v.s[7], min, max));
+}
+
+fcLong8 fcLong8_maxk(fcLong8 x, fcLong y) {
+ return fcLong8_create11111111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y), fcMath_max(x.s[4], y), fcMath_max(x.s[5], y), fcMath_max(x.s[6], y), fcMath_max(x.s[7], y));
+}
+
+fcLong8 fcLong8_mink(fcLong8 x, fcLong y) {
+ return fcLong8_create11111111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y), fcMath_min(x.s[4], y), fcMath_min(x.s[5], y), fcMath_min(x.s[6], y), fcMath_min(x.s[7], y));
+}
+
+fcLong8 fcLong8_mixk(fcLong8 x, fcLong8 y, fcLong a) {
+ return fcLong8_create11111111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a), fcMath_mix(x.s[4], y.s[4], a), fcMath_mix(x.s[5], y.s[5], a), fcMath_mix(x.s[6], y.s[6], a), fcMath_mix(x.s[7], y.s[7], a));
+}
+
+fcLong8 fcLong8_absDiff(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_absDiff(a.s[0], b.s[0]), fcMath_absDiff(a.s[1], b.s[1]), fcMath_absDiff(a.s[2], b.s[2]), fcMath_absDiff(a.s[3], b.s[3]), fcMath_absDiff(a.s[4], b.s[4]), fcMath_absDiff(a.s[5], b.s[5]), fcMath_absDiff(a.s[6], b.s[6]), fcMath_absDiff(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_addSat(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_addSatl(a.s[0], b.s[0]), fcMath_addSatl(a.s[1], b.s[1]), fcMath_addSatl(a.s[2], b.s[2]), fcMath_addSatl(a.s[3], b.s[3]), fcMath_addSatl(a.s[4], b.s[4]), fcMath_addSatl(a.s[5], b.s[5]), fcMath_addSatl(a.s[6], b.s[6]), fcMath_addSatl(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_clz(fcLong8 a) {
+ return fcLong8_create11111111(fcMath_clzl(a.s[0]), fcMath_clzl(a.s[1]), fcMath_clzl(a.s[2]), fcMath_clzl(a.s[3]), fcMath_clzl(a.s[4]), fcMath_clzl(a.s[5]), fcMath_clzl(a.s[6]), fcMath_clzl(a.s[7]));
+}
+
+fcLong8 fcLong8_hadd(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_haddl(a.s[0], b.s[0]), fcMath_haddl(a.s[1], b.s[1]), fcMath_haddl(a.s[2], b.s[2]), fcMath_haddl(a.s[3], b.s[3]), fcMath_haddl(a.s[4], b.s[4]), fcMath_haddl(a.s[5], b.s[5]), fcMath_haddl(a.s[6], b.s[6]), fcMath_haddl(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_madHi(fcLong8 a, fcLong8 b, fcLong8 c) {
+ return fcLong8_create11111111(fcMath_madHil(a.s[0], b.s[0], c.s[0]), fcMath_madHil(a.s[1], b.s[1], c.s[1]), fcMath_madHil(a.s[2], b.s[2], c.s[2]), fcMath_madHil(a.s[3], b.s[3], c.s[3]), fcMath_madHil(a.s[4], b.s[4], c.s[4]), fcMath_madHil(a.s[5], b.s[5], c.s[5]), fcMath_madHil(a.s[6], b.s[6], c.s[6]), fcMath_madHil(a.s[7], b.s[7], c.s[7]));
+}
+
+fcLong8 fcLong8_madSat(fcLong8 a, fcLong8 b, fcLong8 c) {
+ return fcLong8_create11111111(fcMath_madSatl(a.s[0], b.s[0], c.s[0]), fcMath_madSatl(a.s[1], b.s[1], c.s[1]), fcMath_madSatl(a.s[2], b.s[2], c.s[2]), fcMath_madSatl(a.s[3], b.s[3], c.s[3]), fcMath_madSatl(a.s[4], b.s[4], c.s[4]), fcMath_madSatl(a.s[5], b.s[5], c.s[5]), fcMath_madSatl(a.s[6], b.s[6], c.s[6]), fcMath_madSatl(a.s[7], b.s[7], c.s[7]));
+}
+
+fcLong8 fcLong8_mulHi(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_mulHil(a.s[0], b.s[0]), fcMath_mulHil(a.s[1], b.s[1]), fcMath_mulHil(a.s[2], b.s[2]), fcMath_mulHil(a.s[3], b.s[3]), fcMath_mulHil(a.s[4], b.s[4]), fcMath_mulHil(a.s[5], b.s[5]), fcMath_mulHil(a.s[6], b.s[6]), fcMath_mulHil(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_rhadd(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_rhaddl(a.s[0], b.s[0]), fcMath_rhaddl(a.s[1], b.s[1]), fcMath_rhaddl(a.s[2], b.s[2]), fcMath_rhaddl(a.s[3], b.s[3]), fcMath_rhaddl(a.s[4], b.s[4]), fcMath_rhaddl(a.s[5], b.s[5]), fcMath_rhaddl(a.s[6], b.s[6]), fcMath_rhaddl(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_rotate(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_rotatel(a.s[0], b.s[0]), fcMath_rotatel(a.s[1], b.s[1]), fcMath_rotatel(a.s[2], b.s[2]), fcMath_rotatel(a.s[3], b.s[3]), fcMath_rotatel(a.s[4], b.s[4]), fcMath_rotatel(a.s[5], b.s[5]), fcMath_rotatel(a.s[6], b.s[6]), fcMath_rotatel(a.s[7], b.s[7]));
+}
+
+fcLong8 fcLong8_subSat(fcLong8 a, fcLong8 b) {
+ return fcLong8_create11111111(fcMath_subSatl(a.s[0], b.s[0]), fcMath_subSatl(a.s[1], b.s[1]), fcMath_subSatl(a.s[2], b.s[2]), fcMath_subSatl(a.s[3], b.s[3]), fcMath_subSatl(a.s[4], b.s[4]), fcMath_subSatl(a.s[5], b.s[5]), fcMath_subSatl(a.s[6], b.s[6]), fcMath_subSatl(a.s[7], b.s[7]));
+}
+
+
+//
+// fcFloat2
+//
+
+fcFloat2 fcFloat2_create1(fcFloat v) {
+ return fcFloat2_create11(v, v);
+}
+
+void fcFloat2_set1(fcFloat2* self, fcFloat v) {
+ fcFloat2_set11(self, v, v);
+}
+
+fcFloat2 fcFloat2_create11(fcFloat x, fcFloat y) {
+ fcFloat2 result = {{x, y}};
+ return result;
+}
+
+void fcFloat2_set11(fcFloat2* self, fcFloat x, fcFloat y) {
+ self->s[0] = x;
+ self->s[1] = y;
+}
+
+fcFloat2 fcFloat2_create2(fcFloat2 vec1) {
+ return fcFloat2_create11(vec1.s[0], vec1.s[1]);
+}
+
+void fcFloat2_set2(fcFloat2* self, fcFloat2 vec1) {
+ fcFloat2_set11(self, vec1.s[0], vec1.s[1]);
+}
+
+fcByte2 fcFloat2_convertByte2(fcFloat2 a) {
+ return fcByte2_create11((fcByte)(a.s[0]), (fcByte)(a.s[1]));
+}
+
+fcShort2 fcFloat2_convertShort2(fcFloat2 a) {
+ return fcShort2_create11((fcShort)(a.s[0]), (fcShort)(a.s[1]));
+}
+
+fcInt2 fcFloat2_convertInt2(fcFloat2 a) {
+ return fcInt2_create11((fcInt)(a.s[0]), (fcInt)(a.s[1]));
+}
+
+fcLong2 fcFloat2_convertLong2(fcFloat2 a) {
+ return fcLong2_create11((fcLong)(a.s[0]), (fcLong)(a.s[1]));
+}
+
+fcDouble2 fcFloat2_convertDouble2(fcFloat2 a) {
+ return fcDouble2_create11((fcDouble)(a.s[0]), (fcDouble)(a.s[1]));
+}
+
+fcInt2 fcFloat2_isEqual(fcFloat2 a, fcFloat2 b) {
+ return fcInt2_create11(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0);
+}
+
+fcInt2 fcFloat2_isNotEqual(fcFloat2 a, fcFloat2 b) {
+ return fcInt2_create11(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0);
+}
+
+fcInt2 fcFloat2_isGreater(fcFloat2 a, fcFloat2 b) {
+ return fcInt2_create11(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0);
+}
+
+fcInt2 fcFloat2_isGreaterEqual(fcFloat2 a, fcFloat2 b) {
+ return fcInt2_create11(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0);
+}
+
+fcInt2 fcFloat2_isLess(fcFloat2 a, fcFloat2 b) {
+ return fcInt2_create11(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0);
+}
+
+fcInt2 fcFloat2_isLessEqual(fcFloat2 a, fcFloat2 b) {
+ return fcInt2_create11(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0);
+}
+
+fcFloat2 fcFloat2_select(fcFloat2 a, fcFloat2 b, fcInt2 c) {
+ return fcFloat2_create11(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt2 fcFloat2_isFinite(fcFloat2 a) {
+ return fcInt2_create11(fcMath_isFinitef(a.s[0]), fcMath_isFinitef(a.s[1]));
+}
+
+fcInt2 fcFloat2_isInf(fcFloat2 a) {
+ return fcInt2_create11(fcMath_isInff(a.s[0]), fcMath_isInff(a.s[1]));
+}
+
+fcInt2 fcFloat2_isNaN(fcFloat2 a) {
+ return fcInt2_create11(fcMath_isNaNf(a.s[0]), fcMath_isNaNf(a.s[1]));
+}
+
+fcInt2 fcFloat2_isNormal(fcFloat2 a) {
+ return fcInt2_create11(fcMath_isNormalf(a.s[0]), fcMath_isNormalf(a.s[1]));
+}
+
+fcInt2 fcFloat2_isOrdered(fcFloat2 a, fcFloat2 b) {
+ return fcInt2_create11(fcMath_isOrderedf(a.s[0], b.s[0]), fcMath_isOrderedf(a.s[1], b.s[1]));
+}
+
+fcInt2 fcFloat2_isUnordered(fcFloat2 a, fcFloat2 b) {
+ return fcInt2_create11(fcMath_isUnorderedf(a.s[0], b.s[0]), fcMath_isUnorderedf(a.s[1], b.s[1]));
+}
+
+fcInt fcFloat2_any(fcFloat2 a) {
+ return a.s[0] != 0.0f || a.s[1] != 0.0f;
+}
+
+fcInt fcFloat2_all(fcFloat2 a) {
+ return !(a.s[0] == 0.0f || a.s[1] == 0.0f);
+}
+
+fcFloat2 fcFloat2_neg(fcFloat2 a) {
+ return fcFloat2_create11(-a.s[0], -a.s[1]);
+}
+
+fcFloat2 fcFloat2_add(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(a.s[0] + b.s[0], a.s[1] + b.s[1]);
+}
+
+fcFloat2 fcFloat2_sub(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(a.s[0] - b.s[0], a.s[1] - b.s[1]);
+}
+
+fcDouble2 fcFloat2_muld(fcFloat2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]));
+}
+
+fcFloat2 fcFloat2_mulf(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]));
+}
+
+fcDouble2 fcFloat2_mulkd(fcFloat2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k));
+}
+
+fcFloat2 fcFloat2_mulkf(fcFloat2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k));
+}
+
+fcDouble2 fcFloat2_divd(fcFloat2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]));
+}
+
+fcFloat2 fcFloat2_divf(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]));
+}
+
+fcDouble2 fcFloat2_divkd(fcFloat2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k));
+}
+
+fcFloat2 fcFloat2_divkf(fcFloat2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k));
+}
+
+fcFloat fcFloat2_dot(fcFloat2 a, fcFloat2 b) {
+ return a.s[0] * b.s[0] + a.s[1] * b.s[1];
+}
+
+fcDouble fcFloat2_distance(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_length(fcFloat2_sub(a, b));
+}
+
+fcDouble fcFloat2_length(fcFloat2 a) {
+ return fcMath_sqrt(a.s[0] * a.s[0] + a.s[1] * a.s[1]);
+}
+
+fcFloat2 fcFloat2_normalize(fcFloat2 a) {
+ fcDouble len = fcFloat2_length(a);
+ return fcFloat2_create11((fcFloat)(a.s[0] / len), (fcFloat)(a.s[1] / len));
+}
+
+fcFloat2 fcFloat2_abs(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]));
+}
+
+fcFloat2 fcFloat2_clamp(fcFloat2 a, fcFloat2 b, fcFloat2 c) {
+ return fcFloat2_create11(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]));
+}
+
+fcFloat2 fcFloat2_max(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_maxMag(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_min(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_minMag(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_mix(fcFloat2 a, fcFloat2 b, fcFloat2 c) {
+ return fcFloat2_create11(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]));
+}
+
+fcFloat2 fcFloat2_clampk(fcFloat2 v, fcFloat min, fcFloat max) {
+ return fcFloat2_create11(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max));
+}
+
+fcFloat2 fcFloat2_maxk(fcFloat2 x, fcFloat y) {
+ return fcFloat2_create11(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y));
+}
+
+fcFloat2 fcFloat2_mink(fcFloat2 x, fcFloat y) {
+ return fcFloat2_create11(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y));
+}
+
+fcFloat2 fcFloat2_mixk(fcFloat2 x, fcFloat2 y, fcFloat a) {
+ return fcFloat2_create11(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a));
+}
+
+fcFloat2 fcFloat2_acos(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_acosf(a.s[0]), fcMath_acosf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_acosh(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_acoshf(a.s[0]), fcMath_acoshf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_asin(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_asinf(a.s[0]), fcMath_asinf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_asinh(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_asinhf(a.s[0]), fcMath_asinhf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_atan(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_atanf(a.s[0]), fcMath_atanf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_atan2(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_atan2f(a.s[0], b.s[0]), fcMath_atan2f(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_atanh(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_atanhf(a.s[0]), fcMath_atanhf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_cbrt(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_cbrtf(a.s[0]), fcMath_cbrtf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_ceil(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_ceilf(a.s[0]), fcMath_ceilf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_copySign(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_copySignf(a.s[0], b.s[0]), fcMath_copySignf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_cos(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_cosf(a.s[0]), fcMath_cosf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_cosh(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_coshf(a.s[0]), fcMath_coshf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_erf(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_erff(a.s[0]), fcMath_erff(a.s[1]));
+}
+
+fcFloat2 fcFloat2_erfc(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_erfcf(a.s[0]), fcMath_erfcf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_exp(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_expf(a.s[0]), fcMath_expf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_exp10(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_exp10f(a.s[0]), fcMath_exp10f(a.s[1]));
+}
+
+fcFloat2 fcFloat2_exp2(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_exp2f(a.s[0]), fcMath_exp2f(a.s[1]));
+}
+
+fcFloat2 fcFloat2_expm1(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_expm1f(a.s[0]), fcMath_expm1f(a.s[1]));
+}
+
+fcFloat2 fcFloat2_fdim(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_fdimf(a.s[0], b.s[0]), fcMath_fdimf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_floor(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_floorf(a.s[0]), fcMath_floorf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_fma(fcFloat2 a, fcFloat2 b, fcFloat2 c) {
+ return fcFloat2_create11(fcMath_fmaf(a.s[0], b.s[0], c.s[0]), fcMath_fmaf(a.s[1], b.s[1], c.s[1]));
+}
+
+fcFloat2 fcFloat2_fmod(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_fmodf(a.s[0], b.s[0]), fcMath_fmodf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_fract(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_fractf(a.s[0]), fcMath_fractf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_frexp(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_frexpf(a.s[0]), fcMath_frexpf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_getExponent(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_getExponentf(a.s[0]), fcMath_getExponentf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_hypot(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_hypotf(a.s[0], b.s[0]), fcMath_hypotf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_lgamma(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_lgammaf(a.s[0]), fcMath_lgammaf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_log(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_logf(a.s[0]), fcMath_logf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_log10(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_log10f(a.s[0]), fcMath_log10f(a.s[1]));
+}
+
+fcFloat2 fcFloat2_log1p(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_log1pf(a.s[0]), fcMath_log1pf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_log2(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_log2f(a.s[0]), fcMath_log2f(a.s[1]));
+}
+
+fcFloat2 fcFloat2_logb(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_logbf(a.s[0]), fcMath_logbf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_mad(fcFloat2 a, fcFloat2 b, fcFloat2 c) {
+ return fcFloat2_create11(fcMath_madf(a.s[0], b.s[0], c.s[0]), fcMath_madf(a.s[1], b.s[1], c.s[1]));
+}
+
+fcFloat2 fcFloat2_nextAfter(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_nextAfterf(a.s[0], b.s[0]), fcMath_nextAfterf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_pow(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_powf(a.s[0], b.s[0]), fcMath_powf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_powr(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_powrf(a.s[0], b.s[0]), fcMath_powrf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_remainder(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_remainderf(a.s[0], b.s[0]), fcMath_remainderf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_rint(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_rintf(a.s[0]), fcMath_rintf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_round(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_roundf(a.s[0]), fcMath_roundf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_rsqrt(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_rsqrtf(a.s[0]), fcMath_rsqrtf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_signum(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_signumf(a.s[0]), fcMath_signumf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_sin(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_sinf(a.s[0]), fcMath_sinf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_sinh(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_sinhf(a.s[0]), fcMath_sinhf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_smoothStep(fcFloat2 a, fcFloat2 b, fcFloat2 c) {
+ return fcFloat2_create11(fcMath_smoothStepf(a.s[0], b.s[0], c.s[0]), fcMath_smoothStepf(a.s[1], b.s[1], c.s[1]));
+}
+
+fcFloat2 fcFloat2_sqrt(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_sqrtf(a.s[0]), fcMath_sqrtf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_step(fcFloat2 a, fcFloat2 b) {
+ return fcFloat2_create11(fcMath_stepf(a.s[0], b.s[0]), fcMath_stepf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_tan(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_tanf(a.s[0]), fcMath_tanf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_tanh(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_tanhf(a.s[0]), fcMath_tanhf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_tgamma(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_tgammaf(a.s[0]), fcMath_tgammaf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_toDegrees(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_toDegreesf(a.s[0]), fcMath_toDegreesf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_toRadians(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_toRadiansf(a.s[0]), fcMath_toRadiansf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_trunc(fcFloat2 a) {
+ return fcFloat2_create11(fcMath_truncf(a.s[0]), fcMath_truncf(a.s[1]));
+}
+
+fcFloat2 fcFloat2_scalb(fcFloat2 a, fcInt2 n) {
+ return fcFloat2_create11(fcMath_scalbf(a.s[0], n.s[0]), fcMath_scalbf(a.s[1], n.s[1]));
+}
+
+fcFloat2 fcFloat2_ldexp(fcFloat2 a, fcInt2 n) {
+ return fcFloat2_create11(fcMath_ldexpf(a.s[0], n.s[0]), fcMath_ldexpf(a.s[1], n.s[1]));
+}
+
+fcFloat2 fcFloat2_pown(fcFloat2 a, fcInt2 b) {
+ return fcFloat2_create11(fcMath_pownf(a.s[0], b.s[0]), fcMath_pownf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_rootn(fcFloat2 a, fcInt2 b) {
+ return fcFloat2_create11(fcMath_rootnf(a.s[0], b.s[0]), fcMath_rootnf(a.s[1], b.s[1]));
+}
+
+fcFloat2 fcFloat2_smoothStepk(fcFloat2 a, fcFloat2 b, fcFloat c) {
+ return fcFloat2_create11(fcMath_smoothStepf(a.s[0], b.s[0], c), fcMath_smoothStepf(a.s[1], b.s[1], c));
+}
+
+
+//
+// fcFloat3
+//
+
+fcFloat3 fcFloat3_create1(fcFloat v) {
+ return fcFloat3_create111(v, v, v);
+}
+
+void fcFloat3_set1(fcFloat3* self, fcFloat v) {
+ fcFloat3_set111(self, v, v, v);
+}
+
+fcFloat3 fcFloat3_create111(fcFloat x, fcFloat y, fcFloat z) {
+ fcFloat3 result = {{x, y, z}};
+ return result;
+}
+
+void fcFloat3_set111(fcFloat3* self, fcFloat x, fcFloat y, fcFloat z) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+}
+
+fcFloat3 fcFloat3_create12(fcFloat x, fcFloat2 vec1) {
+ return fcFloat3_create111(x, vec1.s[0], vec1.s[1]);
+}
+
+void fcFloat3_set12(fcFloat3* self, fcFloat x, fcFloat2 vec1) {
+ fcFloat3_set111(self, x, vec1.s[0], vec1.s[1]);
+}
+
+fcFloat3 fcFloat3_create21(fcFloat2 vec1, fcFloat z) {
+ return fcFloat3_create111(vec1.s[0], vec1.s[1], z);
+}
+
+void fcFloat3_set21(fcFloat3* self, fcFloat2 vec1, fcFloat z) {
+ fcFloat3_set111(self, vec1.s[0], vec1.s[1], z);
+}
+
+fcFloat3 fcFloat3_create3(fcFloat3 vec1) {
+ return fcFloat3_create111(vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcFloat3_set3(fcFloat3* self, fcFloat3 vec1) {
+ fcFloat3_set111(self, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcByte3 fcFloat3_convertByte3(fcFloat3 a) {
+ return fcByte3_create111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]));
+}
+
+fcShort3 fcFloat3_convertShort3(fcFloat3 a) {
+ return fcShort3_create111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]));
+}
+
+fcInt3 fcFloat3_convertInt3(fcFloat3 a) {
+ return fcInt3_create111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]));
+}
+
+fcLong3 fcFloat3_convertLong3(fcFloat3 a) {
+ return fcLong3_create111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]));
+}
+
+fcDouble3 fcFloat3_convertDouble3(fcFloat3 a) {
+ return fcDouble3_create111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]));
+}
+
+fcFloat2 fcFloat3_asFloat2(fcFloat3 a) {
+ return fcFloat2_create11(a.s[0], a.s[1]);
+}
+
+fcInt3 fcFloat3_isEqual(fcFloat3 a, fcFloat3 b) {
+ return fcInt3_create111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0);
+}
+
+fcInt3 fcFloat3_isNotEqual(fcFloat3 a, fcFloat3 b) {
+ return fcInt3_create111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0);
+}
+
+fcInt3 fcFloat3_isGreater(fcFloat3 a, fcFloat3 b) {
+ return fcInt3_create111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0);
+}
+
+fcInt3 fcFloat3_isGreaterEqual(fcFloat3 a, fcFloat3 b) {
+ return fcInt3_create111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0);
+}
+
+fcInt3 fcFloat3_isLess(fcFloat3 a, fcFloat3 b) {
+ return fcInt3_create111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0);
+}
+
+fcInt3 fcFloat3_isLessEqual(fcFloat3 a, fcFloat3 b) {
+ return fcInt3_create111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0);
+}
+
+fcFloat3 fcFloat3_select(fcFloat3 a, fcFloat3 b, fcInt3 c) {
+ return fcFloat3_create111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt3 fcFloat3_isFinite(fcFloat3 a) {
+ return fcInt3_create111(fcMath_isFinitef(a.s[0]), fcMath_isFinitef(a.s[1]), fcMath_isFinitef(a.s[2]));
+}
+
+fcInt3 fcFloat3_isInf(fcFloat3 a) {
+ return fcInt3_create111(fcMath_isInff(a.s[0]), fcMath_isInff(a.s[1]), fcMath_isInff(a.s[2]));
+}
+
+fcInt3 fcFloat3_isNaN(fcFloat3 a) {
+ return fcInt3_create111(fcMath_isNaNf(a.s[0]), fcMath_isNaNf(a.s[1]), fcMath_isNaNf(a.s[2]));
+}
+
+fcInt3 fcFloat3_isNormal(fcFloat3 a) {
+ return fcInt3_create111(fcMath_isNormalf(a.s[0]), fcMath_isNormalf(a.s[1]), fcMath_isNormalf(a.s[2]));
+}
+
+fcInt3 fcFloat3_isOrdered(fcFloat3 a, fcFloat3 b) {
+ return fcInt3_create111(fcMath_isOrderedf(a.s[0], b.s[0]), fcMath_isOrderedf(a.s[1], b.s[1]), fcMath_isOrderedf(a.s[2], b.s[2]));
+}
+
+fcInt3 fcFloat3_isUnordered(fcFloat3 a, fcFloat3 b) {
+ return fcInt3_create111(fcMath_isUnorderedf(a.s[0], b.s[0]), fcMath_isUnorderedf(a.s[1], b.s[1]), fcMath_isUnorderedf(a.s[2], b.s[2]));
+}
+
+fcInt fcFloat3_any(fcFloat3 a) {
+ return a.s[0] != 0.0f || a.s[1] != 0.0f || a.s[2] != 0.0f;
+}
+
+fcInt fcFloat3_all(fcFloat3 a) {
+ return !(a.s[0] == 0.0f || a.s[1] == 0.0f || a.s[2] == 0.0f);
+}
+
+fcFloat3 fcFloat3_neg(fcFloat3 a) {
+ return fcFloat3_create111(-a.s[0], -a.s[1], -a.s[2]);
+}
+
+fcFloat3 fcFloat3_add(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2]);
+}
+
+fcFloat3 fcFloat3_sub(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2]);
+}
+
+fcDouble3 fcFloat3_muld(fcFloat3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]));
+}
+
+fcFloat3 fcFloat3_mulf(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]));
+}
+
+fcDouble3 fcFloat3_mulkd(fcFloat3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k));
+}
+
+fcFloat3 fcFloat3_mulkf(fcFloat3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k));
+}
+
+fcDouble3 fcFloat3_divd(fcFloat3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]));
+}
+
+fcFloat3 fcFloat3_divf(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]));
+}
+
+fcDouble3 fcFloat3_divkd(fcFloat3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k));
+}
+
+fcFloat3 fcFloat3_divkf(fcFloat3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k));
+}
+
+fcFloat3 fcFloat3_cross(fcFloat3 a, fcFloat3 b) {
+ fcFloat resX = a.s[1] * b.s[2] - a.s[2] * b.s[1];
+ fcFloat resY = a.s[2] * b.s[0] - a.s[0] * b.s[2];
+ fcFloat resZ = a.s[0] * b.s[1] - a.s[1] * b.s[0];
+ return fcFloat3_create111(resX, resY, resZ);
+}
+
+fcFloat fcFloat3_dot(fcFloat3 a, fcFloat3 b) {
+ return a.s[0] * b.s[0] + a.s[1] * b.s[1] + a.s[2] * b.s[2];
+}
+
+fcDouble fcFloat3_distance(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_length(fcFloat3_sub(a, b));
+}
+
+fcDouble fcFloat3_length(fcFloat3 a) {
+ return fcMath_sqrt(a.s[0] * a.s[0] + a.s[1] * a.s[1] + a.s[2] * a.s[2]);
+}
+
+fcFloat3 fcFloat3_normalize(fcFloat3 a) {
+ fcDouble len = fcFloat3_length(a);
+ return fcFloat3_create111((fcFloat)(a.s[0] / len), (fcFloat)(a.s[1] / len), (fcFloat)(a.s[2] / len));
+}
+
+fcFloat3 fcFloat3_abs(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]));
+}
+
+fcFloat3 fcFloat3_clamp(fcFloat3 a, fcFloat3 b, fcFloat3 c) {
+ return fcFloat3_create111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]));
+}
+
+fcFloat3 fcFloat3_max(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_maxMag(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_min(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_minMag(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_mix(fcFloat3 a, fcFloat3 b, fcFloat3 c) {
+ return fcFloat3_create111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]));
+}
+
+fcFloat3 fcFloat3_clampk(fcFloat3 v, fcFloat min, fcFloat max) {
+ return fcFloat3_create111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max));
+}
+
+fcFloat3 fcFloat3_maxk(fcFloat3 x, fcFloat y) {
+ return fcFloat3_create111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y));
+}
+
+fcFloat3 fcFloat3_mink(fcFloat3 x, fcFloat y) {
+ return fcFloat3_create111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y));
+}
+
+fcFloat3 fcFloat3_mixk(fcFloat3 x, fcFloat3 y, fcFloat a) {
+ return fcFloat3_create111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a));
+}
+
+fcFloat3 fcFloat3_acos(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_acosf(a.s[0]), fcMath_acosf(a.s[1]), fcMath_acosf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_acosh(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_acoshf(a.s[0]), fcMath_acoshf(a.s[1]), fcMath_acoshf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_asin(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_asinf(a.s[0]), fcMath_asinf(a.s[1]), fcMath_asinf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_asinh(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_asinhf(a.s[0]), fcMath_asinhf(a.s[1]), fcMath_asinhf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_atan(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_atanf(a.s[0]), fcMath_atanf(a.s[1]), fcMath_atanf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_atan2(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_atan2f(a.s[0], b.s[0]), fcMath_atan2f(a.s[1], b.s[1]), fcMath_atan2f(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_atanh(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_atanhf(a.s[0]), fcMath_atanhf(a.s[1]), fcMath_atanhf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_cbrt(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_cbrtf(a.s[0]), fcMath_cbrtf(a.s[1]), fcMath_cbrtf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_ceil(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_ceilf(a.s[0]), fcMath_ceilf(a.s[1]), fcMath_ceilf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_copySign(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_copySignf(a.s[0], b.s[0]), fcMath_copySignf(a.s[1], b.s[1]), fcMath_copySignf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_cos(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_cosf(a.s[0]), fcMath_cosf(a.s[1]), fcMath_cosf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_cosh(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_coshf(a.s[0]), fcMath_coshf(a.s[1]), fcMath_coshf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_erf(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_erff(a.s[0]), fcMath_erff(a.s[1]), fcMath_erff(a.s[2]));
+}
+
+fcFloat3 fcFloat3_erfc(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_erfcf(a.s[0]), fcMath_erfcf(a.s[1]), fcMath_erfcf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_exp(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_expf(a.s[0]), fcMath_expf(a.s[1]), fcMath_expf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_exp10(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_exp10f(a.s[0]), fcMath_exp10f(a.s[1]), fcMath_exp10f(a.s[2]));
+}
+
+fcFloat3 fcFloat3_exp2(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_exp2f(a.s[0]), fcMath_exp2f(a.s[1]), fcMath_exp2f(a.s[2]));
+}
+
+fcFloat3 fcFloat3_expm1(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_expm1f(a.s[0]), fcMath_expm1f(a.s[1]), fcMath_expm1f(a.s[2]));
+}
+
+fcFloat3 fcFloat3_fdim(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_fdimf(a.s[0], b.s[0]), fcMath_fdimf(a.s[1], b.s[1]), fcMath_fdimf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_floor(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_floorf(a.s[0]), fcMath_floorf(a.s[1]), fcMath_floorf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_fma(fcFloat3 a, fcFloat3 b, fcFloat3 c) {
+ return fcFloat3_create111(fcMath_fmaf(a.s[0], b.s[0], c.s[0]), fcMath_fmaf(a.s[1], b.s[1], c.s[1]), fcMath_fmaf(a.s[2], b.s[2], c.s[2]));
+}
+
+fcFloat3 fcFloat3_fmod(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_fmodf(a.s[0], b.s[0]), fcMath_fmodf(a.s[1], b.s[1]), fcMath_fmodf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_fract(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_fractf(a.s[0]), fcMath_fractf(a.s[1]), fcMath_fractf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_frexp(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_frexpf(a.s[0]), fcMath_frexpf(a.s[1]), fcMath_frexpf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_getExponent(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_getExponentf(a.s[0]), fcMath_getExponentf(a.s[1]), fcMath_getExponentf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_hypot(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_hypotf(a.s[0], b.s[0]), fcMath_hypotf(a.s[1], b.s[1]), fcMath_hypotf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_lgamma(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_lgammaf(a.s[0]), fcMath_lgammaf(a.s[1]), fcMath_lgammaf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_log(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_logf(a.s[0]), fcMath_logf(a.s[1]), fcMath_logf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_log10(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_log10f(a.s[0]), fcMath_log10f(a.s[1]), fcMath_log10f(a.s[2]));
+}
+
+fcFloat3 fcFloat3_log1p(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_log1pf(a.s[0]), fcMath_log1pf(a.s[1]), fcMath_log1pf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_log2(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_log2f(a.s[0]), fcMath_log2f(a.s[1]), fcMath_log2f(a.s[2]));
+}
+
+fcFloat3 fcFloat3_logb(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_logbf(a.s[0]), fcMath_logbf(a.s[1]), fcMath_logbf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_mad(fcFloat3 a, fcFloat3 b, fcFloat3 c) {
+ return fcFloat3_create111(fcMath_madf(a.s[0], b.s[0], c.s[0]), fcMath_madf(a.s[1], b.s[1], c.s[1]), fcMath_madf(a.s[2], b.s[2], c.s[2]));
+}
+
+fcFloat3 fcFloat3_nextAfter(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_nextAfterf(a.s[0], b.s[0]), fcMath_nextAfterf(a.s[1], b.s[1]), fcMath_nextAfterf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_pow(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_powf(a.s[0], b.s[0]), fcMath_powf(a.s[1], b.s[1]), fcMath_powf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_powr(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_powrf(a.s[0], b.s[0]), fcMath_powrf(a.s[1], b.s[1]), fcMath_powrf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_remainder(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_remainderf(a.s[0], b.s[0]), fcMath_remainderf(a.s[1], b.s[1]), fcMath_remainderf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_rint(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_rintf(a.s[0]), fcMath_rintf(a.s[1]), fcMath_rintf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_round(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_roundf(a.s[0]), fcMath_roundf(a.s[1]), fcMath_roundf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_rsqrt(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_rsqrtf(a.s[0]), fcMath_rsqrtf(a.s[1]), fcMath_rsqrtf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_signum(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_signumf(a.s[0]), fcMath_signumf(a.s[1]), fcMath_signumf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_sin(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_sinf(a.s[0]), fcMath_sinf(a.s[1]), fcMath_sinf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_sinh(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_sinhf(a.s[0]), fcMath_sinhf(a.s[1]), fcMath_sinhf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_smoothStep(fcFloat3 a, fcFloat3 b, fcFloat3 c) {
+ return fcFloat3_create111(fcMath_smoothStepf(a.s[0], b.s[0], c.s[0]), fcMath_smoothStepf(a.s[1], b.s[1], c.s[1]), fcMath_smoothStepf(a.s[2], b.s[2], c.s[2]));
+}
+
+fcFloat3 fcFloat3_sqrt(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_sqrtf(a.s[0]), fcMath_sqrtf(a.s[1]), fcMath_sqrtf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_step(fcFloat3 a, fcFloat3 b) {
+ return fcFloat3_create111(fcMath_stepf(a.s[0], b.s[0]), fcMath_stepf(a.s[1], b.s[1]), fcMath_stepf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_tan(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_tanf(a.s[0]), fcMath_tanf(a.s[1]), fcMath_tanf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_tanh(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_tanhf(a.s[0]), fcMath_tanhf(a.s[1]), fcMath_tanhf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_tgamma(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_tgammaf(a.s[0]), fcMath_tgammaf(a.s[1]), fcMath_tgammaf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_toDegrees(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_toDegreesf(a.s[0]), fcMath_toDegreesf(a.s[1]), fcMath_toDegreesf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_toRadians(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_toRadiansf(a.s[0]), fcMath_toRadiansf(a.s[1]), fcMath_toRadiansf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_trunc(fcFloat3 a) {
+ return fcFloat3_create111(fcMath_truncf(a.s[0]), fcMath_truncf(a.s[1]), fcMath_truncf(a.s[2]));
+}
+
+fcFloat3 fcFloat3_scalb(fcFloat3 a, fcInt3 n) {
+ return fcFloat3_create111(fcMath_scalbf(a.s[0], n.s[0]), fcMath_scalbf(a.s[1], n.s[1]), fcMath_scalbf(a.s[2], n.s[2]));
+}
+
+fcFloat3 fcFloat3_ldexp(fcFloat3 a, fcInt3 n) {
+ return fcFloat3_create111(fcMath_ldexpf(a.s[0], n.s[0]), fcMath_ldexpf(a.s[1], n.s[1]), fcMath_ldexpf(a.s[2], n.s[2]));
+}
+
+fcFloat3 fcFloat3_pown(fcFloat3 a, fcInt3 b) {
+ return fcFloat3_create111(fcMath_pownf(a.s[0], b.s[0]), fcMath_pownf(a.s[1], b.s[1]), fcMath_pownf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_rootn(fcFloat3 a, fcInt3 b) {
+ return fcFloat3_create111(fcMath_rootnf(a.s[0], b.s[0]), fcMath_rootnf(a.s[1], b.s[1]), fcMath_rootnf(a.s[2], b.s[2]));
+}
+
+fcFloat3 fcFloat3_smoothStepk(fcFloat3 a, fcFloat3 b, fcFloat c) {
+ return fcFloat3_create111(fcMath_smoothStepf(a.s[0], b.s[0], c), fcMath_smoothStepf(a.s[1], b.s[1], c), fcMath_smoothStepf(a.s[2], b.s[2], c));
+}
+
+
+//
+// fcFloat4
+//
+
+fcFloat4 fcFloat4_create1(fcFloat v) {
+ return fcFloat4_create1111(v, v, v, v);
+}
+
+void fcFloat4_set1(fcFloat4* self, fcFloat v) {
+ fcFloat4_set1111(self, v, v, v, v);
+}
+
+fcFloat4 fcFloat4_create1111(fcFloat x, fcFloat y, fcFloat z, fcFloat w) {
+ fcFloat4 result = {{x, y, z, w}};
+ return result;
+}
+
+void fcFloat4_set1111(fcFloat4* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+}
+
+fcFloat4 fcFloat4_create112(fcFloat x, fcFloat y, fcFloat2 vec1) {
+ return fcFloat4_create1111(x, y, vec1.s[0], vec1.s[1]);
+}
+
+void fcFloat4_set112(fcFloat4* self, fcFloat x, fcFloat y, fcFloat2 vec1) {
+ fcFloat4_set1111(self, x, y, vec1.s[0], vec1.s[1]);
+}
+
+fcFloat4 fcFloat4_create121(fcFloat x, fcFloat2 vec1, fcFloat w) {
+ return fcFloat4_create1111(x, vec1.s[0], vec1.s[1], w);
+}
+
+void fcFloat4_set121(fcFloat4* self, fcFloat x, fcFloat2 vec1, fcFloat w) {
+ fcFloat4_set1111(self, x, vec1.s[0], vec1.s[1], w);
+}
+
+fcFloat4 fcFloat4_create13(fcFloat x, fcFloat3 vec1) {
+ return fcFloat4_create1111(x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcFloat4_set13(fcFloat4* self, fcFloat x, fcFloat3 vec1) {
+ fcFloat4_set1111(self, x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcFloat4 fcFloat4_create211(fcFloat2 vec1, fcFloat z, fcFloat w) {
+ return fcFloat4_create1111(vec1.s[0], vec1.s[1], z, w);
+}
+
+void fcFloat4_set211(fcFloat4* self, fcFloat2 vec1, fcFloat z, fcFloat w) {
+ fcFloat4_set1111(self, vec1.s[0], vec1.s[1], z, w);
+}
+
+fcFloat4 fcFloat4_create22(fcFloat2 vec1, fcFloat2 vec2) {
+ return fcFloat4_create1111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat4_set22(fcFloat4* self, fcFloat2 vec1, fcFloat2 vec2) {
+ fcFloat4_set1111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcFloat4 fcFloat4_create31(fcFloat3 vec1, fcFloat w) {
+ return fcFloat4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+void fcFloat4_set31(fcFloat4* self, fcFloat3 vec1, fcFloat w) {
+ fcFloat4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+fcFloat4 fcFloat4_create4(fcFloat4 vec1) {
+ return fcFloat4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcFloat4_set4(fcFloat4* self, fcFloat4 vec1) {
+ fcFloat4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcFloat2 fcFloat4_odd(fcFloat4 a) {
+ return fcFloat2_create11(a.s[1], a.s[3]);
+}
+
+fcFloat2 fcFloat4_even(fcFloat4 a) {
+ return fcFloat2_create11(a.s[0], a.s[2]);
+}
+
+fcByte4 fcFloat4_convertByte4(fcFloat4 a) {
+ return fcByte4_create1111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]));
+}
+
+fcShort4 fcFloat4_convertShort4(fcFloat4 a) {
+ return fcShort4_create1111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]), (fcShort)(a.s[3]));
+}
+
+fcInt4 fcFloat4_convertInt4(fcFloat4 a) {
+ return fcInt4_create1111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]), (fcInt)(a.s[3]));
+}
+
+fcLong4 fcFloat4_convertLong4(fcFloat4 a) {
+ return fcLong4_create1111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]), (fcLong)(a.s[3]));
+}
+
+fcDouble4 fcFloat4_convertDouble4(fcFloat4 a) {
+ return fcDouble4_create1111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]), (fcDouble)(a.s[3]));
+}
+
+fcFloat2 fcFloat4_asFloat2(fcFloat4 a) {
+ return fcFloat2_create11(a.s[0], a.s[1]);
+}
+
+fcFloat3 fcFloat4_asFloat3(fcFloat4 a) {
+ return fcFloat3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcInt4 fcFloat4_isEqual(fcFloat4 a, fcFloat4 b) {
+ return fcInt4_create1111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
+}
+
+fcInt4 fcFloat4_isNotEqual(fcFloat4 a, fcFloat4 b) {
+ return fcInt4_create1111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
+}
+
+fcInt4 fcFloat4_isGreater(fcFloat4 a, fcFloat4 b) {
+ return fcInt4_create1111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
+}
+
+fcInt4 fcFloat4_isGreaterEqual(fcFloat4 a, fcFloat4 b) {
+ return fcInt4_create1111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
+}
+
+fcInt4 fcFloat4_isLess(fcFloat4 a, fcFloat4 b) {
+ return fcInt4_create1111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
+}
+
+fcInt4 fcFloat4_isLessEqual(fcFloat4 a, fcFloat4 b) {
+ return fcInt4_create1111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
+}
+
+fcFloat4 fcFloat4_select(fcFloat4 a, fcFloat4 b, fcInt4 c) {
+ return fcFloat4_create1111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt4 fcFloat4_isFinite(fcFloat4 a) {
+ return fcInt4_create1111(fcMath_isFinitef(a.s[0]), fcMath_isFinitef(a.s[1]), fcMath_isFinitef(a.s[2]), fcMath_isFinitef(a.s[3]));
+}
+
+fcInt4 fcFloat4_isInf(fcFloat4 a) {
+ return fcInt4_create1111(fcMath_isInff(a.s[0]), fcMath_isInff(a.s[1]), fcMath_isInff(a.s[2]), fcMath_isInff(a.s[3]));
+}
+
+fcInt4 fcFloat4_isNaN(fcFloat4 a) {
+ return fcInt4_create1111(fcMath_isNaNf(a.s[0]), fcMath_isNaNf(a.s[1]), fcMath_isNaNf(a.s[2]), fcMath_isNaNf(a.s[3]));
+}
+
+fcInt4 fcFloat4_isNormal(fcFloat4 a) {
+ return fcInt4_create1111(fcMath_isNormalf(a.s[0]), fcMath_isNormalf(a.s[1]), fcMath_isNormalf(a.s[2]), fcMath_isNormalf(a.s[3]));
+}
+
+fcInt4 fcFloat4_isOrdered(fcFloat4 a, fcFloat4 b) {
+ return fcInt4_create1111(fcMath_isOrderedf(a.s[0], b.s[0]), fcMath_isOrderedf(a.s[1], b.s[1]), fcMath_isOrderedf(a.s[2], b.s[2]), fcMath_isOrderedf(a.s[3], b.s[3]));
+}
+
+fcInt4 fcFloat4_isUnordered(fcFloat4 a, fcFloat4 b) {
+ return fcInt4_create1111(fcMath_isUnorderedf(a.s[0], b.s[0]), fcMath_isUnorderedf(a.s[1], b.s[1]), fcMath_isUnorderedf(a.s[2], b.s[2]), fcMath_isUnorderedf(a.s[3], b.s[3]));
+}
+
+fcInt fcFloat4_any(fcFloat4 a) {
+ return a.s[0] != 0.0f || a.s[1] != 0.0f || a.s[2] != 0.0f || a.s[3] != 0.0f;
+}
+
+fcInt fcFloat4_all(fcFloat4 a) {
+ return !(a.s[0] == 0.0f || a.s[1] == 0.0f || a.s[2] == 0.0f || a.s[3] == 0.0f);
+}
+
+fcFloat4 fcFloat4_neg(fcFloat4 a) {
+ return fcFloat4_create1111(-a.s[0], -a.s[1], -a.s[2], -a.s[3]);
+}
+
+fcFloat4 fcFloat4_add(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3]);
+}
+
+fcFloat4 fcFloat4_sub(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3]);
+}
+
+fcDouble4 fcFloat4_muld(fcFloat4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]));
+}
+
+fcFloat4 fcFloat4_mulf(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]));
+}
+
+fcDouble4 fcFloat4_mulkd(fcFloat4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k));
+}
+
+fcFloat4 fcFloat4_mulkf(fcFloat4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k));
+}
+
+fcDouble4 fcFloat4_divd(fcFloat4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]));
+}
+
+fcFloat4 fcFloat4_divf(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]));
+}
+
+fcDouble4 fcFloat4_divkd(fcFloat4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k));
+}
+
+fcFloat4 fcFloat4_divkf(fcFloat4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k));
+}
+
+fcFloat4 fcFloat4_cross(fcFloat4 a, fcFloat4 b) {
+ fcFloat resX = a.s[1] * b.s[2] - a.s[2] * b.s[1];
+ fcFloat resY = a.s[2] * b.s[0] - a.s[0] * b.s[2];
+ fcFloat resZ = a.s[0] * b.s[1] - a.s[1] * b.s[0];
+ return fcFloat4_create1111(resX, resY, resZ, 0.0f);
+}
+
+fcFloat fcFloat4_dot(fcFloat4 a, fcFloat4 b) {
+ return a.s[0] * b.s[0] + a.s[1] * b.s[1] + a.s[2] * b.s[2] + a.s[3] * b.s[3];
+}
+
+fcDouble fcFloat4_distance(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_length(fcFloat4_sub(a, b));
+}
+
+fcDouble fcFloat4_length(fcFloat4 a) {
+ return fcMath_sqrt(a.s[0] * a.s[0] + a.s[1] * a.s[1] + a.s[2] * a.s[2] + a.s[3] * a.s[3]);
+}
+
+fcFloat4 fcFloat4_normalize(fcFloat4 a) {
+ fcDouble len = fcFloat4_length(a);
+ return fcFloat4_create1111((fcFloat)(a.s[0] / len), (fcFloat)(a.s[1] / len), (fcFloat)(a.s[2] / len), (fcFloat)(a.s[3] / len));
+}
+
+fcFloat4 fcFloat4_abs(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]));
+}
+
+fcFloat4 fcFloat4_clamp(fcFloat4 a, fcFloat4 b, fcFloat4 c) {
+ return fcFloat4_create1111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]));
+}
+
+fcFloat4 fcFloat4_max(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_maxMag(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_min(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_minMag(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_mix(fcFloat4 a, fcFloat4 b, fcFloat4 c) {
+ return fcFloat4_create1111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]));
+}
+
+fcFloat4 fcFloat4_clampk(fcFloat4 v, fcFloat min, fcFloat max) {
+ return fcFloat4_create1111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max));
+}
+
+fcFloat4 fcFloat4_maxk(fcFloat4 x, fcFloat y) {
+ return fcFloat4_create1111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y));
+}
+
+fcFloat4 fcFloat4_mink(fcFloat4 x, fcFloat y) {
+ return fcFloat4_create1111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y));
+}
+
+fcFloat4 fcFloat4_mixk(fcFloat4 x, fcFloat4 y, fcFloat a) {
+ return fcFloat4_create1111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a));
+}
+
+fcFloat4 fcFloat4_acos(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_acosf(a.s[0]), fcMath_acosf(a.s[1]), fcMath_acosf(a.s[2]), fcMath_acosf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_acosh(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_acoshf(a.s[0]), fcMath_acoshf(a.s[1]), fcMath_acoshf(a.s[2]), fcMath_acoshf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_asin(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_asinf(a.s[0]), fcMath_asinf(a.s[1]), fcMath_asinf(a.s[2]), fcMath_asinf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_asinh(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_asinhf(a.s[0]), fcMath_asinhf(a.s[1]), fcMath_asinhf(a.s[2]), fcMath_asinhf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_atan(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_atanf(a.s[0]), fcMath_atanf(a.s[1]), fcMath_atanf(a.s[2]), fcMath_atanf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_atan2(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_atan2f(a.s[0], b.s[0]), fcMath_atan2f(a.s[1], b.s[1]), fcMath_atan2f(a.s[2], b.s[2]), fcMath_atan2f(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_atanh(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_atanhf(a.s[0]), fcMath_atanhf(a.s[1]), fcMath_atanhf(a.s[2]), fcMath_atanhf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_cbrt(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_cbrtf(a.s[0]), fcMath_cbrtf(a.s[1]), fcMath_cbrtf(a.s[2]), fcMath_cbrtf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_ceil(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_ceilf(a.s[0]), fcMath_ceilf(a.s[1]), fcMath_ceilf(a.s[2]), fcMath_ceilf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_copySign(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_copySignf(a.s[0], b.s[0]), fcMath_copySignf(a.s[1], b.s[1]), fcMath_copySignf(a.s[2], b.s[2]), fcMath_copySignf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_cos(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_cosf(a.s[0]), fcMath_cosf(a.s[1]), fcMath_cosf(a.s[2]), fcMath_cosf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_cosh(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_coshf(a.s[0]), fcMath_coshf(a.s[1]), fcMath_coshf(a.s[2]), fcMath_coshf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_erf(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_erff(a.s[0]), fcMath_erff(a.s[1]), fcMath_erff(a.s[2]), fcMath_erff(a.s[3]));
+}
+
+fcFloat4 fcFloat4_erfc(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_erfcf(a.s[0]), fcMath_erfcf(a.s[1]), fcMath_erfcf(a.s[2]), fcMath_erfcf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_exp(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_expf(a.s[0]), fcMath_expf(a.s[1]), fcMath_expf(a.s[2]), fcMath_expf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_exp10(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_exp10f(a.s[0]), fcMath_exp10f(a.s[1]), fcMath_exp10f(a.s[2]), fcMath_exp10f(a.s[3]));
+}
+
+fcFloat4 fcFloat4_exp2(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_exp2f(a.s[0]), fcMath_exp2f(a.s[1]), fcMath_exp2f(a.s[2]), fcMath_exp2f(a.s[3]));
+}
+
+fcFloat4 fcFloat4_expm1(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_expm1f(a.s[0]), fcMath_expm1f(a.s[1]), fcMath_expm1f(a.s[2]), fcMath_expm1f(a.s[3]));
+}
+
+fcFloat4 fcFloat4_fdim(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_fdimf(a.s[0], b.s[0]), fcMath_fdimf(a.s[1], b.s[1]), fcMath_fdimf(a.s[2], b.s[2]), fcMath_fdimf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_floor(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_floorf(a.s[0]), fcMath_floorf(a.s[1]), fcMath_floorf(a.s[2]), fcMath_floorf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_fma(fcFloat4 a, fcFloat4 b, fcFloat4 c) {
+ return fcFloat4_create1111(fcMath_fmaf(a.s[0], b.s[0], c.s[0]), fcMath_fmaf(a.s[1], b.s[1], c.s[1]), fcMath_fmaf(a.s[2], b.s[2], c.s[2]), fcMath_fmaf(a.s[3], b.s[3], c.s[3]));
+}
+
+fcFloat4 fcFloat4_fmod(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_fmodf(a.s[0], b.s[0]), fcMath_fmodf(a.s[1], b.s[1]), fcMath_fmodf(a.s[2], b.s[2]), fcMath_fmodf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_fract(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_fractf(a.s[0]), fcMath_fractf(a.s[1]), fcMath_fractf(a.s[2]), fcMath_fractf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_frexp(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_frexpf(a.s[0]), fcMath_frexpf(a.s[1]), fcMath_frexpf(a.s[2]), fcMath_frexpf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_getExponent(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_getExponentf(a.s[0]), fcMath_getExponentf(a.s[1]), fcMath_getExponentf(a.s[2]), fcMath_getExponentf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_hypot(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_hypotf(a.s[0], b.s[0]), fcMath_hypotf(a.s[1], b.s[1]), fcMath_hypotf(a.s[2], b.s[2]), fcMath_hypotf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_lgamma(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_lgammaf(a.s[0]), fcMath_lgammaf(a.s[1]), fcMath_lgammaf(a.s[2]), fcMath_lgammaf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_log(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_logf(a.s[0]), fcMath_logf(a.s[1]), fcMath_logf(a.s[2]), fcMath_logf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_log10(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_log10f(a.s[0]), fcMath_log10f(a.s[1]), fcMath_log10f(a.s[2]), fcMath_log10f(a.s[3]));
+}
+
+fcFloat4 fcFloat4_log1p(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_log1pf(a.s[0]), fcMath_log1pf(a.s[1]), fcMath_log1pf(a.s[2]), fcMath_log1pf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_log2(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_log2f(a.s[0]), fcMath_log2f(a.s[1]), fcMath_log2f(a.s[2]), fcMath_log2f(a.s[3]));
+}
+
+fcFloat4 fcFloat4_logb(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_logbf(a.s[0]), fcMath_logbf(a.s[1]), fcMath_logbf(a.s[2]), fcMath_logbf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_mad(fcFloat4 a, fcFloat4 b, fcFloat4 c) {
+ return fcFloat4_create1111(fcMath_madf(a.s[0], b.s[0], c.s[0]), fcMath_madf(a.s[1], b.s[1], c.s[1]), fcMath_madf(a.s[2], b.s[2], c.s[2]), fcMath_madf(a.s[3], b.s[3], c.s[3]));
+}
+
+fcFloat4 fcFloat4_nextAfter(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_nextAfterf(a.s[0], b.s[0]), fcMath_nextAfterf(a.s[1], b.s[1]), fcMath_nextAfterf(a.s[2], b.s[2]), fcMath_nextAfterf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_pow(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_powf(a.s[0], b.s[0]), fcMath_powf(a.s[1], b.s[1]), fcMath_powf(a.s[2], b.s[2]), fcMath_powf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_powr(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_powrf(a.s[0], b.s[0]), fcMath_powrf(a.s[1], b.s[1]), fcMath_powrf(a.s[2], b.s[2]), fcMath_powrf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_remainder(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_remainderf(a.s[0], b.s[0]), fcMath_remainderf(a.s[1], b.s[1]), fcMath_remainderf(a.s[2], b.s[2]), fcMath_remainderf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_rint(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_rintf(a.s[0]), fcMath_rintf(a.s[1]), fcMath_rintf(a.s[2]), fcMath_rintf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_round(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_roundf(a.s[0]), fcMath_roundf(a.s[1]), fcMath_roundf(a.s[2]), fcMath_roundf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_rsqrt(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_rsqrtf(a.s[0]), fcMath_rsqrtf(a.s[1]), fcMath_rsqrtf(a.s[2]), fcMath_rsqrtf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_signum(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_signumf(a.s[0]), fcMath_signumf(a.s[1]), fcMath_signumf(a.s[2]), fcMath_signumf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_sin(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_sinf(a.s[0]), fcMath_sinf(a.s[1]), fcMath_sinf(a.s[2]), fcMath_sinf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_sinh(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_sinhf(a.s[0]), fcMath_sinhf(a.s[1]), fcMath_sinhf(a.s[2]), fcMath_sinhf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_smoothStep(fcFloat4 a, fcFloat4 b, fcFloat4 c) {
+ return fcFloat4_create1111(fcMath_smoothStepf(a.s[0], b.s[0], c.s[0]), fcMath_smoothStepf(a.s[1], b.s[1], c.s[1]), fcMath_smoothStepf(a.s[2], b.s[2], c.s[2]), fcMath_smoothStepf(a.s[3], b.s[3], c.s[3]));
+}
+
+fcFloat4 fcFloat4_sqrt(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_sqrtf(a.s[0]), fcMath_sqrtf(a.s[1]), fcMath_sqrtf(a.s[2]), fcMath_sqrtf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_step(fcFloat4 a, fcFloat4 b) {
+ return fcFloat4_create1111(fcMath_stepf(a.s[0], b.s[0]), fcMath_stepf(a.s[1], b.s[1]), fcMath_stepf(a.s[2], b.s[2]), fcMath_stepf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_tan(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_tanf(a.s[0]), fcMath_tanf(a.s[1]), fcMath_tanf(a.s[2]), fcMath_tanf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_tanh(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_tanhf(a.s[0]), fcMath_tanhf(a.s[1]), fcMath_tanhf(a.s[2]), fcMath_tanhf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_tgamma(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_tgammaf(a.s[0]), fcMath_tgammaf(a.s[1]), fcMath_tgammaf(a.s[2]), fcMath_tgammaf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_toDegrees(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_toDegreesf(a.s[0]), fcMath_toDegreesf(a.s[1]), fcMath_toDegreesf(a.s[2]), fcMath_toDegreesf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_toRadians(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_toRadiansf(a.s[0]), fcMath_toRadiansf(a.s[1]), fcMath_toRadiansf(a.s[2]), fcMath_toRadiansf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_trunc(fcFloat4 a) {
+ return fcFloat4_create1111(fcMath_truncf(a.s[0]), fcMath_truncf(a.s[1]), fcMath_truncf(a.s[2]), fcMath_truncf(a.s[3]));
+}
+
+fcFloat4 fcFloat4_scalb(fcFloat4 a, fcInt4 n) {
+ return fcFloat4_create1111(fcMath_scalbf(a.s[0], n.s[0]), fcMath_scalbf(a.s[1], n.s[1]), fcMath_scalbf(a.s[2], n.s[2]), fcMath_scalbf(a.s[3], n.s[3]));
+}
+
+fcFloat4 fcFloat4_ldexp(fcFloat4 a, fcInt4 n) {
+ return fcFloat4_create1111(fcMath_ldexpf(a.s[0], n.s[0]), fcMath_ldexpf(a.s[1], n.s[1]), fcMath_ldexpf(a.s[2], n.s[2]), fcMath_ldexpf(a.s[3], n.s[3]));
+}
+
+fcFloat4 fcFloat4_pown(fcFloat4 a, fcInt4 b) {
+ return fcFloat4_create1111(fcMath_pownf(a.s[0], b.s[0]), fcMath_pownf(a.s[1], b.s[1]), fcMath_pownf(a.s[2], b.s[2]), fcMath_pownf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_rootn(fcFloat4 a, fcInt4 b) {
+ return fcFloat4_create1111(fcMath_rootnf(a.s[0], b.s[0]), fcMath_rootnf(a.s[1], b.s[1]), fcMath_rootnf(a.s[2], b.s[2]), fcMath_rootnf(a.s[3], b.s[3]));
+}
+
+fcFloat4 fcFloat4_smoothStepk(fcFloat4 a, fcFloat4 b, fcFloat c) {
+ return fcFloat4_create1111(fcMath_smoothStepf(a.s[0], b.s[0], c), fcMath_smoothStepf(a.s[1], b.s[1], c), fcMath_smoothStepf(a.s[2], b.s[2], c), fcMath_smoothStepf(a.s[3], b.s[3], c));
+}
+
+
+//
+// fcFloat8
+//
+
+fcFloat8 fcFloat8_create1(fcFloat v) {
+ return fcFloat8_create11111111(v, v, v, v, v, v, v, v);
+}
+
+void fcFloat8_set1(fcFloat8* self, fcFloat v) {
+ fcFloat8_set11111111(self, v, v, v, v, v, v, v, v);
+}
+
+fcFloat8 fcFloat8_create11111111(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8 result = {{x, y, z, w, s4, s5, s6, s7}};
+ return result;
+}
+
+void fcFloat8_set11111111(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+ self->s[4] = s4;
+ self->s[5] = s5;
+ self->s[6] = s6;
+ self->s[7] = s7;
+}
+
+fcFloat8 fcFloat8_create1111112(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec1) {
+ return fcFloat8_create11111111(x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+void fcFloat8_set1111112(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec1) {
+ fcFloat8_set11111111(self, x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+fcFloat8 fcFloat8_create1111121(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat2 vec1, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+void fcFloat8_set1111121(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat2 vec1, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create111113(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat3 vec1) {
+ return fcFloat8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcFloat8_set111113(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat s4, fcFloat3 vec1) {
+ fcFloat8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcFloat8 fcFloat8_create1111211(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat2 vec1, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+void fcFloat8_set1111211(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat2 vec1, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+fcFloat8 fcFloat8_create111122(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat2 vec1, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set111122(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat2 vec1, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create111131(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat3 vec1, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+void fcFloat8_set111131(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat3 vec1, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+fcFloat8 fcFloat8_create11114(fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat4 vec1) {
+ return fcFloat8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcFloat8_set11114(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat w, fcFloat4 vec1) {
+ fcFloat8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcFloat8 fcFloat8_create1112111(fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+void fcFloat8_set1112111(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create111212(fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set111212(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create111221(fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set111221(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create11123(fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat3 vec2) {
+ return fcFloat8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set11123(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat2 vec1, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create111311(fcFloat x, fcFloat y, fcFloat z, fcFloat3 vec1, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+void fcFloat8_set111311(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat3 vec1, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+fcFloat8 fcFloat8_create11132(fcFloat x, fcFloat y, fcFloat z, fcFloat3 vec1, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set11132(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat3 vec1, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create11141(fcFloat x, fcFloat y, fcFloat z, fcFloat4 vec1, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+void fcFloat8_set11141(fcFloat8* self, fcFloat x, fcFloat y, fcFloat z, fcFloat4 vec1, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+fcFloat8 fcFloat8_create1121111(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+void fcFloat8_set1121111(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create112112(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set112112(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create112121(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set112121(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create11213(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat3 vec2) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set11213(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat s4, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create112211(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcFloat8_set112211(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcFloat8 fcFloat8_create11222(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set11222(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create11231(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat3 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcFloat8_set11231(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat3 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcFloat8 fcFloat8_create1124(fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat4 vec2) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcFloat8_set1124(fcFloat8* self, fcFloat x, fcFloat y, fcFloat2 vec1, fcFloat4 vec2) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcFloat8 fcFloat8_create113111(fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+void fcFloat8_set113111(fcFloat8* self, fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create11312(fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set11312(fcFloat8* self, fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create11321(fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set11321(fcFloat8* self, fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create1133(fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat3 vec2) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set1133(fcFloat8* self, fcFloat x, fcFloat y, fcFloat3 vec1, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create11411(fcFloat x, fcFloat y, fcFloat4 vec1, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+void fcFloat8_set11411(fcFloat8* self, fcFloat x, fcFloat y, fcFloat4 vec1, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+fcFloat8 fcFloat8_create1142(fcFloat x, fcFloat y, fcFloat4 vec1, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set1142(fcFloat8* self, fcFloat x, fcFloat y, fcFloat4 vec1, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create1211111(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+void fcFloat8_set1211111(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create121112(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set121112(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create121121(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set121121(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create12113(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat3 vec2) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set12113(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat s4, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create121211(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcFloat8_set121211(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcFloat8 fcFloat8_create12122(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat2 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set12122(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat2 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create12131(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat3 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcFloat8_set12131(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat3 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcFloat8 fcFloat8_create1214(fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat4 vec2) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcFloat8_set1214(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat w, fcFloat4 vec2) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcFloat8 fcFloat8_create122111(fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcFloat8_set122111(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create12212(fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set12212(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create12221(fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcFloat8_set12221(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create1223(fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat3 vec3) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcFloat8_set1223(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat2 vec2, fcFloat3 vec3) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcFloat8 fcFloat8_create12311(fcFloat x, fcFloat2 vec1, fcFloat3 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcFloat8_set12311(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat3 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcFloat8 fcFloat8_create1232(fcFloat x, fcFloat2 vec1, fcFloat3 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set1232(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat3 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create1241(fcFloat x, fcFloat2 vec1, fcFloat4 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcFloat8_set1241(fcFloat8* self, fcFloat x, fcFloat2 vec1, fcFloat4 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcFloat8 fcFloat8_create131111(fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+void fcFloat8_set131111(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create13112(fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set13112(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create13121(fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set13121(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create1313(fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat3 vec2) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set1313(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat s4, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create13211(fcFloat x, fcFloat3 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcFloat8_set13211(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcFloat8 fcFloat8_create1322(fcFloat x, fcFloat3 vec1, fcFloat2 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set1322(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat2 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create1331(fcFloat x, fcFloat3 vec1, fcFloat3 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcFloat8_set1331(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat3 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcFloat8 fcFloat8_create134(fcFloat x, fcFloat3 vec1, fcFloat4 vec2) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcFloat8_set134(fcFloat8* self, fcFloat x, fcFloat3 vec1, fcFloat4 vec2) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcFloat8 fcFloat8_create14111(fcFloat x, fcFloat4 vec1, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+void fcFloat8_set14111(fcFloat8* self, fcFloat x, fcFloat4 vec1, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create1412(fcFloat x, fcFloat4 vec1, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set1412(fcFloat8* self, fcFloat x, fcFloat4 vec1, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create1421(fcFloat x, fcFloat4 vec1, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set1421(fcFloat8* self, fcFloat x, fcFloat4 vec1, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create143(fcFloat x, fcFloat4 vec1, fcFloat3 vec2) {
+ return fcFloat8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set143(fcFloat8* self, fcFloat x, fcFloat4 vec1, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create2111111(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+void fcFloat8_set2111111(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create211112(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set211112(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create211121(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set211121(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create21113(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat3 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set21113(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat s4, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create211211(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcFloat8_set211211(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcFloat8 fcFloat8_create21122(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat2 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set21122(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat2 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create21131(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat3 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcFloat8_set21131(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat3 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcFloat8 fcFloat8_create2114(fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat4 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcFloat8_set2114(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat w, fcFloat4 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcFloat8 fcFloat8_create212111(fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcFloat8_set212111(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create21212(fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set21212(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create21221(fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcFloat8_set21221(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create2123(fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat3 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcFloat8_set2123(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat2 vec2, fcFloat3 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcFloat8 fcFloat8_create21311(fcFloat2 vec1, fcFloat z, fcFloat3 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcFloat8_set21311(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat3 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcFloat8 fcFloat8_create2132(fcFloat2 vec1, fcFloat z, fcFloat3 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set2132(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat3 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create2141(fcFloat2 vec1, fcFloat z, fcFloat4 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcFloat8_set2141(fcFloat8* self, fcFloat2 vec1, fcFloat z, fcFloat4 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcFloat8 fcFloat8_create221111(fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+void fcFloat8_set221111(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create22112(fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat s5, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set22112(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat s5, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create22121(fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat2 vec3, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+void fcFloat8_set22121(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat2 vec3, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create2213(fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat3 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcFloat8_set2213(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat s4, fcFloat3 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcFloat8 fcFloat8_create22211(fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+void fcFloat8_set22211(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+fcFloat8 fcFloat8_create2222(fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat2 vec4) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+void fcFloat8_set2222(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat2 vec4) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+fcFloat8 fcFloat8_create2231(fcFloat2 vec1, fcFloat2 vec2, fcFloat3 vec3, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+void fcFloat8_set2231(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat3 vec3, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+fcFloat8 fcFloat8_create224(fcFloat2 vec1, fcFloat2 vec2, fcFloat4 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+void fcFloat8_set224(fcFloat8* self, fcFloat2 vec1, fcFloat2 vec2, fcFloat4 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+fcFloat8 fcFloat8_create23111(fcFloat2 vec1, fcFloat3 vec2, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+void fcFloat8_set23111(fcFloat8* self, fcFloat2 vec1, fcFloat3 vec2, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create2312(fcFloat2 vec1, fcFloat3 vec2, fcFloat s5, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set2312(fcFloat8* self, fcFloat2 vec1, fcFloat3 vec2, fcFloat s5, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create2321(fcFloat2 vec1, fcFloat3 vec2, fcFloat2 vec3, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcFloat8_set2321(fcFloat8* self, fcFloat2 vec1, fcFloat3 vec2, fcFloat2 vec3, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create233(fcFloat2 vec1, fcFloat3 vec2, fcFloat3 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcFloat8_set233(fcFloat8* self, fcFloat2 vec1, fcFloat3 vec2, fcFloat3 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcFloat8 fcFloat8_create2411(fcFloat2 vec1, fcFloat4 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+void fcFloat8_set2411(fcFloat8* self, fcFloat2 vec1, fcFloat4 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+fcFloat8 fcFloat8_create242(fcFloat2 vec1, fcFloat4 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set242(fcFloat8* self, fcFloat2 vec1, fcFloat4 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create311111(fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+void fcFloat8_set311111(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create31112(fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set31112(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create31121(fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set31121(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create3113(fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat3 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set3113(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat s4, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create31211(fcFloat3 vec1, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcFloat8_set31211(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcFloat8 fcFloat8_create3122(fcFloat3 vec1, fcFloat w, fcFloat2 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set3122(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat2 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create3131(fcFloat3 vec1, fcFloat w, fcFloat3 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcFloat8_set3131(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat3 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcFloat8 fcFloat8_create314(fcFloat3 vec1, fcFloat w, fcFloat4 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcFloat8_set314(fcFloat8* self, fcFloat3 vec1, fcFloat w, fcFloat4 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcFloat8 fcFloat8_create32111(fcFloat3 vec1, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcFloat8_set32111(fcFloat8* self, fcFloat3 vec1, fcFloat2 vec2, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create3212(fcFloat3 vec1, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set3212(fcFloat8* self, fcFloat3 vec1, fcFloat2 vec2, fcFloat s5, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create3221(fcFloat3 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcFloat8_set3221(fcFloat8* self, fcFloat3 vec1, fcFloat2 vec2, fcFloat2 vec3, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create323(fcFloat3 vec1, fcFloat2 vec2, fcFloat3 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcFloat8_set323(fcFloat8* self, fcFloat3 vec1, fcFloat2 vec2, fcFloat3 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcFloat8 fcFloat8_create3311(fcFloat3 vec1, fcFloat3 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcFloat8_set3311(fcFloat8* self, fcFloat3 vec1, fcFloat3 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcFloat8 fcFloat8_create332(fcFloat3 vec1, fcFloat3 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set332(fcFloat8* self, fcFloat3 vec1, fcFloat3 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create341(fcFloat3 vec1, fcFloat4 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcFloat8_set341(fcFloat8* self, fcFloat3 vec1, fcFloat4 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcFloat8 fcFloat8_create41111(fcFloat4 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+void fcFloat8_set41111(fcFloat8* self, fcFloat4 vec1, fcFloat s4, fcFloat s5, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+fcFloat8 fcFloat8_create4112(fcFloat4 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcFloat8_set4112(fcFloat8* self, fcFloat4 vec1, fcFloat s4, fcFloat s5, fcFloat2 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcFloat8 fcFloat8_create4121(fcFloat4 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcFloat8_set4121(fcFloat8* self, fcFloat4 vec1, fcFloat s4, fcFloat2 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcFloat8 fcFloat8_create413(fcFloat4 vec1, fcFloat s4, fcFloat3 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcFloat8_set413(fcFloat8* self, fcFloat4 vec1, fcFloat s4, fcFloat3 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcFloat8 fcFloat8_create4211(fcFloat4 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcFloat8_set4211(fcFloat8* self, fcFloat4 vec1, fcFloat2 vec2, fcFloat s6, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcFloat8 fcFloat8_create422(fcFloat4 vec1, fcFloat2 vec2, fcFloat2 vec3) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcFloat8_set422(fcFloat8* self, fcFloat4 vec1, fcFloat2 vec2, fcFloat2 vec3) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcFloat8 fcFloat8_create431(fcFloat4 vec1, fcFloat3 vec2, fcFloat s7) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcFloat8_set431(fcFloat8* self, fcFloat4 vec1, fcFloat3 vec2, fcFloat s7) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcFloat8 fcFloat8_create44(fcFloat4 vec1, fcFloat4 vec2) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcFloat8_set44(fcFloat8* self, fcFloat4 vec1, fcFloat4 vec2) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcFloat8 fcFloat8_create8(fcFloat8 vec1) {
+ return fcFloat8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+void fcFloat8_set8(fcFloat8* self, fcFloat8 vec1) {
+ fcFloat8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+fcFloat4 fcFloat8_odd(fcFloat8 a) {
+ return fcFloat4_create1111(a.s[1], a.s[3], a.s[5], a.s[7]);
+}
+
+fcFloat4 fcFloat8_even(fcFloat8 a) {
+ return fcFloat4_create1111(a.s[0], a.s[2], a.s[4], a.s[6]);
+}
+
+fcByte8 fcFloat8_convertByte8(fcFloat8 a) {
+ return fcByte8_create11111111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]), (fcByte)(a.s[4]), (fcByte)(a.s[5]), (fcByte)(a.s[6]), (fcByte)(a.s[7]));
+}
+
+fcShort8 fcFloat8_convertShort8(fcFloat8 a) {
+ return fcShort8_create11111111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]), (fcShort)(a.s[3]), (fcShort)(a.s[4]), (fcShort)(a.s[5]), (fcShort)(a.s[6]), (fcShort)(a.s[7]));
+}
+
+fcInt8 fcFloat8_convertInt8(fcFloat8 a) {
+ return fcInt8_create11111111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]), (fcInt)(a.s[3]), (fcInt)(a.s[4]), (fcInt)(a.s[5]), (fcInt)(a.s[6]), (fcInt)(a.s[7]));
+}
+
+fcLong8 fcFloat8_convertLong8(fcFloat8 a) {
+ return fcLong8_create11111111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]), (fcLong)(a.s[3]), (fcLong)(a.s[4]), (fcLong)(a.s[5]), (fcLong)(a.s[6]), (fcLong)(a.s[7]));
+}
+
+fcDouble8 fcFloat8_convertDouble8(fcFloat8 a) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0]), (fcDouble)(a.s[1]), (fcDouble)(a.s[2]), (fcDouble)(a.s[3]), (fcDouble)(a.s[4]), (fcDouble)(a.s[5]), (fcDouble)(a.s[6]), (fcDouble)(a.s[7]));
+}
+
+fcFloat2 fcFloat8_asFloat2(fcFloat8 a) {
+ return fcFloat2_create11(a.s[0], a.s[1]);
+}
+
+fcFloat3 fcFloat8_asFloat3(fcFloat8 a) {
+ return fcFloat3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcFloat4 fcFloat8_asFloat4(fcFloat8 a) {
+ return fcFloat4_create1111(a.s[0], a.s[1], a.s[2], a.s[3]);
+}
+
+fcInt8 fcFloat8_isEqual(fcFloat8 a, fcFloat8 b) {
+ return fcInt8_create11111111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0, a.s[4] == b.s[4]? 1 : 0, a.s[5] == b.s[5]? 1 : 0, a.s[6] == b.s[6]? 1 : 0, a.s[7] == b.s[7]? 1 : 0);
+}
+
+fcInt8 fcFloat8_isNotEqual(fcFloat8 a, fcFloat8 b) {
+ return fcInt8_create11111111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0, a.s[4] != b.s[4]? 1 : 0, a.s[5] != b.s[5]? 1 : 0, a.s[6] != b.s[6]? 1 : 0, a.s[7] != b.s[7]? 1 : 0);
+}
+
+fcInt8 fcFloat8_isGreater(fcFloat8 a, fcFloat8 b) {
+ return fcInt8_create11111111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0, a.s[4] > b.s[4]? 1 : 0, a.s[5] > b.s[5]? 1 : 0, a.s[6] > b.s[6]? 1 : 0, a.s[7] > b.s[7]? 1 : 0);
+}
+
+fcInt8 fcFloat8_isGreaterEqual(fcFloat8 a, fcFloat8 b) {
+ return fcInt8_create11111111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0, a.s[4] >= b.s[4]? 1 : 0, a.s[5] >= b.s[5]? 1 : 0, a.s[6] >= b.s[6]? 1 : 0, a.s[7] >= b.s[7]? 1 : 0);
+}
+
+fcInt8 fcFloat8_isLess(fcFloat8 a, fcFloat8 b) {
+ return fcInt8_create11111111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0, a.s[4] < b.s[4]? 1 : 0, a.s[5] < b.s[5]? 1 : 0, a.s[6] < b.s[6]? 1 : 0, a.s[7] < b.s[7]? 1 : 0);
+}
+
+fcInt8 fcFloat8_isLessEqual(fcFloat8 a, fcFloat8 b) {
+ return fcInt8_create11111111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0, a.s[4] <= b.s[4]? 1 : 0, a.s[5] <= b.s[5]? 1 : 0, a.s[6] <= b.s[6]? 1 : 0, a.s[7] <= b.s[7]? 1 : 0);
+}
+
+fcFloat8 fcFloat8_select(fcFloat8 a, fcFloat8 b, fcInt8 c) {
+ return fcFloat8_create11111111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]), fcMath_select(a.s[4], b.s[4], c.s[4]), fcMath_select(a.s[5], b.s[5], c.s[5]), fcMath_select(a.s[6], b.s[6], c.s[6]), fcMath_select(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt8 fcFloat8_isFinite(fcFloat8 a) {
+ return fcInt8_create11111111(fcMath_isFinitef(a.s[0]), fcMath_isFinitef(a.s[1]), fcMath_isFinitef(a.s[2]), fcMath_isFinitef(a.s[3]), fcMath_isFinitef(a.s[4]), fcMath_isFinitef(a.s[5]), fcMath_isFinitef(a.s[6]), fcMath_isFinitef(a.s[7]));
+}
+
+fcInt8 fcFloat8_isInf(fcFloat8 a) {
+ return fcInt8_create11111111(fcMath_isInff(a.s[0]), fcMath_isInff(a.s[1]), fcMath_isInff(a.s[2]), fcMath_isInff(a.s[3]), fcMath_isInff(a.s[4]), fcMath_isInff(a.s[5]), fcMath_isInff(a.s[6]), fcMath_isInff(a.s[7]));
+}
+
+fcInt8 fcFloat8_isNaN(fcFloat8 a) {
+ return fcInt8_create11111111(fcMath_isNaNf(a.s[0]), fcMath_isNaNf(a.s[1]), fcMath_isNaNf(a.s[2]), fcMath_isNaNf(a.s[3]), fcMath_isNaNf(a.s[4]), fcMath_isNaNf(a.s[5]), fcMath_isNaNf(a.s[6]), fcMath_isNaNf(a.s[7]));
+}
+
+fcInt8 fcFloat8_isNormal(fcFloat8 a) {
+ return fcInt8_create11111111(fcMath_isNormalf(a.s[0]), fcMath_isNormalf(a.s[1]), fcMath_isNormalf(a.s[2]), fcMath_isNormalf(a.s[3]), fcMath_isNormalf(a.s[4]), fcMath_isNormalf(a.s[5]), fcMath_isNormalf(a.s[6]), fcMath_isNormalf(a.s[7]));
+}
+
+fcInt8 fcFloat8_isOrdered(fcFloat8 a, fcFloat8 b) {
+ return fcInt8_create11111111(fcMath_isOrderedf(a.s[0], b.s[0]), fcMath_isOrderedf(a.s[1], b.s[1]), fcMath_isOrderedf(a.s[2], b.s[2]), fcMath_isOrderedf(a.s[3], b.s[3]), fcMath_isOrderedf(a.s[4], b.s[4]), fcMath_isOrderedf(a.s[5], b.s[5]), fcMath_isOrderedf(a.s[6], b.s[6]), fcMath_isOrderedf(a.s[7], b.s[7]));
+}
+
+fcInt8 fcFloat8_isUnordered(fcFloat8 a, fcFloat8 b) {
+ return fcInt8_create11111111(fcMath_isUnorderedf(a.s[0], b.s[0]), fcMath_isUnorderedf(a.s[1], b.s[1]), fcMath_isUnorderedf(a.s[2], b.s[2]), fcMath_isUnorderedf(a.s[3], b.s[3]), fcMath_isUnorderedf(a.s[4], b.s[4]), fcMath_isUnorderedf(a.s[5], b.s[5]), fcMath_isUnorderedf(a.s[6], b.s[6]), fcMath_isUnorderedf(a.s[7], b.s[7]));
+}
+
+fcInt fcFloat8_any(fcFloat8 a) {
+ return a.s[0] != 0.0f || a.s[1] != 0.0f || a.s[2] != 0.0f || a.s[3] != 0.0f || a.s[4] != 0.0f || a.s[5] != 0.0f || a.s[6] != 0.0f || a.s[7] != 0.0f;
+}
+
+fcInt fcFloat8_all(fcFloat8 a) {
+ return !(a.s[0] == 0.0f || a.s[1] == 0.0f || a.s[2] == 0.0f || a.s[3] == 0.0f || a.s[4] == 0.0f || a.s[5] == 0.0f || a.s[6] == 0.0f || a.s[7] == 0.0f);
+}
+
+fcFloat8 fcFloat8_neg(fcFloat8 a) {
+ return fcFloat8_create11111111(-a.s[0], -a.s[1], -a.s[2], -a.s[3], -a.s[4], -a.s[5], -a.s[6], -a.s[7]);
+}
+
+fcFloat8 fcFloat8_add(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3], a.s[4] + b.s[4], a.s[5] + b.s[5], a.s[6] + b.s[6], a.s[7] + b.s[7]);
+}
+
+fcFloat8 fcFloat8_sub(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3], a.s[4] - b.s[4], a.s[5] - b.s[5], a.s[6] - b.s[6], a.s[7] - b.s[7]);
+}
+
+fcDouble8 fcFloat8_muld(fcFloat8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]), (fcDouble)(a.s[4] * b.s[4]), (fcDouble)(a.s[5] * b.s[5]), (fcDouble)(a.s[6] * b.s[6]), (fcDouble)(a.s[7] * b.s[7]));
+}
+
+fcFloat8 fcFloat8_mulf(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]), (fcFloat)(a.s[4] * b.s[4]), (fcFloat)(a.s[5] * b.s[5]), (fcFloat)(a.s[6] * b.s[6]), (fcFloat)(a.s[7] * b.s[7]));
+}
+
+fcDouble8 fcFloat8_mulkd(fcFloat8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k), (fcDouble)(a.s[4] * k), (fcDouble)(a.s[5] * k), (fcDouble)(a.s[6] * k), (fcDouble)(a.s[7] * k));
+}
+
+fcFloat8 fcFloat8_mulkf(fcFloat8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k), (fcFloat)(a.s[4] * k), (fcFloat)(a.s[5] * k), (fcFloat)(a.s[6] * k), (fcFloat)(a.s[7] * k));
+}
+
+fcDouble8 fcFloat8_divd(fcFloat8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]), (fcDouble)(a.s[4] / b.s[4]), (fcDouble)(a.s[5] / b.s[5]), (fcDouble)(a.s[6] / b.s[6]), (fcDouble)(a.s[7] / b.s[7]));
+}
+
+fcFloat8 fcFloat8_divf(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]), (fcFloat)(a.s[4] / b.s[4]), (fcFloat)(a.s[5] / b.s[5]), (fcFloat)(a.s[6] / b.s[6]), (fcFloat)(a.s[7] / b.s[7]));
+}
+
+fcDouble8 fcFloat8_divkd(fcFloat8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k), (fcDouble)(a.s[4] / k), (fcDouble)(a.s[5] / k), (fcDouble)(a.s[6] / k), (fcDouble)(a.s[7] / k));
+}
+
+fcFloat8 fcFloat8_divkf(fcFloat8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k), (fcFloat)(a.s[4] / k), (fcFloat)(a.s[5] / k), (fcFloat)(a.s[6] / k), (fcFloat)(a.s[7] / k));
+}
+
+fcFloat fcFloat8_dot(fcFloat8 a, fcFloat8 b) {
+ return a.s[0] * b.s[0] + a.s[1] * b.s[1] + a.s[2] * b.s[2] + a.s[3] * b.s[3] + a.s[4] * b.s[4] + a.s[5] * b.s[5] + a.s[6] * b.s[6] + a.s[7] * b.s[7];
+}
+
+fcDouble fcFloat8_distance(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_length(fcFloat8_sub(a, b));
+}
+
+fcDouble fcFloat8_length(fcFloat8 a) {
+ return fcMath_sqrt(a.s[0] * a.s[0] + a.s[1] * a.s[1] + a.s[2] * a.s[2] + a.s[3] * a.s[3] + a.s[4] * a.s[4] + a.s[5] * a.s[5] + a.s[6] * a.s[6] + a.s[7] * a.s[7]);
+}
+
+fcFloat8 fcFloat8_normalize(fcFloat8 a) {
+ fcDouble len = fcFloat8_length(a);
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / len), (fcFloat)(a.s[1] / len), (fcFloat)(a.s[2] / len), (fcFloat)(a.s[3] / len), (fcFloat)(a.s[4] / len), (fcFloat)(a.s[5] / len), (fcFloat)(a.s[6] / len), (fcFloat)(a.s[7] / len));
+}
+
+fcFloat8 fcFloat8_abs(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]), fcMath_abs(a.s[4]), fcMath_abs(a.s[5]), fcMath_abs(a.s[6]), fcMath_abs(a.s[7]));
+}
+
+fcFloat8 fcFloat8_clamp(fcFloat8 a, fcFloat8 b, fcFloat8 c) {
+ return fcFloat8_create11111111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]), fcMath_clamp(a.s[4], b.s[4], c.s[4]), fcMath_clamp(a.s[5], b.s[5], c.s[5]), fcMath_clamp(a.s[6], b.s[6], c.s[6]), fcMath_clamp(a.s[7], b.s[7], c.s[7]));
+}
+
+fcFloat8 fcFloat8_max(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]), fcMath_max(a.s[4], b.s[4]), fcMath_max(a.s[5], b.s[5]), fcMath_max(a.s[6], b.s[6]), fcMath_max(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_maxMag(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]), fcMath_maxMag(a.s[4], b.s[4]), fcMath_maxMag(a.s[5], b.s[5]), fcMath_maxMag(a.s[6], b.s[6]), fcMath_maxMag(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_min(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]), fcMath_min(a.s[4], b.s[4]), fcMath_min(a.s[5], b.s[5]), fcMath_min(a.s[6], b.s[6]), fcMath_min(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_minMag(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]), fcMath_minMag(a.s[4], b.s[4]), fcMath_minMag(a.s[5], b.s[5]), fcMath_minMag(a.s[6], b.s[6]), fcMath_minMag(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_mix(fcFloat8 a, fcFloat8 b, fcFloat8 c) {
+ return fcFloat8_create11111111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]), fcMath_mix(a.s[4], b.s[4], c.s[4]), fcMath_mix(a.s[5], b.s[5], c.s[5]), fcMath_mix(a.s[6], b.s[6], c.s[6]), fcMath_mix(a.s[7], b.s[7], c.s[7]));
+}
+
+fcFloat8 fcFloat8_clampk(fcFloat8 v, fcFloat min, fcFloat max) {
+ return fcFloat8_create11111111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max), fcMath_clamp(v.s[4], min, max), fcMath_clamp(v.s[5], min, max), fcMath_clamp(v.s[6], min, max), fcMath_clamp(v.s[7], min, max));
+}
+
+fcFloat8 fcFloat8_maxk(fcFloat8 x, fcFloat y) {
+ return fcFloat8_create11111111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y), fcMath_max(x.s[4], y), fcMath_max(x.s[5], y), fcMath_max(x.s[6], y), fcMath_max(x.s[7], y));
+}
+
+fcFloat8 fcFloat8_mink(fcFloat8 x, fcFloat y) {
+ return fcFloat8_create11111111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y), fcMath_min(x.s[4], y), fcMath_min(x.s[5], y), fcMath_min(x.s[6], y), fcMath_min(x.s[7], y));
+}
+
+fcFloat8 fcFloat8_mixk(fcFloat8 x, fcFloat8 y, fcFloat a) {
+ return fcFloat8_create11111111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a), fcMath_mix(x.s[4], y.s[4], a), fcMath_mix(x.s[5], y.s[5], a), fcMath_mix(x.s[6], y.s[6], a), fcMath_mix(x.s[7], y.s[7], a));
+}
+
+fcFloat8 fcFloat8_acos(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_acosf(a.s[0]), fcMath_acosf(a.s[1]), fcMath_acosf(a.s[2]), fcMath_acosf(a.s[3]), fcMath_acosf(a.s[4]), fcMath_acosf(a.s[5]), fcMath_acosf(a.s[6]), fcMath_acosf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_acosh(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_acoshf(a.s[0]), fcMath_acoshf(a.s[1]), fcMath_acoshf(a.s[2]), fcMath_acoshf(a.s[3]), fcMath_acoshf(a.s[4]), fcMath_acoshf(a.s[5]), fcMath_acoshf(a.s[6]), fcMath_acoshf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_asin(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_asinf(a.s[0]), fcMath_asinf(a.s[1]), fcMath_asinf(a.s[2]), fcMath_asinf(a.s[3]), fcMath_asinf(a.s[4]), fcMath_asinf(a.s[5]), fcMath_asinf(a.s[6]), fcMath_asinf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_asinh(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_asinhf(a.s[0]), fcMath_asinhf(a.s[1]), fcMath_asinhf(a.s[2]), fcMath_asinhf(a.s[3]), fcMath_asinhf(a.s[4]), fcMath_asinhf(a.s[5]), fcMath_asinhf(a.s[6]), fcMath_asinhf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_atan(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_atanf(a.s[0]), fcMath_atanf(a.s[1]), fcMath_atanf(a.s[2]), fcMath_atanf(a.s[3]), fcMath_atanf(a.s[4]), fcMath_atanf(a.s[5]), fcMath_atanf(a.s[6]), fcMath_atanf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_atan2(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_atan2f(a.s[0], b.s[0]), fcMath_atan2f(a.s[1], b.s[1]), fcMath_atan2f(a.s[2], b.s[2]), fcMath_atan2f(a.s[3], b.s[3]), fcMath_atan2f(a.s[4], b.s[4]), fcMath_atan2f(a.s[5], b.s[5]), fcMath_atan2f(a.s[6], b.s[6]), fcMath_atan2f(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_atanh(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_atanhf(a.s[0]), fcMath_atanhf(a.s[1]), fcMath_atanhf(a.s[2]), fcMath_atanhf(a.s[3]), fcMath_atanhf(a.s[4]), fcMath_atanhf(a.s[5]), fcMath_atanhf(a.s[6]), fcMath_atanhf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_cbrt(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_cbrtf(a.s[0]), fcMath_cbrtf(a.s[1]), fcMath_cbrtf(a.s[2]), fcMath_cbrtf(a.s[3]), fcMath_cbrtf(a.s[4]), fcMath_cbrtf(a.s[5]), fcMath_cbrtf(a.s[6]), fcMath_cbrtf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_ceil(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_ceilf(a.s[0]), fcMath_ceilf(a.s[1]), fcMath_ceilf(a.s[2]), fcMath_ceilf(a.s[3]), fcMath_ceilf(a.s[4]), fcMath_ceilf(a.s[5]), fcMath_ceilf(a.s[6]), fcMath_ceilf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_copySign(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_copySignf(a.s[0], b.s[0]), fcMath_copySignf(a.s[1], b.s[1]), fcMath_copySignf(a.s[2], b.s[2]), fcMath_copySignf(a.s[3], b.s[3]), fcMath_copySignf(a.s[4], b.s[4]), fcMath_copySignf(a.s[5], b.s[5]), fcMath_copySignf(a.s[6], b.s[6]), fcMath_copySignf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_cos(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_cosf(a.s[0]), fcMath_cosf(a.s[1]), fcMath_cosf(a.s[2]), fcMath_cosf(a.s[3]), fcMath_cosf(a.s[4]), fcMath_cosf(a.s[5]), fcMath_cosf(a.s[6]), fcMath_cosf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_cosh(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_coshf(a.s[0]), fcMath_coshf(a.s[1]), fcMath_coshf(a.s[2]), fcMath_coshf(a.s[3]), fcMath_coshf(a.s[4]), fcMath_coshf(a.s[5]), fcMath_coshf(a.s[6]), fcMath_coshf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_erf(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_erff(a.s[0]), fcMath_erff(a.s[1]), fcMath_erff(a.s[2]), fcMath_erff(a.s[3]), fcMath_erff(a.s[4]), fcMath_erff(a.s[5]), fcMath_erff(a.s[6]), fcMath_erff(a.s[7]));
+}
+
+fcFloat8 fcFloat8_erfc(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_erfcf(a.s[0]), fcMath_erfcf(a.s[1]), fcMath_erfcf(a.s[2]), fcMath_erfcf(a.s[3]), fcMath_erfcf(a.s[4]), fcMath_erfcf(a.s[5]), fcMath_erfcf(a.s[6]), fcMath_erfcf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_exp(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_expf(a.s[0]), fcMath_expf(a.s[1]), fcMath_expf(a.s[2]), fcMath_expf(a.s[3]), fcMath_expf(a.s[4]), fcMath_expf(a.s[5]), fcMath_expf(a.s[6]), fcMath_expf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_exp10(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_exp10f(a.s[0]), fcMath_exp10f(a.s[1]), fcMath_exp10f(a.s[2]), fcMath_exp10f(a.s[3]), fcMath_exp10f(a.s[4]), fcMath_exp10f(a.s[5]), fcMath_exp10f(a.s[6]), fcMath_exp10f(a.s[7]));
+}
+
+fcFloat8 fcFloat8_exp2(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_exp2f(a.s[0]), fcMath_exp2f(a.s[1]), fcMath_exp2f(a.s[2]), fcMath_exp2f(a.s[3]), fcMath_exp2f(a.s[4]), fcMath_exp2f(a.s[5]), fcMath_exp2f(a.s[6]), fcMath_exp2f(a.s[7]));
+}
+
+fcFloat8 fcFloat8_expm1(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_expm1f(a.s[0]), fcMath_expm1f(a.s[1]), fcMath_expm1f(a.s[2]), fcMath_expm1f(a.s[3]), fcMath_expm1f(a.s[4]), fcMath_expm1f(a.s[5]), fcMath_expm1f(a.s[6]), fcMath_expm1f(a.s[7]));
+}
+
+fcFloat8 fcFloat8_fdim(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_fdimf(a.s[0], b.s[0]), fcMath_fdimf(a.s[1], b.s[1]), fcMath_fdimf(a.s[2], b.s[2]), fcMath_fdimf(a.s[3], b.s[3]), fcMath_fdimf(a.s[4], b.s[4]), fcMath_fdimf(a.s[5], b.s[5]), fcMath_fdimf(a.s[6], b.s[6]), fcMath_fdimf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_floor(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_floorf(a.s[0]), fcMath_floorf(a.s[1]), fcMath_floorf(a.s[2]), fcMath_floorf(a.s[3]), fcMath_floorf(a.s[4]), fcMath_floorf(a.s[5]), fcMath_floorf(a.s[6]), fcMath_floorf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_fma(fcFloat8 a, fcFloat8 b, fcFloat8 c) {
+ return fcFloat8_create11111111(fcMath_fmaf(a.s[0], b.s[0], c.s[0]), fcMath_fmaf(a.s[1], b.s[1], c.s[1]), fcMath_fmaf(a.s[2], b.s[2], c.s[2]), fcMath_fmaf(a.s[3], b.s[3], c.s[3]), fcMath_fmaf(a.s[4], b.s[4], c.s[4]), fcMath_fmaf(a.s[5], b.s[5], c.s[5]), fcMath_fmaf(a.s[6], b.s[6], c.s[6]), fcMath_fmaf(a.s[7], b.s[7], c.s[7]));
+}
+
+fcFloat8 fcFloat8_fmod(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_fmodf(a.s[0], b.s[0]), fcMath_fmodf(a.s[1], b.s[1]), fcMath_fmodf(a.s[2], b.s[2]), fcMath_fmodf(a.s[3], b.s[3]), fcMath_fmodf(a.s[4], b.s[4]), fcMath_fmodf(a.s[5], b.s[5]), fcMath_fmodf(a.s[6], b.s[6]), fcMath_fmodf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_fract(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_fractf(a.s[0]), fcMath_fractf(a.s[1]), fcMath_fractf(a.s[2]), fcMath_fractf(a.s[3]), fcMath_fractf(a.s[4]), fcMath_fractf(a.s[5]), fcMath_fractf(a.s[6]), fcMath_fractf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_frexp(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_frexpf(a.s[0]), fcMath_frexpf(a.s[1]), fcMath_frexpf(a.s[2]), fcMath_frexpf(a.s[3]), fcMath_frexpf(a.s[4]), fcMath_frexpf(a.s[5]), fcMath_frexpf(a.s[6]), fcMath_frexpf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_getExponent(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_getExponentf(a.s[0]), fcMath_getExponentf(a.s[1]), fcMath_getExponentf(a.s[2]), fcMath_getExponentf(a.s[3]), fcMath_getExponentf(a.s[4]), fcMath_getExponentf(a.s[5]), fcMath_getExponentf(a.s[6]), fcMath_getExponentf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_hypot(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_hypotf(a.s[0], b.s[0]), fcMath_hypotf(a.s[1], b.s[1]), fcMath_hypotf(a.s[2], b.s[2]), fcMath_hypotf(a.s[3], b.s[3]), fcMath_hypotf(a.s[4], b.s[4]), fcMath_hypotf(a.s[5], b.s[5]), fcMath_hypotf(a.s[6], b.s[6]), fcMath_hypotf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_lgamma(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_lgammaf(a.s[0]), fcMath_lgammaf(a.s[1]), fcMath_lgammaf(a.s[2]), fcMath_lgammaf(a.s[3]), fcMath_lgammaf(a.s[4]), fcMath_lgammaf(a.s[5]), fcMath_lgammaf(a.s[6]), fcMath_lgammaf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_log(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_logf(a.s[0]), fcMath_logf(a.s[1]), fcMath_logf(a.s[2]), fcMath_logf(a.s[3]), fcMath_logf(a.s[4]), fcMath_logf(a.s[5]), fcMath_logf(a.s[6]), fcMath_logf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_log10(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_log10f(a.s[0]), fcMath_log10f(a.s[1]), fcMath_log10f(a.s[2]), fcMath_log10f(a.s[3]), fcMath_log10f(a.s[4]), fcMath_log10f(a.s[5]), fcMath_log10f(a.s[6]), fcMath_log10f(a.s[7]));
+}
+
+fcFloat8 fcFloat8_log1p(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_log1pf(a.s[0]), fcMath_log1pf(a.s[1]), fcMath_log1pf(a.s[2]), fcMath_log1pf(a.s[3]), fcMath_log1pf(a.s[4]), fcMath_log1pf(a.s[5]), fcMath_log1pf(a.s[6]), fcMath_log1pf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_log2(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_log2f(a.s[0]), fcMath_log2f(a.s[1]), fcMath_log2f(a.s[2]), fcMath_log2f(a.s[3]), fcMath_log2f(a.s[4]), fcMath_log2f(a.s[5]), fcMath_log2f(a.s[6]), fcMath_log2f(a.s[7]));
+}
+
+fcFloat8 fcFloat8_logb(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_logbf(a.s[0]), fcMath_logbf(a.s[1]), fcMath_logbf(a.s[2]), fcMath_logbf(a.s[3]), fcMath_logbf(a.s[4]), fcMath_logbf(a.s[5]), fcMath_logbf(a.s[6]), fcMath_logbf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_mad(fcFloat8 a, fcFloat8 b, fcFloat8 c) {
+ return fcFloat8_create11111111(fcMath_madf(a.s[0], b.s[0], c.s[0]), fcMath_madf(a.s[1], b.s[1], c.s[1]), fcMath_madf(a.s[2], b.s[2], c.s[2]), fcMath_madf(a.s[3], b.s[3], c.s[3]), fcMath_madf(a.s[4], b.s[4], c.s[4]), fcMath_madf(a.s[5], b.s[5], c.s[5]), fcMath_madf(a.s[6], b.s[6], c.s[6]), fcMath_madf(a.s[7], b.s[7], c.s[7]));
+}
+
+fcFloat8 fcFloat8_nextAfter(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_nextAfterf(a.s[0], b.s[0]), fcMath_nextAfterf(a.s[1], b.s[1]), fcMath_nextAfterf(a.s[2], b.s[2]), fcMath_nextAfterf(a.s[3], b.s[3]), fcMath_nextAfterf(a.s[4], b.s[4]), fcMath_nextAfterf(a.s[5], b.s[5]), fcMath_nextAfterf(a.s[6], b.s[6]), fcMath_nextAfterf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_pow(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_powf(a.s[0], b.s[0]), fcMath_powf(a.s[1], b.s[1]), fcMath_powf(a.s[2], b.s[2]), fcMath_powf(a.s[3], b.s[3]), fcMath_powf(a.s[4], b.s[4]), fcMath_powf(a.s[5], b.s[5]), fcMath_powf(a.s[6], b.s[6]), fcMath_powf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_powr(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_powrf(a.s[0], b.s[0]), fcMath_powrf(a.s[1], b.s[1]), fcMath_powrf(a.s[2], b.s[2]), fcMath_powrf(a.s[3], b.s[3]), fcMath_powrf(a.s[4], b.s[4]), fcMath_powrf(a.s[5], b.s[5]), fcMath_powrf(a.s[6], b.s[6]), fcMath_powrf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_remainder(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_remainderf(a.s[0], b.s[0]), fcMath_remainderf(a.s[1], b.s[1]), fcMath_remainderf(a.s[2], b.s[2]), fcMath_remainderf(a.s[3], b.s[3]), fcMath_remainderf(a.s[4], b.s[4]), fcMath_remainderf(a.s[5], b.s[5]), fcMath_remainderf(a.s[6], b.s[6]), fcMath_remainderf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_rint(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_rintf(a.s[0]), fcMath_rintf(a.s[1]), fcMath_rintf(a.s[2]), fcMath_rintf(a.s[3]), fcMath_rintf(a.s[4]), fcMath_rintf(a.s[5]), fcMath_rintf(a.s[6]), fcMath_rintf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_round(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_roundf(a.s[0]), fcMath_roundf(a.s[1]), fcMath_roundf(a.s[2]), fcMath_roundf(a.s[3]), fcMath_roundf(a.s[4]), fcMath_roundf(a.s[5]), fcMath_roundf(a.s[6]), fcMath_roundf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_rsqrt(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_rsqrtf(a.s[0]), fcMath_rsqrtf(a.s[1]), fcMath_rsqrtf(a.s[2]), fcMath_rsqrtf(a.s[3]), fcMath_rsqrtf(a.s[4]), fcMath_rsqrtf(a.s[5]), fcMath_rsqrtf(a.s[6]), fcMath_rsqrtf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_signum(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_signumf(a.s[0]), fcMath_signumf(a.s[1]), fcMath_signumf(a.s[2]), fcMath_signumf(a.s[3]), fcMath_signumf(a.s[4]), fcMath_signumf(a.s[5]), fcMath_signumf(a.s[6]), fcMath_signumf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_sin(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_sinf(a.s[0]), fcMath_sinf(a.s[1]), fcMath_sinf(a.s[2]), fcMath_sinf(a.s[3]), fcMath_sinf(a.s[4]), fcMath_sinf(a.s[5]), fcMath_sinf(a.s[6]), fcMath_sinf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_sinh(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_sinhf(a.s[0]), fcMath_sinhf(a.s[1]), fcMath_sinhf(a.s[2]), fcMath_sinhf(a.s[3]), fcMath_sinhf(a.s[4]), fcMath_sinhf(a.s[5]), fcMath_sinhf(a.s[6]), fcMath_sinhf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_smoothStep(fcFloat8 a, fcFloat8 b, fcFloat8 c) {
+ return fcFloat8_create11111111(fcMath_smoothStepf(a.s[0], b.s[0], c.s[0]), fcMath_smoothStepf(a.s[1], b.s[1], c.s[1]), fcMath_smoothStepf(a.s[2], b.s[2], c.s[2]), fcMath_smoothStepf(a.s[3], b.s[3], c.s[3]), fcMath_smoothStepf(a.s[4], b.s[4], c.s[4]), fcMath_smoothStepf(a.s[5], b.s[5], c.s[5]), fcMath_smoothStepf(a.s[6], b.s[6], c.s[6]), fcMath_smoothStepf(a.s[7], b.s[7], c.s[7]));
+}
+
+fcFloat8 fcFloat8_sqrt(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_sqrtf(a.s[0]), fcMath_sqrtf(a.s[1]), fcMath_sqrtf(a.s[2]), fcMath_sqrtf(a.s[3]), fcMath_sqrtf(a.s[4]), fcMath_sqrtf(a.s[5]), fcMath_sqrtf(a.s[6]), fcMath_sqrtf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_step(fcFloat8 a, fcFloat8 b) {
+ return fcFloat8_create11111111(fcMath_stepf(a.s[0], b.s[0]), fcMath_stepf(a.s[1], b.s[1]), fcMath_stepf(a.s[2], b.s[2]), fcMath_stepf(a.s[3], b.s[3]), fcMath_stepf(a.s[4], b.s[4]), fcMath_stepf(a.s[5], b.s[5]), fcMath_stepf(a.s[6], b.s[6]), fcMath_stepf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_tan(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_tanf(a.s[0]), fcMath_tanf(a.s[1]), fcMath_tanf(a.s[2]), fcMath_tanf(a.s[3]), fcMath_tanf(a.s[4]), fcMath_tanf(a.s[5]), fcMath_tanf(a.s[6]), fcMath_tanf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_tanh(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_tanhf(a.s[0]), fcMath_tanhf(a.s[1]), fcMath_tanhf(a.s[2]), fcMath_tanhf(a.s[3]), fcMath_tanhf(a.s[4]), fcMath_tanhf(a.s[5]), fcMath_tanhf(a.s[6]), fcMath_tanhf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_tgamma(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_tgammaf(a.s[0]), fcMath_tgammaf(a.s[1]), fcMath_tgammaf(a.s[2]), fcMath_tgammaf(a.s[3]), fcMath_tgammaf(a.s[4]), fcMath_tgammaf(a.s[5]), fcMath_tgammaf(a.s[6]), fcMath_tgammaf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_toDegrees(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_toDegreesf(a.s[0]), fcMath_toDegreesf(a.s[1]), fcMath_toDegreesf(a.s[2]), fcMath_toDegreesf(a.s[3]), fcMath_toDegreesf(a.s[4]), fcMath_toDegreesf(a.s[5]), fcMath_toDegreesf(a.s[6]), fcMath_toDegreesf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_toRadians(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_toRadiansf(a.s[0]), fcMath_toRadiansf(a.s[1]), fcMath_toRadiansf(a.s[2]), fcMath_toRadiansf(a.s[3]), fcMath_toRadiansf(a.s[4]), fcMath_toRadiansf(a.s[5]), fcMath_toRadiansf(a.s[6]), fcMath_toRadiansf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_trunc(fcFloat8 a) {
+ return fcFloat8_create11111111(fcMath_truncf(a.s[0]), fcMath_truncf(a.s[1]), fcMath_truncf(a.s[2]), fcMath_truncf(a.s[3]), fcMath_truncf(a.s[4]), fcMath_truncf(a.s[5]), fcMath_truncf(a.s[6]), fcMath_truncf(a.s[7]));
+}
+
+fcFloat8 fcFloat8_scalb(fcFloat8 a, fcInt8 n) {
+ return fcFloat8_create11111111(fcMath_scalbf(a.s[0], n.s[0]), fcMath_scalbf(a.s[1], n.s[1]), fcMath_scalbf(a.s[2], n.s[2]), fcMath_scalbf(a.s[3], n.s[3]), fcMath_scalbf(a.s[4], n.s[4]), fcMath_scalbf(a.s[5], n.s[5]), fcMath_scalbf(a.s[6], n.s[6]), fcMath_scalbf(a.s[7], n.s[7]));
+}
+
+fcFloat8 fcFloat8_ldexp(fcFloat8 a, fcInt8 n) {
+ return fcFloat8_create11111111(fcMath_ldexpf(a.s[0], n.s[0]), fcMath_ldexpf(a.s[1], n.s[1]), fcMath_ldexpf(a.s[2], n.s[2]), fcMath_ldexpf(a.s[3], n.s[3]), fcMath_ldexpf(a.s[4], n.s[4]), fcMath_ldexpf(a.s[5], n.s[5]), fcMath_ldexpf(a.s[6], n.s[6]), fcMath_ldexpf(a.s[7], n.s[7]));
+}
+
+fcFloat8 fcFloat8_pown(fcFloat8 a, fcInt8 b) {
+ return fcFloat8_create11111111(fcMath_pownf(a.s[0], b.s[0]), fcMath_pownf(a.s[1], b.s[1]), fcMath_pownf(a.s[2], b.s[2]), fcMath_pownf(a.s[3], b.s[3]), fcMath_pownf(a.s[4], b.s[4]), fcMath_pownf(a.s[5], b.s[5]), fcMath_pownf(a.s[6], b.s[6]), fcMath_pownf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_rootn(fcFloat8 a, fcInt8 b) {
+ return fcFloat8_create11111111(fcMath_rootnf(a.s[0], b.s[0]), fcMath_rootnf(a.s[1], b.s[1]), fcMath_rootnf(a.s[2], b.s[2]), fcMath_rootnf(a.s[3], b.s[3]), fcMath_rootnf(a.s[4], b.s[4]), fcMath_rootnf(a.s[5], b.s[5]), fcMath_rootnf(a.s[6], b.s[6]), fcMath_rootnf(a.s[7], b.s[7]));
+}
+
+fcFloat8 fcFloat8_smoothStepk(fcFloat8 a, fcFloat8 b, fcFloat c) {
+ return fcFloat8_create11111111(fcMath_smoothStepf(a.s[0], b.s[0], c), fcMath_smoothStepf(a.s[1], b.s[1], c), fcMath_smoothStepf(a.s[2], b.s[2], c), fcMath_smoothStepf(a.s[3], b.s[3], c), fcMath_smoothStepf(a.s[4], b.s[4], c), fcMath_smoothStepf(a.s[5], b.s[5], c), fcMath_smoothStepf(a.s[6], b.s[6], c), fcMath_smoothStepf(a.s[7], b.s[7], c));
+}
+
+
+//
+// fcDouble2
+//
+
+fcDouble2 fcDouble2_create1(fcDouble v) {
+ return fcDouble2_create11(v, v);
+}
+
+void fcDouble2_set1(fcDouble2* self, fcDouble v) {
+ fcDouble2_set11(self, v, v);
+}
+
+fcDouble2 fcDouble2_create11(fcDouble x, fcDouble y) {
+ fcDouble2 result = {{x, y}};
+ return result;
+}
+
+void fcDouble2_set11(fcDouble2* self, fcDouble x, fcDouble y) {
+ self->s[0] = x;
+ self->s[1] = y;
+}
+
+fcDouble2 fcDouble2_create2(fcDouble2 vec1) {
+ return fcDouble2_create11(vec1.s[0], vec1.s[1]);
+}
+
+void fcDouble2_set2(fcDouble2* self, fcDouble2 vec1) {
+ fcDouble2_set11(self, vec1.s[0], vec1.s[1]);
+}
+
+fcByte2 fcDouble2_convertByte2(fcDouble2 a) {
+ return fcByte2_create11((fcByte)(a.s[0]), (fcByte)(a.s[1]));
+}
+
+fcShort2 fcDouble2_convertShort2(fcDouble2 a) {
+ return fcShort2_create11((fcShort)(a.s[0]), (fcShort)(a.s[1]));
+}
+
+fcInt2 fcDouble2_convertInt2(fcDouble2 a) {
+ return fcInt2_create11((fcInt)(a.s[0]), (fcInt)(a.s[1]));
+}
+
+fcLong2 fcDouble2_convertLong2(fcDouble2 a) {
+ return fcLong2_create11((fcLong)(a.s[0]), (fcLong)(a.s[1]));
+}
+
+fcFloat2 fcDouble2_convertFloat2(fcDouble2 a) {
+ return fcFloat2_create11((fcFloat)(a.s[0]), (fcFloat)(a.s[1]));
+}
+
+fcInt2 fcDouble2_isEqual(fcDouble2 a, fcDouble2 b) {
+ return fcInt2_create11(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0);
+}
+
+fcInt2 fcDouble2_isNotEqual(fcDouble2 a, fcDouble2 b) {
+ return fcInt2_create11(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0);
+}
+
+fcInt2 fcDouble2_isGreater(fcDouble2 a, fcDouble2 b) {
+ return fcInt2_create11(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0);
+}
+
+fcInt2 fcDouble2_isGreaterEqual(fcDouble2 a, fcDouble2 b) {
+ return fcInt2_create11(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0);
+}
+
+fcInt2 fcDouble2_isLess(fcDouble2 a, fcDouble2 b) {
+ return fcInt2_create11(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0);
+}
+
+fcInt2 fcDouble2_isLessEqual(fcDouble2 a, fcDouble2 b) {
+ return fcInt2_create11(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0);
+}
+
+fcDouble2 fcDouble2_select(fcDouble2 a, fcDouble2 b, fcInt2 c) {
+ return fcDouble2_create11(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]));
+}
+
+fcInt2 fcDouble2_isFinite(fcDouble2 a) {
+ return fcInt2_create11(fcMath_isFinite(a.s[0]), fcMath_isFinite(a.s[1]));
+}
+
+fcInt2 fcDouble2_isInf(fcDouble2 a) {
+ return fcInt2_create11(fcMath_isInf(a.s[0]), fcMath_isInf(a.s[1]));
+}
+
+fcInt2 fcDouble2_isNaN(fcDouble2 a) {
+ return fcInt2_create11(fcMath_isNaN(a.s[0]), fcMath_isNaN(a.s[1]));
+}
+
+fcInt2 fcDouble2_isNormal(fcDouble2 a) {
+ return fcInt2_create11(fcMath_isNormal(a.s[0]), fcMath_isNormal(a.s[1]));
+}
+
+fcInt2 fcDouble2_isOrdered(fcDouble2 a, fcDouble2 b) {
+ return fcInt2_create11(fcMath_isOrdered(a.s[0], b.s[0]), fcMath_isOrdered(a.s[1], b.s[1]));
+}
+
+fcInt2 fcDouble2_isUnordered(fcDouble2 a, fcDouble2 b) {
+ return fcInt2_create11(fcMath_isUnordered(a.s[0], b.s[0]), fcMath_isUnordered(a.s[1], b.s[1]));
+}
+
+fcInt fcDouble2_any(fcDouble2 a) {
+ return a.s[0] != 0.0 || a.s[1] != 0.0;
+}
+
+fcInt fcDouble2_all(fcDouble2 a) {
+ return !(a.s[0] == 0.0 || a.s[1] == 0.0);
+}
+
+fcDouble2 fcDouble2_neg(fcDouble2 a) {
+ return fcDouble2_create11(-a.s[0], -a.s[1]);
+}
+
+fcDouble2 fcDouble2_add(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(a.s[0] + b.s[0], a.s[1] + b.s[1]);
+}
+
+fcDouble2 fcDouble2_sub(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(a.s[0] - b.s[0], a.s[1] - b.s[1]);
+}
+
+fcDouble2 fcDouble2_muld(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]));
+}
+
+fcFloat2 fcDouble2_mulf(fcDouble2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]));
+}
+
+fcDouble2 fcDouble2_mulkd(fcDouble2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k));
+}
+
+fcFloat2 fcDouble2_mulkf(fcDouble2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k));
+}
+
+fcDouble2 fcDouble2_divd(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]));
+}
+
+fcFloat2 fcDouble2_divf(fcDouble2 a, fcFloat2 b) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]));
+}
+
+fcDouble2 fcDouble2_divkd(fcDouble2 a, fcDouble k) {
+ return fcDouble2_create11((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k));
+}
+
+fcFloat2 fcDouble2_divkf(fcDouble2 a, fcFloat k) {
+ return fcFloat2_create11((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k));
+}
+
+fcDouble fcDouble2_dot(fcDouble2 a, fcDouble2 b) {
+ return a.s[0] * b.s[0] + a.s[1] * b.s[1];
+}
+
+fcDouble fcDouble2_distance(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_length(fcDouble2_sub(a, b));
+}
+
+fcDouble fcDouble2_length(fcDouble2 a) {
+ return fcMath_sqrt(a.s[0] * a.s[0] + a.s[1] * a.s[1]);
+}
+
+fcDouble2 fcDouble2_normalize(fcDouble2 a) {
+ fcDouble len = fcDouble2_length(a);
+ return fcDouble2_create11((fcDouble)(a.s[0] / len), (fcDouble)(a.s[1] / len));
+}
+
+fcDouble2 fcDouble2_abs(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]));
+}
+
+fcDouble2 fcDouble2_clamp(fcDouble2 a, fcDouble2 b, fcDouble2 c) {
+ return fcDouble2_create11(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]));
+}
+
+fcDouble2 fcDouble2_max(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_maxMag(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_min(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_minMag(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_mix(fcDouble2 a, fcDouble2 b, fcDouble2 c) {
+ return fcDouble2_create11(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]));
+}
+
+fcDouble2 fcDouble2_clampk(fcDouble2 v, fcDouble min, fcDouble max) {
+ return fcDouble2_create11(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max));
+}
+
+fcDouble2 fcDouble2_maxk(fcDouble2 x, fcDouble y) {
+ return fcDouble2_create11(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y));
+}
+
+fcDouble2 fcDouble2_mink(fcDouble2 x, fcDouble y) {
+ return fcDouble2_create11(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y));
+}
+
+fcDouble2 fcDouble2_mixk(fcDouble2 x, fcDouble2 y, fcDouble a) {
+ return fcDouble2_create11(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a));
+}
+
+fcDouble2 fcDouble2_acos(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_acos(a.s[0]), fcMath_acos(a.s[1]));
+}
+
+fcDouble2 fcDouble2_acosh(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_acosh(a.s[0]), fcMath_acosh(a.s[1]));
+}
+
+fcDouble2 fcDouble2_asin(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_asin(a.s[0]), fcMath_asin(a.s[1]));
+}
+
+fcDouble2 fcDouble2_asinh(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_asinh(a.s[0]), fcMath_asinh(a.s[1]));
+}
+
+fcDouble2 fcDouble2_atan(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_atan(a.s[0]), fcMath_atan(a.s[1]));
+}
+
+fcDouble2 fcDouble2_atan2(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_atan2(a.s[0], b.s[0]), fcMath_atan2(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_atanh(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_atanh(a.s[0]), fcMath_atanh(a.s[1]));
+}
+
+fcDouble2 fcDouble2_cbrt(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_cbrt(a.s[0]), fcMath_cbrt(a.s[1]));
+}
+
+fcDouble2 fcDouble2_ceil(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_ceil(a.s[0]), fcMath_ceil(a.s[1]));
+}
+
+fcDouble2 fcDouble2_copySign(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_copySign(a.s[0], b.s[0]), fcMath_copySign(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_cos(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_cos(a.s[0]), fcMath_cos(a.s[1]));
+}
+
+fcDouble2 fcDouble2_cosh(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_cosh(a.s[0]), fcMath_cosh(a.s[1]));
+}
+
+fcDouble2 fcDouble2_erf(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_erf(a.s[0]), fcMath_erf(a.s[1]));
+}
+
+fcDouble2 fcDouble2_erfc(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_erfc(a.s[0]), fcMath_erfc(a.s[1]));
+}
+
+fcDouble2 fcDouble2_exp(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_exp(a.s[0]), fcMath_exp(a.s[1]));
+}
+
+fcDouble2 fcDouble2_exp10(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_exp10(a.s[0]), fcMath_exp10(a.s[1]));
+}
+
+fcDouble2 fcDouble2_exp2(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_exp2(a.s[0]), fcMath_exp2(a.s[1]));
+}
+
+fcDouble2 fcDouble2_expm1(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_expm1(a.s[0]), fcMath_expm1(a.s[1]));
+}
+
+fcDouble2 fcDouble2_fdim(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_fdim(a.s[0], b.s[0]), fcMath_fdim(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_floor(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_floor(a.s[0]), fcMath_floor(a.s[1]));
+}
+
+fcDouble2 fcDouble2_fma(fcDouble2 a, fcDouble2 b, fcDouble2 c) {
+ return fcDouble2_create11(fcMath_fma(a.s[0], b.s[0], c.s[0]), fcMath_fma(a.s[1], b.s[1], c.s[1]));
+}
+
+fcDouble2 fcDouble2_fmod(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_fmod(a.s[0], b.s[0]), fcMath_fmod(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_fract(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_fract(a.s[0]), fcMath_fract(a.s[1]));
+}
+
+fcDouble2 fcDouble2_frexp(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_frexp(a.s[0]), fcMath_frexp(a.s[1]));
+}
+
+fcDouble2 fcDouble2_getExponent(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_getExponent(a.s[0]), fcMath_getExponent(a.s[1]));
+}
+
+fcDouble2 fcDouble2_hypot(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_hypot(a.s[0], b.s[0]), fcMath_hypot(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_lgamma(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_lgamma(a.s[0]), fcMath_lgamma(a.s[1]));
+}
+
+fcDouble2 fcDouble2_log(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_log(a.s[0]), fcMath_log(a.s[1]));
+}
+
+fcDouble2 fcDouble2_log10(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_log10(a.s[0]), fcMath_log10(a.s[1]));
+}
+
+fcDouble2 fcDouble2_log1p(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_log1p(a.s[0]), fcMath_log1p(a.s[1]));
+}
+
+fcDouble2 fcDouble2_log2(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_log2(a.s[0]), fcMath_log2(a.s[1]));
+}
+
+fcDouble2 fcDouble2_logb(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_logb(a.s[0]), fcMath_logb(a.s[1]));
+}
+
+fcDouble2 fcDouble2_mad(fcDouble2 a, fcDouble2 b, fcDouble2 c) {
+ return fcDouble2_create11(fcMath_mad(a.s[0], b.s[0], c.s[0]), fcMath_mad(a.s[1], b.s[1], c.s[1]));
+}
+
+fcDouble2 fcDouble2_nextAfter(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_nextAfter(a.s[0], b.s[0]), fcMath_nextAfter(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_pow(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_pow(a.s[0], b.s[0]), fcMath_pow(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_powr(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_powr(a.s[0], b.s[0]), fcMath_powr(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_remainder(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_remainder(a.s[0], b.s[0]), fcMath_remainder(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_rint(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_rint(a.s[0]), fcMath_rint(a.s[1]));
+}
+
+fcDouble2 fcDouble2_round(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_round(a.s[0]), fcMath_round(a.s[1]));
+}
+
+fcDouble2 fcDouble2_rsqrt(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_rsqrt(a.s[0]), fcMath_rsqrt(a.s[1]));
+}
+
+fcDouble2 fcDouble2_signum(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_signum(a.s[0]), fcMath_signum(a.s[1]));
+}
+
+fcDouble2 fcDouble2_sin(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_sin(a.s[0]), fcMath_sin(a.s[1]));
+}
+
+fcDouble2 fcDouble2_sinh(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_sinh(a.s[0]), fcMath_sinh(a.s[1]));
+}
+
+fcDouble2 fcDouble2_smoothStep(fcDouble2 a, fcDouble2 b, fcDouble2 c) {
+ return fcDouble2_create11(fcMath_smoothStep(a.s[0], b.s[0], c.s[0]), fcMath_smoothStep(a.s[1], b.s[1], c.s[1]));
+}
+
+fcDouble2 fcDouble2_sqrt(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_sqrt(a.s[0]), fcMath_sqrt(a.s[1]));
+}
+
+fcDouble2 fcDouble2_step(fcDouble2 a, fcDouble2 b) {
+ return fcDouble2_create11(fcMath_step(a.s[0], b.s[0]), fcMath_step(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_tan(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_tan(a.s[0]), fcMath_tan(a.s[1]));
+}
+
+fcDouble2 fcDouble2_tanh(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_tanh(a.s[0]), fcMath_tanh(a.s[1]));
+}
+
+fcDouble2 fcDouble2_tgamma(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_tgamma(a.s[0]), fcMath_tgamma(a.s[1]));
+}
+
+fcDouble2 fcDouble2_toDegrees(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_toDegrees(a.s[0]), fcMath_toDegrees(a.s[1]));
+}
+
+fcDouble2 fcDouble2_toRadians(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_toRadians(a.s[0]), fcMath_toRadians(a.s[1]));
+}
+
+fcDouble2 fcDouble2_trunc(fcDouble2 a) {
+ return fcDouble2_create11(fcMath_trunc(a.s[0]), fcMath_trunc(a.s[1]));
+}
+
+fcDouble2 fcDouble2_scalb(fcDouble2 a, fcInt2 n) {
+ return fcDouble2_create11(fcMath_scalb(a.s[0], n.s[0]), fcMath_scalb(a.s[1], n.s[1]));
+}
+
+fcDouble2 fcDouble2_ldexp(fcDouble2 a, fcInt2 n) {
+ return fcDouble2_create11(fcMath_ldexp(a.s[0], n.s[0]), fcMath_ldexp(a.s[1], n.s[1]));
+}
+
+fcDouble2 fcDouble2_pown(fcDouble2 a, fcInt2 b) {
+ return fcDouble2_create11(fcMath_pown(a.s[0], b.s[0]), fcMath_pown(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_rootn(fcDouble2 a, fcInt2 b) {
+ return fcDouble2_create11(fcMath_rootn(a.s[0], b.s[0]), fcMath_rootn(a.s[1], b.s[1]));
+}
+
+fcDouble2 fcDouble2_smoothStepk(fcDouble2 a, fcDouble2 b, fcDouble c) {
+ return fcDouble2_create11(fcMath_smoothStep(a.s[0], b.s[0], c), fcMath_smoothStep(a.s[1], b.s[1], c));
+}
+
+
+//
+// fcDouble3
+//
+
+fcDouble3 fcDouble3_create1(fcDouble v) {
+ return fcDouble3_create111(v, v, v);
+}
+
+void fcDouble3_set1(fcDouble3* self, fcDouble v) {
+ fcDouble3_set111(self, v, v, v);
+}
+
+fcDouble3 fcDouble3_create111(fcDouble x, fcDouble y, fcDouble z) {
+ fcDouble3 result = {{x, y, z}};
+ return result;
+}
+
+void fcDouble3_set111(fcDouble3* self, fcDouble x, fcDouble y, fcDouble z) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+}
+
+fcDouble3 fcDouble3_create12(fcDouble x, fcDouble2 vec1) {
+ return fcDouble3_create111(x, vec1.s[0], vec1.s[1]);
+}
+
+void fcDouble3_set12(fcDouble3* self, fcDouble x, fcDouble2 vec1) {
+ fcDouble3_set111(self, x, vec1.s[0], vec1.s[1]);
+}
+
+fcDouble3 fcDouble3_create21(fcDouble2 vec1, fcDouble z) {
+ return fcDouble3_create111(vec1.s[0], vec1.s[1], z);
+}
+
+void fcDouble3_set21(fcDouble3* self, fcDouble2 vec1, fcDouble z) {
+ fcDouble3_set111(self, vec1.s[0], vec1.s[1], z);
+}
+
+fcDouble3 fcDouble3_create3(fcDouble3 vec1) {
+ return fcDouble3_create111(vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcDouble3_set3(fcDouble3* self, fcDouble3 vec1) {
+ fcDouble3_set111(self, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcByte3 fcDouble3_convertByte3(fcDouble3 a) {
+ return fcByte3_create111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]));
+}
+
+fcShort3 fcDouble3_convertShort3(fcDouble3 a) {
+ return fcShort3_create111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]));
+}
+
+fcInt3 fcDouble3_convertInt3(fcDouble3 a) {
+ return fcInt3_create111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]));
+}
+
+fcLong3 fcDouble3_convertLong3(fcDouble3 a) {
+ return fcLong3_create111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]));
+}
+
+fcFloat3 fcDouble3_convertFloat3(fcDouble3 a) {
+ return fcFloat3_create111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]));
+}
+
+fcDouble2 fcDouble3_asDouble2(fcDouble3 a) {
+ return fcDouble2_create11(a.s[0], a.s[1]);
+}
+
+fcInt3 fcDouble3_isEqual(fcDouble3 a, fcDouble3 b) {
+ return fcInt3_create111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0);
+}
+
+fcInt3 fcDouble3_isNotEqual(fcDouble3 a, fcDouble3 b) {
+ return fcInt3_create111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0);
+}
+
+fcInt3 fcDouble3_isGreater(fcDouble3 a, fcDouble3 b) {
+ return fcInt3_create111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0);
+}
+
+fcInt3 fcDouble3_isGreaterEqual(fcDouble3 a, fcDouble3 b) {
+ return fcInt3_create111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0);
+}
+
+fcInt3 fcDouble3_isLess(fcDouble3 a, fcDouble3 b) {
+ return fcInt3_create111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0);
+}
+
+fcInt3 fcDouble3_isLessEqual(fcDouble3 a, fcDouble3 b) {
+ return fcInt3_create111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0);
+}
+
+fcDouble3 fcDouble3_select(fcDouble3 a, fcDouble3 b, fcInt3 c) {
+ return fcDouble3_create111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]));
+}
+
+fcInt3 fcDouble3_isFinite(fcDouble3 a) {
+ return fcInt3_create111(fcMath_isFinite(a.s[0]), fcMath_isFinite(a.s[1]), fcMath_isFinite(a.s[2]));
+}
+
+fcInt3 fcDouble3_isInf(fcDouble3 a) {
+ return fcInt3_create111(fcMath_isInf(a.s[0]), fcMath_isInf(a.s[1]), fcMath_isInf(a.s[2]));
+}
+
+fcInt3 fcDouble3_isNaN(fcDouble3 a) {
+ return fcInt3_create111(fcMath_isNaN(a.s[0]), fcMath_isNaN(a.s[1]), fcMath_isNaN(a.s[2]));
+}
+
+fcInt3 fcDouble3_isNormal(fcDouble3 a) {
+ return fcInt3_create111(fcMath_isNormal(a.s[0]), fcMath_isNormal(a.s[1]), fcMath_isNormal(a.s[2]));
+}
+
+fcInt3 fcDouble3_isOrdered(fcDouble3 a, fcDouble3 b) {
+ return fcInt3_create111(fcMath_isOrdered(a.s[0], b.s[0]), fcMath_isOrdered(a.s[1], b.s[1]), fcMath_isOrdered(a.s[2], b.s[2]));
+}
+
+fcInt3 fcDouble3_isUnordered(fcDouble3 a, fcDouble3 b) {
+ return fcInt3_create111(fcMath_isUnordered(a.s[0], b.s[0]), fcMath_isUnordered(a.s[1], b.s[1]), fcMath_isUnordered(a.s[2], b.s[2]));
+}
+
+fcInt fcDouble3_any(fcDouble3 a) {
+ return a.s[0] != 0.0 || a.s[1] != 0.0 || a.s[2] != 0.0;
+}
+
+fcInt fcDouble3_all(fcDouble3 a) {
+ return !(a.s[0] == 0.0 || a.s[1] == 0.0 || a.s[2] == 0.0);
+}
+
+fcDouble3 fcDouble3_neg(fcDouble3 a) {
+ return fcDouble3_create111(-a.s[0], -a.s[1], -a.s[2]);
+}
+
+fcDouble3 fcDouble3_add(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2]);
+}
+
+fcDouble3 fcDouble3_sub(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2]);
+}
+
+fcDouble3 fcDouble3_muld(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]));
+}
+
+fcFloat3 fcDouble3_mulf(fcDouble3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]));
+}
+
+fcDouble3 fcDouble3_mulkd(fcDouble3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k));
+}
+
+fcFloat3 fcDouble3_mulkf(fcDouble3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k));
+}
+
+fcDouble3 fcDouble3_divd(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]));
+}
+
+fcFloat3 fcDouble3_divf(fcDouble3 a, fcFloat3 b) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]));
+}
+
+fcDouble3 fcDouble3_divkd(fcDouble3 a, fcDouble k) {
+ return fcDouble3_create111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k));
+}
+
+fcFloat3 fcDouble3_divkf(fcDouble3 a, fcFloat k) {
+ return fcFloat3_create111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k));
+}
+
+fcDouble3 fcDouble3_cross(fcDouble3 a, fcDouble3 b) {
+ fcDouble resX = a.s[1] * b.s[2] - a.s[2] * b.s[1];
+ fcDouble resY = a.s[2] * b.s[0] - a.s[0] * b.s[2];
+ fcDouble resZ = a.s[0] * b.s[1] - a.s[1] * b.s[0];
+ return fcDouble3_create111(resX, resY, resZ);
+}
+
+fcDouble fcDouble3_dot(fcDouble3 a, fcDouble3 b) {
+ return a.s[0] * b.s[0] + a.s[1] * b.s[1] + a.s[2] * b.s[2];
+}
+
+fcDouble fcDouble3_distance(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_length(fcDouble3_sub(a, b));
+}
+
+fcDouble fcDouble3_length(fcDouble3 a) {
+ return fcMath_sqrt(a.s[0] * a.s[0] + a.s[1] * a.s[1] + a.s[2] * a.s[2]);
+}
+
+fcDouble3 fcDouble3_normalize(fcDouble3 a) {
+ fcDouble len = fcDouble3_length(a);
+ return fcDouble3_create111((fcDouble)(a.s[0] / len), (fcDouble)(a.s[1] / len), (fcDouble)(a.s[2] / len));
+}
+
+fcDouble3 fcDouble3_abs(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]));
+}
+
+fcDouble3 fcDouble3_clamp(fcDouble3 a, fcDouble3 b, fcDouble3 c) {
+ return fcDouble3_create111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]));
+}
+
+fcDouble3 fcDouble3_max(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_maxMag(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_min(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_minMag(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_mix(fcDouble3 a, fcDouble3 b, fcDouble3 c) {
+ return fcDouble3_create111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]));
+}
+
+fcDouble3 fcDouble3_clampk(fcDouble3 v, fcDouble min, fcDouble max) {
+ return fcDouble3_create111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max));
+}
+
+fcDouble3 fcDouble3_maxk(fcDouble3 x, fcDouble y) {
+ return fcDouble3_create111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y));
+}
+
+fcDouble3 fcDouble3_mink(fcDouble3 x, fcDouble y) {
+ return fcDouble3_create111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y));
+}
+
+fcDouble3 fcDouble3_mixk(fcDouble3 x, fcDouble3 y, fcDouble a) {
+ return fcDouble3_create111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a));
+}
+
+fcDouble3 fcDouble3_acos(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_acos(a.s[0]), fcMath_acos(a.s[1]), fcMath_acos(a.s[2]));
+}
+
+fcDouble3 fcDouble3_acosh(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_acosh(a.s[0]), fcMath_acosh(a.s[1]), fcMath_acosh(a.s[2]));
+}
+
+fcDouble3 fcDouble3_asin(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_asin(a.s[0]), fcMath_asin(a.s[1]), fcMath_asin(a.s[2]));
+}
+
+fcDouble3 fcDouble3_asinh(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_asinh(a.s[0]), fcMath_asinh(a.s[1]), fcMath_asinh(a.s[2]));
+}
+
+fcDouble3 fcDouble3_atan(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_atan(a.s[0]), fcMath_atan(a.s[1]), fcMath_atan(a.s[2]));
+}
+
+fcDouble3 fcDouble3_atan2(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_atan2(a.s[0], b.s[0]), fcMath_atan2(a.s[1], b.s[1]), fcMath_atan2(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_atanh(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_atanh(a.s[0]), fcMath_atanh(a.s[1]), fcMath_atanh(a.s[2]));
+}
+
+fcDouble3 fcDouble3_cbrt(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_cbrt(a.s[0]), fcMath_cbrt(a.s[1]), fcMath_cbrt(a.s[2]));
+}
+
+fcDouble3 fcDouble3_ceil(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_ceil(a.s[0]), fcMath_ceil(a.s[1]), fcMath_ceil(a.s[2]));
+}
+
+fcDouble3 fcDouble3_copySign(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_copySign(a.s[0], b.s[0]), fcMath_copySign(a.s[1], b.s[1]), fcMath_copySign(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_cos(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_cos(a.s[0]), fcMath_cos(a.s[1]), fcMath_cos(a.s[2]));
+}
+
+fcDouble3 fcDouble3_cosh(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_cosh(a.s[0]), fcMath_cosh(a.s[1]), fcMath_cosh(a.s[2]));
+}
+
+fcDouble3 fcDouble3_erf(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_erf(a.s[0]), fcMath_erf(a.s[1]), fcMath_erf(a.s[2]));
+}
+
+fcDouble3 fcDouble3_erfc(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_erfc(a.s[0]), fcMath_erfc(a.s[1]), fcMath_erfc(a.s[2]));
+}
+
+fcDouble3 fcDouble3_exp(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_exp(a.s[0]), fcMath_exp(a.s[1]), fcMath_exp(a.s[2]));
+}
+
+fcDouble3 fcDouble3_exp10(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_exp10(a.s[0]), fcMath_exp10(a.s[1]), fcMath_exp10(a.s[2]));
+}
+
+fcDouble3 fcDouble3_exp2(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_exp2(a.s[0]), fcMath_exp2(a.s[1]), fcMath_exp2(a.s[2]));
+}
+
+fcDouble3 fcDouble3_expm1(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_expm1(a.s[0]), fcMath_expm1(a.s[1]), fcMath_expm1(a.s[2]));
+}
+
+fcDouble3 fcDouble3_fdim(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_fdim(a.s[0], b.s[0]), fcMath_fdim(a.s[1], b.s[1]), fcMath_fdim(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_floor(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_floor(a.s[0]), fcMath_floor(a.s[1]), fcMath_floor(a.s[2]));
+}
+
+fcDouble3 fcDouble3_fma(fcDouble3 a, fcDouble3 b, fcDouble3 c) {
+ return fcDouble3_create111(fcMath_fma(a.s[0], b.s[0], c.s[0]), fcMath_fma(a.s[1], b.s[1], c.s[1]), fcMath_fma(a.s[2], b.s[2], c.s[2]));
+}
+
+fcDouble3 fcDouble3_fmod(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_fmod(a.s[0], b.s[0]), fcMath_fmod(a.s[1], b.s[1]), fcMath_fmod(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_fract(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_fract(a.s[0]), fcMath_fract(a.s[1]), fcMath_fract(a.s[2]));
+}
+
+fcDouble3 fcDouble3_frexp(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_frexp(a.s[0]), fcMath_frexp(a.s[1]), fcMath_frexp(a.s[2]));
+}
+
+fcDouble3 fcDouble3_getExponent(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_getExponent(a.s[0]), fcMath_getExponent(a.s[1]), fcMath_getExponent(a.s[2]));
+}
+
+fcDouble3 fcDouble3_hypot(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_hypot(a.s[0], b.s[0]), fcMath_hypot(a.s[1], b.s[1]), fcMath_hypot(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_lgamma(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_lgamma(a.s[0]), fcMath_lgamma(a.s[1]), fcMath_lgamma(a.s[2]));
+}
+
+fcDouble3 fcDouble3_log(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_log(a.s[0]), fcMath_log(a.s[1]), fcMath_log(a.s[2]));
+}
+
+fcDouble3 fcDouble3_log10(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_log10(a.s[0]), fcMath_log10(a.s[1]), fcMath_log10(a.s[2]));
+}
+
+fcDouble3 fcDouble3_log1p(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_log1p(a.s[0]), fcMath_log1p(a.s[1]), fcMath_log1p(a.s[2]));
+}
+
+fcDouble3 fcDouble3_log2(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_log2(a.s[0]), fcMath_log2(a.s[1]), fcMath_log2(a.s[2]));
+}
+
+fcDouble3 fcDouble3_logb(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_logb(a.s[0]), fcMath_logb(a.s[1]), fcMath_logb(a.s[2]));
+}
+
+fcDouble3 fcDouble3_mad(fcDouble3 a, fcDouble3 b, fcDouble3 c) {
+ return fcDouble3_create111(fcMath_mad(a.s[0], b.s[0], c.s[0]), fcMath_mad(a.s[1], b.s[1], c.s[1]), fcMath_mad(a.s[2], b.s[2], c.s[2]));
+}
+
+fcDouble3 fcDouble3_nextAfter(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_nextAfter(a.s[0], b.s[0]), fcMath_nextAfter(a.s[1], b.s[1]), fcMath_nextAfter(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_pow(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_pow(a.s[0], b.s[0]), fcMath_pow(a.s[1], b.s[1]), fcMath_pow(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_powr(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_powr(a.s[0], b.s[0]), fcMath_powr(a.s[1], b.s[1]), fcMath_powr(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_remainder(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_remainder(a.s[0], b.s[0]), fcMath_remainder(a.s[1], b.s[1]), fcMath_remainder(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_rint(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_rint(a.s[0]), fcMath_rint(a.s[1]), fcMath_rint(a.s[2]));
+}
+
+fcDouble3 fcDouble3_round(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_round(a.s[0]), fcMath_round(a.s[1]), fcMath_round(a.s[2]));
+}
+
+fcDouble3 fcDouble3_rsqrt(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_rsqrt(a.s[0]), fcMath_rsqrt(a.s[1]), fcMath_rsqrt(a.s[2]));
+}
+
+fcDouble3 fcDouble3_signum(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_signum(a.s[0]), fcMath_signum(a.s[1]), fcMath_signum(a.s[2]));
+}
+
+fcDouble3 fcDouble3_sin(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_sin(a.s[0]), fcMath_sin(a.s[1]), fcMath_sin(a.s[2]));
+}
+
+fcDouble3 fcDouble3_sinh(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_sinh(a.s[0]), fcMath_sinh(a.s[1]), fcMath_sinh(a.s[2]));
+}
+
+fcDouble3 fcDouble3_smoothStep(fcDouble3 a, fcDouble3 b, fcDouble3 c) {
+ return fcDouble3_create111(fcMath_smoothStep(a.s[0], b.s[0], c.s[0]), fcMath_smoothStep(a.s[1], b.s[1], c.s[1]), fcMath_smoothStep(a.s[2], b.s[2], c.s[2]));
+}
+
+fcDouble3 fcDouble3_sqrt(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_sqrt(a.s[0]), fcMath_sqrt(a.s[1]), fcMath_sqrt(a.s[2]));
+}
+
+fcDouble3 fcDouble3_step(fcDouble3 a, fcDouble3 b) {
+ return fcDouble3_create111(fcMath_step(a.s[0], b.s[0]), fcMath_step(a.s[1], b.s[1]), fcMath_step(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_tan(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_tan(a.s[0]), fcMath_tan(a.s[1]), fcMath_tan(a.s[2]));
+}
+
+fcDouble3 fcDouble3_tanh(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_tanh(a.s[0]), fcMath_tanh(a.s[1]), fcMath_tanh(a.s[2]));
+}
+
+fcDouble3 fcDouble3_tgamma(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_tgamma(a.s[0]), fcMath_tgamma(a.s[1]), fcMath_tgamma(a.s[2]));
+}
+
+fcDouble3 fcDouble3_toDegrees(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_toDegrees(a.s[0]), fcMath_toDegrees(a.s[1]), fcMath_toDegrees(a.s[2]));
+}
+
+fcDouble3 fcDouble3_toRadians(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_toRadians(a.s[0]), fcMath_toRadians(a.s[1]), fcMath_toRadians(a.s[2]));
+}
+
+fcDouble3 fcDouble3_trunc(fcDouble3 a) {
+ return fcDouble3_create111(fcMath_trunc(a.s[0]), fcMath_trunc(a.s[1]), fcMath_trunc(a.s[2]));
+}
+
+fcDouble3 fcDouble3_scalb(fcDouble3 a, fcInt3 n) {
+ return fcDouble3_create111(fcMath_scalb(a.s[0], n.s[0]), fcMath_scalb(a.s[1], n.s[1]), fcMath_scalb(a.s[2], n.s[2]));
+}
+
+fcDouble3 fcDouble3_ldexp(fcDouble3 a, fcInt3 n) {
+ return fcDouble3_create111(fcMath_ldexp(a.s[0], n.s[0]), fcMath_ldexp(a.s[1], n.s[1]), fcMath_ldexp(a.s[2], n.s[2]));
+}
+
+fcDouble3 fcDouble3_pown(fcDouble3 a, fcInt3 b) {
+ return fcDouble3_create111(fcMath_pown(a.s[0], b.s[0]), fcMath_pown(a.s[1], b.s[1]), fcMath_pown(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_rootn(fcDouble3 a, fcInt3 b) {
+ return fcDouble3_create111(fcMath_rootn(a.s[0], b.s[0]), fcMath_rootn(a.s[1], b.s[1]), fcMath_rootn(a.s[2], b.s[2]));
+}
+
+fcDouble3 fcDouble3_smoothStepk(fcDouble3 a, fcDouble3 b, fcDouble c) {
+ return fcDouble3_create111(fcMath_smoothStep(a.s[0], b.s[0], c), fcMath_smoothStep(a.s[1], b.s[1], c), fcMath_smoothStep(a.s[2], b.s[2], c));
+}
+
+
+//
+// fcDouble4
+//
+
+fcDouble4 fcDouble4_create1(fcDouble v) {
+ return fcDouble4_create1111(v, v, v, v);
+}
+
+void fcDouble4_set1(fcDouble4* self, fcDouble v) {
+ fcDouble4_set1111(self, v, v, v, v);
+}
+
+fcDouble4 fcDouble4_create1111(fcDouble x, fcDouble y, fcDouble z, fcDouble w) {
+ fcDouble4 result = {{x, y, z, w}};
+ return result;
+}
+
+void fcDouble4_set1111(fcDouble4* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+}
+
+fcDouble4 fcDouble4_create112(fcDouble x, fcDouble y, fcDouble2 vec1) {
+ return fcDouble4_create1111(x, y, vec1.s[0], vec1.s[1]);
+}
+
+void fcDouble4_set112(fcDouble4* self, fcDouble x, fcDouble y, fcDouble2 vec1) {
+ fcDouble4_set1111(self, x, y, vec1.s[0], vec1.s[1]);
+}
+
+fcDouble4 fcDouble4_create121(fcDouble x, fcDouble2 vec1, fcDouble w) {
+ return fcDouble4_create1111(x, vec1.s[0], vec1.s[1], w);
+}
+
+void fcDouble4_set121(fcDouble4* self, fcDouble x, fcDouble2 vec1, fcDouble w) {
+ fcDouble4_set1111(self, x, vec1.s[0], vec1.s[1], w);
+}
+
+fcDouble4 fcDouble4_create13(fcDouble x, fcDouble3 vec1) {
+ return fcDouble4_create1111(x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcDouble4_set13(fcDouble4* self, fcDouble x, fcDouble3 vec1) {
+ fcDouble4_set1111(self, x, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcDouble4 fcDouble4_create211(fcDouble2 vec1, fcDouble z, fcDouble w) {
+ return fcDouble4_create1111(vec1.s[0], vec1.s[1], z, w);
+}
+
+void fcDouble4_set211(fcDouble4* self, fcDouble2 vec1, fcDouble z, fcDouble w) {
+ fcDouble4_set1111(self, vec1.s[0], vec1.s[1], z, w);
+}
+
+fcDouble4 fcDouble4_create22(fcDouble2 vec1, fcDouble2 vec2) {
+ return fcDouble4_create1111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble4_set22(fcDouble4* self, fcDouble2 vec1, fcDouble2 vec2) {
+ fcDouble4_set1111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcDouble4 fcDouble4_create31(fcDouble3 vec1, fcDouble w) {
+ return fcDouble4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+void fcDouble4_set31(fcDouble4* self, fcDouble3 vec1, fcDouble w) {
+ fcDouble4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], w);
+}
+
+fcDouble4 fcDouble4_create4(fcDouble4 vec1) {
+ return fcDouble4_create1111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcDouble4_set4(fcDouble4* self, fcDouble4 vec1) {
+ fcDouble4_set1111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcDouble2 fcDouble4_odd(fcDouble4 a) {
+ return fcDouble2_create11(a.s[1], a.s[3]);
+}
+
+fcDouble2 fcDouble4_even(fcDouble4 a) {
+ return fcDouble2_create11(a.s[0], a.s[2]);
+}
+
+fcByte4 fcDouble4_convertByte4(fcDouble4 a) {
+ return fcByte4_create1111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]));
+}
+
+fcShort4 fcDouble4_convertShort4(fcDouble4 a) {
+ return fcShort4_create1111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]), (fcShort)(a.s[3]));
+}
+
+fcInt4 fcDouble4_convertInt4(fcDouble4 a) {
+ return fcInt4_create1111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]), (fcInt)(a.s[3]));
+}
+
+fcLong4 fcDouble4_convertLong4(fcDouble4 a) {
+ return fcLong4_create1111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]), (fcLong)(a.s[3]));
+}
+
+fcFloat4 fcDouble4_convertFloat4(fcDouble4 a) {
+ return fcFloat4_create1111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]), (fcFloat)(a.s[3]));
+}
+
+fcDouble2 fcDouble4_asDouble2(fcDouble4 a) {
+ return fcDouble2_create11(a.s[0], a.s[1]);
+}
+
+fcDouble3 fcDouble4_asDouble3(fcDouble4 a) {
+ return fcDouble3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcInt4 fcDouble4_isEqual(fcDouble4 a, fcDouble4 b) {
+ return fcInt4_create1111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0);
+}
+
+fcInt4 fcDouble4_isNotEqual(fcDouble4 a, fcDouble4 b) {
+ return fcInt4_create1111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0);
+}
+
+fcInt4 fcDouble4_isGreater(fcDouble4 a, fcDouble4 b) {
+ return fcInt4_create1111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0);
+}
+
+fcInt4 fcDouble4_isGreaterEqual(fcDouble4 a, fcDouble4 b) {
+ return fcInt4_create1111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0);
+}
+
+fcInt4 fcDouble4_isLess(fcDouble4 a, fcDouble4 b) {
+ return fcInt4_create1111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0);
+}
+
+fcInt4 fcDouble4_isLessEqual(fcDouble4 a, fcDouble4 b) {
+ return fcInt4_create1111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0);
+}
+
+fcDouble4 fcDouble4_select(fcDouble4 a, fcDouble4 b, fcInt4 c) {
+ return fcDouble4_create1111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]));
+}
+
+fcInt4 fcDouble4_isFinite(fcDouble4 a) {
+ return fcInt4_create1111(fcMath_isFinite(a.s[0]), fcMath_isFinite(a.s[1]), fcMath_isFinite(a.s[2]), fcMath_isFinite(a.s[3]));
+}
+
+fcInt4 fcDouble4_isInf(fcDouble4 a) {
+ return fcInt4_create1111(fcMath_isInf(a.s[0]), fcMath_isInf(a.s[1]), fcMath_isInf(a.s[2]), fcMath_isInf(a.s[3]));
+}
+
+fcInt4 fcDouble4_isNaN(fcDouble4 a) {
+ return fcInt4_create1111(fcMath_isNaN(a.s[0]), fcMath_isNaN(a.s[1]), fcMath_isNaN(a.s[2]), fcMath_isNaN(a.s[3]));
+}
+
+fcInt4 fcDouble4_isNormal(fcDouble4 a) {
+ return fcInt4_create1111(fcMath_isNormal(a.s[0]), fcMath_isNormal(a.s[1]), fcMath_isNormal(a.s[2]), fcMath_isNormal(a.s[3]));
+}
+
+fcInt4 fcDouble4_isOrdered(fcDouble4 a, fcDouble4 b) {
+ return fcInt4_create1111(fcMath_isOrdered(a.s[0], b.s[0]), fcMath_isOrdered(a.s[1], b.s[1]), fcMath_isOrdered(a.s[2], b.s[2]), fcMath_isOrdered(a.s[3], b.s[3]));
+}
+
+fcInt4 fcDouble4_isUnordered(fcDouble4 a, fcDouble4 b) {
+ return fcInt4_create1111(fcMath_isUnordered(a.s[0], b.s[0]), fcMath_isUnordered(a.s[1], b.s[1]), fcMath_isUnordered(a.s[2], b.s[2]), fcMath_isUnordered(a.s[3], b.s[3]));
+}
+
+fcInt fcDouble4_any(fcDouble4 a) {
+ return a.s[0] != 0.0 || a.s[1] != 0.0 || a.s[2] != 0.0 || a.s[3] != 0.0;
+}
+
+fcInt fcDouble4_all(fcDouble4 a) {
+ return !(a.s[0] == 0.0 || a.s[1] == 0.0 || a.s[2] == 0.0 || a.s[3] == 0.0);
+}
+
+fcDouble4 fcDouble4_neg(fcDouble4 a) {
+ return fcDouble4_create1111(-a.s[0], -a.s[1], -a.s[2], -a.s[3]);
+}
+
+fcDouble4 fcDouble4_add(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3]);
+}
+
+fcDouble4 fcDouble4_sub(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3]);
+}
+
+fcDouble4 fcDouble4_muld(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]));
+}
+
+fcFloat4 fcDouble4_mulf(fcDouble4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]));
+}
+
+fcDouble4 fcDouble4_mulkd(fcDouble4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k));
+}
+
+fcFloat4 fcDouble4_mulkf(fcDouble4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k));
+}
+
+fcDouble4 fcDouble4_divd(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]));
+}
+
+fcFloat4 fcDouble4_divf(fcDouble4 a, fcFloat4 b) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]));
+}
+
+fcDouble4 fcDouble4_divkd(fcDouble4 a, fcDouble k) {
+ return fcDouble4_create1111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k));
+}
+
+fcFloat4 fcDouble4_divkf(fcDouble4 a, fcFloat k) {
+ return fcFloat4_create1111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k));
+}
+
+fcDouble4 fcDouble4_cross(fcDouble4 a, fcDouble4 b) {
+ fcDouble resX = a.s[1] * b.s[2] - a.s[2] * b.s[1];
+ fcDouble resY = a.s[2] * b.s[0] - a.s[0] * b.s[2];
+ fcDouble resZ = a.s[0] * b.s[1] - a.s[1] * b.s[0];
+ return fcDouble4_create1111(resX, resY, resZ, 0.0);
+}
+
+fcDouble fcDouble4_dot(fcDouble4 a, fcDouble4 b) {
+ return a.s[0] * b.s[0] + a.s[1] * b.s[1] + a.s[2] * b.s[2] + a.s[3] * b.s[3];
+}
+
+fcDouble fcDouble4_distance(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_length(fcDouble4_sub(a, b));
+}
+
+fcDouble fcDouble4_length(fcDouble4 a) {
+ return fcMath_sqrt(a.s[0] * a.s[0] + a.s[1] * a.s[1] + a.s[2] * a.s[2] + a.s[3] * a.s[3]);
+}
+
+fcDouble4 fcDouble4_normalize(fcDouble4 a) {
+ fcDouble len = fcDouble4_length(a);
+ return fcDouble4_create1111((fcDouble)(a.s[0] / len), (fcDouble)(a.s[1] / len), (fcDouble)(a.s[2] / len), (fcDouble)(a.s[3] / len));
+}
+
+fcDouble4 fcDouble4_abs(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]));
+}
+
+fcDouble4 fcDouble4_clamp(fcDouble4 a, fcDouble4 b, fcDouble4 c) {
+ return fcDouble4_create1111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]));
+}
+
+fcDouble4 fcDouble4_max(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_maxMag(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_min(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_minMag(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_mix(fcDouble4 a, fcDouble4 b, fcDouble4 c) {
+ return fcDouble4_create1111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]));
+}
+
+fcDouble4 fcDouble4_clampk(fcDouble4 v, fcDouble min, fcDouble max) {
+ return fcDouble4_create1111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max));
+}
+
+fcDouble4 fcDouble4_maxk(fcDouble4 x, fcDouble y) {
+ return fcDouble4_create1111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y));
+}
+
+fcDouble4 fcDouble4_mink(fcDouble4 x, fcDouble y) {
+ return fcDouble4_create1111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y));
+}
+
+fcDouble4 fcDouble4_mixk(fcDouble4 x, fcDouble4 y, fcDouble a) {
+ return fcDouble4_create1111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a));
+}
+
+fcDouble4 fcDouble4_acos(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_acos(a.s[0]), fcMath_acos(a.s[1]), fcMath_acos(a.s[2]), fcMath_acos(a.s[3]));
+}
+
+fcDouble4 fcDouble4_acosh(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_acosh(a.s[0]), fcMath_acosh(a.s[1]), fcMath_acosh(a.s[2]), fcMath_acosh(a.s[3]));
+}
+
+fcDouble4 fcDouble4_asin(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_asin(a.s[0]), fcMath_asin(a.s[1]), fcMath_asin(a.s[2]), fcMath_asin(a.s[3]));
+}
+
+fcDouble4 fcDouble4_asinh(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_asinh(a.s[0]), fcMath_asinh(a.s[1]), fcMath_asinh(a.s[2]), fcMath_asinh(a.s[3]));
+}
+
+fcDouble4 fcDouble4_atan(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_atan(a.s[0]), fcMath_atan(a.s[1]), fcMath_atan(a.s[2]), fcMath_atan(a.s[3]));
+}
+
+fcDouble4 fcDouble4_atan2(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_atan2(a.s[0], b.s[0]), fcMath_atan2(a.s[1], b.s[1]), fcMath_atan2(a.s[2], b.s[2]), fcMath_atan2(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_atanh(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_atanh(a.s[0]), fcMath_atanh(a.s[1]), fcMath_atanh(a.s[2]), fcMath_atanh(a.s[3]));
+}
+
+fcDouble4 fcDouble4_cbrt(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_cbrt(a.s[0]), fcMath_cbrt(a.s[1]), fcMath_cbrt(a.s[2]), fcMath_cbrt(a.s[3]));
+}
+
+fcDouble4 fcDouble4_ceil(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_ceil(a.s[0]), fcMath_ceil(a.s[1]), fcMath_ceil(a.s[2]), fcMath_ceil(a.s[3]));
+}
+
+fcDouble4 fcDouble4_copySign(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_copySign(a.s[0], b.s[0]), fcMath_copySign(a.s[1], b.s[1]), fcMath_copySign(a.s[2], b.s[2]), fcMath_copySign(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_cos(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_cos(a.s[0]), fcMath_cos(a.s[1]), fcMath_cos(a.s[2]), fcMath_cos(a.s[3]));
+}
+
+fcDouble4 fcDouble4_cosh(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_cosh(a.s[0]), fcMath_cosh(a.s[1]), fcMath_cosh(a.s[2]), fcMath_cosh(a.s[3]));
+}
+
+fcDouble4 fcDouble4_erf(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_erf(a.s[0]), fcMath_erf(a.s[1]), fcMath_erf(a.s[2]), fcMath_erf(a.s[3]));
+}
+
+fcDouble4 fcDouble4_erfc(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_erfc(a.s[0]), fcMath_erfc(a.s[1]), fcMath_erfc(a.s[2]), fcMath_erfc(a.s[3]));
+}
+
+fcDouble4 fcDouble4_exp(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_exp(a.s[0]), fcMath_exp(a.s[1]), fcMath_exp(a.s[2]), fcMath_exp(a.s[3]));
+}
+
+fcDouble4 fcDouble4_exp10(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_exp10(a.s[0]), fcMath_exp10(a.s[1]), fcMath_exp10(a.s[2]), fcMath_exp10(a.s[3]));
+}
+
+fcDouble4 fcDouble4_exp2(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_exp2(a.s[0]), fcMath_exp2(a.s[1]), fcMath_exp2(a.s[2]), fcMath_exp2(a.s[3]));
+}
+
+fcDouble4 fcDouble4_expm1(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_expm1(a.s[0]), fcMath_expm1(a.s[1]), fcMath_expm1(a.s[2]), fcMath_expm1(a.s[3]));
+}
+
+fcDouble4 fcDouble4_fdim(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_fdim(a.s[0], b.s[0]), fcMath_fdim(a.s[1], b.s[1]), fcMath_fdim(a.s[2], b.s[2]), fcMath_fdim(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_floor(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_floor(a.s[0]), fcMath_floor(a.s[1]), fcMath_floor(a.s[2]), fcMath_floor(a.s[3]));
+}
+
+fcDouble4 fcDouble4_fma(fcDouble4 a, fcDouble4 b, fcDouble4 c) {
+ return fcDouble4_create1111(fcMath_fma(a.s[0], b.s[0], c.s[0]), fcMath_fma(a.s[1], b.s[1], c.s[1]), fcMath_fma(a.s[2], b.s[2], c.s[2]), fcMath_fma(a.s[3], b.s[3], c.s[3]));
+}
+
+fcDouble4 fcDouble4_fmod(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_fmod(a.s[0], b.s[0]), fcMath_fmod(a.s[1], b.s[1]), fcMath_fmod(a.s[2], b.s[2]), fcMath_fmod(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_fract(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_fract(a.s[0]), fcMath_fract(a.s[1]), fcMath_fract(a.s[2]), fcMath_fract(a.s[3]));
+}
+
+fcDouble4 fcDouble4_frexp(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_frexp(a.s[0]), fcMath_frexp(a.s[1]), fcMath_frexp(a.s[2]), fcMath_frexp(a.s[3]));
+}
+
+fcDouble4 fcDouble4_getExponent(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_getExponent(a.s[0]), fcMath_getExponent(a.s[1]), fcMath_getExponent(a.s[2]), fcMath_getExponent(a.s[3]));
+}
+
+fcDouble4 fcDouble4_hypot(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_hypot(a.s[0], b.s[0]), fcMath_hypot(a.s[1], b.s[1]), fcMath_hypot(a.s[2], b.s[2]), fcMath_hypot(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_lgamma(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_lgamma(a.s[0]), fcMath_lgamma(a.s[1]), fcMath_lgamma(a.s[2]), fcMath_lgamma(a.s[3]));
+}
+
+fcDouble4 fcDouble4_log(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_log(a.s[0]), fcMath_log(a.s[1]), fcMath_log(a.s[2]), fcMath_log(a.s[3]));
+}
+
+fcDouble4 fcDouble4_log10(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_log10(a.s[0]), fcMath_log10(a.s[1]), fcMath_log10(a.s[2]), fcMath_log10(a.s[3]));
+}
+
+fcDouble4 fcDouble4_log1p(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_log1p(a.s[0]), fcMath_log1p(a.s[1]), fcMath_log1p(a.s[2]), fcMath_log1p(a.s[3]));
+}
+
+fcDouble4 fcDouble4_log2(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_log2(a.s[0]), fcMath_log2(a.s[1]), fcMath_log2(a.s[2]), fcMath_log2(a.s[3]));
+}
+
+fcDouble4 fcDouble4_logb(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_logb(a.s[0]), fcMath_logb(a.s[1]), fcMath_logb(a.s[2]), fcMath_logb(a.s[3]));
+}
+
+fcDouble4 fcDouble4_mad(fcDouble4 a, fcDouble4 b, fcDouble4 c) {
+ return fcDouble4_create1111(fcMath_mad(a.s[0], b.s[0], c.s[0]), fcMath_mad(a.s[1], b.s[1], c.s[1]), fcMath_mad(a.s[2], b.s[2], c.s[2]), fcMath_mad(a.s[3], b.s[3], c.s[3]));
+}
+
+fcDouble4 fcDouble4_nextAfter(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_nextAfter(a.s[0], b.s[0]), fcMath_nextAfter(a.s[1], b.s[1]), fcMath_nextAfter(a.s[2], b.s[2]), fcMath_nextAfter(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_pow(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_pow(a.s[0], b.s[0]), fcMath_pow(a.s[1], b.s[1]), fcMath_pow(a.s[2], b.s[2]), fcMath_pow(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_powr(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_powr(a.s[0], b.s[0]), fcMath_powr(a.s[1], b.s[1]), fcMath_powr(a.s[2], b.s[2]), fcMath_powr(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_remainder(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_remainder(a.s[0], b.s[0]), fcMath_remainder(a.s[1], b.s[1]), fcMath_remainder(a.s[2], b.s[2]), fcMath_remainder(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_rint(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_rint(a.s[0]), fcMath_rint(a.s[1]), fcMath_rint(a.s[2]), fcMath_rint(a.s[3]));
+}
+
+fcDouble4 fcDouble4_round(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_round(a.s[0]), fcMath_round(a.s[1]), fcMath_round(a.s[2]), fcMath_round(a.s[3]));
+}
+
+fcDouble4 fcDouble4_rsqrt(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_rsqrt(a.s[0]), fcMath_rsqrt(a.s[1]), fcMath_rsqrt(a.s[2]), fcMath_rsqrt(a.s[3]));
+}
+
+fcDouble4 fcDouble4_signum(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_signum(a.s[0]), fcMath_signum(a.s[1]), fcMath_signum(a.s[2]), fcMath_signum(a.s[3]));
+}
+
+fcDouble4 fcDouble4_sin(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_sin(a.s[0]), fcMath_sin(a.s[1]), fcMath_sin(a.s[2]), fcMath_sin(a.s[3]));
+}
+
+fcDouble4 fcDouble4_sinh(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_sinh(a.s[0]), fcMath_sinh(a.s[1]), fcMath_sinh(a.s[2]), fcMath_sinh(a.s[3]));
+}
+
+fcDouble4 fcDouble4_smoothStep(fcDouble4 a, fcDouble4 b, fcDouble4 c) {
+ return fcDouble4_create1111(fcMath_smoothStep(a.s[0], b.s[0], c.s[0]), fcMath_smoothStep(a.s[1], b.s[1], c.s[1]), fcMath_smoothStep(a.s[2], b.s[2], c.s[2]), fcMath_smoothStep(a.s[3], b.s[3], c.s[3]));
+}
+
+fcDouble4 fcDouble4_sqrt(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_sqrt(a.s[0]), fcMath_sqrt(a.s[1]), fcMath_sqrt(a.s[2]), fcMath_sqrt(a.s[3]));
+}
+
+fcDouble4 fcDouble4_step(fcDouble4 a, fcDouble4 b) {
+ return fcDouble4_create1111(fcMath_step(a.s[0], b.s[0]), fcMath_step(a.s[1], b.s[1]), fcMath_step(a.s[2], b.s[2]), fcMath_step(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_tan(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_tan(a.s[0]), fcMath_tan(a.s[1]), fcMath_tan(a.s[2]), fcMath_tan(a.s[3]));
+}
+
+fcDouble4 fcDouble4_tanh(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_tanh(a.s[0]), fcMath_tanh(a.s[1]), fcMath_tanh(a.s[2]), fcMath_tanh(a.s[3]));
+}
+
+fcDouble4 fcDouble4_tgamma(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_tgamma(a.s[0]), fcMath_tgamma(a.s[1]), fcMath_tgamma(a.s[2]), fcMath_tgamma(a.s[3]));
+}
+
+fcDouble4 fcDouble4_toDegrees(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_toDegrees(a.s[0]), fcMath_toDegrees(a.s[1]), fcMath_toDegrees(a.s[2]), fcMath_toDegrees(a.s[3]));
+}
+
+fcDouble4 fcDouble4_toRadians(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_toRadians(a.s[0]), fcMath_toRadians(a.s[1]), fcMath_toRadians(a.s[2]), fcMath_toRadians(a.s[3]));
+}
+
+fcDouble4 fcDouble4_trunc(fcDouble4 a) {
+ return fcDouble4_create1111(fcMath_trunc(a.s[0]), fcMath_trunc(a.s[1]), fcMath_trunc(a.s[2]), fcMath_trunc(a.s[3]));
+}
+
+fcDouble4 fcDouble4_scalb(fcDouble4 a, fcInt4 n) {
+ return fcDouble4_create1111(fcMath_scalb(a.s[0], n.s[0]), fcMath_scalb(a.s[1], n.s[1]), fcMath_scalb(a.s[2], n.s[2]), fcMath_scalb(a.s[3], n.s[3]));
+}
+
+fcDouble4 fcDouble4_ldexp(fcDouble4 a, fcInt4 n) {
+ return fcDouble4_create1111(fcMath_ldexp(a.s[0], n.s[0]), fcMath_ldexp(a.s[1], n.s[1]), fcMath_ldexp(a.s[2], n.s[2]), fcMath_ldexp(a.s[3], n.s[3]));
+}
+
+fcDouble4 fcDouble4_pown(fcDouble4 a, fcInt4 b) {
+ return fcDouble4_create1111(fcMath_pown(a.s[0], b.s[0]), fcMath_pown(a.s[1], b.s[1]), fcMath_pown(a.s[2], b.s[2]), fcMath_pown(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_rootn(fcDouble4 a, fcInt4 b) {
+ return fcDouble4_create1111(fcMath_rootn(a.s[0], b.s[0]), fcMath_rootn(a.s[1], b.s[1]), fcMath_rootn(a.s[2], b.s[2]), fcMath_rootn(a.s[3], b.s[3]));
+}
+
+fcDouble4 fcDouble4_smoothStepk(fcDouble4 a, fcDouble4 b, fcDouble c) {
+ return fcDouble4_create1111(fcMath_smoothStep(a.s[0], b.s[0], c), fcMath_smoothStep(a.s[1], b.s[1], c), fcMath_smoothStep(a.s[2], b.s[2], c), fcMath_smoothStep(a.s[3], b.s[3], c));
+}
+
+
+//
+// fcDouble8
+//
+
+fcDouble8 fcDouble8_create1(fcDouble v) {
+ return fcDouble8_create11111111(v, v, v, v, v, v, v, v);
+}
+
+void fcDouble8_set1(fcDouble8* self, fcDouble v) {
+ fcDouble8_set11111111(self, v, v, v, v, v, v, v, v);
+}
+
+fcDouble8 fcDouble8_create11111111(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8 result = {{x, y, z, w, s4, s5, s6, s7}};
+ return result;
+}
+
+void fcDouble8_set11111111(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ self->s[0] = x;
+ self->s[1] = y;
+ self->s[2] = z;
+ self->s[3] = w;
+ self->s[4] = s4;
+ self->s[5] = s5;
+ self->s[6] = s6;
+ self->s[7] = s7;
+}
+
+fcDouble8 fcDouble8_create1111112(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec1) {
+ return fcDouble8_create11111111(x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+void fcDouble8_set1111112(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec1) {
+ fcDouble8_set11111111(self, x, y, z, w, s4, s5, vec1.s[0], vec1.s[1]);
+}
+
+fcDouble8 fcDouble8_create1111121(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble2 vec1, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+void fcDouble8_set1111121(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble2 vec1, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create111113(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble3 vec1) {
+ return fcDouble8_create11111111(x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+void fcDouble8_set111113(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble s4, fcDouble3 vec1) {
+ fcDouble8_set11111111(self, x, y, z, w, s4, vec1.s[0], vec1.s[1], vec1.s[2]);
+}
+
+fcDouble8 fcDouble8_create1111211(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble2 vec1, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+void fcDouble8_set1111211(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble2 vec1, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], s6, s7);
+}
+
+fcDouble8 fcDouble8_create111122(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble2 vec1, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set111122(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble2 vec1, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create111131(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble3 vec1, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+void fcDouble8_set111131(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble3 vec1, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], s7);
+}
+
+fcDouble8 fcDouble8_create11114(fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble4 vec1) {
+ return fcDouble8_create11111111(x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+void fcDouble8_set11114(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble w, fcDouble4 vec1) {
+ fcDouble8_set11111111(self, x, y, z, w, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3]);
+}
+
+fcDouble8 fcDouble8_create1112111(fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+void fcDouble8_set1112111(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create111212(fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set111212(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create111221(fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set111221(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create11123(fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble3 vec2) {
+ return fcDouble8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set11123(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble2 vec1, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create111311(fcDouble x, fcDouble y, fcDouble z, fcDouble3 vec1, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+void fcDouble8_set111311(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble3 vec1, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], s6, s7);
+}
+
+fcDouble8 fcDouble8_create11132(fcDouble x, fcDouble y, fcDouble z, fcDouble3 vec1, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set11132(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble3 vec1, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create11141(fcDouble x, fcDouble y, fcDouble z, fcDouble4 vec1, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+void fcDouble8_set11141(fcDouble8* self, fcDouble x, fcDouble y, fcDouble z, fcDouble4 vec1, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, z, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s7);
+}
+
+fcDouble8 fcDouble8_create1121111(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+void fcDouble8_set1121111(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create112112(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set112112(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create112121(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set112121(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create11213(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble3 vec2) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set11213(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble s4, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create112211(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcDouble8_set112211(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcDouble8 fcDouble8_create11222(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set11222(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create11231(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble3 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcDouble8_set11231(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble3 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcDouble8 fcDouble8_create1124(fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble4 vec2) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcDouble8_set1124(fcDouble8* self, fcDouble x, fcDouble y, fcDouble2 vec1, fcDouble4 vec2) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcDouble8 fcDouble8_create113111(fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+void fcDouble8_set113111(fcDouble8* self, fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create11312(fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set11312(fcDouble8* self, fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create11321(fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set11321(fcDouble8* self, fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create1133(fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble3 vec2) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set1133(fcDouble8* self, fcDouble x, fcDouble y, fcDouble3 vec1, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create11411(fcDouble x, fcDouble y, fcDouble4 vec1, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+void fcDouble8_set11411(fcDouble8* self, fcDouble x, fcDouble y, fcDouble4 vec1, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s6, s7);
+}
+
+fcDouble8 fcDouble8_create1142(fcDouble x, fcDouble y, fcDouble4 vec1, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set1142(fcDouble8* self, fcDouble x, fcDouble y, fcDouble4 vec1, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, y, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create1211111(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+void fcDouble8_set1211111(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create121112(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set121112(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create121121(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set121121(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create12113(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble3 vec2) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set12113(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble s4, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create121211(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcDouble8_set121211(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcDouble8 fcDouble8_create12122(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble2 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set12122(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble2 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create12131(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble3 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcDouble8_set12131(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble3 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcDouble8 fcDouble8_create1214(fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble4 vec2) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcDouble8_set1214(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble w, fcDouble4 vec2) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcDouble8 fcDouble8_create122111(fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcDouble8_set122111(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create12212(fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set12212(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create12221(fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcDouble8_set12221(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create1223(fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble3 vec3) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcDouble8_set1223(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble2 vec2, fcDouble3 vec3) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcDouble8 fcDouble8_create12311(fcDouble x, fcDouble2 vec1, fcDouble3 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcDouble8_set12311(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble3 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcDouble8 fcDouble8_create1232(fcDouble x, fcDouble2 vec1, fcDouble3 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set1232(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble3 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create1241(fcDouble x, fcDouble2 vec1, fcDouble4 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcDouble8_set1241(fcDouble8* self, fcDouble x, fcDouble2 vec1, fcDouble4 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcDouble8 fcDouble8_create131111(fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+void fcDouble8_set131111(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create13112(fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set13112(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create13121(fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set13121(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create1313(fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble3 vec2) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set1313(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble s4, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create13211(fcDouble x, fcDouble3 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcDouble8_set13211(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcDouble8 fcDouble8_create1322(fcDouble x, fcDouble3 vec1, fcDouble2 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set1322(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble2 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create1331(fcDouble x, fcDouble3 vec1, fcDouble3 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcDouble8_set1331(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble3 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcDouble8 fcDouble8_create134(fcDouble x, fcDouble3 vec1, fcDouble4 vec2) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcDouble8_set134(fcDouble8* self, fcDouble x, fcDouble3 vec1, fcDouble4 vec2) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcDouble8 fcDouble8_create14111(fcDouble x, fcDouble4 vec1, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+void fcDouble8_set14111(fcDouble8* self, fcDouble x, fcDouble4 vec1, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create1412(fcDouble x, fcDouble4 vec1, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set1412(fcDouble8* self, fcDouble x, fcDouble4 vec1, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create1421(fcDouble x, fcDouble4 vec1, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set1421(fcDouble8* self, fcDouble x, fcDouble4 vec1, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create143(fcDouble x, fcDouble4 vec1, fcDouble3 vec2) {
+ return fcDouble8_create11111111(x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set143(fcDouble8* self, fcDouble x, fcDouble4 vec1, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, x, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create2111111(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+void fcDouble8_set2111111(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create211112(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set211112(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create211121(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set211121(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create21113(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble3 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set21113(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble s4, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create211211(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcDouble8_set211211(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcDouble8 fcDouble8_create21122(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble2 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set21122(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble2 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create21131(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble3 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcDouble8_set21131(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble3 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcDouble8 fcDouble8_create2114(fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble4 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcDouble8_set2114(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble w, fcDouble4 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcDouble8 fcDouble8_create212111(fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcDouble8_set212111(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create21212(fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set21212(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create21221(fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcDouble8_set21221(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create2123(fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble3 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcDouble8_set2123(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble2 vec2, fcDouble3 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcDouble8 fcDouble8_create21311(fcDouble2 vec1, fcDouble z, fcDouble3 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcDouble8_set21311(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble3 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcDouble8 fcDouble8_create2132(fcDouble2 vec1, fcDouble z, fcDouble3 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set2132(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble3 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create2141(fcDouble2 vec1, fcDouble z, fcDouble4 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcDouble8_set2141(fcDouble8* self, fcDouble2 vec1, fcDouble z, fcDouble4 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], z, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcDouble8 fcDouble8_create221111(fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+void fcDouble8_set221111(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create22112(fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble s5, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set22112(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble s5, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, s5, vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create22121(fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble2 vec3, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+void fcDouble8_set22121(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble2 vec3, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create2213(fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble3 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcDouble8_set2213(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble s4, fcDouble3 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], s4, vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcDouble8 fcDouble8_create22211(fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+void fcDouble8_set22211(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s6, s7);
+}
+
+fcDouble8 fcDouble8_create2222(fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble2 vec4) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+void fcDouble8_set2222(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble2 vec4) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec4.s[0], vec4.s[1]);
+}
+
+fcDouble8 fcDouble8_create2231(fcDouble2 vec1, fcDouble2 vec2, fcDouble3 vec3, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+void fcDouble8_set2231(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble3 vec3, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], s7);
+}
+
+fcDouble8 fcDouble8_create224(fcDouble2 vec1, fcDouble2 vec2, fcDouble4 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+void fcDouble8_set224(fcDouble8* self, fcDouble2 vec1, fcDouble2 vec2, fcDouble4 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2], vec3.s[3]);
+}
+
+fcDouble8 fcDouble8_create23111(fcDouble2 vec1, fcDouble3 vec2, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+void fcDouble8_set23111(fcDouble8* self, fcDouble2 vec1, fcDouble3 vec2, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create2312(fcDouble2 vec1, fcDouble3 vec2, fcDouble s5, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set2312(fcDouble8* self, fcDouble2 vec1, fcDouble3 vec2, fcDouble s5, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create2321(fcDouble2 vec1, fcDouble3 vec2, fcDouble2 vec3, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcDouble8_set2321(fcDouble8* self, fcDouble2 vec1, fcDouble3 vec2, fcDouble2 vec3, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create233(fcDouble2 vec1, fcDouble3 vec2, fcDouble3 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcDouble8_set233(fcDouble8* self, fcDouble2 vec1, fcDouble3 vec2, fcDouble3 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcDouble8 fcDouble8_create2411(fcDouble2 vec1, fcDouble4 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+void fcDouble8_set2411(fcDouble8* self, fcDouble2 vec1, fcDouble4 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s6, s7);
+}
+
+fcDouble8 fcDouble8_create242(fcDouble2 vec1, fcDouble4 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set242(fcDouble8* self, fcDouble2 vec1, fcDouble4 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create311111(fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+void fcDouble8_set311111(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create31112(fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set31112(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create31121(fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set31121(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create3113(fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble3 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set3113(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble s4, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create31211(fcDouble3 vec1, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcDouble8_set31211(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcDouble8 fcDouble8_create3122(fcDouble3 vec1, fcDouble w, fcDouble2 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set3122(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble2 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create3131(fcDouble3 vec1, fcDouble w, fcDouble3 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcDouble8_set3131(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble3 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcDouble8 fcDouble8_create314(fcDouble3 vec1, fcDouble w, fcDouble4 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcDouble8_set314(fcDouble8* self, fcDouble3 vec1, fcDouble w, fcDouble4 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], w, vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcDouble8 fcDouble8_create32111(fcDouble3 vec1, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+void fcDouble8_set32111(fcDouble8* self, fcDouble3 vec1, fcDouble2 vec2, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create3212(fcDouble3 vec1, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set3212(fcDouble8* self, fcDouble3 vec1, fcDouble2 vec2, fcDouble s5, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], s5, vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create3221(fcDouble3 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+void fcDouble8_set3221(fcDouble8* self, fcDouble3 vec1, fcDouble2 vec2, fcDouble2 vec3, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create323(fcDouble3 vec1, fcDouble2 vec2, fcDouble3 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+void fcDouble8_set323(fcDouble8* self, fcDouble3 vec1, fcDouble2 vec2, fcDouble3 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1], vec3.s[2]);
+}
+
+fcDouble8 fcDouble8_create3311(fcDouble3 vec1, fcDouble3 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+void fcDouble8_set3311(fcDouble8* self, fcDouble3 vec1, fcDouble3 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], s6, s7);
+}
+
+fcDouble8 fcDouble8_create332(fcDouble3 vec1, fcDouble3 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set332(fcDouble8* self, fcDouble3 vec1, fcDouble3 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create341(fcDouble3 vec1, fcDouble4 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+void fcDouble8_set341(fcDouble8* self, fcDouble3 vec1, fcDouble4 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3], s7);
+}
+
+fcDouble8 fcDouble8_create41111(fcDouble4 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+void fcDouble8_set41111(fcDouble8* self, fcDouble4 vec1, fcDouble s4, fcDouble s5, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, s6, s7);
+}
+
+fcDouble8 fcDouble8_create4112(fcDouble4 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+void fcDouble8_set4112(fcDouble8* self, fcDouble4 vec1, fcDouble s4, fcDouble s5, fcDouble2 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, s5, vec2.s[0], vec2.s[1]);
+}
+
+fcDouble8 fcDouble8_create4121(fcDouble4 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+void fcDouble8_set4121(fcDouble8* self, fcDouble4 vec1, fcDouble s4, fcDouble2 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], s7);
+}
+
+fcDouble8 fcDouble8_create413(fcDouble4 vec1, fcDouble s4, fcDouble3 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+void fcDouble8_set413(fcDouble8* self, fcDouble4 vec1, fcDouble s4, fcDouble3 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], s4, vec2.s[0], vec2.s[1], vec2.s[2]);
+}
+
+fcDouble8 fcDouble8_create4211(fcDouble4 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+void fcDouble8_set4211(fcDouble8* self, fcDouble4 vec1, fcDouble2 vec2, fcDouble s6, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], s6, s7);
+}
+
+fcDouble8 fcDouble8_create422(fcDouble4 vec1, fcDouble2 vec2, fcDouble2 vec3) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+void fcDouble8_set422(fcDouble8* self, fcDouble4 vec1, fcDouble2 vec2, fcDouble2 vec3) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec3.s[0], vec3.s[1]);
+}
+
+fcDouble8 fcDouble8_create431(fcDouble4 vec1, fcDouble3 vec2, fcDouble s7) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+void fcDouble8_set431(fcDouble8* self, fcDouble4 vec1, fcDouble3 vec2, fcDouble s7) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], s7);
+}
+
+fcDouble8 fcDouble8_create44(fcDouble4 vec1, fcDouble4 vec2) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+void fcDouble8_set44(fcDouble8* self, fcDouble4 vec1, fcDouble4 vec2) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec2.s[0], vec2.s[1], vec2.s[2], vec2.s[3]);
+}
+
+fcDouble8 fcDouble8_create8(fcDouble8 vec1) {
+ return fcDouble8_create11111111(vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+void fcDouble8_set8(fcDouble8* self, fcDouble8 vec1) {
+ fcDouble8_set11111111(self, vec1.s[0], vec1.s[1], vec1.s[2], vec1.s[3], vec1.s[4], vec1.s[5], vec1.s[6], vec1.s[7]);
+}
+
+fcDouble4 fcDouble8_odd(fcDouble8 a) {
+ return fcDouble4_create1111(a.s[1], a.s[3], a.s[5], a.s[7]);
+}
+
+fcDouble4 fcDouble8_even(fcDouble8 a) {
+ return fcDouble4_create1111(a.s[0], a.s[2], a.s[4], a.s[6]);
+}
+
+fcByte8 fcDouble8_convertByte8(fcDouble8 a) {
+ return fcByte8_create11111111((fcByte)(a.s[0]), (fcByte)(a.s[1]), (fcByte)(a.s[2]), (fcByte)(a.s[3]), (fcByte)(a.s[4]), (fcByte)(a.s[5]), (fcByte)(a.s[6]), (fcByte)(a.s[7]));
+}
+
+fcShort8 fcDouble8_convertShort8(fcDouble8 a) {
+ return fcShort8_create11111111((fcShort)(a.s[0]), (fcShort)(a.s[1]), (fcShort)(a.s[2]), (fcShort)(a.s[3]), (fcShort)(a.s[4]), (fcShort)(a.s[5]), (fcShort)(a.s[6]), (fcShort)(a.s[7]));
+}
+
+fcInt8 fcDouble8_convertInt8(fcDouble8 a) {
+ return fcInt8_create11111111((fcInt)(a.s[0]), (fcInt)(a.s[1]), (fcInt)(a.s[2]), (fcInt)(a.s[3]), (fcInt)(a.s[4]), (fcInt)(a.s[5]), (fcInt)(a.s[6]), (fcInt)(a.s[7]));
+}
+
+fcLong8 fcDouble8_convertLong8(fcDouble8 a) {
+ return fcLong8_create11111111((fcLong)(a.s[0]), (fcLong)(a.s[1]), (fcLong)(a.s[2]), (fcLong)(a.s[3]), (fcLong)(a.s[4]), (fcLong)(a.s[5]), (fcLong)(a.s[6]), (fcLong)(a.s[7]));
+}
+
+fcFloat8 fcDouble8_convertFloat8(fcDouble8 a) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0]), (fcFloat)(a.s[1]), (fcFloat)(a.s[2]), (fcFloat)(a.s[3]), (fcFloat)(a.s[4]), (fcFloat)(a.s[5]), (fcFloat)(a.s[6]), (fcFloat)(a.s[7]));
+}
+
+fcDouble2 fcDouble8_asDouble2(fcDouble8 a) {
+ return fcDouble2_create11(a.s[0], a.s[1]);
+}
+
+fcDouble3 fcDouble8_asDouble3(fcDouble8 a) {
+ return fcDouble3_create111(a.s[0], a.s[1], a.s[2]);
+}
+
+fcDouble4 fcDouble8_asDouble4(fcDouble8 a) {
+ return fcDouble4_create1111(a.s[0], a.s[1], a.s[2], a.s[3]);
+}
+
+fcInt8 fcDouble8_isEqual(fcDouble8 a, fcDouble8 b) {
+ return fcInt8_create11111111(a.s[0] == b.s[0]? 1 : 0, a.s[1] == b.s[1]? 1 : 0, a.s[2] == b.s[2]? 1 : 0, a.s[3] == b.s[3]? 1 : 0, a.s[4] == b.s[4]? 1 : 0, a.s[5] == b.s[5]? 1 : 0, a.s[6] == b.s[6]? 1 : 0, a.s[7] == b.s[7]? 1 : 0);
+}
+
+fcInt8 fcDouble8_isNotEqual(fcDouble8 a, fcDouble8 b) {
+ return fcInt8_create11111111(a.s[0] != b.s[0]? 1 : 0, a.s[1] != b.s[1]? 1 : 0, a.s[2] != b.s[2]? 1 : 0, a.s[3] != b.s[3]? 1 : 0, a.s[4] != b.s[4]? 1 : 0, a.s[5] != b.s[5]? 1 : 0, a.s[6] != b.s[6]? 1 : 0, a.s[7] != b.s[7]? 1 : 0);
+}
+
+fcInt8 fcDouble8_isGreater(fcDouble8 a, fcDouble8 b) {
+ return fcInt8_create11111111(a.s[0] > b.s[0]? 1 : 0, a.s[1] > b.s[1]? 1 : 0, a.s[2] > b.s[2]? 1 : 0, a.s[3] > b.s[3]? 1 : 0, a.s[4] > b.s[4]? 1 : 0, a.s[5] > b.s[5]? 1 : 0, a.s[6] > b.s[6]? 1 : 0, a.s[7] > b.s[7]? 1 : 0);
+}
+
+fcInt8 fcDouble8_isGreaterEqual(fcDouble8 a, fcDouble8 b) {
+ return fcInt8_create11111111(a.s[0] >= b.s[0]? 1 : 0, a.s[1] >= b.s[1]? 1 : 0, a.s[2] >= b.s[2]? 1 : 0, a.s[3] >= b.s[3]? 1 : 0, a.s[4] >= b.s[4]? 1 : 0, a.s[5] >= b.s[5]? 1 : 0, a.s[6] >= b.s[6]? 1 : 0, a.s[7] >= b.s[7]? 1 : 0);
+}
+
+fcInt8 fcDouble8_isLess(fcDouble8 a, fcDouble8 b) {
+ return fcInt8_create11111111(a.s[0] < b.s[0]? 1 : 0, a.s[1] < b.s[1]? 1 : 0, a.s[2] < b.s[2]? 1 : 0, a.s[3] < b.s[3]? 1 : 0, a.s[4] < b.s[4]? 1 : 0, a.s[5] < b.s[5]? 1 : 0, a.s[6] < b.s[6]? 1 : 0, a.s[7] < b.s[7]? 1 : 0);
+}
+
+fcInt8 fcDouble8_isLessEqual(fcDouble8 a, fcDouble8 b) {
+ return fcInt8_create11111111(a.s[0] <= b.s[0]? 1 : 0, a.s[1] <= b.s[1]? 1 : 0, a.s[2] <= b.s[2]? 1 : 0, a.s[3] <= b.s[3]? 1 : 0, a.s[4] <= b.s[4]? 1 : 0, a.s[5] <= b.s[5]? 1 : 0, a.s[6] <= b.s[6]? 1 : 0, a.s[7] <= b.s[7]? 1 : 0);
+}
+
+fcDouble8 fcDouble8_select(fcDouble8 a, fcDouble8 b, fcInt8 c) {
+ return fcDouble8_create11111111(fcMath_select(a.s[0], b.s[0], c.s[0]), fcMath_select(a.s[1], b.s[1], c.s[1]), fcMath_select(a.s[2], b.s[2], c.s[2]), fcMath_select(a.s[3], b.s[3], c.s[3]), fcMath_select(a.s[4], b.s[4], c.s[4]), fcMath_select(a.s[5], b.s[5], c.s[5]), fcMath_select(a.s[6], b.s[6], c.s[6]), fcMath_select(a.s[7], b.s[7], c.s[7]));
+}
+
+fcInt8 fcDouble8_isFinite(fcDouble8 a) {
+ return fcInt8_create11111111(fcMath_isFinite(a.s[0]), fcMath_isFinite(a.s[1]), fcMath_isFinite(a.s[2]), fcMath_isFinite(a.s[3]), fcMath_isFinite(a.s[4]), fcMath_isFinite(a.s[5]), fcMath_isFinite(a.s[6]), fcMath_isFinite(a.s[7]));
+}
+
+fcInt8 fcDouble8_isInf(fcDouble8 a) {
+ return fcInt8_create11111111(fcMath_isInf(a.s[0]), fcMath_isInf(a.s[1]), fcMath_isInf(a.s[2]), fcMath_isInf(a.s[3]), fcMath_isInf(a.s[4]), fcMath_isInf(a.s[5]), fcMath_isInf(a.s[6]), fcMath_isInf(a.s[7]));
+}
+
+fcInt8 fcDouble8_isNaN(fcDouble8 a) {
+ return fcInt8_create11111111(fcMath_isNaN(a.s[0]), fcMath_isNaN(a.s[1]), fcMath_isNaN(a.s[2]), fcMath_isNaN(a.s[3]), fcMath_isNaN(a.s[4]), fcMath_isNaN(a.s[5]), fcMath_isNaN(a.s[6]), fcMath_isNaN(a.s[7]));
+}
+
+fcInt8 fcDouble8_isNormal(fcDouble8 a) {
+ return fcInt8_create11111111(fcMath_isNormal(a.s[0]), fcMath_isNormal(a.s[1]), fcMath_isNormal(a.s[2]), fcMath_isNormal(a.s[3]), fcMath_isNormal(a.s[4]), fcMath_isNormal(a.s[5]), fcMath_isNormal(a.s[6]), fcMath_isNormal(a.s[7]));
+}
+
+fcInt8 fcDouble8_isOrdered(fcDouble8 a, fcDouble8 b) {
+ return fcInt8_create11111111(fcMath_isOrdered(a.s[0], b.s[0]), fcMath_isOrdered(a.s[1], b.s[1]), fcMath_isOrdered(a.s[2], b.s[2]), fcMath_isOrdered(a.s[3], b.s[3]), fcMath_isOrdered(a.s[4], b.s[4]), fcMath_isOrdered(a.s[5], b.s[5]), fcMath_isOrdered(a.s[6], b.s[6]), fcMath_isOrdered(a.s[7], b.s[7]));
+}
+
+fcInt8 fcDouble8_isUnordered(fcDouble8 a, fcDouble8 b) {
+ return fcInt8_create11111111(fcMath_isUnordered(a.s[0], b.s[0]), fcMath_isUnordered(a.s[1], b.s[1]), fcMath_isUnordered(a.s[2], b.s[2]), fcMath_isUnordered(a.s[3], b.s[3]), fcMath_isUnordered(a.s[4], b.s[4]), fcMath_isUnordered(a.s[5], b.s[5]), fcMath_isUnordered(a.s[6], b.s[6]), fcMath_isUnordered(a.s[7], b.s[7]));
+}
+
+fcInt fcDouble8_any(fcDouble8 a) {
+ return a.s[0] != 0.0 || a.s[1] != 0.0 || a.s[2] != 0.0 || a.s[3] != 0.0 || a.s[4] != 0.0 || a.s[5] != 0.0 || a.s[6] != 0.0 || a.s[7] != 0.0;
+}
+
+fcInt fcDouble8_all(fcDouble8 a) {
+ return !(a.s[0] == 0.0 || a.s[1] == 0.0 || a.s[2] == 0.0 || a.s[3] == 0.0 || a.s[4] == 0.0 || a.s[5] == 0.0 || a.s[6] == 0.0 || a.s[7] == 0.0);
+}
+
+fcDouble8 fcDouble8_neg(fcDouble8 a) {
+ return fcDouble8_create11111111(-a.s[0], -a.s[1], -a.s[2], -a.s[3], -a.s[4], -a.s[5], -a.s[6], -a.s[7]);
+}
+
+fcDouble8 fcDouble8_add(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(a.s[0] + b.s[0], a.s[1] + b.s[1], a.s[2] + b.s[2], a.s[3] + b.s[3], a.s[4] + b.s[4], a.s[5] + b.s[5], a.s[6] + b.s[6], a.s[7] + b.s[7]);
+}
+
+fcDouble8 fcDouble8_sub(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(a.s[0] - b.s[0], a.s[1] - b.s[1], a.s[2] - b.s[2], a.s[3] - b.s[3], a.s[4] - b.s[4], a.s[5] - b.s[5], a.s[6] - b.s[6], a.s[7] - b.s[7]);
+}
+
+fcDouble8 fcDouble8_muld(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * b.s[0]), (fcDouble)(a.s[1] * b.s[1]), (fcDouble)(a.s[2] * b.s[2]), (fcDouble)(a.s[3] * b.s[3]), (fcDouble)(a.s[4] * b.s[4]), (fcDouble)(a.s[5] * b.s[5]), (fcDouble)(a.s[6] * b.s[6]), (fcDouble)(a.s[7] * b.s[7]));
+}
+
+fcFloat8 fcDouble8_mulf(fcDouble8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * b.s[0]), (fcFloat)(a.s[1] * b.s[1]), (fcFloat)(a.s[2] * b.s[2]), (fcFloat)(a.s[3] * b.s[3]), (fcFloat)(a.s[4] * b.s[4]), (fcFloat)(a.s[5] * b.s[5]), (fcFloat)(a.s[6] * b.s[6]), (fcFloat)(a.s[7] * b.s[7]));
+}
+
+fcDouble8 fcDouble8_mulkd(fcDouble8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] * k), (fcDouble)(a.s[1] * k), (fcDouble)(a.s[2] * k), (fcDouble)(a.s[3] * k), (fcDouble)(a.s[4] * k), (fcDouble)(a.s[5] * k), (fcDouble)(a.s[6] * k), (fcDouble)(a.s[7] * k));
+}
+
+fcFloat8 fcDouble8_mulkf(fcDouble8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] * k), (fcFloat)(a.s[1] * k), (fcFloat)(a.s[2] * k), (fcFloat)(a.s[3] * k), (fcFloat)(a.s[4] * k), (fcFloat)(a.s[5] * k), (fcFloat)(a.s[6] * k), (fcFloat)(a.s[7] * k));
+}
+
+fcDouble8 fcDouble8_divd(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / b.s[0]), (fcDouble)(a.s[1] / b.s[1]), (fcDouble)(a.s[2] / b.s[2]), (fcDouble)(a.s[3] / b.s[3]), (fcDouble)(a.s[4] / b.s[4]), (fcDouble)(a.s[5] / b.s[5]), (fcDouble)(a.s[6] / b.s[6]), (fcDouble)(a.s[7] / b.s[7]));
+}
+
+fcFloat8 fcDouble8_divf(fcDouble8 a, fcFloat8 b) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / b.s[0]), (fcFloat)(a.s[1] / b.s[1]), (fcFloat)(a.s[2] / b.s[2]), (fcFloat)(a.s[3] / b.s[3]), (fcFloat)(a.s[4] / b.s[4]), (fcFloat)(a.s[5] / b.s[5]), (fcFloat)(a.s[6] / b.s[6]), (fcFloat)(a.s[7] / b.s[7]));
+}
+
+fcDouble8 fcDouble8_divkd(fcDouble8 a, fcDouble k) {
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / k), (fcDouble)(a.s[1] / k), (fcDouble)(a.s[2] / k), (fcDouble)(a.s[3] / k), (fcDouble)(a.s[4] / k), (fcDouble)(a.s[5] / k), (fcDouble)(a.s[6] / k), (fcDouble)(a.s[7] / k));
+}
+
+fcFloat8 fcDouble8_divkf(fcDouble8 a, fcFloat k) {
+ return fcFloat8_create11111111((fcFloat)(a.s[0] / k), (fcFloat)(a.s[1] / k), (fcFloat)(a.s[2] / k), (fcFloat)(a.s[3] / k), (fcFloat)(a.s[4] / k), (fcFloat)(a.s[5] / k), (fcFloat)(a.s[6] / k), (fcFloat)(a.s[7] / k));
+}
+
+fcDouble fcDouble8_dot(fcDouble8 a, fcDouble8 b) {
+ return a.s[0] * b.s[0] + a.s[1] * b.s[1] + a.s[2] * b.s[2] + a.s[3] * b.s[3] + a.s[4] * b.s[4] + a.s[5] * b.s[5] + a.s[6] * b.s[6] + a.s[7] * b.s[7];
+}
+
+fcDouble fcDouble8_distance(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_length(fcDouble8_sub(a, b));
+}
+
+fcDouble fcDouble8_length(fcDouble8 a) {
+ return fcMath_sqrt(a.s[0] * a.s[0] + a.s[1] * a.s[1] + a.s[2] * a.s[2] + a.s[3] * a.s[3] + a.s[4] * a.s[4] + a.s[5] * a.s[5] + a.s[6] * a.s[6] + a.s[7] * a.s[7]);
+}
+
+fcDouble8 fcDouble8_normalize(fcDouble8 a) {
+ fcDouble len = fcDouble8_length(a);
+ return fcDouble8_create11111111((fcDouble)(a.s[0] / len), (fcDouble)(a.s[1] / len), (fcDouble)(a.s[2] / len), (fcDouble)(a.s[3] / len), (fcDouble)(a.s[4] / len), (fcDouble)(a.s[5] / len), (fcDouble)(a.s[6] / len), (fcDouble)(a.s[7] / len));
+}
+
+fcDouble8 fcDouble8_abs(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_abs(a.s[0]), fcMath_abs(a.s[1]), fcMath_abs(a.s[2]), fcMath_abs(a.s[3]), fcMath_abs(a.s[4]), fcMath_abs(a.s[5]), fcMath_abs(a.s[6]), fcMath_abs(a.s[7]));
+}
+
+fcDouble8 fcDouble8_clamp(fcDouble8 a, fcDouble8 b, fcDouble8 c) {
+ return fcDouble8_create11111111(fcMath_clamp(a.s[0], b.s[0], c.s[0]), fcMath_clamp(a.s[1], b.s[1], c.s[1]), fcMath_clamp(a.s[2], b.s[2], c.s[2]), fcMath_clamp(a.s[3], b.s[3], c.s[3]), fcMath_clamp(a.s[4], b.s[4], c.s[4]), fcMath_clamp(a.s[5], b.s[5], c.s[5]), fcMath_clamp(a.s[6], b.s[6], c.s[6]), fcMath_clamp(a.s[7], b.s[7], c.s[7]));
+}
+
+fcDouble8 fcDouble8_max(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_max(a.s[0], b.s[0]), fcMath_max(a.s[1], b.s[1]), fcMath_max(a.s[2], b.s[2]), fcMath_max(a.s[3], b.s[3]), fcMath_max(a.s[4], b.s[4]), fcMath_max(a.s[5], b.s[5]), fcMath_max(a.s[6], b.s[6]), fcMath_max(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_maxMag(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_maxMag(a.s[0], b.s[0]), fcMath_maxMag(a.s[1], b.s[1]), fcMath_maxMag(a.s[2], b.s[2]), fcMath_maxMag(a.s[3], b.s[3]), fcMath_maxMag(a.s[4], b.s[4]), fcMath_maxMag(a.s[5], b.s[5]), fcMath_maxMag(a.s[6], b.s[6]), fcMath_maxMag(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_min(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_min(a.s[0], b.s[0]), fcMath_min(a.s[1], b.s[1]), fcMath_min(a.s[2], b.s[2]), fcMath_min(a.s[3], b.s[3]), fcMath_min(a.s[4], b.s[4]), fcMath_min(a.s[5], b.s[5]), fcMath_min(a.s[6], b.s[6]), fcMath_min(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_minMag(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_minMag(a.s[0], b.s[0]), fcMath_minMag(a.s[1], b.s[1]), fcMath_minMag(a.s[2], b.s[2]), fcMath_minMag(a.s[3], b.s[3]), fcMath_minMag(a.s[4], b.s[4]), fcMath_minMag(a.s[5], b.s[5]), fcMath_minMag(a.s[6], b.s[6]), fcMath_minMag(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_mix(fcDouble8 a, fcDouble8 b, fcDouble8 c) {
+ return fcDouble8_create11111111(fcMath_mix(a.s[0], b.s[0], c.s[0]), fcMath_mix(a.s[1], b.s[1], c.s[1]), fcMath_mix(a.s[2], b.s[2], c.s[2]), fcMath_mix(a.s[3], b.s[3], c.s[3]), fcMath_mix(a.s[4], b.s[4], c.s[4]), fcMath_mix(a.s[5], b.s[5], c.s[5]), fcMath_mix(a.s[6], b.s[6], c.s[6]), fcMath_mix(a.s[7], b.s[7], c.s[7]));
+}
+
+fcDouble8 fcDouble8_clampk(fcDouble8 v, fcDouble min, fcDouble max) {
+ return fcDouble8_create11111111(fcMath_clamp(v.s[0], min, max), fcMath_clamp(v.s[1], min, max), fcMath_clamp(v.s[2], min, max), fcMath_clamp(v.s[3], min, max), fcMath_clamp(v.s[4], min, max), fcMath_clamp(v.s[5], min, max), fcMath_clamp(v.s[6], min, max), fcMath_clamp(v.s[7], min, max));
+}
+
+fcDouble8 fcDouble8_maxk(fcDouble8 x, fcDouble y) {
+ return fcDouble8_create11111111(fcMath_max(x.s[0], y), fcMath_max(x.s[1], y), fcMath_max(x.s[2], y), fcMath_max(x.s[3], y), fcMath_max(x.s[4], y), fcMath_max(x.s[5], y), fcMath_max(x.s[6], y), fcMath_max(x.s[7], y));
+}
+
+fcDouble8 fcDouble8_mink(fcDouble8 x, fcDouble y) {
+ return fcDouble8_create11111111(fcMath_min(x.s[0], y), fcMath_min(x.s[1], y), fcMath_min(x.s[2], y), fcMath_min(x.s[3], y), fcMath_min(x.s[4], y), fcMath_min(x.s[5], y), fcMath_min(x.s[6], y), fcMath_min(x.s[7], y));
+}
+
+fcDouble8 fcDouble8_mixk(fcDouble8 x, fcDouble8 y, fcDouble a) {
+ return fcDouble8_create11111111(fcMath_mix(x.s[0], y.s[0], a), fcMath_mix(x.s[1], y.s[1], a), fcMath_mix(x.s[2], y.s[2], a), fcMath_mix(x.s[3], y.s[3], a), fcMath_mix(x.s[4], y.s[4], a), fcMath_mix(x.s[5], y.s[5], a), fcMath_mix(x.s[6], y.s[6], a), fcMath_mix(x.s[7], y.s[7], a));
+}
+
+fcDouble8 fcDouble8_acos(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_acos(a.s[0]), fcMath_acos(a.s[1]), fcMath_acos(a.s[2]), fcMath_acos(a.s[3]), fcMath_acos(a.s[4]), fcMath_acos(a.s[5]), fcMath_acos(a.s[6]), fcMath_acos(a.s[7]));
+}
+
+fcDouble8 fcDouble8_acosh(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_acosh(a.s[0]), fcMath_acosh(a.s[1]), fcMath_acosh(a.s[2]), fcMath_acosh(a.s[3]), fcMath_acosh(a.s[4]), fcMath_acosh(a.s[5]), fcMath_acosh(a.s[6]), fcMath_acosh(a.s[7]));
+}
+
+fcDouble8 fcDouble8_asin(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_asin(a.s[0]), fcMath_asin(a.s[1]), fcMath_asin(a.s[2]), fcMath_asin(a.s[3]), fcMath_asin(a.s[4]), fcMath_asin(a.s[5]), fcMath_asin(a.s[6]), fcMath_asin(a.s[7]));
+}
+
+fcDouble8 fcDouble8_asinh(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_asinh(a.s[0]), fcMath_asinh(a.s[1]), fcMath_asinh(a.s[2]), fcMath_asinh(a.s[3]), fcMath_asinh(a.s[4]), fcMath_asinh(a.s[5]), fcMath_asinh(a.s[6]), fcMath_asinh(a.s[7]));
+}
+
+fcDouble8 fcDouble8_atan(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_atan(a.s[0]), fcMath_atan(a.s[1]), fcMath_atan(a.s[2]), fcMath_atan(a.s[3]), fcMath_atan(a.s[4]), fcMath_atan(a.s[5]), fcMath_atan(a.s[6]), fcMath_atan(a.s[7]));
+}
+
+fcDouble8 fcDouble8_atan2(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_atan2(a.s[0], b.s[0]), fcMath_atan2(a.s[1], b.s[1]), fcMath_atan2(a.s[2], b.s[2]), fcMath_atan2(a.s[3], b.s[3]), fcMath_atan2(a.s[4], b.s[4]), fcMath_atan2(a.s[5], b.s[5]), fcMath_atan2(a.s[6], b.s[6]), fcMath_atan2(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_atanh(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_atanh(a.s[0]), fcMath_atanh(a.s[1]), fcMath_atanh(a.s[2]), fcMath_atanh(a.s[3]), fcMath_atanh(a.s[4]), fcMath_atanh(a.s[5]), fcMath_atanh(a.s[6]), fcMath_atanh(a.s[7]));
+}
+
+fcDouble8 fcDouble8_cbrt(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_cbrt(a.s[0]), fcMath_cbrt(a.s[1]), fcMath_cbrt(a.s[2]), fcMath_cbrt(a.s[3]), fcMath_cbrt(a.s[4]), fcMath_cbrt(a.s[5]), fcMath_cbrt(a.s[6]), fcMath_cbrt(a.s[7]));
+}
+
+fcDouble8 fcDouble8_ceil(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_ceil(a.s[0]), fcMath_ceil(a.s[1]), fcMath_ceil(a.s[2]), fcMath_ceil(a.s[3]), fcMath_ceil(a.s[4]), fcMath_ceil(a.s[5]), fcMath_ceil(a.s[6]), fcMath_ceil(a.s[7]));
+}
+
+fcDouble8 fcDouble8_copySign(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_copySign(a.s[0], b.s[0]), fcMath_copySign(a.s[1], b.s[1]), fcMath_copySign(a.s[2], b.s[2]), fcMath_copySign(a.s[3], b.s[3]), fcMath_copySign(a.s[4], b.s[4]), fcMath_copySign(a.s[5], b.s[5]), fcMath_copySign(a.s[6], b.s[6]), fcMath_copySign(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_cos(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_cos(a.s[0]), fcMath_cos(a.s[1]), fcMath_cos(a.s[2]), fcMath_cos(a.s[3]), fcMath_cos(a.s[4]), fcMath_cos(a.s[5]), fcMath_cos(a.s[6]), fcMath_cos(a.s[7]));
+}
+
+fcDouble8 fcDouble8_cosh(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_cosh(a.s[0]), fcMath_cosh(a.s[1]), fcMath_cosh(a.s[2]), fcMath_cosh(a.s[3]), fcMath_cosh(a.s[4]), fcMath_cosh(a.s[5]), fcMath_cosh(a.s[6]), fcMath_cosh(a.s[7]));
+}
+
+fcDouble8 fcDouble8_erf(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_erf(a.s[0]), fcMath_erf(a.s[1]), fcMath_erf(a.s[2]), fcMath_erf(a.s[3]), fcMath_erf(a.s[4]), fcMath_erf(a.s[5]), fcMath_erf(a.s[6]), fcMath_erf(a.s[7]));
+}
+
+fcDouble8 fcDouble8_erfc(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_erfc(a.s[0]), fcMath_erfc(a.s[1]), fcMath_erfc(a.s[2]), fcMath_erfc(a.s[3]), fcMath_erfc(a.s[4]), fcMath_erfc(a.s[5]), fcMath_erfc(a.s[6]), fcMath_erfc(a.s[7]));
+}
+
+fcDouble8 fcDouble8_exp(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_exp(a.s[0]), fcMath_exp(a.s[1]), fcMath_exp(a.s[2]), fcMath_exp(a.s[3]), fcMath_exp(a.s[4]), fcMath_exp(a.s[5]), fcMath_exp(a.s[6]), fcMath_exp(a.s[7]));
+}
+
+fcDouble8 fcDouble8_exp10(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_exp10(a.s[0]), fcMath_exp10(a.s[1]), fcMath_exp10(a.s[2]), fcMath_exp10(a.s[3]), fcMath_exp10(a.s[4]), fcMath_exp10(a.s[5]), fcMath_exp10(a.s[6]), fcMath_exp10(a.s[7]));
+}
+
+fcDouble8 fcDouble8_exp2(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_exp2(a.s[0]), fcMath_exp2(a.s[1]), fcMath_exp2(a.s[2]), fcMath_exp2(a.s[3]), fcMath_exp2(a.s[4]), fcMath_exp2(a.s[5]), fcMath_exp2(a.s[6]), fcMath_exp2(a.s[7]));
+}
+
+fcDouble8 fcDouble8_expm1(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_expm1(a.s[0]), fcMath_expm1(a.s[1]), fcMath_expm1(a.s[2]), fcMath_expm1(a.s[3]), fcMath_expm1(a.s[4]), fcMath_expm1(a.s[5]), fcMath_expm1(a.s[6]), fcMath_expm1(a.s[7]));
+}
+
+fcDouble8 fcDouble8_fdim(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_fdim(a.s[0], b.s[0]), fcMath_fdim(a.s[1], b.s[1]), fcMath_fdim(a.s[2], b.s[2]), fcMath_fdim(a.s[3], b.s[3]), fcMath_fdim(a.s[4], b.s[4]), fcMath_fdim(a.s[5], b.s[5]), fcMath_fdim(a.s[6], b.s[6]), fcMath_fdim(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_floor(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_floor(a.s[0]), fcMath_floor(a.s[1]), fcMath_floor(a.s[2]), fcMath_floor(a.s[3]), fcMath_floor(a.s[4]), fcMath_floor(a.s[5]), fcMath_floor(a.s[6]), fcMath_floor(a.s[7]));
+}
+
+fcDouble8 fcDouble8_fma(fcDouble8 a, fcDouble8 b, fcDouble8 c) {
+ return fcDouble8_create11111111(fcMath_fma(a.s[0], b.s[0], c.s[0]), fcMath_fma(a.s[1], b.s[1], c.s[1]), fcMath_fma(a.s[2], b.s[2], c.s[2]), fcMath_fma(a.s[3], b.s[3], c.s[3]), fcMath_fma(a.s[4], b.s[4], c.s[4]), fcMath_fma(a.s[5], b.s[5], c.s[5]), fcMath_fma(a.s[6], b.s[6], c.s[6]), fcMath_fma(a.s[7], b.s[7], c.s[7]));
+}
+
+fcDouble8 fcDouble8_fmod(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_fmod(a.s[0], b.s[0]), fcMath_fmod(a.s[1], b.s[1]), fcMath_fmod(a.s[2], b.s[2]), fcMath_fmod(a.s[3], b.s[3]), fcMath_fmod(a.s[4], b.s[4]), fcMath_fmod(a.s[5], b.s[5]), fcMath_fmod(a.s[6], b.s[6]), fcMath_fmod(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_fract(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_fract(a.s[0]), fcMath_fract(a.s[1]), fcMath_fract(a.s[2]), fcMath_fract(a.s[3]), fcMath_fract(a.s[4]), fcMath_fract(a.s[5]), fcMath_fract(a.s[6]), fcMath_fract(a.s[7]));
+}
+
+fcDouble8 fcDouble8_frexp(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_frexp(a.s[0]), fcMath_frexp(a.s[1]), fcMath_frexp(a.s[2]), fcMath_frexp(a.s[3]), fcMath_frexp(a.s[4]), fcMath_frexp(a.s[5]), fcMath_frexp(a.s[6]), fcMath_frexp(a.s[7]));
+}
+
+fcDouble8 fcDouble8_getExponent(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_getExponent(a.s[0]), fcMath_getExponent(a.s[1]), fcMath_getExponent(a.s[2]), fcMath_getExponent(a.s[3]), fcMath_getExponent(a.s[4]), fcMath_getExponent(a.s[5]), fcMath_getExponent(a.s[6]), fcMath_getExponent(a.s[7]));
+}
+
+fcDouble8 fcDouble8_hypot(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_hypot(a.s[0], b.s[0]), fcMath_hypot(a.s[1], b.s[1]), fcMath_hypot(a.s[2], b.s[2]), fcMath_hypot(a.s[3], b.s[3]), fcMath_hypot(a.s[4], b.s[4]), fcMath_hypot(a.s[5], b.s[5]), fcMath_hypot(a.s[6], b.s[6]), fcMath_hypot(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_lgamma(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_lgamma(a.s[0]), fcMath_lgamma(a.s[1]), fcMath_lgamma(a.s[2]), fcMath_lgamma(a.s[3]), fcMath_lgamma(a.s[4]), fcMath_lgamma(a.s[5]), fcMath_lgamma(a.s[6]), fcMath_lgamma(a.s[7]));
+}
+
+fcDouble8 fcDouble8_log(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_log(a.s[0]), fcMath_log(a.s[1]), fcMath_log(a.s[2]), fcMath_log(a.s[3]), fcMath_log(a.s[4]), fcMath_log(a.s[5]), fcMath_log(a.s[6]), fcMath_log(a.s[7]));
+}
+
+fcDouble8 fcDouble8_log10(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_log10(a.s[0]), fcMath_log10(a.s[1]), fcMath_log10(a.s[2]), fcMath_log10(a.s[3]), fcMath_log10(a.s[4]), fcMath_log10(a.s[5]), fcMath_log10(a.s[6]), fcMath_log10(a.s[7]));
+}
+
+fcDouble8 fcDouble8_log1p(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_log1p(a.s[0]), fcMath_log1p(a.s[1]), fcMath_log1p(a.s[2]), fcMath_log1p(a.s[3]), fcMath_log1p(a.s[4]), fcMath_log1p(a.s[5]), fcMath_log1p(a.s[6]), fcMath_log1p(a.s[7]));
+}
+
+fcDouble8 fcDouble8_log2(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_log2(a.s[0]), fcMath_log2(a.s[1]), fcMath_log2(a.s[2]), fcMath_log2(a.s[3]), fcMath_log2(a.s[4]), fcMath_log2(a.s[5]), fcMath_log2(a.s[6]), fcMath_log2(a.s[7]));
+}
+
+fcDouble8 fcDouble8_logb(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_logb(a.s[0]), fcMath_logb(a.s[1]), fcMath_logb(a.s[2]), fcMath_logb(a.s[3]), fcMath_logb(a.s[4]), fcMath_logb(a.s[5]), fcMath_logb(a.s[6]), fcMath_logb(a.s[7]));
+}
+
+fcDouble8 fcDouble8_mad(fcDouble8 a, fcDouble8 b, fcDouble8 c) {
+ return fcDouble8_create11111111(fcMath_mad(a.s[0], b.s[0], c.s[0]), fcMath_mad(a.s[1], b.s[1], c.s[1]), fcMath_mad(a.s[2], b.s[2], c.s[2]), fcMath_mad(a.s[3], b.s[3], c.s[3]), fcMath_mad(a.s[4], b.s[4], c.s[4]), fcMath_mad(a.s[5], b.s[5], c.s[5]), fcMath_mad(a.s[6], b.s[6], c.s[6]), fcMath_mad(a.s[7], b.s[7], c.s[7]));
+}
+
+fcDouble8 fcDouble8_nextAfter(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_nextAfter(a.s[0], b.s[0]), fcMath_nextAfter(a.s[1], b.s[1]), fcMath_nextAfter(a.s[2], b.s[2]), fcMath_nextAfter(a.s[3], b.s[3]), fcMath_nextAfter(a.s[4], b.s[4]), fcMath_nextAfter(a.s[5], b.s[5]), fcMath_nextAfter(a.s[6], b.s[6]), fcMath_nextAfter(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_pow(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_pow(a.s[0], b.s[0]), fcMath_pow(a.s[1], b.s[1]), fcMath_pow(a.s[2], b.s[2]), fcMath_pow(a.s[3], b.s[3]), fcMath_pow(a.s[4], b.s[4]), fcMath_pow(a.s[5], b.s[5]), fcMath_pow(a.s[6], b.s[6]), fcMath_pow(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_powr(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_powr(a.s[0], b.s[0]), fcMath_powr(a.s[1], b.s[1]), fcMath_powr(a.s[2], b.s[2]), fcMath_powr(a.s[3], b.s[3]), fcMath_powr(a.s[4], b.s[4]), fcMath_powr(a.s[5], b.s[5]), fcMath_powr(a.s[6], b.s[6]), fcMath_powr(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_remainder(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_remainder(a.s[0], b.s[0]), fcMath_remainder(a.s[1], b.s[1]), fcMath_remainder(a.s[2], b.s[2]), fcMath_remainder(a.s[3], b.s[3]), fcMath_remainder(a.s[4], b.s[4]), fcMath_remainder(a.s[5], b.s[5]), fcMath_remainder(a.s[6], b.s[6]), fcMath_remainder(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_rint(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_rint(a.s[0]), fcMath_rint(a.s[1]), fcMath_rint(a.s[2]), fcMath_rint(a.s[3]), fcMath_rint(a.s[4]), fcMath_rint(a.s[5]), fcMath_rint(a.s[6]), fcMath_rint(a.s[7]));
+}
+
+fcDouble8 fcDouble8_round(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_round(a.s[0]), fcMath_round(a.s[1]), fcMath_round(a.s[2]), fcMath_round(a.s[3]), fcMath_round(a.s[4]), fcMath_round(a.s[5]), fcMath_round(a.s[6]), fcMath_round(a.s[7]));
+}
+
+fcDouble8 fcDouble8_rsqrt(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_rsqrt(a.s[0]), fcMath_rsqrt(a.s[1]), fcMath_rsqrt(a.s[2]), fcMath_rsqrt(a.s[3]), fcMath_rsqrt(a.s[4]), fcMath_rsqrt(a.s[5]), fcMath_rsqrt(a.s[6]), fcMath_rsqrt(a.s[7]));
+}
+
+fcDouble8 fcDouble8_signum(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_signum(a.s[0]), fcMath_signum(a.s[1]), fcMath_signum(a.s[2]), fcMath_signum(a.s[3]), fcMath_signum(a.s[4]), fcMath_signum(a.s[5]), fcMath_signum(a.s[6]), fcMath_signum(a.s[7]));
+}
+
+fcDouble8 fcDouble8_sin(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_sin(a.s[0]), fcMath_sin(a.s[1]), fcMath_sin(a.s[2]), fcMath_sin(a.s[3]), fcMath_sin(a.s[4]), fcMath_sin(a.s[5]), fcMath_sin(a.s[6]), fcMath_sin(a.s[7]));
+}
+
+fcDouble8 fcDouble8_sinh(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_sinh(a.s[0]), fcMath_sinh(a.s[1]), fcMath_sinh(a.s[2]), fcMath_sinh(a.s[3]), fcMath_sinh(a.s[4]), fcMath_sinh(a.s[5]), fcMath_sinh(a.s[6]), fcMath_sinh(a.s[7]));
+}
+
+fcDouble8 fcDouble8_smoothStep(fcDouble8 a, fcDouble8 b, fcDouble8 c) {
+ return fcDouble8_create11111111(fcMath_smoothStep(a.s[0], b.s[0], c.s[0]), fcMath_smoothStep(a.s[1], b.s[1], c.s[1]), fcMath_smoothStep(a.s[2], b.s[2], c.s[2]), fcMath_smoothStep(a.s[3], b.s[3], c.s[3]), fcMath_smoothStep(a.s[4], b.s[4], c.s[4]), fcMath_smoothStep(a.s[5], b.s[5], c.s[5]), fcMath_smoothStep(a.s[6], b.s[6], c.s[6]), fcMath_smoothStep(a.s[7], b.s[7], c.s[7]));
+}
+
+fcDouble8 fcDouble8_sqrt(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_sqrt(a.s[0]), fcMath_sqrt(a.s[1]), fcMath_sqrt(a.s[2]), fcMath_sqrt(a.s[3]), fcMath_sqrt(a.s[4]), fcMath_sqrt(a.s[5]), fcMath_sqrt(a.s[6]), fcMath_sqrt(a.s[7]));
+}
+
+fcDouble8 fcDouble8_step(fcDouble8 a, fcDouble8 b) {
+ return fcDouble8_create11111111(fcMath_step(a.s[0], b.s[0]), fcMath_step(a.s[1], b.s[1]), fcMath_step(a.s[2], b.s[2]), fcMath_step(a.s[3], b.s[3]), fcMath_step(a.s[4], b.s[4]), fcMath_step(a.s[5], b.s[5]), fcMath_step(a.s[6], b.s[6]), fcMath_step(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_tan(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_tan(a.s[0]), fcMath_tan(a.s[1]), fcMath_tan(a.s[2]), fcMath_tan(a.s[3]), fcMath_tan(a.s[4]), fcMath_tan(a.s[5]), fcMath_tan(a.s[6]), fcMath_tan(a.s[7]));
+}
+
+fcDouble8 fcDouble8_tanh(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_tanh(a.s[0]), fcMath_tanh(a.s[1]), fcMath_tanh(a.s[2]), fcMath_tanh(a.s[3]), fcMath_tanh(a.s[4]), fcMath_tanh(a.s[5]), fcMath_tanh(a.s[6]), fcMath_tanh(a.s[7]));
+}
+
+fcDouble8 fcDouble8_tgamma(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_tgamma(a.s[0]), fcMath_tgamma(a.s[1]), fcMath_tgamma(a.s[2]), fcMath_tgamma(a.s[3]), fcMath_tgamma(a.s[4]), fcMath_tgamma(a.s[5]), fcMath_tgamma(a.s[6]), fcMath_tgamma(a.s[7]));
+}
+
+fcDouble8 fcDouble8_toDegrees(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_toDegrees(a.s[0]), fcMath_toDegrees(a.s[1]), fcMath_toDegrees(a.s[2]), fcMath_toDegrees(a.s[3]), fcMath_toDegrees(a.s[4]), fcMath_toDegrees(a.s[5]), fcMath_toDegrees(a.s[6]), fcMath_toDegrees(a.s[7]));
+}
+
+fcDouble8 fcDouble8_toRadians(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_toRadians(a.s[0]), fcMath_toRadians(a.s[1]), fcMath_toRadians(a.s[2]), fcMath_toRadians(a.s[3]), fcMath_toRadians(a.s[4]), fcMath_toRadians(a.s[5]), fcMath_toRadians(a.s[6]), fcMath_toRadians(a.s[7]));
+}
+
+fcDouble8 fcDouble8_trunc(fcDouble8 a) {
+ return fcDouble8_create11111111(fcMath_trunc(a.s[0]), fcMath_trunc(a.s[1]), fcMath_trunc(a.s[2]), fcMath_trunc(a.s[3]), fcMath_trunc(a.s[4]), fcMath_trunc(a.s[5]), fcMath_trunc(a.s[6]), fcMath_trunc(a.s[7]));
+}
+
+fcDouble8 fcDouble8_scalb(fcDouble8 a, fcInt8 n) {
+ return fcDouble8_create11111111(fcMath_scalb(a.s[0], n.s[0]), fcMath_scalb(a.s[1], n.s[1]), fcMath_scalb(a.s[2], n.s[2]), fcMath_scalb(a.s[3], n.s[3]), fcMath_scalb(a.s[4], n.s[4]), fcMath_scalb(a.s[5], n.s[5]), fcMath_scalb(a.s[6], n.s[6]), fcMath_scalb(a.s[7], n.s[7]));
+}
+
+fcDouble8 fcDouble8_ldexp(fcDouble8 a, fcInt8 n) {
+ return fcDouble8_create11111111(fcMath_ldexp(a.s[0], n.s[0]), fcMath_ldexp(a.s[1], n.s[1]), fcMath_ldexp(a.s[2], n.s[2]), fcMath_ldexp(a.s[3], n.s[3]), fcMath_ldexp(a.s[4], n.s[4]), fcMath_ldexp(a.s[5], n.s[5]), fcMath_ldexp(a.s[6], n.s[6]), fcMath_ldexp(a.s[7], n.s[7]));
+}
+
+fcDouble8 fcDouble8_pown(fcDouble8 a, fcInt8 b) {
+ return fcDouble8_create11111111(fcMath_pown(a.s[0], b.s[0]), fcMath_pown(a.s[1], b.s[1]), fcMath_pown(a.s[2], b.s[2]), fcMath_pown(a.s[3], b.s[3]), fcMath_pown(a.s[4], b.s[4]), fcMath_pown(a.s[5], b.s[5]), fcMath_pown(a.s[6], b.s[6]), fcMath_pown(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_rootn(fcDouble8 a, fcInt8 b) {
+ return fcDouble8_create11111111(fcMath_rootn(a.s[0], b.s[0]), fcMath_rootn(a.s[1], b.s[1]), fcMath_rootn(a.s[2], b.s[2]), fcMath_rootn(a.s[3], b.s[3]), fcMath_rootn(a.s[4], b.s[4]), fcMath_rootn(a.s[5], b.s[5]), fcMath_rootn(a.s[6], b.s[6]), fcMath_rootn(a.s[7], b.s[7]));
+}
+
+fcDouble8 fcDouble8_smoothStepk(fcDouble8 a, fcDouble8 b, fcDouble c) {
+ return fcDouble8_create11111111(fcMath_smoothStep(a.s[0], b.s[0], c), fcMath_smoothStep(a.s[1], b.s[1], c), fcMath_smoothStep(a.s[2], b.s[2], c), fcMath_smoothStep(a.s[3], b.s[3], c), fcMath_smoothStep(a.s[4], b.s[4], c), fcMath_smoothStep(a.s[5], b.s[5], c), fcMath_smoothStep(a.s[6], b.s[6], c), fcMath_smoothStep(a.s[7], b.s[7], c));
+}
+
+
+
+#endif // _FANCIER_VECTOR_H_
diff --git a/test/linux/jni/include/thirdparty/fancier/vector_array.h b/test/linux/jni/include/thirdparty/fancier/vector_array.h
new file mode 100644
index 0000000..bcf0c40
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/fancier/vector_array.h
@@ -0,0 +1,1107 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/*
+ * DO NOT MANUALLY EDIT THIS FILE!
+ * This file has been automatically generated, any modifications will be lost
+ * when generating the Fancier library. Any modifications to this file must be
+ * done via the corresponding template.
+ */
+
+#ifndef _FANCIER_VECTOR_ARRAY_H_
+#define _FANCIER_VECTOR_ARRAY_H_
+
+#include
+#include
+#include
+
+
+// Global Java References
+
+extern jclass fcByte2Array_class;
+extern jmethodID fcByte2Array_constructor;
+extern jclass fcByte3Array_class;
+extern jmethodID fcByte3Array_constructor;
+extern jclass fcByte4Array_class;
+extern jmethodID fcByte4Array_constructor;
+extern jclass fcByte8Array_class;
+extern jmethodID fcByte8Array_constructor;
+
+extern jclass fcShort2Array_class;
+extern jmethodID fcShort2Array_constructor;
+extern jclass fcShort3Array_class;
+extern jmethodID fcShort3Array_constructor;
+extern jclass fcShort4Array_class;
+extern jmethodID fcShort4Array_constructor;
+extern jclass fcShort8Array_class;
+extern jmethodID fcShort8Array_constructor;
+
+extern jclass fcInt2Array_class;
+extern jmethodID fcInt2Array_constructor;
+extern jclass fcInt3Array_class;
+extern jmethodID fcInt3Array_constructor;
+extern jclass fcInt4Array_class;
+extern jmethodID fcInt4Array_constructor;
+extern jclass fcInt8Array_class;
+extern jmethodID fcInt8Array_constructor;
+
+extern jclass fcLong2Array_class;
+extern jmethodID fcLong2Array_constructor;
+extern jclass fcLong3Array_class;
+extern jmethodID fcLong3Array_constructor;
+extern jclass fcLong4Array_class;
+extern jmethodID fcLong4Array_constructor;
+extern jclass fcLong8Array_class;
+extern jmethodID fcLong8Array_constructor;
+
+extern jclass fcFloat2Array_class;
+extern jmethodID fcFloat2Array_constructor;
+extern jclass fcFloat3Array_class;
+extern jmethodID fcFloat3Array_constructor;
+extern jclass fcFloat4Array_class;
+extern jmethodID fcFloat4Array_constructor;
+extern jclass fcFloat8Array_class;
+extern jmethodID fcFloat8Array_constructor;
+
+extern jclass fcDouble2Array_class;
+extern jmethodID fcDouble2Array_constructor;
+extern jclass fcDouble3Array_class;
+extern jmethodID fcDouble3Array_constructor;
+extern jclass fcDouble4Array_class;
+extern jmethodID fcDouble4Array_constructor;
+extern jclass fcDouble8Array_class;
+extern jmethodID fcDouble8Array_constructor;
+
+
+// Native Definitions
+
+/// Native representation of an array of elements of vector type `fcByte2`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcByte2* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcByte2Array;
+
+/// Native representation of an array of elements of vector type `fcByte3`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcByte3* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcByte3Array;
+
+/// Native representation of an array of elements of vector type `fcByte4`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcByte4* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcByte4Array;
+
+/// Native representation of an array of elements of vector type `fcByte8`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcByte8* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcByte8Array;
+
+/// Native representation of an array of elements of vector type `fcShort2`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcShort2* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcShort2Array;
+
+/// Native representation of an array of elements of vector type `fcShort3`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcShort3* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcShort3Array;
+
+/// Native representation of an array of elements of vector type `fcShort4`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcShort4* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcShort4Array;
+
+/// Native representation of an array of elements of vector type `fcShort8`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcShort8* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcShort8Array;
+
+/// Native representation of an array of elements of vector type `fcInt2`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcInt2* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcInt2Array;
+
+/// Native representation of an array of elements of vector type `fcInt3`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcInt3* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcInt3Array;
+
+/// Native representation of an array of elements of vector type `fcInt4`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcInt4* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcInt4Array;
+
+/// Native representation of an array of elements of vector type `fcInt8`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcInt8* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcInt8Array;
+
+/// Native representation of an array of elements of vector type `fcLong2`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcLong2* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcLong2Array;
+
+/// Native representation of an array of elements of vector type `fcLong3`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcLong3* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcLong3Array;
+
+/// Native representation of an array of elements of vector type `fcLong4`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcLong4* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcLong4Array;
+
+/// Native representation of an array of elements of vector type `fcLong8`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcLong8* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcLong8Array;
+
+/// Native representation of an array of elements of vector type `fcFloat2`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcFloat2* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcFloat2Array;
+
+/// Native representation of an array of elements of vector type `fcFloat3`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcFloat3* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcFloat3Array;
+
+/// Native representation of an array of elements of vector type `fcFloat4`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcFloat4* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcFloat4Array;
+
+/// Native representation of an array of elements of vector type `fcFloat8`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcFloat8* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcFloat8Array;
+
+/// Native representation of an array of elements of vector type `fcDouble2`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcDouble2* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcDouble2Array;
+
+/// Native representation of an array of elements of vector type `fcDouble3`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcDouble3* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcDouble3Array;
+
+/// Native representation of an array of elements of vector type `fcDouble4`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcDouble4* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcDouble4Array;
+
+/// Native representation of an array of elements of vector type `fcDouble8`.
+typedef struct {
+ /// Reference counter for the buffer inside.
+ ///
+ /// Multiple pointers to the same object can be created, and a reference counter must be
+ /// created in order to only free the contents when there are no more references to it.
+ fcInt ref_count;
+
+ /// Number of elements in the array.
+ fcInt len;
+
+ /// Pointer to native elements. Only valid when `location = FC_ARRAY_LOCATION_NATIVE`.
+ fcDouble8* c;
+
+ /// OpenCL buffer to array elements. Only valid when `location = FC_ARRAY_LOCATION_OPENCL`.
+ cl_mem ocl;
+
+ /// Current location of the array data.
+ int location;
+} fcDouble8Array;
+
+
+// Native Interface
+
+FANCIER_API jint fcVectorArray_initJNI(JNIEnv* env);
+FANCIER_API void fcVectorArray_releaseJNI(JNIEnv* env);
+
+FANCIER_API fcByte2Array* fcByte2Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcByte2Array_createRef(fcByte2Array* array);
+FANCIER_API fcError fcByte2Array_releaseRef(fcByte2Array* array);
+
+FANCIER_API fcError fcByte2Array_init(fcByte2Array* self);
+FANCIER_API fcError fcByte2Array_initSize(fcByte2Array* self, fcInt n);
+FANCIER_API fcError fcByte2Array_initArray(fcByte2Array* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByte2Array_initCopy(fcByte2Array* self, const fcByte2Array* array);
+FANCIER_API fcError fcByte2Array_release(fcByte2Array* self);
+
+FANCIER_API fcByte2 fcByte2Array_get(fcByte2Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcByte2Array_set(fcByte2Array* self, fcInt i, fcByte2 x);
+
+FANCIER_API fcError fcByte2Array_setArray(fcByte2Array* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByte2Array_setCopy(fcByte2Array* self, const fcByte2Array* array);
+FANCIER_API fcError fcByte2Array_setBuffer(fcByte2Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcByte2Array_syncToHost(fcByte2Array* self);
+FANCIER_API fcError fcByte2Array_syncToDevice(fcByte2Array* self);
+FANCIER_API fcBool fcByte2Array_valid(const fcByte2Array* self);
+
+FANCIER_API fcByte3Array* fcByte3Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcByte3Array_createRef(fcByte3Array* array);
+FANCIER_API fcError fcByte3Array_releaseRef(fcByte3Array* array);
+
+FANCIER_API fcError fcByte3Array_init(fcByte3Array* self);
+FANCIER_API fcError fcByte3Array_initSize(fcByte3Array* self, fcInt n);
+FANCIER_API fcError fcByte3Array_initArray(fcByte3Array* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByte3Array_initCopy(fcByte3Array* self, const fcByte3Array* array);
+FANCIER_API fcError fcByte3Array_release(fcByte3Array* self);
+
+FANCIER_API fcByte3 fcByte3Array_get(fcByte3Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcByte3Array_set(fcByte3Array* self, fcInt i, fcByte3 x);
+
+FANCIER_API fcError fcByte3Array_setArray(fcByte3Array* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByte3Array_setCopy(fcByte3Array* self, const fcByte3Array* array);
+FANCIER_API fcError fcByte3Array_setBuffer(fcByte3Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcByte3Array_syncToHost(fcByte3Array* self);
+FANCIER_API fcError fcByte3Array_syncToDevice(fcByte3Array* self);
+FANCIER_API fcBool fcByte3Array_valid(const fcByte3Array* self);
+
+FANCIER_API fcByte4Array* fcByte4Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcByte4Array_createRef(fcByte4Array* array);
+FANCIER_API fcError fcByte4Array_releaseRef(fcByte4Array* array);
+
+FANCIER_API fcError fcByte4Array_init(fcByte4Array* self);
+FANCIER_API fcError fcByte4Array_initSize(fcByte4Array* self, fcInt n);
+FANCIER_API fcError fcByte4Array_initArray(fcByte4Array* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByte4Array_initCopy(fcByte4Array* self, const fcByte4Array* array);
+FANCIER_API fcError fcByte4Array_release(fcByte4Array* self);
+
+FANCIER_API fcByte4 fcByte4Array_get(fcByte4Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcByte4Array_set(fcByte4Array* self, fcInt i, fcByte4 x);
+
+FANCIER_API fcError fcByte4Array_setArray(fcByte4Array* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByte4Array_setCopy(fcByte4Array* self, const fcByte4Array* array);
+FANCIER_API fcError fcByte4Array_setBuffer(fcByte4Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcByte4Array_syncToHost(fcByte4Array* self);
+FANCIER_API fcError fcByte4Array_syncToDevice(fcByte4Array* self);
+FANCIER_API fcBool fcByte4Array_valid(const fcByte4Array* self);
+
+FANCIER_API fcByte8Array* fcByte8Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcByte8Array_createRef(fcByte8Array* array);
+FANCIER_API fcError fcByte8Array_releaseRef(fcByte8Array* array);
+
+FANCIER_API fcError fcByte8Array_init(fcByte8Array* self);
+FANCIER_API fcError fcByte8Array_initSize(fcByte8Array* self, fcInt n);
+FANCIER_API fcError fcByte8Array_initArray(fcByte8Array* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByte8Array_initCopy(fcByte8Array* self, const fcByte8Array* array);
+FANCIER_API fcError fcByte8Array_release(fcByte8Array* self);
+
+FANCIER_API fcByte8 fcByte8Array_get(fcByte8Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcByte8Array_set(fcByte8Array* self, fcInt i, fcByte8 x);
+
+FANCIER_API fcError fcByte8Array_setArray(fcByte8Array* self, fcInt len, const fcByte* v);
+FANCIER_API fcError fcByte8Array_setCopy(fcByte8Array* self, const fcByte8Array* array);
+FANCIER_API fcError fcByte8Array_setBuffer(fcByte8Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcByte8Array_syncToHost(fcByte8Array* self);
+FANCIER_API fcError fcByte8Array_syncToDevice(fcByte8Array* self);
+FANCIER_API fcBool fcByte8Array_valid(const fcByte8Array* self);
+
+FANCIER_API fcShort2Array* fcShort2Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcShort2Array_createRef(fcShort2Array* array);
+FANCIER_API fcError fcShort2Array_releaseRef(fcShort2Array* array);
+
+FANCIER_API fcError fcShort2Array_init(fcShort2Array* self);
+FANCIER_API fcError fcShort2Array_initSize(fcShort2Array* self, fcInt n);
+FANCIER_API fcError fcShort2Array_initArray(fcShort2Array* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShort2Array_initCopy(fcShort2Array* self, const fcShort2Array* array);
+FANCIER_API fcError fcShort2Array_release(fcShort2Array* self);
+
+FANCIER_API fcShort2 fcShort2Array_get(fcShort2Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcShort2Array_set(fcShort2Array* self, fcInt i, fcShort2 x);
+
+FANCIER_API fcError fcShort2Array_setArray(fcShort2Array* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShort2Array_setCopy(fcShort2Array* self, const fcShort2Array* array);
+FANCIER_API fcError fcShort2Array_setBuffer(fcShort2Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcShort2Array_syncToHost(fcShort2Array* self);
+FANCIER_API fcError fcShort2Array_syncToDevice(fcShort2Array* self);
+FANCIER_API fcBool fcShort2Array_valid(const fcShort2Array* self);
+
+FANCIER_API fcShort3Array* fcShort3Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcShort3Array_createRef(fcShort3Array* array);
+FANCIER_API fcError fcShort3Array_releaseRef(fcShort3Array* array);
+
+FANCIER_API fcError fcShort3Array_init(fcShort3Array* self);
+FANCIER_API fcError fcShort3Array_initSize(fcShort3Array* self, fcInt n);
+FANCIER_API fcError fcShort3Array_initArray(fcShort3Array* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShort3Array_initCopy(fcShort3Array* self, const fcShort3Array* array);
+FANCIER_API fcError fcShort3Array_release(fcShort3Array* self);
+
+FANCIER_API fcShort3 fcShort3Array_get(fcShort3Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcShort3Array_set(fcShort3Array* self, fcInt i, fcShort3 x);
+
+FANCIER_API fcError fcShort3Array_setArray(fcShort3Array* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShort3Array_setCopy(fcShort3Array* self, const fcShort3Array* array);
+FANCIER_API fcError fcShort3Array_setBuffer(fcShort3Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcShort3Array_syncToHost(fcShort3Array* self);
+FANCIER_API fcError fcShort3Array_syncToDevice(fcShort3Array* self);
+FANCIER_API fcBool fcShort3Array_valid(const fcShort3Array* self);
+
+FANCIER_API fcShort4Array* fcShort4Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcShort4Array_createRef(fcShort4Array* array);
+FANCIER_API fcError fcShort4Array_releaseRef(fcShort4Array* array);
+
+FANCIER_API fcError fcShort4Array_init(fcShort4Array* self);
+FANCIER_API fcError fcShort4Array_initSize(fcShort4Array* self, fcInt n);
+FANCIER_API fcError fcShort4Array_initArray(fcShort4Array* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShort4Array_initCopy(fcShort4Array* self, const fcShort4Array* array);
+FANCIER_API fcError fcShort4Array_release(fcShort4Array* self);
+
+FANCIER_API fcShort4 fcShort4Array_get(fcShort4Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcShort4Array_set(fcShort4Array* self, fcInt i, fcShort4 x);
+
+FANCIER_API fcError fcShort4Array_setArray(fcShort4Array* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShort4Array_setCopy(fcShort4Array* self, const fcShort4Array* array);
+FANCIER_API fcError fcShort4Array_setBuffer(fcShort4Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcShort4Array_syncToHost(fcShort4Array* self);
+FANCIER_API fcError fcShort4Array_syncToDevice(fcShort4Array* self);
+FANCIER_API fcBool fcShort4Array_valid(const fcShort4Array* self);
+
+FANCIER_API fcShort8Array* fcShort8Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcShort8Array_createRef(fcShort8Array* array);
+FANCIER_API fcError fcShort8Array_releaseRef(fcShort8Array* array);
+
+FANCIER_API fcError fcShort8Array_init(fcShort8Array* self);
+FANCIER_API fcError fcShort8Array_initSize(fcShort8Array* self, fcInt n);
+FANCIER_API fcError fcShort8Array_initArray(fcShort8Array* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShort8Array_initCopy(fcShort8Array* self, const fcShort8Array* array);
+FANCIER_API fcError fcShort8Array_release(fcShort8Array* self);
+
+FANCIER_API fcShort8 fcShort8Array_get(fcShort8Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcShort8Array_set(fcShort8Array* self, fcInt i, fcShort8 x);
+
+FANCIER_API fcError fcShort8Array_setArray(fcShort8Array* self, fcInt len, const fcShort* v);
+FANCIER_API fcError fcShort8Array_setCopy(fcShort8Array* self, const fcShort8Array* array);
+FANCIER_API fcError fcShort8Array_setBuffer(fcShort8Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcShort8Array_syncToHost(fcShort8Array* self);
+FANCIER_API fcError fcShort8Array_syncToDevice(fcShort8Array* self);
+FANCIER_API fcBool fcShort8Array_valid(const fcShort8Array* self);
+
+FANCIER_API fcInt2Array* fcInt2Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcInt2Array_createRef(fcInt2Array* array);
+FANCIER_API fcError fcInt2Array_releaseRef(fcInt2Array* array);
+
+FANCIER_API fcError fcInt2Array_init(fcInt2Array* self);
+FANCIER_API fcError fcInt2Array_initSize(fcInt2Array* self, fcInt n);
+FANCIER_API fcError fcInt2Array_initArray(fcInt2Array* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcInt2Array_initCopy(fcInt2Array* self, const fcInt2Array* array);
+FANCIER_API fcError fcInt2Array_release(fcInt2Array* self);
+
+FANCIER_API fcInt2 fcInt2Array_get(fcInt2Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcInt2Array_set(fcInt2Array* self, fcInt i, fcInt2 x);
+
+FANCIER_API fcError fcInt2Array_setArray(fcInt2Array* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcInt2Array_setCopy(fcInt2Array* self, const fcInt2Array* array);
+FANCIER_API fcError fcInt2Array_setBuffer(fcInt2Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcInt2Array_syncToHost(fcInt2Array* self);
+FANCIER_API fcError fcInt2Array_syncToDevice(fcInt2Array* self);
+FANCIER_API fcBool fcInt2Array_valid(const fcInt2Array* self);
+
+FANCIER_API fcInt3Array* fcInt3Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcInt3Array_createRef(fcInt3Array* array);
+FANCIER_API fcError fcInt3Array_releaseRef(fcInt3Array* array);
+
+FANCIER_API fcError fcInt3Array_init(fcInt3Array* self);
+FANCIER_API fcError fcInt3Array_initSize(fcInt3Array* self, fcInt n);
+FANCIER_API fcError fcInt3Array_initArray(fcInt3Array* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcInt3Array_initCopy(fcInt3Array* self, const fcInt3Array* array);
+FANCIER_API fcError fcInt3Array_release(fcInt3Array* self);
+
+FANCIER_API fcInt3 fcInt3Array_get(fcInt3Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcInt3Array_set(fcInt3Array* self, fcInt i, fcInt3 x);
+
+FANCIER_API fcError fcInt3Array_setArray(fcInt3Array* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcInt3Array_setCopy(fcInt3Array* self, const fcInt3Array* array);
+FANCIER_API fcError fcInt3Array_setBuffer(fcInt3Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcInt3Array_syncToHost(fcInt3Array* self);
+FANCIER_API fcError fcInt3Array_syncToDevice(fcInt3Array* self);
+FANCIER_API fcBool fcInt3Array_valid(const fcInt3Array* self);
+
+FANCIER_API fcInt4Array* fcInt4Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcInt4Array_createRef(fcInt4Array* array);
+FANCIER_API fcError fcInt4Array_releaseRef(fcInt4Array* array);
+
+FANCIER_API fcError fcInt4Array_init(fcInt4Array* self);
+FANCIER_API fcError fcInt4Array_initSize(fcInt4Array* self, fcInt n);
+FANCIER_API fcError fcInt4Array_initArray(fcInt4Array* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcInt4Array_initCopy(fcInt4Array* self, const fcInt4Array* array);
+FANCIER_API fcError fcInt4Array_release(fcInt4Array* self);
+
+FANCIER_API fcInt4 fcInt4Array_get(fcInt4Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcInt4Array_set(fcInt4Array* self, fcInt i, fcInt4 x);
+
+FANCIER_API fcError fcInt4Array_setArray(fcInt4Array* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcInt4Array_setCopy(fcInt4Array* self, const fcInt4Array* array);
+FANCIER_API fcError fcInt4Array_setBuffer(fcInt4Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcInt4Array_syncToHost(fcInt4Array* self);
+FANCIER_API fcError fcInt4Array_syncToDevice(fcInt4Array* self);
+FANCIER_API fcBool fcInt4Array_valid(const fcInt4Array* self);
+
+FANCIER_API fcInt8Array* fcInt8Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcInt8Array_createRef(fcInt8Array* array);
+FANCIER_API fcError fcInt8Array_releaseRef(fcInt8Array* array);
+
+FANCIER_API fcError fcInt8Array_init(fcInt8Array* self);
+FANCIER_API fcError fcInt8Array_initSize(fcInt8Array* self, fcInt n);
+FANCIER_API fcError fcInt8Array_initArray(fcInt8Array* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcInt8Array_initCopy(fcInt8Array* self, const fcInt8Array* array);
+FANCIER_API fcError fcInt8Array_release(fcInt8Array* self);
+
+FANCIER_API fcInt8 fcInt8Array_get(fcInt8Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcInt8Array_set(fcInt8Array* self, fcInt i, fcInt8 x);
+
+FANCIER_API fcError fcInt8Array_setArray(fcInt8Array* self, fcInt len, const fcInt* v);
+FANCIER_API fcError fcInt8Array_setCopy(fcInt8Array* self, const fcInt8Array* array);
+FANCIER_API fcError fcInt8Array_setBuffer(fcInt8Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcInt8Array_syncToHost(fcInt8Array* self);
+FANCIER_API fcError fcInt8Array_syncToDevice(fcInt8Array* self);
+FANCIER_API fcBool fcInt8Array_valid(const fcInt8Array* self);
+
+FANCIER_API fcLong2Array* fcLong2Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcLong2Array_createRef(fcLong2Array* array);
+FANCIER_API fcError fcLong2Array_releaseRef(fcLong2Array* array);
+
+FANCIER_API fcError fcLong2Array_init(fcLong2Array* self);
+FANCIER_API fcError fcLong2Array_initSize(fcLong2Array* self, fcInt n);
+FANCIER_API fcError fcLong2Array_initArray(fcLong2Array* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLong2Array_initCopy(fcLong2Array* self, const fcLong2Array* array);
+FANCIER_API fcError fcLong2Array_release(fcLong2Array* self);
+
+FANCIER_API fcLong2 fcLong2Array_get(fcLong2Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcLong2Array_set(fcLong2Array* self, fcInt i, fcLong2 x);
+
+FANCIER_API fcError fcLong2Array_setArray(fcLong2Array* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLong2Array_setCopy(fcLong2Array* self, const fcLong2Array* array);
+FANCIER_API fcError fcLong2Array_setBuffer(fcLong2Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcLong2Array_syncToHost(fcLong2Array* self);
+FANCIER_API fcError fcLong2Array_syncToDevice(fcLong2Array* self);
+FANCIER_API fcBool fcLong2Array_valid(const fcLong2Array* self);
+
+FANCIER_API fcLong3Array* fcLong3Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcLong3Array_createRef(fcLong3Array* array);
+FANCIER_API fcError fcLong3Array_releaseRef(fcLong3Array* array);
+
+FANCIER_API fcError fcLong3Array_init(fcLong3Array* self);
+FANCIER_API fcError fcLong3Array_initSize(fcLong3Array* self, fcInt n);
+FANCIER_API fcError fcLong3Array_initArray(fcLong3Array* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLong3Array_initCopy(fcLong3Array* self, const fcLong3Array* array);
+FANCIER_API fcError fcLong3Array_release(fcLong3Array* self);
+
+FANCIER_API fcLong3 fcLong3Array_get(fcLong3Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcLong3Array_set(fcLong3Array* self, fcInt i, fcLong3 x);
+
+FANCIER_API fcError fcLong3Array_setArray(fcLong3Array* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLong3Array_setCopy(fcLong3Array* self, const fcLong3Array* array);
+FANCIER_API fcError fcLong3Array_setBuffer(fcLong3Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcLong3Array_syncToHost(fcLong3Array* self);
+FANCIER_API fcError fcLong3Array_syncToDevice(fcLong3Array* self);
+FANCIER_API fcBool fcLong3Array_valid(const fcLong3Array* self);
+
+FANCIER_API fcLong4Array* fcLong4Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcLong4Array_createRef(fcLong4Array* array);
+FANCIER_API fcError fcLong4Array_releaseRef(fcLong4Array* array);
+
+FANCIER_API fcError fcLong4Array_init(fcLong4Array* self);
+FANCIER_API fcError fcLong4Array_initSize(fcLong4Array* self, fcInt n);
+FANCIER_API fcError fcLong4Array_initArray(fcLong4Array* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLong4Array_initCopy(fcLong4Array* self, const fcLong4Array* array);
+FANCIER_API fcError fcLong4Array_release(fcLong4Array* self);
+
+FANCIER_API fcLong4 fcLong4Array_get(fcLong4Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcLong4Array_set(fcLong4Array* self, fcInt i, fcLong4 x);
+
+FANCIER_API fcError fcLong4Array_setArray(fcLong4Array* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLong4Array_setCopy(fcLong4Array* self, const fcLong4Array* array);
+FANCIER_API fcError fcLong4Array_setBuffer(fcLong4Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcLong4Array_syncToHost(fcLong4Array* self);
+FANCIER_API fcError fcLong4Array_syncToDevice(fcLong4Array* self);
+FANCIER_API fcBool fcLong4Array_valid(const fcLong4Array* self);
+
+FANCIER_API fcLong8Array* fcLong8Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcLong8Array_createRef(fcLong8Array* array);
+FANCIER_API fcError fcLong8Array_releaseRef(fcLong8Array* array);
+
+FANCIER_API fcError fcLong8Array_init(fcLong8Array* self);
+FANCIER_API fcError fcLong8Array_initSize(fcLong8Array* self, fcInt n);
+FANCIER_API fcError fcLong8Array_initArray(fcLong8Array* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLong8Array_initCopy(fcLong8Array* self, const fcLong8Array* array);
+FANCIER_API fcError fcLong8Array_release(fcLong8Array* self);
+
+FANCIER_API fcLong8 fcLong8Array_get(fcLong8Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcLong8Array_set(fcLong8Array* self, fcInt i, fcLong8 x);
+
+FANCIER_API fcError fcLong8Array_setArray(fcLong8Array* self, fcInt len, const fcLong* v);
+FANCIER_API fcError fcLong8Array_setCopy(fcLong8Array* self, const fcLong8Array* array);
+FANCIER_API fcError fcLong8Array_setBuffer(fcLong8Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcLong8Array_syncToHost(fcLong8Array* self);
+FANCIER_API fcError fcLong8Array_syncToDevice(fcLong8Array* self);
+FANCIER_API fcBool fcLong8Array_valid(const fcLong8Array* self);
+
+FANCIER_API fcFloat2Array* fcFloat2Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcFloat2Array_createRef(fcFloat2Array* array);
+FANCIER_API fcError fcFloat2Array_releaseRef(fcFloat2Array* array);
+
+FANCIER_API fcError fcFloat2Array_init(fcFloat2Array* self);
+FANCIER_API fcError fcFloat2Array_initSize(fcFloat2Array* self, fcInt n);
+FANCIER_API fcError fcFloat2Array_initArray(fcFloat2Array* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloat2Array_initCopy(fcFloat2Array* self, const fcFloat2Array* array);
+FANCIER_API fcError fcFloat2Array_release(fcFloat2Array* self);
+
+FANCIER_API fcFloat2 fcFloat2Array_get(fcFloat2Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcFloat2Array_set(fcFloat2Array* self, fcInt i, fcFloat2 x);
+
+FANCIER_API fcError fcFloat2Array_setArray(fcFloat2Array* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloat2Array_setCopy(fcFloat2Array* self, const fcFloat2Array* array);
+FANCIER_API fcError fcFloat2Array_setBuffer(fcFloat2Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcFloat2Array_syncToHost(fcFloat2Array* self);
+FANCIER_API fcError fcFloat2Array_syncToDevice(fcFloat2Array* self);
+FANCIER_API fcBool fcFloat2Array_valid(const fcFloat2Array* self);
+
+FANCIER_API fcFloat3Array* fcFloat3Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcFloat3Array_createRef(fcFloat3Array* array);
+FANCIER_API fcError fcFloat3Array_releaseRef(fcFloat3Array* array);
+
+FANCIER_API fcError fcFloat3Array_init(fcFloat3Array* self);
+FANCIER_API fcError fcFloat3Array_initSize(fcFloat3Array* self, fcInt n);
+FANCIER_API fcError fcFloat3Array_initArray(fcFloat3Array* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloat3Array_initCopy(fcFloat3Array* self, const fcFloat3Array* array);
+FANCIER_API fcError fcFloat3Array_release(fcFloat3Array* self);
+
+FANCIER_API fcFloat3 fcFloat3Array_get(fcFloat3Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcFloat3Array_set(fcFloat3Array* self, fcInt i, fcFloat3 x);
+
+FANCIER_API fcError fcFloat3Array_setArray(fcFloat3Array* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloat3Array_setCopy(fcFloat3Array* self, const fcFloat3Array* array);
+FANCIER_API fcError fcFloat3Array_setBuffer(fcFloat3Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcFloat3Array_syncToHost(fcFloat3Array* self);
+FANCIER_API fcError fcFloat3Array_syncToDevice(fcFloat3Array* self);
+FANCIER_API fcBool fcFloat3Array_valid(const fcFloat3Array* self);
+
+FANCIER_API fcFloat4Array* fcFloat4Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcFloat4Array_createRef(fcFloat4Array* array);
+FANCIER_API fcError fcFloat4Array_releaseRef(fcFloat4Array* array);
+
+FANCIER_API fcError fcFloat4Array_init(fcFloat4Array* self);
+FANCIER_API fcError fcFloat4Array_initSize(fcFloat4Array* self, fcInt n);
+FANCIER_API fcError fcFloat4Array_initArray(fcFloat4Array* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloat4Array_initCopy(fcFloat4Array* self, const fcFloat4Array* array);
+FANCIER_API fcError fcFloat4Array_release(fcFloat4Array* self);
+
+FANCIER_API fcFloat4 fcFloat4Array_get(fcFloat4Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcFloat4Array_set(fcFloat4Array* self, fcInt i, fcFloat4 x);
+
+FANCIER_API fcError fcFloat4Array_setArray(fcFloat4Array* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloat4Array_setCopy(fcFloat4Array* self, const fcFloat4Array* array);
+FANCIER_API fcError fcFloat4Array_setBuffer(fcFloat4Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcFloat4Array_syncToHost(fcFloat4Array* self);
+FANCIER_API fcError fcFloat4Array_syncToDevice(fcFloat4Array* self);
+FANCIER_API fcBool fcFloat4Array_valid(const fcFloat4Array* self);
+
+FANCIER_API fcFloat8Array* fcFloat8Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcFloat8Array_createRef(fcFloat8Array* array);
+FANCIER_API fcError fcFloat8Array_releaseRef(fcFloat8Array* array);
+
+FANCIER_API fcError fcFloat8Array_init(fcFloat8Array* self);
+FANCIER_API fcError fcFloat8Array_initSize(fcFloat8Array* self, fcInt n);
+FANCIER_API fcError fcFloat8Array_initArray(fcFloat8Array* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloat8Array_initCopy(fcFloat8Array* self, const fcFloat8Array* array);
+FANCIER_API fcError fcFloat8Array_release(fcFloat8Array* self);
+
+FANCIER_API fcFloat8 fcFloat8Array_get(fcFloat8Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcFloat8Array_set(fcFloat8Array* self, fcInt i, fcFloat8 x);
+
+FANCIER_API fcError fcFloat8Array_setArray(fcFloat8Array* self, fcInt len, const fcFloat* v);
+FANCIER_API fcError fcFloat8Array_setCopy(fcFloat8Array* self, const fcFloat8Array* array);
+FANCIER_API fcError fcFloat8Array_setBuffer(fcFloat8Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcFloat8Array_syncToHost(fcFloat8Array* self);
+FANCIER_API fcError fcFloat8Array_syncToDevice(fcFloat8Array* self);
+FANCIER_API fcBool fcFloat8Array_valid(const fcFloat8Array* self);
+
+FANCIER_API fcDouble2Array* fcDouble2Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcDouble2Array_createRef(fcDouble2Array* array);
+FANCIER_API fcError fcDouble2Array_releaseRef(fcDouble2Array* array);
+
+FANCIER_API fcError fcDouble2Array_init(fcDouble2Array* self);
+FANCIER_API fcError fcDouble2Array_initSize(fcDouble2Array* self, fcInt n);
+FANCIER_API fcError fcDouble2Array_initArray(fcDouble2Array* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDouble2Array_initCopy(fcDouble2Array* self, const fcDouble2Array* array);
+FANCIER_API fcError fcDouble2Array_release(fcDouble2Array* self);
+
+FANCIER_API fcDouble2 fcDouble2Array_get(fcDouble2Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcDouble2Array_set(fcDouble2Array* self, fcInt i, fcDouble2 x);
+
+FANCIER_API fcError fcDouble2Array_setArray(fcDouble2Array* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDouble2Array_setCopy(fcDouble2Array* self, const fcDouble2Array* array);
+FANCIER_API fcError fcDouble2Array_setBuffer(fcDouble2Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcDouble2Array_syncToHost(fcDouble2Array* self);
+FANCIER_API fcError fcDouble2Array_syncToDevice(fcDouble2Array* self);
+FANCIER_API fcBool fcDouble2Array_valid(const fcDouble2Array* self);
+
+FANCIER_API fcDouble3Array* fcDouble3Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcDouble3Array_createRef(fcDouble3Array* array);
+FANCIER_API fcError fcDouble3Array_releaseRef(fcDouble3Array* array);
+
+FANCIER_API fcError fcDouble3Array_init(fcDouble3Array* self);
+FANCIER_API fcError fcDouble3Array_initSize(fcDouble3Array* self, fcInt n);
+FANCIER_API fcError fcDouble3Array_initArray(fcDouble3Array* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDouble3Array_initCopy(fcDouble3Array* self, const fcDouble3Array* array);
+FANCIER_API fcError fcDouble3Array_release(fcDouble3Array* self);
+
+FANCIER_API fcDouble3 fcDouble3Array_get(fcDouble3Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcDouble3Array_set(fcDouble3Array* self, fcInt i, fcDouble3 x);
+
+FANCIER_API fcError fcDouble3Array_setArray(fcDouble3Array* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDouble3Array_setCopy(fcDouble3Array* self, const fcDouble3Array* array);
+FANCIER_API fcError fcDouble3Array_setBuffer(fcDouble3Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcDouble3Array_syncToHost(fcDouble3Array* self);
+FANCIER_API fcError fcDouble3Array_syncToDevice(fcDouble3Array* self);
+FANCIER_API fcBool fcDouble3Array_valid(const fcDouble3Array* self);
+
+FANCIER_API fcDouble4Array* fcDouble4Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcDouble4Array_createRef(fcDouble4Array* array);
+FANCIER_API fcError fcDouble4Array_releaseRef(fcDouble4Array* array);
+
+FANCIER_API fcError fcDouble4Array_init(fcDouble4Array* self);
+FANCIER_API fcError fcDouble4Array_initSize(fcDouble4Array* self, fcInt n);
+FANCIER_API fcError fcDouble4Array_initArray(fcDouble4Array* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDouble4Array_initCopy(fcDouble4Array* self, const fcDouble4Array* array);
+FANCIER_API fcError fcDouble4Array_release(fcDouble4Array* self);
+
+FANCIER_API fcDouble4 fcDouble4Array_get(fcDouble4Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcDouble4Array_set(fcDouble4Array* self, fcInt i, fcDouble4 x);
+
+FANCIER_API fcError fcDouble4Array_setArray(fcDouble4Array* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDouble4Array_setCopy(fcDouble4Array* self, const fcDouble4Array* array);
+FANCIER_API fcError fcDouble4Array_setBuffer(fcDouble4Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcDouble4Array_syncToHost(fcDouble4Array* self);
+FANCIER_API fcError fcDouble4Array_syncToDevice(fcDouble4Array* self);
+FANCIER_API fcBool fcDouble4Array_valid(const fcDouble4Array* self);
+
+FANCIER_API fcDouble8Array* fcDouble8Array_getJava(JNIEnv* env, jobject obj);
+FANCIER_API fcError fcDouble8Array_createRef(fcDouble8Array* array);
+FANCIER_API fcError fcDouble8Array_releaseRef(fcDouble8Array* array);
+
+FANCIER_API fcError fcDouble8Array_init(fcDouble8Array* self);
+FANCIER_API fcError fcDouble8Array_initSize(fcDouble8Array* self, fcInt n);
+FANCIER_API fcError fcDouble8Array_initArray(fcDouble8Array* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDouble8Array_initCopy(fcDouble8Array* self, const fcDouble8Array* array);
+FANCIER_API fcError fcDouble8Array_release(fcDouble8Array* self);
+
+FANCIER_API fcDouble8 fcDouble8Array_get(fcDouble8Array* self, fcInt i, fcError* err);
+FANCIER_API fcError fcDouble8Array_set(fcDouble8Array* self, fcInt i, fcDouble8 x);
+
+FANCIER_API fcError fcDouble8Array_setArray(fcDouble8Array* self, fcInt len, const fcDouble* v);
+FANCIER_API fcError fcDouble8Array_setCopy(fcDouble8Array* self, const fcDouble8Array* array);
+FANCIER_API fcError fcDouble8Array_setBuffer(fcDouble8Array* self, fcLong len, const void* v);
+
+FANCIER_API fcError fcDouble8Array_syncToHost(fcDouble8Array* self);
+FANCIER_API fcError fcDouble8Array_syncToDevice(fcDouble8Array* self);
+FANCIER_API fcBool fcDouble8Array_valid(const fcDouble8Array* self);
+
+#endif // _FANCIER_VECTOR_ARRAY_H_
diff --git a/test/linux/jni/include/thirdparty/jni.h b/test/linux/jni/include/thirdparty/jni.h
new file mode 100644
index 0000000..2e83cb7
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/jni.h
@@ -0,0 +1,1960 @@
+/*
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * We used part of Netscape's Java Runtime Interface (JRI) as the starting
+ * point of our design and implementation.
+ */
+
+/******************************************************************************
+ * Java Runtime Interface
+ * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
+ *****************************************************************************/
+
+#ifndef _JAVASOFT_JNI_H_
+#define _JAVASOFT_JNI_H_
+
+#include
+#include
+
+/* jni_md.h contains the machine-dependent typedefs for jbyte, jint
+ and jlong */
+
+#include "jni_md.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * JNI Types
+ */
+
+#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
+
+typedef unsigned char jboolean;
+typedef unsigned short jchar;
+typedef short jshort;
+typedef float jfloat;
+typedef double jdouble;
+
+typedef jint jsize;
+
+#ifdef __cplusplus
+
+class _jobject {};
+class _jclass : public _jobject {};
+class _jthrowable : public _jobject {};
+class _jstring : public _jobject {};
+class _jarray : public _jobject {};
+class _jbooleanArray : public _jarray {};
+class _jbyteArray : public _jarray {};
+class _jcharArray : public _jarray {};
+class _jshortArray : public _jarray {};
+class _jintArray : public _jarray {};
+class _jlongArray : public _jarray {};
+class _jfloatArray : public _jarray {};
+class _jdoubleArray : public _jarray {};
+class _jobjectArray : public _jarray {};
+
+typedef _jobject *jobject;
+typedef _jclass *jclass;
+typedef _jthrowable *jthrowable;
+typedef _jstring *jstring;
+typedef _jarray *jarray;
+typedef _jbooleanArray *jbooleanArray;
+typedef _jbyteArray *jbyteArray;
+typedef _jcharArray *jcharArray;
+typedef _jshortArray *jshortArray;
+typedef _jintArray *jintArray;
+typedef _jlongArray *jlongArray;
+typedef _jfloatArray *jfloatArray;
+typedef _jdoubleArray *jdoubleArray;
+typedef _jobjectArray *jobjectArray;
+
+#else
+
+struct _jobject;
+
+typedef struct _jobject *jobject;
+typedef jobject jclass;
+typedef jobject jthrowable;
+typedef jobject jstring;
+typedef jobject jarray;
+typedef jarray jbooleanArray;
+typedef jarray jbyteArray;
+typedef jarray jcharArray;
+typedef jarray jshortArray;
+typedef jarray jintArray;
+typedef jarray jlongArray;
+typedef jarray jfloatArray;
+typedef jarray jdoubleArray;
+typedef jarray jobjectArray;
+
+#endif
+
+typedef jobject jweak;
+
+typedef union jvalue {
+ jboolean z;
+ jbyte b;
+ jchar c;
+ jshort s;
+ jint i;
+ jlong j;
+ jfloat f;
+ jdouble d;
+ jobject l;
+} jvalue;
+
+struct _jfieldID;
+typedef struct _jfieldID *jfieldID;
+
+struct _jmethodID;
+typedef struct _jmethodID *jmethodID;
+
+/* Return values from jobjectRefType */
+typedef enum _jobjectType {
+ JNIInvalidRefType = 0,
+ JNILocalRefType = 1,
+ JNIGlobalRefType = 2,
+ JNIWeakGlobalRefType = 3
+} jobjectRefType;
+
+
+#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
+
+/*
+ * jboolean constants
+ */
+
+#define JNI_FALSE 0
+#define JNI_TRUE 1
+
+/*
+ * possible return values for JNI functions.
+ */
+
+#define JNI_OK 0 /* success */
+#define JNI_ERR (-1) /* unknown error */
+#define JNI_EDETACHED (-2) /* thread detached from the VM */
+#define JNI_EVERSION (-3) /* JNI version error */
+#define JNI_ENOMEM (-4) /* not enough memory */
+#define JNI_EEXIST (-5) /* VM already created */
+#define JNI_EINVAL (-6) /* invalid arguments */
+
+/*
+ * used in ReleaseScalarArrayElements
+ */
+
+#define JNI_COMMIT 1
+#define JNI_ABORT 2
+
+/*
+ * used in RegisterNatives to describe native method name, signature,
+ * and function pointer.
+ */
+
+typedef struct {
+ char *name;
+ char *signature;
+ void *fnPtr;
+} JNINativeMethod;
+
+/*
+ * JNI Native Method Interface.
+ */
+
+struct JNINativeInterface_;
+
+struct JNIEnv_;
+
+#ifdef __cplusplus
+typedef JNIEnv_ JNIEnv;
+#else
+typedef const struct JNINativeInterface_ *JNIEnv;
+#endif
+
+/*
+ * JNI Invocation Interface.
+ */
+
+struct JNIInvokeInterface_;
+
+struct JavaVM_;
+
+#ifdef __cplusplus
+typedef JavaVM_ JavaVM;
+#else
+typedef const struct JNIInvokeInterface_ *JavaVM;
+#endif
+
+struct JNINativeInterface_ {
+ void *reserved0;
+ void *reserved1;
+ void *reserved2;
+
+ void *reserved3;
+ jint (JNICALL *GetVersion)(JNIEnv *env);
+
+ jclass (JNICALL *DefineClass)
+ (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
+ jsize len);
+ jclass (JNICALL *FindClass)
+ (JNIEnv *env, const char *name);
+
+ jmethodID (JNICALL *FromReflectedMethod)
+ (JNIEnv *env, jobject method);
+ jfieldID (JNICALL *FromReflectedField)
+ (JNIEnv *env, jobject field);
+
+ jobject (JNICALL *ToReflectedMethod)
+ (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
+
+ jclass (JNICALL *GetSuperclass)
+ (JNIEnv *env, jclass sub);
+ jboolean (JNICALL *IsAssignableFrom)
+ (JNIEnv *env, jclass sub, jclass sup);
+
+ jobject (JNICALL *ToReflectedField)
+ (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
+
+ jint (JNICALL *Throw)
+ (JNIEnv *env, jthrowable obj);
+ jint (JNICALL *ThrowNew)
+ (JNIEnv *env, jclass clazz, const char *msg);
+ jthrowable (JNICALL *ExceptionOccurred)
+ (JNIEnv *env);
+ void (JNICALL *ExceptionDescribe)
+ (JNIEnv *env);
+ void (JNICALL *ExceptionClear)
+ (JNIEnv *env);
+ void (JNICALL *FatalError)
+ (JNIEnv *env, const char *msg);
+
+ jint (JNICALL *PushLocalFrame)
+ (JNIEnv *env, jint capacity);
+ jobject (JNICALL *PopLocalFrame)
+ (JNIEnv *env, jobject result);
+
+ jobject (JNICALL *NewGlobalRef)
+ (JNIEnv *env, jobject lobj);
+ void (JNICALL *DeleteGlobalRef)
+ (JNIEnv *env, jobject gref);
+ void (JNICALL *DeleteLocalRef)
+ (JNIEnv *env, jobject obj);
+ jboolean (JNICALL *IsSameObject)
+ (JNIEnv *env, jobject obj1, jobject obj2);
+ jobject (JNICALL *NewLocalRef)
+ (JNIEnv *env, jobject ref);
+ jint (JNICALL *EnsureLocalCapacity)
+ (JNIEnv *env, jint capacity);
+
+ jobject (JNICALL *AllocObject)
+ (JNIEnv *env, jclass clazz);
+ jobject (JNICALL *NewObject)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jobject (JNICALL *NewObjectV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jobject (JNICALL *NewObjectA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jclass (JNICALL *GetObjectClass)
+ (JNIEnv *env, jobject obj);
+ jboolean (JNICALL *IsInstanceOf)
+ (JNIEnv *env, jobject obj, jclass clazz);
+
+ jmethodID (JNICALL *GetMethodID)
+ (JNIEnv *env, jclass clazz, const char *name, const char *sig);
+
+ jobject (JNICALL *CallObjectMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jobject (JNICALL *CallObjectMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jobject (JNICALL *CallObjectMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
+
+ jboolean (JNICALL *CallBooleanMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jboolean (JNICALL *CallBooleanMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jboolean (JNICALL *CallBooleanMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
+
+ jbyte (JNICALL *CallByteMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jbyte (JNICALL *CallByteMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jbyte (JNICALL *CallByteMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
+
+ jchar (JNICALL *CallCharMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jchar (JNICALL *CallCharMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jchar (JNICALL *CallCharMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
+
+ jshort (JNICALL *CallShortMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jshort (JNICALL *CallShortMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jshort (JNICALL *CallShortMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
+
+ jint (JNICALL *CallIntMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jint (JNICALL *CallIntMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jint (JNICALL *CallIntMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
+
+ jlong (JNICALL *CallLongMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jlong (JNICALL *CallLongMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jlong (JNICALL *CallLongMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
+
+ jfloat (JNICALL *CallFloatMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jfloat (JNICALL *CallFloatMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jfloat (JNICALL *CallFloatMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
+
+ jdouble (JNICALL *CallDoubleMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ jdouble (JNICALL *CallDoubleMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ jdouble (JNICALL *CallDoubleMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
+
+ void (JNICALL *CallVoidMethod)
+ (JNIEnv *env, jobject obj, jmethodID methodID, ...);
+ void (JNICALL *CallVoidMethodV)
+ (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
+ void (JNICALL *CallVoidMethodA)
+ (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
+
+ jobject (JNICALL *CallNonvirtualObjectMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jobject (JNICALL *CallNonvirtualObjectMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jobject (JNICALL *CallNonvirtualObjectMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue * args);
+
+ jboolean (JNICALL *CallNonvirtualBooleanMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jboolean (JNICALL *CallNonvirtualBooleanMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jboolean (JNICALL *CallNonvirtualBooleanMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue * args);
+
+ jbyte (JNICALL *CallNonvirtualByteMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jbyte (JNICALL *CallNonvirtualByteMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jbyte (JNICALL *CallNonvirtualByteMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue *args);
+
+ jchar (JNICALL *CallNonvirtualCharMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jchar (JNICALL *CallNonvirtualCharMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jchar (JNICALL *CallNonvirtualCharMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue *args);
+
+ jshort (JNICALL *CallNonvirtualShortMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jshort (JNICALL *CallNonvirtualShortMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jshort (JNICALL *CallNonvirtualShortMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue *args);
+
+ jint (JNICALL *CallNonvirtualIntMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jint (JNICALL *CallNonvirtualIntMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jint (JNICALL *CallNonvirtualIntMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue *args);
+
+ jlong (JNICALL *CallNonvirtualLongMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jlong (JNICALL *CallNonvirtualLongMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jlong (JNICALL *CallNonvirtualLongMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue *args);
+
+ jfloat (JNICALL *CallNonvirtualFloatMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jfloat (JNICALL *CallNonvirtualFloatMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jfloat (JNICALL *CallNonvirtualFloatMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue *args);
+
+ jdouble (JNICALL *CallNonvirtualDoubleMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ jdouble (JNICALL *CallNonvirtualDoubleMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ jdouble (JNICALL *CallNonvirtualDoubleMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue *args);
+
+ void (JNICALL *CallNonvirtualVoidMethod)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
+ void (JNICALL *CallNonvirtualVoidMethodV)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ va_list args);
+ void (JNICALL *CallNonvirtualVoidMethodA)
+ (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
+ const jvalue * args);
+
+ jfieldID (JNICALL *GetFieldID)
+ (JNIEnv *env, jclass clazz, const char *name, const char *sig);
+
+ jobject (JNICALL *GetObjectField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+ jboolean (JNICALL *GetBooleanField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+ jbyte (JNICALL *GetByteField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+ jchar (JNICALL *GetCharField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+ jshort (JNICALL *GetShortField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+ jint (JNICALL *GetIntField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+ jlong (JNICALL *GetLongField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+ jfloat (JNICALL *GetFloatField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+ jdouble (JNICALL *GetDoubleField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID);
+
+ void (JNICALL *SetObjectField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
+ void (JNICALL *SetBooleanField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
+ void (JNICALL *SetByteField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
+ void (JNICALL *SetCharField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
+ void (JNICALL *SetShortField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
+ void (JNICALL *SetIntField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
+ void (JNICALL *SetLongField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
+ void (JNICALL *SetFloatField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
+ void (JNICALL *SetDoubleField)
+ (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
+
+ jmethodID (JNICALL *GetStaticMethodID)
+ (JNIEnv *env, jclass clazz, const char *name, const char *sig);
+
+ jobject (JNICALL *CallStaticObjectMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jobject (JNICALL *CallStaticObjectMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jobject (JNICALL *CallStaticObjectMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jboolean (JNICALL *CallStaticBooleanMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jboolean (JNICALL *CallStaticBooleanMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jboolean (JNICALL *CallStaticBooleanMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jbyte (JNICALL *CallStaticByteMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jbyte (JNICALL *CallStaticByteMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jbyte (JNICALL *CallStaticByteMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jchar (JNICALL *CallStaticCharMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jchar (JNICALL *CallStaticCharMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jchar (JNICALL *CallStaticCharMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jshort (JNICALL *CallStaticShortMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jshort (JNICALL *CallStaticShortMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jshort (JNICALL *CallStaticShortMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jint (JNICALL *CallStaticIntMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jint (JNICALL *CallStaticIntMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jint (JNICALL *CallStaticIntMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jlong (JNICALL *CallStaticLongMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jlong (JNICALL *CallStaticLongMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jlong (JNICALL *CallStaticLongMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jfloat (JNICALL *CallStaticFloatMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jfloat (JNICALL *CallStaticFloatMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jfloat (JNICALL *CallStaticFloatMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ jdouble (JNICALL *CallStaticDoubleMethod)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
+ jdouble (JNICALL *CallStaticDoubleMethodV)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
+ jdouble (JNICALL *CallStaticDoubleMethodA)
+ (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
+
+ void (JNICALL *CallStaticVoidMethod)
+ (JNIEnv *env, jclass cls, jmethodID methodID, ...);
+ void (JNICALL *CallStaticVoidMethodV)
+ (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
+ void (JNICALL *CallStaticVoidMethodA)
+ (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args);
+
+ jfieldID (JNICALL *GetStaticFieldID)
+ (JNIEnv *env, jclass clazz, const char *name, const char *sig);
+ jobject (JNICALL *GetStaticObjectField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+ jboolean (JNICALL *GetStaticBooleanField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+ jbyte (JNICALL *GetStaticByteField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+ jchar (JNICALL *GetStaticCharField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+ jshort (JNICALL *GetStaticShortField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+ jint (JNICALL *GetStaticIntField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+ jlong (JNICALL *GetStaticLongField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+ jfloat (JNICALL *GetStaticFloatField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+ jdouble (JNICALL *GetStaticDoubleField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID);
+
+ void (JNICALL *SetStaticObjectField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
+ void (JNICALL *SetStaticBooleanField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
+ void (JNICALL *SetStaticByteField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
+ void (JNICALL *SetStaticCharField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
+ void (JNICALL *SetStaticShortField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
+ void (JNICALL *SetStaticIntField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
+ void (JNICALL *SetStaticLongField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
+ void (JNICALL *SetStaticFloatField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
+ void (JNICALL *SetStaticDoubleField)
+ (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
+
+ jstring (JNICALL *NewString)
+ (JNIEnv *env, const jchar *unicode, jsize len);
+ jsize (JNICALL *GetStringLength)
+ (JNIEnv *env, jstring str);
+ const jchar *(JNICALL *GetStringChars)
+ (JNIEnv *env, jstring str, jboolean *isCopy);
+ void (JNICALL *ReleaseStringChars)
+ (JNIEnv *env, jstring str, const jchar *chars);
+
+ jstring (JNICALL *NewStringUTF)
+ (JNIEnv *env, const char *utf);
+ jsize (JNICALL *GetStringUTFLength)
+ (JNIEnv *env, jstring str);
+ const char* (JNICALL *GetStringUTFChars)
+ (JNIEnv *env, jstring str, jboolean *isCopy);
+ void (JNICALL *ReleaseStringUTFChars)
+ (JNIEnv *env, jstring str, const char* chars);
+
+
+ jsize (JNICALL *GetArrayLength)
+ (JNIEnv *env, jarray array);
+
+ jobjectArray (JNICALL *NewObjectArray)
+ (JNIEnv *env, jsize len, jclass clazz, jobject init);
+ jobject (JNICALL *GetObjectArrayElement)
+ (JNIEnv *env, jobjectArray array, jsize index);
+ void (JNICALL *SetObjectArrayElement)
+ (JNIEnv *env, jobjectArray array, jsize index, jobject val);
+
+ jbooleanArray (JNICALL *NewBooleanArray)
+ (JNIEnv *env, jsize len);
+ jbyteArray (JNICALL *NewByteArray)
+ (JNIEnv *env, jsize len);
+ jcharArray (JNICALL *NewCharArray)
+ (JNIEnv *env, jsize len);
+ jshortArray (JNICALL *NewShortArray)
+ (JNIEnv *env, jsize len);
+ jintArray (JNICALL *NewIntArray)
+ (JNIEnv *env, jsize len);
+ jlongArray (JNICALL *NewLongArray)
+ (JNIEnv *env, jsize len);
+ jfloatArray (JNICALL *NewFloatArray)
+ (JNIEnv *env, jsize len);
+ jdoubleArray (JNICALL *NewDoubleArray)
+ (JNIEnv *env, jsize len);
+
+ jboolean * (JNICALL *GetBooleanArrayElements)
+ (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
+ jbyte * (JNICALL *GetByteArrayElements)
+ (JNIEnv *env, jbyteArray array, jboolean *isCopy);
+ jchar * (JNICALL *GetCharArrayElements)
+ (JNIEnv *env, jcharArray array, jboolean *isCopy);
+ jshort * (JNICALL *GetShortArrayElements)
+ (JNIEnv *env, jshortArray array, jboolean *isCopy);
+ jint * (JNICALL *GetIntArrayElements)
+ (JNIEnv *env, jintArray array, jboolean *isCopy);
+ jlong * (JNICALL *GetLongArrayElements)
+ (JNIEnv *env, jlongArray array, jboolean *isCopy);
+ jfloat * (JNICALL *GetFloatArrayElements)
+ (JNIEnv *env, jfloatArray array, jboolean *isCopy);
+ jdouble * (JNICALL *GetDoubleArrayElements)
+ (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
+
+ void (JNICALL *ReleaseBooleanArrayElements)
+ (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
+ void (JNICALL *ReleaseByteArrayElements)
+ (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
+ void (JNICALL *ReleaseCharArrayElements)
+ (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
+ void (JNICALL *ReleaseShortArrayElements)
+ (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
+ void (JNICALL *ReleaseIntArrayElements)
+ (JNIEnv *env, jintArray array, jint *elems, jint mode);
+ void (JNICALL *ReleaseLongArrayElements)
+ (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
+ void (JNICALL *ReleaseFloatArrayElements)
+ (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
+ void (JNICALL *ReleaseDoubleArrayElements)
+ (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
+
+ void (JNICALL *GetBooleanArrayRegion)
+ (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
+ void (JNICALL *GetByteArrayRegion)
+ (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
+ void (JNICALL *GetCharArrayRegion)
+ (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
+ void (JNICALL *GetShortArrayRegion)
+ (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
+ void (JNICALL *GetIntArrayRegion)
+ (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
+ void (JNICALL *GetLongArrayRegion)
+ (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
+ void (JNICALL *GetFloatArrayRegion)
+ (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
+ void (JNICALL *GetDoubleArrayRegion)
+ (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
+
+ void (JNICALL *SetBooleanArrayRegion)
+ (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf);
+ void (JNICALL *SetByteArrayRegion)
+ (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf);
+ void (JNICALL *SetCharArrayRegion)
+ (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf);
+ void (JNICALL *SetShortArrayRegion)
+ (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf);
+ void (JNICALL *SetIntArrayRegion)
+ (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf);
+ void (JNICALL *SetLongArrayRegion)
+ (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf);
+ void (JNICALL *SetFloatArrayRegion)
+ (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf);
+ void (JNICALL *SetDoubleArrayRegion)
+ (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf);
+
+ jint (JNICALL *RegisterNatives)
+ (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
+ jint nMethods);
+ jint (JNICALL *UnregisterNatives)
+ (JNIEnv *env, jclass clazz);
+
+ jint (JNICALL *MonitorEnter)
+ (JNIEnv *env, jobject obj);
+ jint (JNICALL *MonitorExit)
+ (JNIEnv *env, jobject obj);
+
+ jint (JNICALL *GetJavaVM)
+ (JNIEnv *env, JavaVM **vm);
+
+ void (JNICALL *GetStringRegion)
+ (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
+ void (JNICALL *GetStringUTFRegion)
+ (JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
+
+ void * (JNICALL *GetPrimitiveArrayCritical)
+ (JNIEnv *env, jarray array, jboolean *isCopy);
+ void (JNICALL *ReleasePrimitiveArrayCritical)
+ (JNIEnv *env, jarray array, void *carray, jint mode);
+
+ const jchar * (JNICALL *GetStringCritical)
+ (JNIEnv *env, jstring string, jboolean *isCopy);
+ void (JNICALL *ReleaseStringCritical)
+ (JNIEnv *env, jstring string, const jchar *cstring);
+
+ jweak (JNICALL *NewWeakGlobalRef)
+ (JNIEnv *env, jobject obj);
+ void (JNICALL *DeleteWeakGlobalRef)
+ (JNIEnv *env, jweak ref);
+
+ jboolean (JNICALL *ExceptionCheck)
+ (JNIEnv *env);
+
+ jobject (JNICALL *NewDirectByteBuffer)
+ (JNIEnv* env, void* address, jlong capacity);
+ void* (JNICALL *GetDirectBufferAddress)
+ (JNIEnv* env, jobject buf);
+ jlong (JNICALL *GetDirectBufferCapacity)
+ (JNIEnv* env, jobject buf);
+
+ /* New JNI 1.6 Features */
+
+ jobjectRefType (JNICALL *GetObjectRefType)
+ (JNIEnv* env, jobject obj);
+};
+
+/*
+ * We use inlined functions for C++ so that programmers can write:
+ *
+ * env->FindClass("java/lang/String")
+ *
+ * in C++ rather than:
+ *
+ * (*env)->FindClass(env, "java/lang/String")
+ *
+ * in C.
+ */
+
+struct JNIEnv_ {
+ const struct JNINativeInterface_ *functions;
+#ifdef __cplusplus
+
+ jint GetVersion() {
+ return functions->GetVersion(this);
+ }
+ jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
+ jsize len) {
+ return functions->DefineClass(this, name, loader, buf, len);
+ }
+ jclass FindClass(const char *name) {
+ return functions->FindClass(this, name);
+ }
+ jmethodID FromReflectedMethod(jobject method) {
+ return functions->FromReflectedMethod(this,method);
+ }
+ jfieldID FromReflectedField(jobject field) {
+ return functions->FromReflectedField(this,field);
+ }
+
+ jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
+ return functions->ToReflectedMethod(this, cls, methodID, isStatic);
+ }
+
+ jclass GetSuperclass(jclass sub) {
+ return functions->GetSuperclass(this, sub);
+ }
+ jboolean IsAssignableFrom(jclass sub, jclass sup) {
+ return functions->IsAssignableFrom(this, sub, sup);
+ }
+
+ jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
+ return functions->ToReflectedField(this,cls,fieldID,isStatic);
+ }
+
+ jint Throw(jthrowable obj) {
+ return functions->Throw(this, obj);
+ }
+ jint ThrowNew(jclass clazz, const char *msg) {
+ return functions->ThrowNew(this, clazz, msg);
+ }
+ jthrowable ExceptionOccurred() {
+ return functions->ExceptionOccurred(this);
+ }
+ void ExceptionDescribe() {
+ functions->ExceptionDescribe(this);
+ }
+ void ExceptionClear() {
+ functions->ExceptionClear(this);
+ }
+ void FatalError(const char *msg) {
+ functions->FatalError(this, msg);
+ }
+
+ jint PushLocalFrame(jint capacity) {
+ return functions->PushLocalFrame(this,capacity);
+ }
+ jobject PopLocalFrame(jobject result) {
+ return functions->PopLocalFrame(this,result);
+ }
+
+ jobject NewGlobalRef(jobject lobj) {
+ return functions->NewGlobalRef(this,lobj);
+ }
+ void DeleteGlobalRef(jobject gref) {
+ functions->DeleteGlobalRef(this,gref);
+ }
+ void DeleteLocalRef(jobject obj) {
+ functions->DeleteLocalRef(this, obj);
+ }
+
+ jboolean IsSameObject(jobject obj1, jobject obj2) {
+ return functions->IsSameObject(this,obj1,obj2);
+ }
+
+ jobject NewLocalRef(jobject ref) {
+ return functions->NewLocalRef(this,ref);
+ }
+ jint EnsureLocalCapacity(jint capacity) {
+ return functions->EnsureLocalCapacity(this,capacity);
+ }
+
+ jobject AllocObject(jclass clazz) {
+ return functions->AllocObject(this,clazz);
+ }
+ jobject NewObject(jclass clazz, jmethodID methodID, ...) {
+ va_list args;
+ jobject result;
+ va_start(args, methodID);
+ result = functions->NewObjectV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jobject NewObjectV(jclass clazz, jmethodID methodID,
+ va_list args) {
+ return functions->NewObjectV(this,clazz,methodID,args);
+ }
+ jobject NewObjectA(jclass clazz, jmethodID methodID,
+ const jvalue *args) {
+ return functions->NewObjectA(this,clazz,methodID,args);
+ }
+
+ jclass GetObjectClass(jobject obj) {
+ return functions->GetObjectClass(this,obj);
+ }
+ jboolean IsInstanceOf(jobject obj, jclass clazz) {
+ return functions->IsInstanceOf(this,obj,clazz);
+ }
+
+ jmethodID GetMethodID(jclass clazz, const char *name,
+ const char *sig) {
+ return functions->GetMethodID(this,clazz,name,sig);
+ }
+
+ jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ jobject result;
+ va_start(args,methodID);
+ result = functions->CallObjectMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jobject CallObjectMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallObjectMethodV(this,obj,methodID,args);
+ }
+ jobject CallObjectMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallObjectMethodA(this,obj,methodID,args);
+ }
+
+ jboolean CallBooleanMethod(jobject obj,
+ jmethodID methodID, ...) {
+ va_list args;
+ jboolean result;
+ va_start(args,methodID);
+ result = functions->CallBooleanMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallBooleanMethodV(this,obj,methodID,args);
+ }
+ jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallBooleanMethodA(this,obj,methodID, args);
+ }
+
+ jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ jbyte result;
+ va_start(args,methodID);
+ result = functions->CallByteMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jbyte CallByteMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallByteMethodV(this,obj,methodID,args);
+ }
+ jbyte CallByteMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallByteMethodA(this,obj,methodID,args);
+ }
+
+ jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ jchar result;
+ va_start(args,methodID);
+ result = functions->CallCharMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jchar CallCharMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallCharMethodV(this,obj,methodID,args);
+ }
+ jchar CallCharMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallCharMethodA(this,obj,methodID,args);
+ }
+
+ jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ jshort result;
+ va_start(args,methodID);
+ result = functions->CallShortMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jshort CallShortMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallShortMethodV(this,obj,methodID,args);
+ }
+ jshort CallShortMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallShortMethodA(this,obj,methodID,args);
+ }
+
+ jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ jint result;
+ va_start(args,methodID);
+ result = functions->CallIntMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jint CallIntMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallIntMethodV(this,obj,methodID,args);
+ }
+ jint CallIntMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallIntMethodA(this,obj,methodID,args);
+ }
+
+ jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ jlong result;
+ va_start(args,methodID);
+ result = functions->CallLongMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jlong CallLongMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallLongMethodV(this,obj,methodID,args);
+ }
+ jlong CallLongMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallLongMethodA(this,obj,methodID,args);
+ }
+
+ jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ jfloat result;
+ va_start(args,methodID);
+ result = functions->CallFloatMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallFloatMethodV(this,obj,methodID,args);
+ }
+ jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallFloatMethodA(this,obj,methodID,args);
+ }
+
+ jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ jdouble result;
+ va_start(args,methodID);
+ result = functions->CallDoubleMethodV(this,obj,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ return functions->CallDoubleMethodV(this,obj,methodID,args);
+ }
+ jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallDoubleMethodA(this,obj,methodID,args);
+ }
+
+ void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
+ va_list args;
+ va_start(args,methodID);
+ functions->CallVoidMethodV(this,obj,methodID,args);
+ va_end(args);
+ }
+ void CallVoidMethodV(jobject obj, jmethodID methodID,
+ va_list args) {
+ functions->CallVoidMethodV(this,obj,methodID,args);
+ }
+ void CallVoidMethodA(jobject obj, jmethodID methodID,
+ const jvalue * args) {
+ functions->CallVoidMethodA(this,obj,methodID,args);
+ }
+
+ jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jobject result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, const jvalue * args) {
+ return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
+ methodID,args);
+ }
+
+ jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jboolean result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, const jvalue * args) {
+ return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
+ methodID, args);
+ }
+
+ jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jbyte result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallNonvirtualByteMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, const jvalue * args) {
+ return functions->CallNonvirtualByteMethodA(this,obj,clazz,
+ methodID,args);
+ }
+
+ jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jchar result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallNonvirtualCharMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, const jvalue * args) {
+ return functions->CallNonvirtualCharMethodA(this,obj,clazz,
+ methodID,args);
+ }
+
+ jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jshort result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallNonvirtualShortMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, const jvalue * args) {
+ return functions->CallNonvirtualShortMethodA(this,obj,clazz,
+ methodID,args);
+ }
+
+ jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jint result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallNonvirtualIntMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, const jvalue * args) {
+ return functions->CallNonvirtualIntMethodA(this,obj,clazz,
+ methodID,args);
+ }
+
+ jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jlong result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallNonvirtualLongMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, const jvalue * args) {
+ return functions->CallNonvirtualLongMethodA(this,obj,clazz,
+ methodID,args);
+ }
+
+ jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jfloat result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
+ jmethodID methodID,
+ va_list args) {
+ return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
+ jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
+ methodID,args);
+ }
+
+ jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jdouble result;
+ va_start(args,methodID);
+ result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
+ methodID,args);
+ va_end(args);
+ return result;
+ }
+ jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
+ jmethodID methodID,
+ va_list args) {
+ return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
+ methodID,args);
+ }
+ jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
+ jmethodID methodID,
+ const jvalue * args) {
+ return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
+ methodID,args);
+ }
+
+ void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ va_start(args,methodID);
+ functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
+ va_end(args);
+ }
+ void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
+ jmethodID methodID,
+ va_list args) {
+ functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
+ }
+ void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
+ jmethodID methodID,
+ const jvalue * args) {
+ functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
+ }
+
+ jfieldID GetFieldID(jclass clazz, const char *name,
+ const char *sig) {
+ return functions->GetFieldID(this,clazz,name,sig);
+ }
+
+ jobject GetObjectField(jobject obj, jfieldID fieldID) {
+ return functions->GetObjectField(this,obj,fieldID);
+ }
+ jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
+ return functions->GetBooleanField(this,obj,fieldID);
+ }
+ jbyte GetByteField(jobject obj, jfieldID fieldID) {
+ return functions->GetByteField(this,obj,fieldID);
+ }
+ jchar GetCharField(jobject obj, jfieldID fieldID) {
+ return functions->GetCharField(this,obj,fieldID);
+ }
+ jshort GetShortField(jobject obj, jfieldID fieldID) {
+ return functions->GetShortField(this,obj,fieldID);
+ }
+ jint GetIntField(jobject obj, jfieldID fieldID) {
+ return functions->GetIntField(this,obj,fieldID);
+ }
+ jlong GetLongField(jobject obj, jfieldID fieldID) {
+ return functions->GetLongField(this,obj,fieldID);
+ }
+ jfloat GetFloatField(jobject obj, jfieldID fieldID) {
+ return functions->GetFloatField(this,obj,fieldID);
+ }
+ jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
+ return functions->GetDoubleField(this,obj,fieldID);
+ }
+
+ void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
+ functions->SetObjectField(this,obj,fieldID,val);
+ }
+ void SetBooleanField(jobject obj, jfieldID fieldID,
+ jboolean val) {
+ functions->SetBooleanField(this,obj,fieldID,val);
+ }
+ void SetByteField(jobject obj, jfieldID fieldID,
+ jbyte val) {
+ functions->SetByteField(this,obj,fieldID,val);
+ }
+ void SetCharField(jobject obj, jfieldID fieldID,
+ jchar val) {
+ functions->SetCharField(this,obj,fieldID,val);
+ }
+ void SetShortField(jobject obj, jfieldID fieldID,
+ jshort val) {
+ functions->SetShortField(this,obj,fieldID,val);
+ }
+ void SetIntField(jobject obj, jfieldID fieldID,
+ jint val) {
+ functions->SetIntField(this,obj,fieldID,val);
+ }
+ void SetLongField(jobject obj, jfieldID fieldID,
+ jlong val) {
+ functions->SetLongField(this,obj,fieldID,val);
+ }
+ void SetFloatField(jobject obj, jfieldID fieldID,
+ jfloat val) {
+ functions->SetFloatField(this,obj,fieldID,val);
+ }
+ void SetDoubleField(jobject obj, jfieldID fieldID,
+ jdouble val) {
+ functions->SetDoubleField(this,obj,fieldID,val);
+ }
+
+ jmethodID GetStaticMethodID(jclass clazz, const char *name,
+ const char *sig) {
+ return functions->GetStaticMethodID(this,clazz,name,sig);
+ }
+
+ jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
+ ...) {
+ va_list args;
+ jobject result;
+ va_start(args,methodID);
+ result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
+ va_list args) {
+ return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
+ }
+ jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
+ const jvalue *args) {
+ return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
+ }
+
+ jboolean CallStaticBooleanMethod(jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jboolean result;
+ va_start(args,methodID);
+ result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jboolean CallStaticBooleanMethodV(jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
+ }
+ jboolean CallStaticBooleanMethodA(jclass clazz,
+ jmethodID methodID, const jvalue *args) {
+ return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
+ }
+
+ jbyte CallStaticByteMethod(jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jbyte result;
+ va_start(args,methodID);
+ result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jbyte CallStaticByteMethodV(jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallStaticByteMethodV(this,clazz,methodID,args);
+ }
+ jbyte CallStaticByteMethodA(jclass clazz,
+ jmethodID methodID, const jvalue *args) {
+ return functions->CallStaticByteMethodA(this,clazz,methodID,args);
+ }
+
+ jchar CallStaticCharMethod(jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jchar result;
+ va_start(args,methodID);
+ result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jchar CallStaticCharMethodV(jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallStaticCharMethodV(this,clazz,methodID,args);
+ }
+ jchar CallStaticCharMethodA(jclass clazz,
+ jmethodID methodID, const jvalue *args) {
+ return functions->CallStaticCharMethodA(this,clazz,methodID,args);
+ }
+
+ jshort CallStaticShortMethod(jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jshort result;
+ va_start(args,methodID);
+ result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jshort CallStaticShortMethodV(jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallStaticShortMethodV(this,clazz,methodID,args);
+ }
+ jshort CallStaticShortMethodA(jclass clazz,
+ jmethodID methodID, const jvalue *args) {
+ return functions->CallStaticShortMethodA(this,clazz,methodID,args);
+ }
+
+ jint CallStaticIntMethod(jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jint result;
+ va_start(args,methodID);
+ result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jint CallStaticIntMethodV(jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallStaticIntMethodV(this,clazz,methodID,args);
+ }
+ jint CallStaticIntMethodA(jclass clazz,
+ jmethodID methodID, const jvalue *args) {
+ return functions->CallStaticIntMethodA(this,clazz,methodID,args);
+ }
+
+ jlong CallStaticLongMethod(jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jlong result;
+ va_start(args,methodID);
+ result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jlong CallStaticLongMethodV(jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallStaticLongMethodV(this,clazz,methodID,args);
+ }
+ jlong CallStaticLongMethodA(jclass clazz,
+ jmethodID methodID, const jvalue *args) {
+ return functions->CallStaticLongMethodA(this,clazz,methodID,args);
+ }
+
+ jfloat CallStaticFloatMethod(jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jfloat result;
+ va_start(args,methodID);
+ result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jfloat CallStaticFloatMethodV(jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
+ }
+ jfloat CallStaticFloatMethodA(jclass clazz,
+ jmethodID methodID, const jvalue *args) {
+ return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
+ }
+
+ jdouble CallStaticDoubleMethod(jclass clazz,
+ jmethodID methodID, ...) {
+ va_list args;
+ jdouble result;
+ va_start(args,methodID);
+ result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
+ va_end(args);
+ return result;
+ }
+ jdouble CallStaticDoubleMethodV(jclass clazz,
+ jmethodID methodID, va_list args) {
+ return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
+ }
+ jdouble CallStaticDoubleMethodA(jclass clazz,
+ jmethodID methodID, const jvalue *args) {
+ return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
+ }
+
+ void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
+ va_list args;
+ va_start(args,methodID);
+ functions->CallStaticVoidMethodV(this,cls,methodID,args);
+ va_end(args);
+ }
+ void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
+ va_list args) {
+ functions->CallStaticVoidMethodV(this,cls,methodID,args);
+ }
+ void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
+ const jvalue * args) {
+ functions->CallStaticVoidMethodA(this,cls,methodID,args);
+ }
+
+ jfieldID GetStaticFieldID(jclass clazz, const char *name,
+ const char *sig) {
+ return functions->GetStaticFieldID(this,clazz,name,sig);
+ }
+ jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticObjectField(this,clazz,fieldID);
+ }
+ jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticBooleanField(this,clazz,fieldID);
+ }
+ jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticByteField(this,clazz,fieldID);
+ }
+ jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticCharField(this,clazz,fieldID);
+ }
+ jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticShortField(this,clazz,fieldID);
+ }
+ jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticIntField(this,clazz,fieldID);
+ }
+ jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticLongField(this,clazz,fieldID);
+ }
+ jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticFloatField(this,clazz,fieldID);
+ }
+ jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
+ return functions->GetStaticDoubleField(this,clazz,fieldID);
+ }
+
+ void SetStaticObjectField(jclass clazz, jfieldID fieldID,
+ jobject value) {
+ functions->SetStaticObjectField(this,clazz,fieldID,value);
+ }
+ void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
+ jboolean value) {
+ functions->SetStaticBooleanField(this,clazz,fieldID,value);
+ }
+ void SetStaticByteField(jclass clazz, jfieldID fieldID,
+ jbyte value) {
+ functions->SetStaticByteField(this,clazz,fieldID,value);
+ }
+ void SetStaticCharField(jclass clazz, jfieldID fieldID,
+ jchar value) {
+ functions->SetStaticCharField(this,clazz,fieldID,value);
+ }
+ void SetStaticShortField(jclass clazz, jfieldID fieldID,
+ jshort value) {
+ functions->SetStaticShortField(this,clazz,fieldID,value);
+ }
+ void SetStaticIntField(jclass clazz, jfieldID fieldID,
+ jint value) {
+ functions->SetStaticIntField(this,clazz,fieldID,value);
+ }
+ void SetStaticLongField(jclass clazz, jfieldID fieldID,
+ jlong value) {
+ functions->SetStaticLongField(this,clazz,fieldID,value);
+ }
+ void SetStaticFloatField(jclass clazz, jfieldID fieldID,
+ jfloat value) {
+ functions->SetStaticFloatField(this,clazz,fieldID,value);
+ }
+ void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
+ jdouble value) {
+ functions->SetStaticDoubleField(this,clazz,fieldID,value);
+ }
+
+ jstring NewString(const jchar *unicode, jsize len) {
+ return functions->NewString(this,unicode,len);
+ }
+ jsize GetStringLength(jstring str) {
+ return functions->GetStringLength(this,str);
+ }
+ const jchar *GetStringChars(jstring str, jboolean *isCopy) {
+ return functions->GetStringChars(this,str,isCopy);
+ }
+ void ReleaseStringChars(jstring str, const jchar *chars) {
+ functions->ReleaseStringChars(this,str,chars);
+ }
+
+ jstring NewStringUTF(const char *utf) {
+ return functions->NewStringUTF(this,utf);
+ }
+ jsize GetStringUTFLength(jstring str) {
+ return functions->GetStringUTFLength(this,str);
+ }
+ const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
+ return functions->GetStringUTFChars(this,str,isCopy);
+ }
+ void ReleaseStringUTFChars(jstring str, const char* chars) {
+ functions->ReleaseStringUTFChars(this,str,chars);
+ }
+
+ jsize GetArrayLength(jarray array) {
+ return functions->GetArrayLength(this,array);
+ }
+
+ jobjectArray NewObjectArray(jsize len, jclass clazz,
+ jobject init) {
+ return functions->NewObjectArray(this,len,clazz,init);
+ }
+ jobject GetObjectArrayElement(jobjectArray array, jsize index) {
+ return functions->GetObjectArrayElement(this,array,index);
+ }
+ void SetObjectArrayElement(jobjectArray array, jsize index,
+ jobject val) {
+ functions->SetObjectArrayElement(this,array,index,val);
+ }
+
+ jbooleanArray NewBooleanArray(jsize len) {
+ return functions->NewBooleanArray(this,len);
+ }
+ jbyteArray NewByteArray(jsize len) {
+ return functions->NewByteArray(this,len);
+ }
+ jcharArray NewCharArray(jsize len) {
+ return functions->NewCharArray(this,len);
+ }
+ jshortArray NewShortArray(jsize len) {
+ return functions->NewShortArray(this,len);
+ }
+ jintArray NewIntArray(jsize len) {
+ return functions->NewIntArray(this,len);
+ }
+ jlongArray NewLongArray(jsize len) {
+ return functions->NewLongArray(this,len);
+ }
+ jfloatArray NewFloatArray(jsize len) {
+ return functions->NewFloatArray(this,len);
+ }
+ jdoubleArray NewDoubleArray(jsize len) {
+ return functions->NewDoubleArray(this,len);
+ }
+
+ jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
+ return functions->GetBooleanArrayElements(this,array,isCopy);
+ }
+ jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
+ return functions->GetByteArrayElements(this,array,isCopy);
+ }
+ jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
+ return functions->GetCharArrayElements(this,array,isCopy);
+ }
+ jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
+ return functions->GetShortArrayElements(this,array,isCopy);
+ }
+ jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
+ return functions->GetIntArrayElements(this,array,isCopy);
+ }
+ jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
+ return functions->GetLongArrayElements(this,array,isCopy);
+ }
+ jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
+ return functions->GetFloatArrayElements(this,array,isCopy);
+ }
+ jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
+ return functions->GetDoubleArrayElements(this,array,isCopy);
+ }
+
+ void ReleaseBooleanArrayElements(jbooleanArray array,
+ jboolean *elems,
+ jint mode) {
+ functions->ReleaseBooleanArrayElements(this,array,elems,mode);
+ }
+ void ReleaseByteArrayElements(jbyteArray array,
+ jbyte *elems,
+ jint mode) {
+ functions->ReleaseByteArrayElements(this,array,elems,mode);
+ }
+ void ReleaseCharArrayElements(jcharArray array,
+ jchar *elems,
+ jint mode) {
+ functions->ReleaseCharArrayElements(this,array,elems,mode);
+ }
+ void ReleaseShortArrayElements(jshortArray array,
+ jshort *elems,
+ jint mode) {
+ functions->ReleaseShortArrayElements(this,array,elems,mode);
+ }
+ void ReleaseIntArrayElements(jintArray array,
+ jint *elems,
+ jint mode) {
+ functions->ReleaseIntArrayElements(this,array,elems,mode);
+ }
+ void ReleaseLongArrayElements(jlongArray array,
+ jlong *elems,
+ jint mode) {
+ functions->ReleaseLongArrayElements(this,array,elems,mode);
+ }
+ void ReleaseFloatArrayElements(jfloatArray array,
+ jfloat *elems,
+ jint mode) {
+ functions->ReleaseFloatArrayElements(this,array,elems,mode);
+ }
+ void ReleaseDoubleArrayElements(jdoubleArray array,
+ jdouble *elems,
+ jint mode) {
+ functions->ReleaseDoubleArrayElements(this,array,elems,mode);
+ }
+
+ void GetBooleanArrayRegion(jbooleanArray array,
+ jsize start, jsize len, jboolean *buf) {
+ functions->GetBooleanArrayRegion(this,array,start,len,buf);
+ }
+ void GetByteArrayRegion(jbyteArray array,
+ jsize start, jsize len, jbyte *buf) {
+ functions->GetByteArrayRegion(this,array,start,len,buf);
+ }
+ void GetCharArrayRegion(jcharArray array,
+ jsize start, jsize len, jchar *buf) {
+ functions->GetCharArrayRegion(this,array,start,len,buf);
+ }
+ void GetShortArrayRegion(jshortArray array,
+ jsize start, jsize len, jshort *buf) {
+ functions->GetShortArrayRegion(this,array,start,len,buf);
+ }
+ void GetIntArrayRegion(jintArray array,
+ jsize start, jsize len, jint *buf) {
+ functions->GetIntArrayRegion(this,array,start,len,buf);
+ }
+ void GetLongArrayRegion(jlongArray array,
+ jsize start, jsize len, jlong *buf) {
+ functions->GetLongArrayRegion(this,array,start,len,buf);
+ }
+ void GetFloatArrayRegion(jfloatArray array,
+ jsize start, jsize len, jfloat *buf) {
+ functions->GetFloatArrayRegion(this,array,start,len,buf);
+ }
+ void GetDoubleArrayRegion(jdoubleArray array,
+ jsize start, jsize len, jdouble *buf) {
+ functions->GetDoubleArrayRegion(this,array,start,len,buf);
+ }
+
+ void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
+ const jboolean *buf) {
+ functions->SetBooleanArrayRegion(this,array,start,len,buf);
+ }
+ void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
+ const jbyte *buf) {
+ functions->SetByteArrayRegion(this,array,start,len,buf);
+ }
+ void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
+ const jchar *buf) {
+ functions->SetCharArrayRegion(this,array,start,len,buf);
+ }
+ void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
+ const jshort *buf) {
+ functions->SetShortArrayRegion(this,array,start,len,buf);
+ }
+ void SetIntArrayRegion(jintArray array, jsize start, jsize len,
+ const jint *buf) {
+ functions->SetIntArrayRegion(this,array,start,len,buf);
+ }
+ void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
+ const jlong *buf) {
+ functions->SetLongArrayRegion(this,array,start,len,buf);
+ }
+ void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
+ const jfloat *buf) {
+ functions->SetFloatArrayRegion(this,array,start,len,buf);
+ }
+ void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
+ const jdouble *buf) {
+ functions->SetDoubleArrayRegion(this,array,start,len,buf);
+ }
+
+ jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
+ jint nMethods) {
+ return functions->RegisterNatives(this,clazz,methods,nMethods);
+ }
+ jint UnregisterNatives(jclass clazz) {
+ return functions->UnregisterNatives(this,clazz);
+ }
+
+ jint MonitorEnter(jobject obj) {
+ return functions->MonitorEnter(this,obj);
+ }
+ jint MonitorExit(jobject obj) {
+ return functions->MonitorExit(this,obj);
+ }
+
+ jint GetJavaVM(JavaVM **vm) {
+ return functions->GetJavaVM(this,vm);
+ }
+
+ void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
+ functions->GetStringRegion(this,str,start,len,buf);
+ }
+ void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
+ functions->GetStringUTFRegion(this,str,start,len,buf);
+ }
+
+ void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
+ return functions->GetPrimitiveArrayCritical(this,array,isCopy);
+ }
+ void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
+ functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
+ }
+
+ const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
+ return functions->GetStringCritical(this,string,isCopy);
+ }
+ void ReleaseStringCritical(jstring string, const jchar *cstring) {
+ functions->ReleaseStringCritical(this,string,cstring);
+ }
+
+ jweak NewWeakGlobalRef(jobject obj) {
+ return functions->NewWeakGlobalRef(this,obj);
+ }
+ void DeleteWeakGlobalRef(jweak ref) {
+ functions->DeleteWeakGlobalRef(this,ref);
+ }
+
+ jboolean ExceptionCheck() {
+ return functions->ExceptionCheck(this);
+ }
+
+ jobject NewDirectByteBuffer(void* address, jlong capacity) {
+ return functions->NewDirectByteBuffer(this, address, capacity);
+ }
+ void* GetDirectBufferAddress(jobject buf) {
+ return functions->GetDirectBufferAddress(this, buf);
+ }
+ jlong GetDirectBufferCapacity(jobject buf) {
+ return functions->GetDirectBufferCapacity(this, buf);
+ }
+ jobjectRefType GetObjectRefType(jobject obj) {
+ return functions->GetObjectRefType(this, obj);
+ }
+
+#endif /* __cplusplus */
+};
+
+typedef struct JavaVMOption {
+ char *optionString;
+ void *extraInfo;
+} JavaVMOption;
+
+typedef struct JavaVMInitArgs {
+ jint version;
+
+ jint nOptions;
+ JavaVMOption *options;
+ jboolean ignoreUnrecognized;
+} JavaVMInitArgs;
+
+typedef struct JavaVMAttachArgs {
+ jint version;
+
+ char *name;
+ jobject group;
+} JavaVMAttachArgs;
+
+/* These will be VM-specific. */
+
+#define JDK1_2
+#define JDK1_4
+
+/* End VM-specific. */
+
+struct JNIInvokeInterface_ {
+ void *reserved0;
+ void *reserved1;
+ void *reserved2;
+
+ jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
+
+ jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
+
+ jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
+
+ jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
+
+ jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
+};
+
+struct JavaVM_ {
+ const struct JNIInvokeInterface_ *functions;
+#ifdef __cplusplus
+
+ jint DestroyJavaVM() {
+ return functions->DestroyJavaVM(this);
+ }
+ jint AttachCurrentThread(void **penv, void *args) {
+ return functions->AttachCurrentThread(this, penv, args);
+ }
+ jint DetachCurrentThread() {
+ return functions->DetachCurrentThread(this);
+ }
+
+ jint GetEnv(void **penv, jint version) {
+ return functions->GetEnv(this, penv, version);
+ }
+ jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
+ return functions->AttachCurrentThreadAsDaemon(this, penv, args);
+ }
+#endif
+};
+
+#ifdef _JNI_IMPLEMENTATION_
+#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
+#else
+#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
+#endif
+_JNI_IMPORT_OR_EXPORT_ jint JNICALL
+JNI_GetDefaultJavaVMInitArgs(void *args);
+
+_JNI_IMPORT_OR_EXPORT_ jint JNICALL
+JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
+
+_JNI_IMPORT_OR_EXPORT_ jint JNICALL
+JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
+
+/* Defined by native libraries. */
+JNIEXPORT jint JNICALL
+JNI_OnLoad(JavaVM *vm, void *reserved);
+
+JNIEXPORT void JNICALL
+JNI_OnUnload(JavaVM *vm, void *reserved);
+
+#define JNI_VERSION_1_1 0x00010001
+#define JNI_VERSION_1_2 0x00010002
+#define JNI_VERSION_1_4 0x00010004
+#define JNI_VERSION_1_6 0x00010006
+#define JNI_VERSION_1_8 0x00010008
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+#endif /* !_JAVASOFT_JNI_H_ */
diff --git a/test/linux/jni/include/thirdparty/jni_md.h b/test/linux/jni/include/thirdparty/jni_md.h
new file mode 100644
index 0000000..80eedf3
--- /dev/null
+++ b/test/linux/jni/include/thirdparty/jni_md.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef _JAVASOFT_JNI_MD_H_
+#define _JAVASOFT_JNI_MD_H_
+
+#ifndef __has_attribute
+ #define __has_attribute(x) 0
+#endif
+#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
+ #define JNIEXPORT __attribute__((visibility("default")))
+ #define JNIIMPORT __attribute__((visibility("default")))
+#else
+ #define JNIEXPORT
+ #define JNIIMPORT
+#endif
+
+#define JNICALL
+
+typedef int jint;
+#ifdef _LP64 /* 64-bit Solaris */
+typedef long jlong;
+#else
+typedef long long jlong;
+#endif
+
+typedef signed char jbyte;
+
+#endif /* !_JAVASOFT_JNI_MD_H_ */
diff --git a/test/linux/jni/src/filter/native_filter.c b/test/linux/jni/src/filter/native_filter.c
new file mode 100644
index 0000000..f497d30
--- /dev/null
+++ b/test/linux/jni/src/filter/native_filter.c
@@ -0,0 +1,2348 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+
+#define FC_LOG_TAG "NativeFilter"
+
+#include
+#include
+
+#include
+#include
+
+// #ifdef __ANDROID__
+// #include
+// #endif
+
+#include
+
+#define MAX_KERNELS 4
+
+#define RED_WEIGHT 0.299f
+#define GREEN_WEIGHT 0.587f
+#define BLUE_WEIGHT 0.114f
+
+#define BLUR_RADIUS 5
+#define CONVOLVE3_00 0
+#define CONVOLVE3_01 -1
+#define CONVOLVE3_02 0
+#define CONVOLVE3_10 -1
+#define CONVOLVE3_11 5
+#define CONVOLVE3_12 -1
+#define CONVOLVE3_20 0
+#define CONVOLVE3_21 -1
+#define CONVOLVE3_22 0
+#define CONVOLVE5_00 0
+#define CONVOLVE5_01 0
+#define CONVOLVE5_02 -1
+#define CONVOLVE5_03 0
+#define CONVOLVE5_04 0
+#define CONVOLVE5_10 0
+#define CONVOLVE5_11 -1
+#define CONVOLVE5_12 -2
+#define CONVOLVE5_13 -1
+#define CONVOLVE5_14 0
+#define CONVOLVE5_20 -1
+#define CONVOLVE5_21 -2
+#define CONVOLVE5_22 16
+#define CONVOLVE5_23 -2
+#define CONVOLVE5_24 -1
+#define CONVOLVE5_30 0
+#define CONVOLVE5_31 -1
+#define CONVOLVE5_32 -2
+#define CONVOLVE5_33 -1
+#define CONVOLVE5_34 0
+#define CONVOLVE5_40 0
+#define CONVOLVE5_41 0
+#define CONVOLVE5_42 -1
+#define CONVOLVE5_43 0
+#define CONVOLVE5_44 0
+#define BILATERAL_RADIUS 10
+#define BILATERAL_PRESERVATION 0.5f
+#define MEDIAN_RADIUS 7
+#define CONTRAST_ENHANCEMENT 0.5f
+#define FISHEYE_CENTER_X 0.5f
+#define FISHEYE_CENTER_Y 0.5f
+#define FISHEYE_SCALE 0.75f
+#define LEVELS_IN_BLACK 0.0f
+#define LEVELS_OUT_BLACK 40.0f
+#define LEVELS_IN_WHITE 200.0f
+#define LEVELS_OUT_WHITE 255.0f
+#define LEVELS_SATURATION 1.5f
+#define POSTERIZE_INTENSITY0 0.0f
+#define POSTERIZE_INTENSITY1 0.2f
+#define POSTERIZE_INTENSITY2 0.4f
+#define POSTERIZE_INTENSITY3 0.6f
+#define POSTERIZE_INTENSITY4 0.8f
+#define POSTERIZE_INTENSITY5 1.0f
+#define POSTERIZE_COLOR0 fcRGBAColor_RED
+#define POSTERIZE_COLOR1 fcRGBAColor_GREEN
+#define POSTERIZE_COLOR2 fcRGBAColor_BLUE
+#define POSTERIZE_COLOR3 fcRGBAColor_YELLOW
+#define POSTERIZE_COLOR4 fcRGBAColor_CYAN
+// FIXME Why is it necessary to reverse here?
+// Orden de las componentes RGBA cambiadas porque se usa BufferedImage
+#define POSTERIZE_COLOR0_REF fcRGBAColor_BLUE
+#define POSTERIZE_COLOR1_REF fcRGBAColor_GREEN
+#define POSTERIZE_COLOR2_REF fcRGBAColor_RED
+#define POSTERIZE_COLOR3_REF fcRGBAColor_CYAN
+#define POSTERIZE_COLOR4_REF fcRGBAColor_YELLOW
+
+
+typedef struct {
+ int m_filter_id;
+} NativeImageFilter;
+
+typedef struct {
+ cl_kernel m_kernels[MAX_KERNELS];
+ int m_num_kernels;
+} Filter;
+
+enum {
+ GRAYSCALE, BLUR, CONVOLVE3, CONVOLVE5, BILATERAL, MEDIAN, CONTRAST, FISHEYE, LEVELS, POSTERIZE,
+ NUM_FILTERS
+};
+
+
+static int s_init = 0;
+static cl_program s_program;
+static Filter s_filters[NUM_FILTERS];
+
+static jclass NativeImageFilter_class = NULL;
+FC_JAVA_INSTANCE_HANDLERS(NativeImageFilter);
+
+
+static int run_grayscale_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_blur_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_convolve3_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_convolve5_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_bilateral_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_median_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_contrast_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_fisheye_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_levels_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+static int run_posterize_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output);
+
+static void run_grayscale_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_blur_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_convolve3_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_convolve5_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_bilateral_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_median_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_contrast_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_fisheye_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_levels_cpu(fcRGBAImage* input, fcRGBAImage* output);
+static void run_posterize_cpu(fcRGBAImage* input, fcRGBAImage* output);
+
+static void run_grayscale_arr(jint width, jint height, jint** input, jint** output);
+static void run_blur_arr(jint width, jint height, jint** input, jint** output);
+static void run_convolve3_arr(jint width, jint height, jint** input, jint** output);
+static void run_convolve5_arr(jint width, jint height, jint** input, jint** output);
+static void run_bilateral_arr(jint width, jint height, jint** input, jint** output);
+static void run_median_arr(jint width, jint height, jint** input, jint** output);
+static void run_contrast_arr(jint width, jint height, jint** input, jint** output);
+static void run_fisheye_arr(jint width, jint height, jint** input, jint** output);
+static void run_levels_arr(jint width, jint height, jint** input, jint** output);
+static void run_posterize_arr(jint width, jint height, jint** input, jint** output);
+
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_model_NativeImageFilter_compileKernels__Landroid_content_res_AssetManager_2 (JNIEnv* env,
+ jclass clazz,
+ jobject asset_manager) {
+ if (++s_init > 1)
+ return;
+
+ // OpenCL program compilation
+ cl_int err;
+ s_program = fcOpenCL_compileKernelAsset(env, asset_manager, "", "filters.cl", &err);
+ FC_EXCEPTION_HANDLE_BUILD(env, err, "fcOpenCL_compileKernelAsset", s_program, FC_VOID_EXPR);
+
+ // Only create the cl_kernel object for the specified kernel
+ const char* kernel_names[MAX_KERNELS];
+ int num_kernels = 1;
+
+ for (int kernel_id = 0; kernel_id < NUM_FILTERS; ++kernel_id) {
+ switch (kernel_id) {
+ case GRAYSCALE:
+ kernel_names[0] = "grayscale";
+ break;
+ case BLUR:
+ kernel_names[0] = "blur_h";
+ kernel_names[1] = "blur_v";
+ num_kernels = 2;
+ break;
+ case CONVOLVE3:
+ kernel_names[0] = "convolve3x3";
+ break;
+ case CONVOLVE5:
+ kernel_names[0] = "convolve5x5";
+ break;
+ case BILATERAL:
+ kernel_names[0] = "bilateral";
+ break;
+ case MEDIAN:
+ kernel_names[0] = "median";
+ break;
+ case CONTRAST:
+ kernel_names[0] = "contrast";
+ break;
+ case FISHEYE:
+ kernel_names[0] = "fisheye";
+ break;
+ case LEVELS:
+ kernel_names[0] = "levels";
+ break;
+ case POSTERIZE:
+ kernel_names[0] = "posterize";
+ break;
+ default:
+ FC_LOGERROR_FMT("Kernel ID: %d not implemented", kernel_id);
+ fcException_throwNative(env, __FILE__, __LINE__, "NativeImageFilter_compileKernels",
+ FC_EXCEPTION_OTHER);
+ num_kernels = 0;
+ break;
+ }
+
+ s_filters[kernel_id].m_num_kernels = num_kernels;
+ for (int i = 0; i < num_kernels; ++i) {
+ s_filters[kernel_id].m_kernels[i] = clCreateKernel(s_program, kernel_names[i], &err);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "clCreateKernel", FC_VOID_EXPR);
+ }
+ }
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_model_NativeImageFilter_compileKernels__Ljava_lang_String_2(JNIEnv* env,
+ jclass clazz,
+ jstring kernelDir) {
+
+ const char* dirName = (*env)->GetStringUTFChars(env, kernelDir, NULL);
+
+ if (++s_init > 1)
+ return;
+
+ // OpenCL program compilation
+ cl_int err;
+ s_program = fcOpenCL_compileKernelFile(dirName, "filters.cl", &err);
+ FC_EXCEPTION_HANDLE_BUILD(env, err, "fcOpenCL_compileKernelFile", s_program, FC_VOID_EXPR);
+
+ // Only create the cl_kernel object for the specified kernel
+ const char* kernel_names[MAX_KERNELS];
+ int num_kernels = 1;
+
+ for (int kernel_id = 0; kernel_id < NUM_FILTERS; ++kernel_id) {
+ switch (kernel_id) {
+ case GRAYSCALE:
+ kernel_names[0] = "grayscale";
+ break;
+ case BLUR:
+ kernel_names[0] = "blur_h";
+ kernel_names[1] = "blur_v";
+ num_kernels = 2;
+ break;
+ case CONVOLVE3:
+ kernel_names[0] = "convolve3x3";
+ break;
+ case CONVOLVE5:
+ kernel_names[0] = "convolve5x5";
+ break;
+ case BILATERAL:
+ kernel_names[0] = "bilateral";
+ break;
+ case MEDIAN:
+ kernel_names[0] = "median";
+ break;
+ case CONTRAST:
+ kernel_names[0] = "contrast";
+ break;
+ case FISHEYE:
+ kernel_names[0] = "fisheye";
+ break;
+ case LEVELS:
+ kernel_names[0] = "levels";
+ break;
+ case POSTERIZE:
+ kernel_names[0] = "posterize";
+ break;
+ default:
+ FC_LOGERROR_FMT("Kernel ID: %d not implemented", kernel_id);
+ fcException_throwNative(env, __FILE__, __LINE__, "NativeImageFilter_compileKernels",
+ FC_EXCEPTION_OTHER);
+ num_kernels = 0;
+ break;
+ }
+
+ s_filters[kernel_id].m_num_kernels = num_kernels;
+ for (int i = 0; i < num_kernels; ++i) {
+ s_filters[kernel_id].m_kernels[i] = clCreateKernel(s_program, kernel_names[i], &err);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "clCreateKernel", FC_VOID_EXPR);
+ }
+ }
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_model_NativeImageFilter_releaseKernels(JNIEnv* env,
+ jclass clazz) {
+ if (--s_init > 0)
+ return;
+
+ for (int filter_id = 0; filter_id < NUM_FILTERS; ++filter_id) {
+ Filter filter = s_filters[filter_id];
+
+ for (int i = 0; i < filter.m_num_kernels; ++i) {
+ if (filter.m_kernels[i])
+ clReleaseKernel(filter.m_kernels[i]);
+ }
+ }
+
+ if (s_program)
+ clReleaseProgram(s_program);
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_model_NativeImageFilter_setupNative(JNIEnv* env, jobject obj,
+ int filter_id) {
+ // Initialize class and create native instance
+ if (!NativeImageFilter_class)
+ FC_INIT_CLASS_REF(env, "es/ull/pcg/hpc/fancier/linuxtest/model/NativeImageFilter",
+ NativeImageFilter_class, "NativeImageFilter.setupNative", FC_VOID_EXPR);
+
+ NativeImageFilter* self = NativeImageFilter_getJava(env, obj);
+ if (!self)
+ self = NativeImageFilter_allocJava(env, obj);
+
+ FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "NativeImageFilter.setupNative",
+ FC_VOID_EXPR);
+
+ self->m_filter_id = filter_id;
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_model_NativeImageFilter_processGpu(JNIEnv* env,
+ jobject obj,
+ jobject jni_input,
+ jobject jni_output) {
+ NativeImageFilter* self = NativeImageFilter_getJava(env, obj);
+ FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "NativeImageFilter.processGpu",
+ FC_VOID_EXPR);
+
+ fcRGBAImage* input = fcRGBAImage_getJava(env, jni_input);
+ fcRGBAImage* output = fcRGBAImage_getJava(env, jni_output);
+
+ if (!fcRGBAImage_valid(input) || !fcRGBAImage_valid(output)) {
+ fcException_throwNative(env, __FILE__, __LINE__, "fcARGBImage_valid",
+ FC_EXCEPTION_BAD_PARAMETER);
+ return;
+ }
+
+ // Ensure data is updated in the target device
+ int err = fcRGBAImage_syncToOCL(input);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToOCL:input", FC_VOID_EXPR);
+
+ err = fcRGBAImage_syncToOCL(output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToOCL:output", FC_VOID_EXPR);
+
+ // Execute kernel
+ switch (self->m_filter_id) {
+ case GRAYSCALE:
+ err = run_grayscale_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_grayscale_gpu", FC_VOID_EXPR);
+ break;
+ case BLUR:
+ err = run_blur_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_blur_gpu", FC_VOID_EXPR);
+ break;
+ case CONVOLVE3:
+ err = run_convolve3_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_convolve3_gpu", FC_VOID_EXPR);
+ break;
+ case CONVOLVE5:
+ err = run_convolve5_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_convolve5_gpu", FC_VOID_EXPR);
+ break;
+ case BILATERAL:
+ err = run_bilateral_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_bilateral_gpu", FC_VOID_EXPR);
+ break;
+ case MEDIAN:
+ err = run_median_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_median_gpu", FC_VOID_EXPR);
+ break;
+ case CONTRAST:
+ err = run_contrast_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_contrast_gpu", FC_VOID_EXPR);
+ break;
+ case FISHEYE:
+ err = run_fisheye_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_fisheye_gpu", FC_VOID_EXPR);
+ break;
+ case LEVELS:
+ err = run_levels_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_levels_gpu", FC_VOID_EXPR);
+ break;
+ case POSTERIZE:
+ err = run_posterize_gpu(&s_filters[self->m_filter_id], input, output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "run_posterize_gpu", FC_VOID_EXPR);
+ break;
+ default:
+ FC_LOGERROR_FMT("Unknown kernel id: %d", self->m_filter_id);
+ break;
+ }
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_model_NativeImageFilter_processCpu(JNIEnv* env,
+ jobject obj,
+ jobject jni_input,
+ jobject jni_output) {
+ NativeImageFilter* self = NativeImageFilter_getJava(env, obj);
+ FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "NativeImageFilter.processCpu",
+ FC_VOID_EXPR);
+
+ fcRGBAImage* input = fcRGBAImage_getJava(env, jni_input);
+ fcRGBAImage* output = fcRGBAImage_getJava(env, jni_output);
+
+ if (!fcRGBAImage_valid(input) || !fcRGBAImage_valid(output)) {
+ fcException_throwNative(env, __FILE__, __LINE__, "fcARGBImage_valid",
+ FC_EXCEPTION_BAD_PARAMETER);
+ return;
+ }
+
+ // Ensure data is updated in the target device
+ int err = fcRGBAImage_syncToNative(input);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToNative:input", FC_VOID_EXPR);
+
+ err = fcRGBAImage_syncToNative(output);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcARGBImage_syncToNative:output", FC_VOID_EXPR);
+
+ // Execute kernel
+ switch (self->m_filter_id) {
+ case GRAYSCALE:
+ run_grayscale_cpu(input, output);
+ break;
+ case BLUR:
+ run_blur_cpu(input, output);
+ break;
+ case CONVOLVE3:
+ run_convolve3_cpu(input, output);
+ break;
+ case CONVOLVE5:
+ run_convolve5_cpu(input, output);
+ break;
+ case BILATERAL:
+ run_bilateral_cpu(input, output);
+ break;
+ case MEDIAN:
+ run_median_cpu(input, output);
+ break;
+ case CONTRAST:
+ run_contrast_cpu(input, output);
+ break;
+ case FISHEYE:
+ run_fisheye_cpu(input, output);
+ break;
+ case LEVELS:
+ run_levels_cpu(input, output);
+ break;
+ case POSTERIZE:
+ run_posterize_cpu(input, output);
+ break;
+ default:
+ FC_LOGERROR_FMT("Unknown kernel id: %d", self->m_filter_id);
+ break;
+ }
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_model_NativeImageFilter_processArray(JNIEnv* env,
+ jobject obj,
+ jintArray jni_input,
+ jintArray jni_output,
+ jint width,
+ jint height) {
+ jboolean error = JNI_FALSE;
+
+ NativeImageFilter* self = NativeImageFilter_getJava(env, obj);
+ FC_EXCEPTION_HANDLE_NULL(env, self, FC_EXCEPTION_INVALID_THIS, "NativeImageFilter.processRef",
+ FC_VOID_EXPR);
+
+ // Initialize image
+ jint* __input_pixels = (*env)->GetIntArrayElements(env, jni_input, NULL);
+ jint* __output_pixels = (*env)->GetIntArrayElements(env, jni_output, NULL);
+
+ // Execute kernel
+ switch (self->m_filter_id) {
+ case GRAYSCALE:
+ run_grayscale_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case BLUR:
+ run_blur_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case CONVOLVE3:
+ run_convolve3_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case CONVOLVE5:
+ run_convolve5_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case BILATERAL:
+ run_bilateral_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case MEDIAN:
+ run_median_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case CONTRAST:
+ run_contrast_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case FISHEYE:
+ run_fisheye_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case LEVELS:
+ run_levels_arr(width, height, &__input_pixels, &__output_pixels);
+ break;
+ case POSTERIZE:
+ run_posterize_arr(width, height, &__input_pixels, &__output_pixels);;
+ break;
+ default:
+ FC_LOGERROR_FMT("Unknown kernel id: %d", self->m_filter_id);
+ break;
+ }
+
+ (*env)->ReleaseIntArrayElements(env, jni_input, __input_pixels, JNI_COMMIT);
+ (*env)->ReleaseIntArrayElements(env, jni_output, __output_pixels, JNI_COMMIT);
+
+ if (error)
+ fcException_throwNative(env, __FILE__, __LINE__, "NativeImageFilter.processRef",
+ FC_EXCEPTION_OTHER);
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_model_NativeImageFilter_releaseNative(JNIEnv* env,
+ jobject obj) {
+ NativeImageFilter* self = NativeImageFilter_getJava(env, obj);
+
+ if (self)
+ NativeImageFilter_freeJava(env, obj);
+}
+
+// Helpers
+
+static void blur_build_mask(float* gauss_kernel, int radius) {
+ int r;
+ float sigma = 0.4f * radius + 0.6f;
+ float coeff1 = 1.0f / (fcMath_sqrtf(2.0f * CL_M_PI_F) * sigma);
+ float coeff2 = -1.0f / (2.0f * sigma * sigma);
+
+ float normalize_factor = 0.0f;
+ for (r = -radius; r <= radius; r++) {
+ gauss_kernel[r + radius] = coeff1 * fcMath_powf(CL_M_E_F, r * r * coeff2);
+ normalize_factor += gauss_kernel[r + radius];
+ }
+
+ normalize_factor = 1.0f / normalize_factor;
+ for (r = -radius; r <= radius; r++) {
+ gauss_kernel[r + radius] *= normalize_factor;
+ }
+}
+
+static void levels_build_sat_matrix(fcFloat3* m, float saturation) {
+ const fcFloat3 weights =
+ fcFloat3_mulkf(fcFloat3_create111(RED_WEIGHT, GREEN_WEIGHT, BLUE_WEIGHT), 1.0f - saturation);
+
+ m[0] = fcFloat3_add(weights, fcFloat3_create111(saturation, 0.0f, 0.0f));
+ m[1] = fcFloat3_add(weights, fcFloat3_create111(0.0f, saturation, 0.0f));
+ m[2] = fcFloat3_add(weights, fcFloat3_create111(0.0f, 0.0f, saturation));
+}
+
+//
+// GPU kernel execution
+//
+
+static int run_grayscale_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Execute kernel
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ return err;
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
+static int run_blur_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Create gaussian kernel mask
+ fcFloatArray* gauss_kernel = calloc(1, sizeof(fcFloatArray));
+ err = fcFloatArray_initSize(gauss_kernel, BLUR_RADIUS * 2 + 1);
+ if (err)
+ goto mask_cleanup;
+
+ err = fcFloatArray_syncToNative(gauss_kernel);
+ if (err)
+ goto mask_cleanup;
+
+ blur_build_mask(gauss_kernel->c, BLUR_RADIUS);
+
+ err = fcFloatArray_syncToOCL(gauss_kernel);
+ if (err)
+ goto mask_cleanup;
+
+ // Create intermediate buffer
+ fcRGBAImage* buffer = calloc(1, sizeof(fcRGBAImage));
+ err = fcRGBAImage_initDims(buffer, input->dims);
+ if (err)
+ goto cleanup;
+
+ err = fcRGBAImage_syncToOCL(buffer);
+ if (err)
+ goto cleanup;
+
+ // Launch horizontal / vertical kernels
+ fcInt radius = BLUR_RADIUS;
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ // Execute horizontal kernel
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(cl_mem), &gauss_kernel->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(fcInt), &radius);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 3, sizeof(cl_mem), &buffer->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ goto cleanup;
+
+ // Execute vertical kernel
+ err = clSetKernelArg(self->m_kernels[1], 0, sizeof(cl_mem), &buffer->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[1], 1, sizeof(cl_mem), &gauss_kernel->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[1], 2, sizeof(fcInt), &radius);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[1], 3, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[1], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ goto cleanup;
+
+cleanup:
+ fcRGBAImage_release(buffer);
+
+mask_cleanup:
+ fcFloatArray_release(gauss_kernel);
+
+ return err;
+}
+
+static int run_convolve3_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Set up 3x3 convolution mask (sharpening)
+ fcFloatArray* mask = calloc(1, sizeof(fcFloatArray));
+ err = fcFloatArray_initSize(mask, 9);
+ if (err)
+ goto cleanup;
+
+ err = fcFloatArray_syncToNative(mask);
+ if (err)
+ goto cleanup;
+
+ mask->c[0] = CONVOLVE3_00;
+ mask->c[1] = CONVOLVE3_01;
+ mask->c[2] = CONVOLVE3_02;
+ mask->c[3] = CONVOLVE3_10;
+ mask->c[4] = CONVOLVE3_11;
+ mask->c[5] = CONVOLVE3_12;
+ mask->c[6] = CONVOLVE3_20;
+ mask->c[7] = CONVOLVE3_21;
+ mask->c[8] = CONVOLVE3_22;
+
+ err = fcFloatArray_syncToOCL(mask);
+ if (err)
+ goto cleanup;
+
+ // Execute kernel
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(cl_mem), &mask->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ goto cleanup;
+
+cleanup:
+ fcFloatArray_release(mask);
+ return err;
+}
+
+static int run_convolve5_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Set up 5x5 convolution mask (laplacian of gaussian)
+ fcFloatArray* mask = calloc(1, sizeof(fcFloatArray));
+ err = fcFloatArray_initSize(mask, 25);
+ if (err)
+ goto cleanup;
+
+ err = fcFloatArray_syncToNative(mask);
+ if (err)
+ goto cleanup;
+
+ mask->c[0] = CONVOLVE5_00;
+ mask->c[1] = CONVOLVE5_01;
+ mask->c[2] = CONVOLVE5_02;
+ mask->c[3] = CONVOLVE5_03;
+ mask->c[4] = CONVOLVE5_04;
+ mask->c[5] = CONVOLVE5_10;
+ mask->c[6] = CONVOLVE5_11;
+ mask->c[7] = CONVOLVE5_12;
+ mask->c[8] = CONVOLVE5_13;
+ mask->c[9] = CONVOLVE5_14;
+ mask->c[10] = CONVOLVE5_20;
+ mask->c[11] = CONVOLVE5_21;
+ mask->c[12] = CONVOLVE5_22;
+ mask->c[13] = CONVOLVE5_23;
+ mask->c[14] = CONVOLVE5_24;
+ mask->c[15] = CONVOLVE5_30;
+ mask->c[16] = CONVOLVE5_31;
+ mask->c[17] = CONVOLVE5_32;
+ mask->c[18] = CONVOLVE5_33;
+ mask->c[19] = CONVOLVE5_34;
+ mask->c[20] = CONVOLVE5_40;
+ mask->c[21] = CONVOLVE5_41;
+ mask->c[22] = CONVOLVE5_42;
+ mask->c[23] = CONVOLVE5_43;
+ mask->c[24] = CONVOLVE5_44;
+
+ err = fcFloatArray_syncToOCL(mask);
+ if (err)
+ goto cleanup;
+
+ // Execute kernel
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(cl_mem), &mask->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ goto cleanup;
+
+cleanup:
+ fcFloatArray_release(mask);
+ return err;
+}
+
+static int run_bilateral_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Execute kernel
+ fcInt radius = BILATERAL_RADIUS;
+ fcFloat preservation = BILATERAL_PRESERVATION;
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(fcInt), &radius);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(fcFloat), &preservation);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 3, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ return err;
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
+static int run_median_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Execute kernel
+ fcInt radius = MEDIAN_RADIUS;
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(fcInt), &radius);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ return err;
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
+static int run_contrast_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Execute kernel
+ fcFloat enhancement = CONTRAST_ENHANCEMENT;
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(fcFloat), &enhancement);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ return err;
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
+static int run_fisheye_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Execute kernel
+ fcFloat2 center = fcFloat2_create11(FISHEYE_CENTER_X, FISHEYE_CENTER_Y);
+ fcFloat scale = FISHEYE_SCALE;
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(fcFloat2), ¢er);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(fcFloat), &scale);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 3, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ return err;
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
+static int run_levels_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ fcFloat3Array* sat_matrix = calloc(1, sizeof(fcFloat3Array));
+ err = fcFloat3Array_initSize(sat_matrix, 3);
+ if (err)
+ goto cleanup;
+
+ err = fcFloat3Array_syncToNative(sat_matrix);
+ if (err)
+ goto cleanup;
+
+ levels_build_sat_matrix(sat_matrix->c, LEVELS_SATURATION);
+
+ err = fcFloat3Array_syncToOCL(sat_matrix);
+ if (err)
+ goto cleanup;
+
+ // Execute kernel
+ fcFloat2 black_levels = fcFloat2_create11(LEVELS_IN_BLACK, LEVELS_OUT_BLACK);
+ fcFloat2 white_levels = fcFloat2_create11(LEVELS_IN_WHITE, LEVELS_OUT_WHITE);
+ size_t sz[] = {input->dims.x, input->dims.y};
+
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(cl_mem), &sat_matrix->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(fcFloat2), &black_levels);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 3, sizeof(fcFloat2), &white_levels);
+ if (err)
+ goto cleanup;
+
+ err = clSetKernelArg(self->m_kernels[0], 4, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ goto cleanup;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ goto cleanup;
+
+cleanup:
+ fcFloat3Array_release(sat_matrix);
+ return err;
+}
+
+static int run_posterize_gpu(Filter* self, fcRGBAImage* input, fcRGBAImage* output) {
+ int err;
+
+ // Execute kernel
+ size_t sz[] = {input->dims.x, input->dims.y};
+ const fcFloat2 intensities[] = {
+ fcFloat2_create11(POSTERIZE_INTENSITY0, POSTERIZE_INTENSITY1),
+ fcFloat2_create11(POSTERIZE_INTENSITY1, POSTERIZE_INTENSITY2),
+ fcFloat2_create11(POSTERIZE_INTENSITY2, POSTERIZE_INTENSITY3),
+ fcFloat2_create11(POSTERIZE_INTENSITY3, POSTERIZE_INTENSITY4),
+ fcFloat2_create11(POSTERIZE_INTENSITY4, POSTERIZE_INTENSITY5)
+ };
+ const fcByte4 colors[] = {
+ POSTERIZE_COLOR0,
+ POSTERIZE_COLOR1,
+ POSTERIZE_COLOR2,
+ POSTERIZE_COLOR3,
+ POSTERIZE_COLOR4
+ };
+ const int num_stages = sizeof(intensities) / sizeof(intensities[0]);
+
+ for (int i = 0; i < num_stages; ++i) {
+ err = clSetKernelArg(self->m_kernels[0], 0, sizeof(cl_mem), &input->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 1, sizeof(fcFloat2), &intensities[i]);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 2, sizeof(fcByte4), &colors[i]);
+ if (err)
+ return err;
+
+ err = clSetKernelArg(self->m_kernels[0], 3, sizeof(cl_mem), &output->pixels->ocl);
+ if (err)
+ return err;
+
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, self->m_kernels[0], 2, NULL, sz, NULL, 0, NULL,
+ NULL);
+ if (err)
+ return err;
+ }
+
+ return FC_EXCEPTION_SUCCESS;
+}
+
+
+// Native helpers
+
+static inline int index_img(int width, int x, int y) {
+ return y * width + x;
+}
+
+static fcByte4 bilinear_interp(const fcByte4* img, fcInt2 dims, fcFloat2 coord) {
+ fcInt2 dims_minus1 = fcInt2_add(dims, fcInt2_create1(-1));
+ fcFloat2 pos_coord = fcFloat2_max(coord, fcFloat2_create1(0.0f));
+
+ fcInt2 xy0 = fcInt2_min(fcFloat2_convertInt2(fcFloat2_trunc(pos_coord)), dims_minus1);
+ fcInt2 xy1 = fcInt2_min(fcInt2_add(xy0, fcInt2_create1(1)), dims_minus1);
+
+ fcFloat4 p00 = fcByte4_convertFloat4(img[index_img(dims.x, xy0.x, xy0.y)]);
+ fcFloat4 p01 = fcByte4_convertFloat4(img[index_img(dims.x, xy0.x, xy1.y)]);
+ fcFloat4 p10 = fcByte4_convertFloat4(img[index_img(dims.x, xy1.x, xy0.y)]);
+ fcFloat4 p11 = fcByte4_convertFloat4(img[index_img(dims.x, xy1.x, xy1.y)]);
+
+ float slopex0 = (float) xy1.x - pos_coord.x;
+ float slopex1 = pos_coord.x - (float) xy0.x;
+
+ fcFloat4 pxy0 = fcFloat4_add(fcFloat4_mulkf(p00, slopex0), fcFloat4_mulkf(p10, slopex1));
+ fcFloat4 pxy1 = fcFloat4_add(fcFloat4_mulkf(p01, slopex0), fcFloat4_mulkf(p11, slopex1));
+
+ fcFloat4 out = fcFloat4_add(fcFloat4_mulkf(pxy0, ((float) xy1.y - coord.y)), fcFloat4_mulkf(pxy1, (coord.y - (float) xy0.y)));
+ return fcFloat4_convertByte4(fcFloat4_clampk(out, 0.0f, 255.0f));
+}
+
+static inline fcFloat3 matrix3x3_vector_multiply(const fcFloat3* m, fcFloat3 v) {
+ return fcFloat3_create111(fcFloat3_dot(m[0], v), fcFloat3_dot(m[1], v), fcFloat3_dot(m[2], v));
+}
+
+//
+// CPU kernel execution
+//
+
+static void run_grayscale_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+ const fcFloat3 weights = fcFloat3_create111(RED_WEIGHT, GREEN_WEIGHT, BLUE_WEIGHT);
+
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int index = index_img(width, x, y);
+ fcByte4 pixel_in = in[index];
+ fcByte gray_value = fcFloat3_dot(fcByte3_convertFloat3(fcByte4_asByte3(pixel_in)), weights);
+ out[index] = fcByte4_create1111(gray_value, gray_value, gray_value, pixel_in.w);
+ }
+ }
+}
+
+static void run_blur_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ float gauss_kernel[BLUR_RADIUS * 2 + 1];
+ blur_build_mask(gauss_kernel, BLUR_RADIUS);
+
+ // Create intermediate buffer
+ fcRGBAImage* buffer = calloc(1, sizeof(fcRGBAImage));
+ int err = fcRGBAImage_initDims(buffer, input->dims);
+ if (err)
+ goto cleanup;
+
+ err = fcRGBAImage_syncToNative(buffer);
+ if (err)
+ goto cleanup;
+
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+ const fcByte4* in = input->pixels->c;
+ fcByte4* buf = buffer->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ // Horizontal (input -> buffer)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ fcFloat4 blurred_pixel = fcFloat4_create1(0.0f);
+ int kernel_index = 0;
+
+ if (x <= BLUR_RADIUS || x >= width - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int x_2 = fcMath_clamp(x + r, 0, width - 1);
+ blurred_pixel = fcFloat4_add(blurred_pixel, fcFloat4_mulkf(
+ fcByte4_convertFloat4(in[index_img(width, x_2, y)]),
+ gauss_kernel[kernel_index++]));
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ blurred_pixel = fcFloat4_add(blurred_pixel, fcFloat4_mulkf(
+ fcByte4_convertFloat4(in[index_img(width, x + r, y)]),
+ gauss_kernel[kernel_index++]));
+ }
+ }
+
+ buf[index_img(width, x, y)] = fcFloat4_convertByte4(blurred_pixel);
+ }
+ }
+
+ // Vertical (buffer -> output)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ fcFloat4 blurred_pixel = fcFloat4_create1(0.0f);
+ int kernel_index = 0;
+
+ if (y <= BLUR_RADIUS || y >= height - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int y_2 = fcMath_clamp(y + r, 0, height - 1);
+ blurred_pixel = fcFloat4_add(blurred_pixel, fcFloat4_mulkf(
+ fcByte4_convertFloat4(buf[index_img(width, x, y_2)]),
+ gauss_kernel[kernel_index++]));
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ blurred_pixel = fcFloat4_add(blurred_pixel, fcFloat4_mulkf(
+ fcByte4_convertFloat4(buf[index_img(width, x, y + r)]),
+ gauss_kernel[kernel_index++]));
+ }
+ }
+
+ out[index_img(width, x, y)] = fcFloat4_convertByte4(blurred_pixel);
+ }
+ }
+
+cleanup:
+ fcRGBAImage_release(buffer);
+}
+
+static void run_convolve3_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ float mask[3 * 3];
+
+ mask[0] = CONVOLVE3_00;
+ mask[1] = CONVOLVE3_01;
+ mask[2] = CONVOLVE3_02;
+ mask[3] = CONVOLVE3_10;
+ mask[4] = CONVOLVE3_11;
+ mask[5] = CONVOLVE3_12;
+ mask[6] = CONVOLVE3_20;
+ mask[7] = CONVOLVE3_21;
+ mask[8] = CONVOLVE3_22;
+
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = fcMath_max((int) x - 1, 0);
+ int x1 = fcMath_min(x + 1, width - 1);
+ int y0 = fcMath_max((int) y - 1, 0);
+ int y1 = fcMath_min(y + 1, height - 1);
+
+ fcByte4 pixel = in[index_img(width, x, y)];
+ fcFloat3 sum = fcFloat3_create1(0.0f);
+
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x0, y0)])), mask[0]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x, y0)])), mask[1]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x1, y0)])), mask[2]));
+
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x0, y)])), mask[3]));
+ sum =
+ fcFloat3_add(sum, fcFloat3_mulkf(fcByte3_convertFloat3(fcByte4_asByte3(pixel)), mask[4]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x1, y)])), mask[5]));
+
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x0, y1)])), mask[6]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x, y1)])), mask[7]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x1, y1)])), mask[8]));
+
+ out[index_img(width, x, y)] =
+ fcByte4_create31(fcFloat3_convertByte3(fcFloat3_clampk(sum, 0.0f, 255.0f)), pixel.w);
+ }
+ }
+}
+
+static void run_convolve5_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ float mask[5 * 5];
+
+ mask[0] = CONVOLVE5_00;
+ mask[1] = CONVOLVE5_01;
+ mask[2] = CONVOLVE5_02;
+ mask[3] = CONVOLVE5_03;
+ mask[4] = CONVOLVE5_04;
+ mask[5] = CONVOLVE5_10;
+ mask[6] = CONVOLVE5_11;
+ mask[7] = CONVOLVE5_12;
+ mask[8] = CONVOLVE5_13;
+ mask[9] = CONVOLVE5_14;
+ mask[10] = CONVOLVE5_20;
+ mask[11] = CONVOLVE5_21;
+ mask[12] = CONVOLVE5_22;
+ mask[13] = CONVOLVE5_23;
+ mask[14] = CONVOLVE5_24;
+ mask[15] = CONVOLVE5_30;
+ mask[16] = CONVOLVE5_31;
+ mask[17] = CONVOLVE5_32;
+ mask[18] = CONVOLVE5_33;
+ mask[19] = CONVOLVE5_34;
+ mask[20] = CONVOLVE5_40;
+ mask[21] = CONVOLVE5_41;
+ mask[22] = CONVOLVE5_42;
+ mask[23] = CONVOLVE5_43;
+ mask[24] = CONVOLVE5_44;
+
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = fcMath_max((int) x - 2, 0);
+ int x1 = fcMath_max((int) x - 1, 0);
+ int x2 = fcMath_min(x + 1, width - 1);
+ int x3 = fcMath_min(x + 2, width - 1);
+
+ int y0 = fcMath_max((int) y - 2, 0);
+ int y1 = fcMath_max((int) y - 1, 0);
+ int y2 = fcMath_min(y + 1, height - 1);
+ int y3 = fcMath_min(y + 2, height - 1);
+
+ fcByte4 pixel = in[index_img(width, x, y)];
+ fcFloat3 sum = fcFloat3_create1(0.0f);
+
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x0, y0)])), mask[0]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x1, y0)])), mask[1]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x, y0)])), mask[2]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x2, y0)])), mask[3]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x3, y0)])), mask[4]));
+
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x0, y1)])), mask[5]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x1, y1)])), mask[6]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x, y1)])), mask[7]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x2, y1)])), mask[8]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x3, y1)])), mask[9]));
+
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x0, y)])), mask[10]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x1, y)])), mask[11]));
+ sum = fcFloat3_add(sum,
+ fcFloat3_mulkf(fcByte3_convertFloat3(fcByte4_asByte3(pixel)), mask[12]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x2, y)])), mask[13]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x3, y)])), mask[14]));
+
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x0, y2)])), mask[15]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x1, y2)])), mask[16]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x, y2)])), mask[17]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x2, y2)])), mask[18]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x3, y2)])), mask[19]));
+
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x0, y3)])), mask[20]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x1, y3)])), mask[21]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x, y3)])), mask[22]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x2, y3)])), mask[23]));
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x3, y3)])), mask[24]));
+
+ out[index_img(width, x, y)] =
+ fcByte4_create31(fcFloat3_convertByte3(fcFloat3_clampk(sum, 0.0f, 255.0f)), pixel.w);
+ }
+ }
+}
+
+static void run_bilateral_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ fcByte4 centerPixel = in[index_img(width, x, y)];
+ fcFloat3 center = fcFloat3_divkf(fcByte3_convertFloat3(fcByte4_asByte3(centerPixel)), 0xff);
+
+ fcFloat3 sum = fcFloat3_create1(0.0f);
+ float totalWeight = 0.0f;
+
+ for (int rx = -BILATERAL_RADIUS; rx <= BILATERAL_RADIUS; ++rx) {
+ for (int ry = -BILATERAL_RADIUS; ry <= BILATERAL_RADIUS; ++ry) {
+ int x2 = fcMath_clamp((int) x + rx, 0, (int) width - 1);
+ int y2 = fcMath_clamp((int) y + ry, 0, (int) height - 1);
+
+ fcFloat3 pixel = fcFloat3_divkf(
+ fcByte3_convertFloat3(fcByte4_asByte3(in[index_img(width, x2, y2)])), 0xff);
+ fcFloat3 diff = fcFloat3_sub(center, pixel);
+ diff = fcFloat3_mulf(diff, diff);
+
+ float diffMap = fcMath_expf(-(diff.x + diff.y + diff.z) * BILATERAL_PRESERVATION * 100.0f);
+ float gaussianWeight =
+ fcMath_expf(-0.5f * ((rx * rx) + (ry * ry)) / (float) BILATERAL_RADIUS);
+
+ float weight = diffMap * gaussianWeight;
+ sum = fcFloat3_add(sum, fcFloat3_mulkf(pixel, weight));
+ totalWeight += weight;
+ }
+ }
+
+ out[index_img(width, x, y)] = fcByte4_create31(
+ fcFloat3_convertByte3(fcFloat3_mulkf(fcFloat3_divkf(sum, totalWeight), 0xff)),
+ centerPixel.w);
+ }
+ }
+}
+
+static void run_median_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ fcInt3 val[256];
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ for (int i = 0; i < 256; i++) {
+ fcInt3_set1(&val[i], 0);
+ }
+
+ for (int rx = -MEDIAN_RADIUS; rx <= MEDIAN_RADIUS; rx++) {
+ for (int ry = -MEDIAN_RADIUS; ry <= MEDIAN_RADIUS; ry++) {
+ int x2 = fcMath_clamp(x + rx, 0, width - 1);
+ int y2 = fcMath_clamp(y + ry, 0, height - 1);
+
+ fcByte pixel = in[index_img(width, x2, y2)].x;
+ val[pixel & 0xff] = fcInt3_add(val[pixel & 0xff], fcInt3_create1(1));
+ }
+ }
+
+ int median = ((MEDIAN_RADIUS * 2 + 1) * (MEDIAN_RADIUS * 2 + 1)) / 2;
+ fcInt3 rgb = fcInt3_create1(0);
+ fcByte4 out_pixel = fcByte4_create1(0xff);
+
+ for (fcByte i = 0;
+ fcInt3_any(fcByte3_isEqual(fcByte4_asByte3(out_pixel), fcByte3_create1(0xff))) != 0;
+ i = (i & 0xff) + 1) {
+ if ((out_pixel.x & 0xff) == 0xff) {
+ rgb.x += val[i & 0xff].x;
+
+ if (rgb.x >= median)
+ out_pixel.x = i;
+ }
+
+ if ((out_pixel.y & 0xff) == 0xff) {
+ rgb.y += val[i & 0xff].y;
+
+ if (rgb.y >= median)
+ out_pixel.y = i;
+ }
+
+ if ((out_pixel.z & 0xff) == 0xff) {
+ rgb.z += val[i & 0xff].z;
+
+ if (rgb.z >= median)
+ out_pixel.z = i;
+ }
+ }
+
+ out[index_img(width, x, y)] = out_pixel;
+ }
+ }
+}
+
+static void run_contrast_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ fcByte4 pixelIn = in[index_img(width, x, y)];
+ float brightM = fcMath_exp2f(CONTRAST_ENHANCEMENT);
+ fcFloat3 pixelOut =
+ fcFloat3_add(fcFloat3_mulkf(fcByte3_convertFloat3(fcByte4_asByte3(pixelIn)), brightM),
+ fcFloat3_create1(127.0f * (1 - brightM)));
+ pixelOut = fcFloat3_clampk(pixelOut, 0.0f, 255.0f);
+ out[index_img(width, x, y)] =
+ fcByte4_create31(fcFloat3_convertByte3(pixelOut), pixelIn.w);
+ }
+ }
+}
+
+static void run_fisheye_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ const fcFloat2 FISHEYE_CENTER = fcFloat2_create11(FISHEYE_CENTER_X, FISHEYE_CENTER_Y);
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ fcFloat2 invDimensions = fcFloat2_create11(1.0f / width, 1.0f / height);
+ float alpha = FISHEYE_SCALE * 2.0f + 0.75f;
+ fcFloat2 axisScale = fcFloat2_create1(1.0f);
+
+ if (width > height)
+ axisScale.y = height / (float) width;
+ else
+ axisScale.x = width / (float) height;
+
+ float bound2 = 0.25f * fcFloat2_dot(axisScale, axisScale);
+ float bound = fcMath_sqrtf(bound2);
+ float radius = 1.15f * bound;
+ float radius2 = radius * radius;
+ float factor = bound / (CL_M_PI_2_F - fcMath_atanf(alpha / bound * fcMath_sqrtf(radius2 - bound2)));
+
+ fcFloat2 coord = fcFloat2_mad(fcFloat2_create11(x, y), invDimensions, fcFloat2_neg(FISHEYE_CENTER));
+ fcFloat2 scaledCoord = fcFloat2_mulf(axisScale, coord);
+
+ float dist2 = fcFloat2_dot(scaledCoord, scaledCoord);
+ float invDist = fcMath_rsqrtf(dist2);
+
+ float radian = CL_M_PI_2_F - fcMath_atanf((alpha * fcMath_sqrtf(radius2 - dist2)) * invDist);
+ float scalar = radian * factor * invDist;
+ fcFloat2 newCoord = fcFloat2_mulf(fcFloat2_create11(width, height), fcFloat2_mad(coord, fcFloat2_create1(scalar), FISHEYE_CENTER));
+
+ out[index_img(width, x, y)] = bilinear_interp(in, input->dims, newCoord);
+ }
+ }
+}
+
+static void run_levels_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ fcFloat3 satMatrix[3];
+ levels_build_sat_matrix(satMatrix, LEVELS_SATURATION);
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ fcFloat4 pixel = fcByte4_convertFloat4(in[index_img(width, x, y)]);
+ fcFloat3 mul = matrix3x3_vector_multiply(satMatrix, fcFloat4_asFloat3(pixel));
+ fcFloat4_set31(&pixel, mul, pixel.w);
+ pixel = fcFloat4_clampk(pixel, 0.0f, 255.0f);
+ pixel = fcFloat4_divkf(fcFloat4_sub(pixel, fcFloat4_create1(LEVELS_IN_BLACK)), LEVELS_IN_WHITE - LEVELS_IN_BLACK);
+ pixel = fcFloat4_add(fcFloat4_mulkf(pixel, (LEVELS_OUT_WHITE - LEVELS_OUT_BLACK)), fcFloat4_create1(LEVELS_OUT_BLACK));
+
+ pixel = fcFloat4_clampk(pixel, 0.0f, 255.0f);
+ fcByte4 pixelOut = fcFloat4_convertByte4(pixel);
+ out[index_img(width, x, y)] = pixelOut;
+ }
+ }
+}
+
+static void run_posterize_cpu(fcRGBAImage* input, fcRGBAImage* output) {
+ const int width = input->dims.x;
+ const int height = input->dims.y;
+
+ const fcByte4* in = input->pixels->c;
+ fcByte4* out = output->pixels->c;
+
+ const fcFloat3 weights = fcFloat3_create111(RED_WEIGHT, GREEN_WEIGHT, BLUE_WEIGHT);
+
+ const fcFloat2 intensities[] = {
+ fcFloat2_create11(POSTERIZE_INTENSITY0, POSTERIZE_INTENSITY1),
+ fcFloat2_create11(POSTERIZE_INTENSITY1, POSTERIZE_INTENSITY2),
+ fcFloat2_create11(POSTERIZE_INTENSITY2, POSTERIZE_INTENSITY3),
+ fcFloat2_create11(POSTERIZE_INTENSITY3, POSTERIZE_INTENSITY4),
+ fcFloat2_create11(POSTERIZE_INTENSITY4, POSTERIZE_INTENSITY5)
+ };
+
+ const fcByte4 colors[] = {
+ POSTERIZE_COLOR0,
+ POSTERIZE_COLOR1,
+ POSTERIZE_COLOR2,
+ POSTERIZE_COLOR3,
+ POSTERIZE_COLOR4
+ };
+
+ const int num_stages = sizeof(intensities) / sizeof(intensities[0]);
+
+ for (int stage = 0; stage < num_stages; ++stage) {
+ fcFloat2 intensity = intensities[stage];
+ fcByte4 color = colors[stage];
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ fcByte4 pixel = in[index_img(width, x, y)];
+ float pixel_intensity = fcFloat3_dot(fcFloat3_divkf(fcByte3_convertFloat3(fcByte4_asByte3(pixel)), 0xff), weights);
+
+ if ((pixel_intensity <= intensity.y) && (pixel_intensity >= intensity.x))
+ out[index_img(width, x, y)] = color;
+ }
+ }
+ }
+}
+
+// Reference helpers
+
+static inline int index_bmp(int width, int x, int y) {
+ return y * width + x;
+}
+
+// FIXME Why are fields reversed here and not in Fancier objects?
+// Maybe .x, .y, .z are reversed?
+
+static inline uint32_t bmp_rgba(uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
+ return ((r & 0xff) << 0) | ((g & 0xff) << 8) | ((b & 0xff) << 16) | ((a & 0xff) << 24);
+}
+
+static inline uint8_t bmp_red(uint32_t rgba) {
+ return (rgba >> 0) & 0xff;
+}
+
+static inline uint8_t bmp_green(uint32_t rgba) {
+ return (rgba >> 8) & 0xff;
+}
+
+static inline uint8_t bmp_blue(uint32_t rgba) {
+ return (rgba >> 16) & 0xff;
+}
+
+static inline uint8_t bmp_alpha(uint32_t rgba) {
+ return (rgba >> 24) & 0xff;
+}
+
+static fcByte4 bilinear_interp_arr(jint** img, int width, int height, float x, float y) {
+ float posCoordX = fmaxf(x, 0.0f);
+ float posCoordY = fmaxf(y, 0.0f);
+
+ int x0 = truncf(posCoordX);
+ if (x0 >= width) x0 = width - 1;
+ int x1 = x0 + 1 >= width? width - 1 : x0 + 1;
+ int y0 = truncf(posCoordY);
+ if (y0 >= height) y0 = height - 1;
+ int y1 = y0 + 1 >= height? height - 1 : y0 + 1;
+
+ fcByte4* p00 = ((fcByte4*)(*img) + (y0 * width + x0));
+ fcByte4* p01 = ((fcByte4*)(*img) + (y1 * width + x0));
+ fcByte4* p10 = ((fcByte4*)(*img) + (y0 * width + x1));
+ fcByte4* p11 = ((fcByte4*)(*img) + (y1 * width + x1));
+
+ float p00A = (float)(p00->w & 0xff);
+ float p00R = (float)(p00->z & 0xff);
+ float p00G = (float)(p00->y & 0xff);
+ float p00B = (float)(p00->x & 0xff);
+ float p01A = (float)(p01->w & 0xff);
+ float p01R = (float)(p01->z & 0xff);
+ float p01G = (float)(p01->y & 0xff);
+ float p01B = (float)(p01->x & 0xff);
+ float p10A = (float)(p10->w & 0xff);
+ float p10R = (float)(p10->z & 0xff);
+ float p10G = (float)(p10->y & 0xff);
+ float p10B = (float)(p10->x & 0xff);
+ float p11A = (float)(p11->w & 0xff);
+ float p11R = (float)(p11->z & 0xff);
+ float p11G = (float)(p11->y & 0xff);
+ float p11B = (float)(p11->x & 0xff);
+
+ float slopeX0 = (float) x1 - posCoordX;
+ float slopeX1 = posCoordX - (float) x0;
+ float slopeY0 = (float) y1 - y;
+ float slopeY1 = y - (float) y0;
+
+ float pXY0A = (p00A * slopeX0 + p10A * slopeX1) * slopeY0;
+ float pXY0R = (p00R * slopeX0 + p10R * slopeX1) * slopeY0;
+ float pXY0G = (p00G * slopeX0 + p10G * slopeX1) * slopeY0;
+ float pXY0B = (p00B * slopeX0 + p10B * slopeX1) * slopeY0;
+ float pXY1A = (p01A * slopeX0 + p11A * slopeX1) * slopeY1;
+ float pXY1R = (p01R * slopeX0 + p11R * slopeX1) * slopeY1;
+ float pXY1G = (p01G * slopeX0 + p11G * slopeX1) * slopeY1;
+ float pXY1B = (p01B * slopeX0 + p11B * slopeX1) * slopeY1;
+
+ float outA = pXY0A + pXY1A;
+ float outR = pXY0R + pXY1R;
+ float outG = pXY0G + pXY1G;
+ float outB = pXY0B + pXY1B;
+
+ if (outA < 0.0f)
+ outA = 0.0f;
+ else if (outA > 255.0f)
+ outA = 255.0f;
+ if (outR < 0.0f)
+ outR = 0.0f;
+ else if (outR > 255.0f)
+ outR = 255.0f;
+ if (outG < 0.0f)
+ outG = 0.0f;
+ else if (outG > 255.0f)
+ outG = 255.0f;
+ if (outB < 0.0f)
+ outB = 0.0f;
+ else if (outB > 255.0f)
+ outB = 255.0f;
+
+ fcByte4 outPixel = {{ outB, outG, outR, outA }};
+ return outPixel;
+}
+
+static inline void matrix3x3_vector_multiply_ref(const float* m, float vx, float vy, float vz, float* result) {
+ result[0] = m[0] * vx + m[1] * vy + m[2] * vz;
+ result[1] = m[3] * vx + m[4] * vy + m[5] * vz;
+ result[2] = m[6] * vx + m[7] * vy + m[8] * vz;
+}
+
+static void levels_build_sat_matrix_ref(float* m, float saturation) {
+ float weights_x = RED_WEIGHT * (1.0f - saturation);
+ float weights_y = GREEN_WEIGHT * (1.0f - saturation);
+ float weights_z = BLUE_WEIGHT * (1.0f - saturation);
+
+ m[0] = weights_x + saturation;
+ m[1] = weights_y;
+ m[2] = weights_z;
+ m[3] = weights_x;
+ m[4] = weights_y + saturation;
+ m[5] = weights_z;
+ m[6] = weights_x;
+ m[7] = weights_y;
+ m[8] = weights_z + saturation;
+}
+
+//
+// REF CPU kernel execution
+//
+static void run_grayscale_arr(jint width, jint height, jint** input, jint** output) {
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int index = y * width + x;
+ fcByte4* pixel = ((fcByte4*)(*input) + index );
+
+ fcInt gray_value = ((int)pixel->z & 0xff) * RED_WEIGHT + ((int)pixel->y & 0xff) * GREEN_WEIGHT + ((int)pixel->x & 0xff) * BLUE_WEIGHT;
+ // fprintf(stderr, "pix(%i)(%i * %i + %i) | gray = %i \n", index, y, x, x, gray_value);
+ fcByte4 v_tmp = {{ gray_value, gray_value, gray_value, ((int)pixel->w & 0xff) }};
+
+ if (!memcpy(((fcByte4*)(*output) + index ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+}
+
+static void run_blur_arr(jint width, jint height, jint** input, jint** output) {
+ float gauss_kernel[BLUR_RADIUS * 2 + 1];
+ blur_build_mask(gauss_kernel, BLUR_RADIUS);
+
+ // Create intermediate buffer
+ fcByte4* buffer = malloc(width * height * sizeof(fcByte4));
+
+ // Horizontal (input -> buffer)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ float blurred_pixel_a = 0.0f;
+ float blurred_pixel_r = 0.0f;
+ float blurred_pixel_g = 0.0f;
+ float blurred_pixel_b = 0.0f;
+ int kernel_index = 0;
+
+ if (x <= BLUR_RADIUS || x >= width - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int x_2 = x + r;
+ if (x_2 < 0) x_2 = 0;
+ else if (x_2 >= width) x_2 = width - 1;
+
+ int index = y * width + x_2;
+ fcByte4* pixel = ((fcByte4*)(*input) + index );
+
+ // cambiadas R y B de orden
+ float kernel_value = gauss_kernel[kernel_index++];
+ blurred_pixel_a += ((int)pixel->w & 0xff) * kernel_value;
+ blurred_pixel_r += ((int)pixel->z & 0xff) * kernel_value;
+ blurred_pixel_g += ((int)pixel->y & 0xff) * kernel_value;
+ blurred_pixel_b += ((int)pixel->x & 0xff) * kernel_value;
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int index = y * width + x + r;
+ fcByte4* pixel = ((fcByte4*)(*input) + index );
+
+ // cambiadas R y B de orden
+ float kernel_value = gauss_kernel[kernel_index++];
+ blurred_pixel_a += ((int)pixel->w & 0xff) * kernel_value;
+ blurred_pixel_r += ((int)pixel->z & 0xff) * kernel_value;
+ blurred_pixel_g += ((int)pixel->y & 0xff) * kernel_value;
+ blurred_pixel_b += ((int)pixel->x & 0xff) * kernel_value;
+ }
+ }
+ int outIndex = y * width + x;
+ fcByte4 v_tmp = {{ ((int)blurred_pixel_b & 0xff), ((int)blurred_pixel_g & 0xff), ((int)blurred_pixel_r & 0xff), ((int)blurred_pixel_a & 0xff) }};
+ buffer[outIndex] = v_tmp;
+ }
+ }
+
+ // Vertical (buffer -> output)
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ float blurred_pixel_a = 0.0f;
+ float blurred_pixel_r = 0.0f;
+ float blurred_pixel_g = 0.0f;
+ float blurred_pixel_b = 0.0f;
+ int kernel_index = 0;
+
+ if (y <= BLUR_RADIUS || y >= height - BLUR_RADIUS) {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int y_2 = y + r;
+ if (y_2 < 0) y_2 = 0;
+ else if (y_2 >= height) y_2 = height - 1;
+
+ int index = y_2 * width + x;
+ fcByte4 pixel = buffer[index];
+
+ // cambiadas R y B de orden
+ float kernel_value = gauss_kernel[kernel_index++];
+ blurred_pixel_a += ((int)pixel.w & 0xff) * kernel_value;
+ blurred_pixel_r += ((int)pixel.z & 0xff) * kernel_value;
+ blurred_pixel_g += ((int)pixel.y & 0xff) * kernel_value;
+ blurred_pixel_b += ((int)pixel.x & 0xff) * kernel_value;
+ }
+ }
+ else {
+ for (int r = -BLUR_RADIUS; r <= BLUR_RADIUS; ++r) {
+ int index = (y + r) * width + x;
+ fcByte4 pixel = buffer[index];
+
+ // cambiadas R y B de orden
+ float kernel_value = gauss_kernel[kernel_index++];
+ blurred_pixel_a += ((int)pixel.w & 0xff) * kernel_value;
+ blurred_pixel_r += ((int)pixel.z & 0xff) * kernel_value;
+ blurred_pixel_g += ((int)pixel.y & 0xff) * kernel_value;
+ blurred_pixel_b += ((int)pixel.x & 0xff) * kernel_value;
+ }
+ }
+
+ fcByte4 v_tmp = {{ ((int)blurred_pixel_b & 0xff), ((int)blurred_pixel_g & 0xff), ((int)blurred_pixel_r & 0xff), ((int)blurred_pixel_a & 0xff) }};
+
+ int outIndex = y * width + x;
+ if (!memcpy(((fcByte4*)(*output) + outIndex ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+
+ free(buffer);
+}
+
+static void run_convolve3_arr(jint width, jint height, jint** input, jint** output) {
+ float mask[3 * 3];
+
+ mask[0] = CONVOLVE3_00;
+ mask[1] = CONVOLVE3_01;
+ mask[2] = CONVOLVE3_02;
+ mask[3] = CONVOLVE3_10;
+ mask[4] = CONVOLVE3_11;
+ mask[5] = CONVOLVE3_12;
+ mask[6] = CONVOLVE3_20;
+ mask[7] = CONVOLVE3_21;
+ mask[8] = CONVOLVE3_22;
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = x > 1? x - 1 : 0;
+ int x1 = x + 1 >= width? width - 1 : x + 1;
+ int y0 = y > 1? y - 1 : 0;
+ int y1 = y + 1 >= height? height - 1 : y + 1;
+
+ int index = y * width + x;
+ fcByte4* pixel = ((fcByte4*)(*input) + index );
+ fcInt pixel_a = (int)pixel->w & 0xff;
+ fcInt pixel_r = (int)pixel->z & 0xff;
+ fcInt pixel_g = (int)pixel->y & 0xff;
+ fcInt pixel_b = (int)pixel->x & 0xff;
+
+ float sum_r = 0.0f;
+ float sum_g = 0.0f;
+ float sum_b = 0.0f;
+
+ fcByte4* otherPixel = ((fcByte4*)(*input) + y0 * width + x0 );
+ sum_r += ((int) otherPixel->z & 0xff) * mask[0];
+ sum_g += ((int) otherPixel->y & 0xff) * mask[0];
+ sum_b += ((int) otherPixel->x & 0xff) * mask[0];
+ otherPixel = ((fcByte4*)(*input) + y0 * width + x );
+ sum_r += ((int) otherPixel->z & 0xff) * mask[1];
+ sum_g += ((int) otherPixel->y & 0xff) * mask[1];
+ sum_b += ((int) otherPixel->x & 0xff) * mask[1];
+ otherPixel = ((fcByte4*)(*input) + y0 * width + x1 );
+ sum_r += ((int) otherPixel->z & 0xff) * mask[2];
+ sum_g += ((int) otherPixel->y & 0xff) * mask[2];
+ sum_b += ((int) otherPixel->x & 0xff) * mask[2];
+
+ otherPixel = ((fcByte4*)(*input) + y * width + x0 );
+ sum_r += ((int) otherPixel->z & 0xff) * mask[3];
+ sum_g += ((int) otherPixel->y & 0xff) * mask[3];
+ sum_b += ((int) otherPixel->x & 0xff) * mask[3];
+ sum_r += pixel_r * mask[4];
+ sum_g += pixel_g * mask[4];
+ sum_b += pixel_b * mask[4];
+ otherPixel = ((fcByte4*)(*input) + y * width + x1 );
+ sum_r += ((int) otherPixel->z & 0xff) * mask[5];
+ sum_g += ((int) otherPixel->y & 0xff) * mask[5];
+ sum_b += ((int) otherPixel->x & 0xff) * mask[5];
+
+ otherPixel = ((fcByte4*)(*input) + y1 * width + x0 );
+ sum_r += ((int) otherPixel->z & 0xff) * mask[6];
+ sum_g += ((int) otherPixel->y & 0xff) * mask[6];
+ sum_b += ((int) otherPixel->x & 0xff) * mask[6];
+ otherPixel = ((fcByte4*)(*input) + y1 * width + x );
+ sum_r += ((int) otherPixel->z & 0xff) * mask[7];
+ sum_g += ((int) otherPixel->y & 0xff) * mask[7];
+ sum_b += ((int) otherPixel->x & 0xff) * mask[7];
+ otherPixel = ((fcByte4*)(*input) + y1 * width + x1 );
+ sum_r += ((int) otherPixel->z & 0xff) * mask[8];
+ sum_g += ((int) otherPixel->y & 0xff) * mask[8];
+ sum_b += ((int) otherPixel->x & 0xff) * mask[8];
+
+ if (sum_r < 0.0f) sum_r = 0.0f;
+ else if (sum_r > 255.0f) sum_r = 255.0f;
+ if (sum_g < 0.0f) sum_g = 0.0f;
+ else if (sum_g > 255.0f) sum_g = 255.0f;
+ if (sum_b < 0.0f) sum_b = 0.0f;
+ else if (sum_b > 255.0f) sum_b = 255.0f;
+
+ fcByte4 v_tmp = {{ sum_b, sum_g, sum_r, pixel_a }};
+
+ if (!memcpy(((fcByte4*)(*output) + index ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+}
+
+static void run_convolve5_arr(jint width, jint height, jint** input, jint** output) {
+ float mask[5 * 5];
+
+ mask[0] = CONVOLVE5_00;
+ mask[1] = CONVOLVE5_01;
+ mask[2] = CONVOLVE5_02;
+ mask[3] = CONVOLVE5_03;
+ mask[4] = CONVOLVE5_04;
+ mask[5] = CONVOLVE5_10;
+ mask[6] = CONVOLVE5_11;
+ mask[7] = CONVOLVE5_12;
+ mask[8] = CONVOLVE5_13;
+ mask[9] = CONVOLVE5_14;
+ mask[10] = CONVOLVE5_20;
+ mask[11] = CONVOLVE5_21;
+ mask[12] = CONVOLVE5_22;
+ mask[13] = CONVOLVE5_23;
+ mask[14] = CONVOLVE5_24;
+ mask[15] = CONVOLVE5_30;
+ mask[16] = CONVOLVE5_31;
+ mask[17] = CONVOLVE5_32;
+ mask[18] = CONVOLVE5_33;
+ mask[19] = CONVOLVE5_34;
+ mask[20] = CONVOLVE5_40;
+ mask[21] = CONVOLVE5_41;
+ mask[22] = CONVOLVE5_42;
+ mask[23] = CONVOLVE5_43;
+ mask[24] = CONVOLVE5_44;
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int x0 = x > 2? x - 2 : 0;
+ int x1 = x > 1? x - 1 : 0;
+ int x2 = x + 1 >= width? width - 1 : x + 1;
+ int x3 = x + 2 >= width? width - 1 : x + 2;
+
+ int y0 = y > 2? y - 2 : 0;
+ int y1 = y > 1? y - 1 : 0;
+ int y2 = y + 1 >= height? height - 1 : y + 1;
+ int y3 = y + 2 >= height? height - 1 : y + 2;
+
+ int index = y * width + x;
+ fcByte4* pixel = ((fcByte4*)(*input) + index );
+ fcInt pixel_a = (int)pixel->w & 0xff;
+ fcInt pixel_r = (int)pixel->z & 0xff;
+ fcInt pixel_g = (int)pixel->y & 0xff;
+ fcInt pixel_b = (int)pixel->x & 0xff;
+
+ float sum_r = 0.0f;
+ float sum_g = 0.0f;
+ float sum_b = 0.0f;
+
+ fcByte4* other_pixel = ((fcByte4*)(*input) + y0 * width + x0 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[0];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[0];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[0];
+ other_pixel = ((fcByte4*)(*input) + y0 * width + x1 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[1];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[1];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[1];
+ other_pixel = ((fcByte4*)(*input) + y0 * width + x );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[2];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[2];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[2];
+ other_pixel = ((fcByte4*)(*input) + y0 * width + x2 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[3];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[3];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[3];
+ other_pixel = ((fcByte4*)(*input) + y0 * width + x3 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[4];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[4];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[4];
+
+ other_pixel = ((fcByte4*)(*input) + y1 * width + x0 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[5];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[5];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[5];
+ other_pixel = ((fcByte4*)(*input) + y1 * width + x1 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[6];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[6];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[6];
+ other_pixel = ((fcByte4*)(*input) + y1 * width + x );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[7];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[7];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[7];
+ other_pixel = ((fcByte4*)(*input) + y1 * width + x2 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[8];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[8];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[8];
+ other_pixel = ((fcByte4*)(*input) + y1 * width + x3 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[9];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[9];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[9];
+
+ other_pixel = ((fcByte4*)(*input) + y * width + x0 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[10];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[10];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[10];
+ other_pixel = ((fcByte4*)(*input) + y * width + x1 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[11];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[11];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[11];
+ sum_r += pixel_r * mask[12];
+ sum_g += pixel_g * mask[12];
+ sum_b += pixel_b * mask[12];
+ other_pixel = ((fcByte4*)(*input) + y * width + x2 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[13];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[13];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[13];
+ other_pixel = ((fcByte4*)(*input) + y * width + x3 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[14];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[14];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[14];
+
+ other_pixel = ((fcByte4*)(*input) + y2 * width + x0 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[15];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[15];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[15];
+ other_pixel = ((fcByte4*)(*input) + y2 * width + x1 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[16];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[16];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[16];
+ other_pixel = ((fcByte4*)(*input) + y2 * width + x );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[17];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[17];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[17];
+ other_pixel = ((fcByte4*)(*input) + y2 * width + x2 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[18];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[18];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[18];
+ other_pixel = ((fcByte4*)(*input) + y2 * width + x3 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[19];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[19];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[19];
+
+ other_pixel = ((fcByte4*)(*input) + y3 * width + x0 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[20];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[20];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[20];
+ other_pixel = ((fcByte4*)(*input) + y3 * width + x1 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[21];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[21];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[21];
+ other_pixel = ((fcByte4*)(*input) + y3 * width + x );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[22];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[22];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[22];
+ other_pixel = ((fcByte4*)(*input) + y3 * width + x2 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[23];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[23];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[23];
+ other_pixel = ((fcByte4*)(*input) + y3 * width + x3 );
+ sum_r += ((int) other_pixel->z & 0xff) * mask[24];
+ sum_g += ((int) other_pixel->y & 0xff) * mask[24];
+ sum_b += ((int) other_pixel->x & 0xff) * mask[24];
+
+ if (sum_r < 0.0f) sum_r = 0.0f;
+ else if (sum_r > 255.0f) sum_r = 255.0f;
+ if (sum_g < 0.0f) sum_g = 0.0f;
+ else if (sum_g > 255.0f) sum_g = 255.0f;
+ if (sum_b < 0.0f) sum_b = 0.0f;
+ else if (sum_b > 255.0f) sum_b = 255.0f;
+
+ fcByte4 v_tmp = {{ sum_b, sum_g, sum_r, pixel_a }};
+
+ if (!memcpy(((fcByte4*)(*output) + index ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+
+ }
+ }
+}
+
+static void run_bilateral_arr(jint width, jint height, jint** input, jint** output) {
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int index = y * width + x;
+ fcByte4* center_pixel = ((fcByte4*)(*input) + index );
+ fcFloat center_r = (float) ((int)center_pixel->z & 0xff) / 0xff;
+ fcFloat center_g = (float) ((int)center_pixel->y & 0xff) / 0xff;
+ fcFloat center_b = (float) ((int)center_pixel->x & 0xff) / 0xff;
+ fcInt outA = (int)center_pixel->w & 0xff;
+
+ float sumR = 0.0f, sumG = 0.0f, sumB = 0.0f;
+ float totalWeight = 0.0f;
+
+ for (int rx = -BILATERAL_RADIUS; rx <= BILATERAL_RADIUS; ++rx) {
+ for (int ry = -BILATERAL_RADIUS; ry <= BILATERAL_RADIUS; ++ry) {
+ int x2 = x + rx;
+ int y2 = y + ry;
+
+ if (x2 < 0) x2 = 0;
+ else if (x2 >= width) x2 = width - 1;
+ if (y2 < 0) y2 = 0;
+ else if (y2 >= height) y2 = height - 1;
+
+ index = y2 * width + x2;
+ fcByte4* other_pixel = ((fcByte4*)(*input) + index );
+ fcFloat pixel_r = (float) ((int)other_pixel->z & 0xff) / 0xff;
+ fcFloat pixel_g = (float) ((int)other_pixel->y & 0xff) / 0xff;
+ fcFloat pixel_b = (float) ((int)other_pixel->x & 0xff) / 0xff;
+
+ float diff_r = center_r - pixel_r;
+ float diff_g = center_g - pixel_g;
+ float diff_b = center_b - pixel_b;
+
+ diff_r *= diff_r;
+ diff_g *= diff_g;
+ diff_b *= diff_b;
+
+ float diffMap = expf(-(diff_r + diff_g + diff_b) * BILATERAL_PRESERVATION * 100.0f);
+ float gaussianWeight = expf(-0.5f * ((rx * rx) + (ry * ry)) / (float) BILATERAL_RADIUS);
+
+ float weight = diffMap * gaussianWeight;
+ sumR += pixel_r * weight;
+ sumG += pixel_g * weight;
+ sumB += pixel_b * weight;
+ totalWeight += weight;
+ }
+ }
+
+ uint8_t outR = (sumR / totalWeight) * 0xff;
+ uint8_t outG = (sumG / totalWeight) * 0xff;
+ uint8_t outB = (sumB / totalWeight) * 0xff;
+
+ fcByte4 v_tmp = {{ outB, outG, outR, outA }};
+ index = y * width + x;
+ if (!memcpy(((fcByte4*)(*output) + index ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+}
+
+static void run_median_arr(jint width, jint height, jint** input, jint** output) {
+ int val[256 * 3];
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ for (int i = 0; i < 256 * 3; i++)
+ val[i] = 0;
+
+ for (int rx = -MEDIAN_RADIUS; rx <= MEDIAN_RADIUS; rx++) {
+ for (int ry = -MEDIAN_RADIUS; ry <= MEDIAN_RADIUS; ry++) {
+ int x_2 = x + rx;
+ int y_2 = y + ry;
+
+ if (x_2 < 0)
+ x_2 = 0;
+ else if (x_2 >= width)
+ x_2 = width - 1;
+ if (y_2 < 0)
+ y_2 = 0;
+ else if (y_2 >= height)
+ y_2 = height - 1;
+
+ // fcInt color_index = bmp_red(input[index_bmp(info.width, x_2, y_2)]);
+
+ fcInt color_pix_index = y_2 * width + x_2;
+ fcByte4* color_pixel = ((fcByte4*)(*input) + color_pix_index);
+ fcInt color_index = (int)color_pixel->z & 0xff; // red
+ ++val[color_index * 3];
+ ++val[color_index * 3 + 1];
+ ++val[color_index * 3 + 2];
+ }
+ }
+
+ int median = ((MEDIAN_RADIUS * 2 + 1) * (MEDIAN_RADIUS * 2 + 1)) / 2;
+ int r = 0, g = 0, b = 0;
+ uint8_t out_pixel_r = 0xff;
+ uint8_t out_pixel_g = 0xff;
+ uint8_t out_pixel_b = 0xff;
+
+ for (uint8_t i = 0; out_pixel_r == 0xff || out_pixel_g == 0xff || out_pixel_b == 0xff; ++i) {
+ if (out_pixel_r == 0xff) {
+ r += val[i * 3];
+
+ if (r >= median)
+ out_pixel_r = i;
+ }
+
+ if (out_pixel_g == 0xff) {
+ g += val[i * 3 + 1];
+
+ if (g >= median)
+ out_pixel_g = i;
+ }
+
+ if (out_pixel_b == 0xff) {
+ b += val[i * 3 + 2];
+
+ if (b >= median)
+ out_pixel_b = i;
+ }
+ }
+
+ fcInt index = y * width + x;
+ fcByte4 v_tmp = {{ out_pixel_b, out_pixel_g, out_pixel_r, 0xff }};
+ if (!memcpy(((fcByte4*)(*output) + index ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+}
+
+static void run_contrast_arr(jint width, jint height, jint** input, jint** output) {
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ fcInt index = y * width + x;
+ fcByte4* pixel = ((fcByte4*)(*input) + index);
+ float bright_m = exp2f(CONTRAST_ENHANCEMENT);
+ float offset = 127.0f * (1 - bright_m);
+
+ float pixel_out_r = offset + ((int) pixel->z & 0xff) * bright_m;
+ float pixel_out_g = offset + ((int) pixel->y & 0xff) * bright_m;
+ float pixel_out_b = offset + ((int) pixel->x & 0xff) * bright_m;
+
+ if (pixel_out_r < 0.0f)
+ pixel_out_r = 0.0f;
+ else if (pixel_out_r > 255.0f)
+ pixel_out_r = 255.0f;
+ if (pixel_out_g < 0.0f)
+ pixel_out_g = 0.0f;
+ else if (pixel_out_g > 255.0f)
+ pixel_out_g = 255.0f;
+ if (pixel_out_b < 0.0f)
+ pixel_out_b = 0.0f;
+ else if (pixel_out_b > 255.0f)
+ pixel_out_b = 255.0f;
+
+ fcByte4 v_tmp = {{ pixel_out_b, pixel_out_g, pixel_out_r, (int) pixel->w & 0xff }};
+ if (!memcpy(((fcByte4*)(*output) + index ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+}
+
+static void run_fisheye_arr(jint width, jint height, jint** input, jint** output) {
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ float invDimensionsX = 1.0f / width;
+ float invDimensionsY = 1.0f / height;
+ float axisScaleX = 1.0f;
+ float axisScaleY = 1.0f;
+ float alpha = FISHEYE_SCALE * 2.0f + 0.75f;
+
+ if (width > height)
+ axisScaleY = height / (float) width;
+ else
+ axisScaleX = width / (float) height;
+
+ float bound2 = 0.25f * (axisScaleX * axisScaleX + axisScaleY * axisScaleY);
+ float bound = sqrtf(bound2);
+ float radius = 1.15f * bound;
+ float radius2 = radius * radius;
+ float factor = bound / (M_PI_2 - atanf(alpha / bound * sqrtf(radius2 - bound2)));
+
+ float coordX = x * invDimensionsX - FISHEYE_CENTER_X;
+ float coordY = y * invDimensionsY - FISHEYE_CENTER_Y;
+ float scaledCoordX = axisScaleX * coordX;
+ float scaledCoordY = axisScaleY * coordY;
+
+ float dist2 = scaledCoordX * scaledCoordX + scaledCoordY * scaledCoordY;
+ float invDist = 1.0f / sqrtf(dist2);
+
+ float radian = M_PI_2 - (float) atanf((alpha * sqrtf(radius2 - dist2)) * invDist);
+ float scalar = radian * factor * invDist;
+ float newCoordX = width * (coordX * scalar + FISHEYE_CENTER_X);
+ float newCoordY = height * (coordY * scalar + FISHEYE_CENTER_Y);
+
+ jint* copy = *input;
+ fcByte4 pixel = bilinear_interp_arr(©, width, height, newCoordX, newCoordY);
+ fcInt index = y * width + x;
+ if (!memcpy(((fcByte4*)(*output) + index ), &pixel, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+}
+
+static void run_levels_arr(jint width, jint height, jint** input, jint** output) {
+ float sat_matrix[3 * 3];
+ float mul[3];
+ levels_build_sat_matrix_ref(sat_matrix, LEVELS_SATURATION);
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int index = y * width + x;
+ fcByte4* pixel = ((fcByte4*)(*input) + index );
+ fcFloat pixel_a = (float)(pixel->w & 0xff);
+ fcFloat pixel_r = (float)(pixel->z & 0xff);
+ fcFloat pixel_g = (float)(pixel->y & 0xff);
+ fcFloat pixel_b = (float)(pixel->x & 0xff);
+
+ matrix3x3_vector_multiply_ref(sat_matrix, pixel_r, pixel_g, pixel_b, mul);
+ pixel_r = mul[0] < 0.0f ? 0.0f : fminf(mul[0], 255.0f);
+ pixel_g = mul[1] < 0.0f ? 0.0f : fminf(mul[1], 255.0f);
+ pixel_b = mul[2] < 0.0f ? 0.0f : fminf(mul[2], 255.0f);
+
+ float diff_min = LEVELS_IN_WHITE - LEVELS_IN_BLACK;
+ float diff_max = LEVELS_OUT_WHITE - LEVELS_OUT_BLACK;
+
+ pixel_r = (pixel_r - LEVELS_IN_BLACK) / diff_min;
+ pixel_g = (pixel_g - LEVELS_IN_BLACK) / diff_min;
+ pixel_b = (pixel_b - LEVELS_IN_BLACK) / diff_min;
+ pixel_a = (pixel_a - LEVELS_IN_BLACK) / diff_min;
+
+ pixel_r = pixel_r * diff_max + LEVELS_OUT_BLACK;
+ pixel_g = pixel_g * diff_max + LEVELS_OUT_BLACK;
+ pixel_b = pixel_b * diff_max + LEVELS_OUT_BLACK;
+ pixel_a = pixel_a * diff_max + LEVELS_OUT_BLACK;
+
+ if (pixel_r < 0.0f)
+ pixel_r = 0.0f;
+ else if (pixel_r > 255.0f)
+ pixel_r = 255.0f;
+ if (pixel_g < 0.0f)
+ pixel_g = 0.0f;
+ else if (pixel_g > 255.0f)
+ pixel_g = 255.0f;
+ if (pixel_b < 0.0f)
+ pixel_b = 0.0f;
+ else if (pixel_b > 255.0f)
+ pixel_b = 255.0f;
+ if (pixel_a < 0.0f)
+ pixel_a = 0.0f;
+ else if (pixel_a > 255.0f)
+ pixel_a = 255.0f;
+
+ fcByte4 v_tmp = {{ pixel_b, pixel_g, pixel_r, pixel_a }};
+ if (!memcpy(((fcByte4*)(*output) + index ), &v_tmp, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+}
+
+static void run_posterize_arr(jint width, jint height, jint** input, jint** output) {
+ const float intensities[] = {
+ POSTERIZE_INTENSITY0, POSTERIZE_INTENSITY1, POSTERIZE_INTENSITY2, POSTERIZE_INTENSITY3,
+ POSTERIZE_INTENSITY4, POSTERIZE_INTENSITY5
+ };
+
+ const fcByte4 colors[] = {
+ POSTERIZE_COLOR0_REF,
+ POSTERIZE_COLOR1_REF,
+ POSTERIZE_COLOR2_REF,
+ POSTERIZE_COLOR3_REF,
+ POSTERIZE_COLOR4_REF
+ };
+
+ const int num_stages = (sizeof(intensities) / sizeof(intensities[0])) - 1;
+
+ for (int stage = 0; stage < num_stages; ++stage) {
+ float intensity_min = intensities[stage];
+ float intensity_max = intensities[stage + 1];
+ fcByte4 color = colors[stage];
+
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < width; ++x) {
+ int index = y * width + x;
+ fcByte4* pixel = ((fcByte4*)(*input) + index );
+ float pixel_a = (int)pixel->w & 0xff;
+ float pixel_intensity_r = ((float) ((int)pixel->z & 0xff)) / 0xff * RED_WEIGHT;
+ float pixel_intensity_g = ((float) ((int)pixel->y & 0xff)) / 0xff * GREEN_WEIGHT;
+ float pixel_intensity_b = ((float) ((int)pixel->x & 0xff)) / 0xff * BLUE_WEIGHT;
+ float pixel_intensity = pixel_intensity_r + pixel_intensity_g + pixel_intensity_b;
+
+ if ((pixel_intensity <= intensity_max) && (pixel_intensity >= intensity_min)) {
+ if (!memcpy(((fcByte4*)(*output) + index ), &color, sizeof(fcByte4)))
+ return FC_EXCEPTION_FAILED_COPY;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/linux/jni/src/rancid/rancid.c b/test/linux/jni/src/rancid/rancid.c
new file mode 100644
index 0000000..1633368
--- /dev/null
+++ b/test/linux/jni/src/rancid/rancid.c
@@ -0,0 +1,154 @@
+#include
+#include
+#include
+
+#define CL_TARGET_OPENCL_VERSION 110
+#include
+
+#define __USE_GNU
+#include
+
+#define BUFFER_SIZE 2048
+
+static cl_platform_id platform = NULL;
+static cl_device_id device = NULL;
+static cl_context context = NULL;
+static cl_command_queue queue = NULL;
+static cl_program program = NULL;
+static cl_kernel kernel = NULL;
+static cl_mem input = NULL;
+static cl_mem output = NULL;
+
+// TODO Tune OpenCL kernel
+static const char* code = "kernel void f(global const float* in, global float* out) {\n"
+ " int id = get_global_id(0);\n"
+ "\n"
+ " float x = in[id];\n"
+ " float result = 0.0f;\n"
+ "\n"
+ " for (int i = 0; i < 10; ++i) {\n"
+ " for (int j = 0; j < 10; ++j) {\n"
+ " float rel_i = (1 + i) / 10.0f;\n"
+ " float rel_j = (1 + j) / 10.0f;\n"
+ " result = mad(sin(sqrt(rel_i)), cos(sqrt(rel_j)), result);\n"
+ " }\n"
+ " }\n"
+ "\n"
+ " out[id] = result;\n"
+ "}";
+
+void pin_process_to_cores(int from, int to) {
+ cpu_set_t mask;
+ CPU_ZERO(&mask);
+
+ for (int i = from; i <= to; ++i)
+ CPU_SET(i, &mask);
+
+ sched_setaffinity(0, sizeof(cpu_set_t), &mask);
+}
+
+// Init / Release
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_DeviceUtils_init(JNIEnv* env, jclass clazz) {
+ clGetPlatformIDs(1, &platform, NULL);
+ clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL);
+ context = clCreateContext(NULL, 1, &device, NULL, NULL, NULL);
+ queue = clCreateCommandQueue(context, device, 0, NULL);
+
+ program = clCreateProgramWithSource(context, 1, &code, NULL, NULL);
+ clBuildProgram(program, 1, &device, NULL, NULL, NULL);
+ kernel = clCreateKernel(program, "f", NULL);
+
+ input = clCreateBuffer(context, CL_MEM_READ_ONLY, BUFFER_SIZE * sizeof(float), NULL, NULL);
+ output = clCreateBuffer(context, CL_MEM_WRITE_ONLY, BUFFER_SIZE * sizeof(float), NULL, NULL);
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_DeviceUtils_release(JNIEnv* env, jclass clazz) {
+ clReleaseMemObject(output);
+ clReleaseMemObject(input);
+ clReleaseKernel(kernel);
+ clReleaseProgram(program);
+ clReleaseCommandQueue(queue);
+ clReleaseContext(context);
+}
+
+// OSUtils
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_OSUtils_unpinThreads(JNIEnv* env, jclass clazz) {
+ long cpus = sysconf(_SC_NPROCESSORS_ONLN);
+ pin_process_to_cores(0, cpus - 1);
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_OSUtils_pinThreads(JNIEnv* env, jclass clazz,
+ jint first_core,
+ jint last_core) {
+ pin_process_to_cores(first_core, last_core);
+}
+
+JNIEXPORT jint JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_OSUtils_usedCores(JNIEnv* env, jclass clazz) {
+ cpu_set_t mask;
+ CPU_ZERO(&mask);
+
+ sched_getaffinity(0, sizeof(cpu_set_t), &mask);
+ return CPU_COUNT(&mask);
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_OSUtils_setDefaultScheduler(JNIEnv* env,
+ jclass clazz) {
+ struct sched_param param;
+ param.sched_priority = 0;
+ sched_setscheduler(0, SCHED_OTHER, ¶m);
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_OSUtils_setRealtimeScheduler(JNIEnv* env,
+ jclass clazz) {
+ struct sched_param param;
+ param.sched_priority = sched_get_priority_max(SCHED_FIFO);
+ sched_setscheduler(0, SCHED_FIFO, ¶m);
+}
+
+// DeviceUtils
+
+JNIEXPORT jfloat JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_DeviceUtils_cpuWarmUpNative(JNIEnv* env,
+ jclass clazz) {
+ // TODO Tune native compute-bound code
+ jfloat unused = 0.0f;
+
+ for (int repetition = 0; repetition < BUFFER_SIZE; ++repetition) {
+ for (int i = 0; i < 10; ++i) {
+ for (int j = 0; j < 10; ++j) {
+ float rel_i = sinf(sqrtf((1 + i) / 10.0f));
+ float rel_j = cosf(sqrtf((1 + j) / 10.0f));
+ unused += rel_i * rel_j;
+ }
+ }
+ }
+
+ return unused;
+}
+
+JNIEXPORT jfloat JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_DeviceUtils_ddrWarmUpNative(JNIEnv* env,
+ jclass clazz) {
+ // TODO Native memory-bound code running on little cores?
+ return 0.0f;
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_benchmark_DeviceUtils_gpuWarmUpNative(JNIEnv* env,
+ jclass clazz) {
+ clSetKernelArg(kernel, 0, sizeof(cl_mem), &input);
+ clSetKernelArg(kernel, 1, sizeof(cl_mem), &output);
+
+ size_t sz = BUFFER_SIZE;
+ clEnqueueNDRangeKernel(queue, kernel, 1, NULL, &sz, NULL, 0, NULL, NULL);
+ clFinish(queue);
+}
diff --git a/test/linux/jni/src/test/array_test.c b/test/linux/jni/src/test/array_test.c
new file mode 100644
index 0000000..ec1a6d2
--- /dev/null
+++ b/test/linux/jni/src/test/array_test.c
@@ -0,0 +1,207 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#include
+#include
+
+
+static const char* kernel_src = "#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n"
+ "void kernel x2(__global float* v) {\n"
+ " v[get_global_id(0)] *= 2;\n"
+ "}";
+
+static const int n = 10;
+static const float x[] = {1.0f, 2.5f, 4.0f};
+
+
+static int process(fcFloatArray* array) {
+ cl_int err;
+
+ err = fcFloatArray_syncToOCL(array);
+ if (err)
+ return err;
+
+ // Kernel compilation
+ cl_program program = fcOpenCL_compileKernel(1, &kernel_src, &err);
+ if (err)
+ return err;
+
+ cl_kernel kernel = clCreateKernel(program, "x2", &err);
+ if (err)
+ return err;
+
+ // Kernel execution
+ err = clSetKernelArg(kernel, 0, sizeof(cl_mem), &array->ocl);
+ if (err)
+ return err;
+
+ err =
+ clEnqueueNDRangeKernel(fcOpenCL_rt.queue, kernel, 1, NULL, &array->len, NULL, 0, NULL, NULL);
+ if (err)
+ return err;
+
+ // Memory release
+ clReleaseKernel(kernel);
+ clReleaseProgram(program);
+
+ return CL_SUCCESS;
+}
+
+JNIEXPORT jboolean JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_test_ArrayTest_nativeRun(JNIEnv* env, jobject obj) {
+ int err;
+
+ fcShortArray* s0 = calloc(1, sizeof(fcShortArray));
+ err = fcShortArray_initSize(s0, n);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_initSize", JNI_FALSE);
+
+ if (s0->len != n)
+ return JNI_FALSE;
+
+ err = fcShortArray_syncToNative(s0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", JNI_FALSE);
+
+ for (int i = 0; i < n; ++i) {
+ s0->c[i] = (short) (i * 2);
+ }
+
+
+ for (int i = 0; i < n; ++i) {
+ if (s0->c[i] != (short) (i * 2))
+ return JNI_FALSE;
+ }
+
+ err = fcShortArray_syncToOCL(s0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToOCL", JNI_FALSE);
+ err = fcShortArray_syncToNative(s0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", JNI_FALSE);
+
+ short s0_[n];
+ for (int i = 0; i < n; ++i) {
+ s0_[i] = (short) (s0->c[i] + 1);
+ }
+
+ err = fcShortArray_setArray(s0, n, s0_);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_setContents", JNI_FALSE);
+ err = fcShortArray_syncToNative(s0); // Just in case... This doesn't add much overhead
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_syncToNative", JNI_FALSE);
+
+ for (int i = 0; i < n; ++i) {
+ if (s0->c[i] != s0_[i])
+ return JNI_FALSE;
+ }
+
+ const size_t d0_len = sizeof(x) / sizeof(x[0]);
+ fcFloatArray* d0 = calloc(1, sizeof(fcFloatArray));
+ err = fcFloatArray_initArray(d0, d0_len, x);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_initArray", JNI_FALSE);
+
+ if (d0->len != d0_len)
+ return JNI_FALSE;
+
+ err = fcFloatArray_syncToNative(d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", JNI_FALSE);
+
+ for (int i = 0; i < d0->len; ++i) {
+ if (d0->c[i] != x[i])
+ return JNI_FALSE;
+ }
+
+ float d0_[d0_len];
+ memcpy(d0_, d0->c, d0->len * sizeof(cl_float));
+ err = process(d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "process", JNI_FALSE);
+ err = fcFloatArray_syncToNative(d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", JNI_FALSE);
+
+ for (int i = 0; i < d0->len; ++i) {
+ if (d0->c[i] != d0_[i] * 2)
+ return JNI_FALSE;
+ }
+
+ fcFloatArray* d1 = calloc(1, sizeof(fcFloatArray));
+ err = fcFloatArray_initCopy(d1, d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_initCopy", JNI_FALSE);
+
+ if (d1->len != d0->len)
+ return JNI_FALSE;
+
+ err = fcFloatArray_syncToNative(d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", JNI_FALSE);
+ err = fcFloatArray_syncToNative(d1);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToNative", JNI_FALSE);
+
+ for (int i = 0; i < d0->len; ++i) {
+ if (d0->c[i] != d1->c[i])
+ return JNI_FALSE;
+ }
+
+ d1->c[0] += 10;
+ if (d0->c[0] == d1->c[0])
+ return JNI_FALSE;
+
+ err = fcShortArray_release(s0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcShortArray_release", JNI_FALSE);
+ err = fcFloatArray_release(d0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_release", JNI_FALSE);
+ err = fcFloatArray_release(d1);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_release", JNI_FALSE);
+
+ return JNI_TRUE;
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_test_ArrayTest_nativeProcess(JNIEnv* env, jobject obj,
+ jobject jniarray) {
+ cl_int err;
+
+ // Process parameter
+ fcFloatArray* array = fcFloatArray_getJava(env, jniarray);
+ FC_EXCEPTION_HANDLE_NULL(env, array, FC_EXCEPTION_BAD_PARAMETER, "fcDoubleArray_getJava",
+ FC_VOID_EXPR);
+
+ err = fcFloatArray_syncToOCL(array);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDoubleArray_syncToOCL", FC_VOID_EXPR);
+
+ // Kernel compilation
+ cl_program program = fcOpenCL_compileKernel(1, &kernel_src, &err);
+ FC_EXCEPTION_HANDLE_BUILD(env, err, "fcOpenCL_compileKernel", program, FC_VOID_EXPR);
+
+ cl_kernel kernel = clCreateKernel(program, "x2", &err);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "clCreateKernel", FC_VOID_EXPR);
+
+ // Kernel execution
+ err = clSetKernelArg(kernel, 0, sizeof(cl_mem), &array->ocl);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "clSetKernelArg", FC_VOID_EXPR);
+
+ err =
+ clEnqueueNDRangeKernel(fcOpenCL_rt.queue, kernel, 1, NULL, &array->len, NULL, 0, NULL, NULL);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "clEnqueueNDRangeKernel", FC_VOID_EXPR);
+
+ fprintf(stderr, "[NATIVE] clEnqueueNDRangeKernel\n");
+ fprintf(stderr, "[NATIVE] array lenght = %i\n", array->len);
+
+ fcFloatArray_syncToNative(array);
+ fprintf(stderr, "[NATIVE] fcDoubleArray_syncToNative\n");
+
+ // Memory release
+ clReleaseKernel(kernel);
+ clReleaseProgram(program);
+
+ fprintf(stderr, "[NATIVE] nativeProcess end\n");
+}
diff --git a/test/linux/jni/src/test/math_test.c b/test/linux/jni/src/test/math_test.c
new file mode 100644
index 0000000..d725258
--- /dev/null
+++ b/test/linux/jni/src/test/math_test.c
@@ -0,0 +1,58 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#include
+
+#include
+
+
+JNIEXPORT jboolean JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_test_MathTest_nativeRun(JNIEnv* env, jobject obj) {
+ if (fcMath_abs(10) != 10)
+ return JNI_FALSE;
+
+ if (fcMath_abs(-10L) != 10L)
+ return JNI_FALSE;
+
+ if (fcMath_max(10.0, 5.0) != 10.0)
+ return JNI_FALSE;
+
+ if (fcMath_min(10.1f, 10.0f) != 10.0f)
+ return JNI_FALSE;
+
+ if (fcMath_clamp((fcByte) 18, (fcByte) 5, (fcByte) 15) != (fcByte) 15)
+ return JNI_FALSE;
+
+ if (fcMath_clamp((fcByte) 4, (fcByte) 5, (fcByte) 15) != (fcByte) 5)
+ return JNI_FALSE;
+
+ if (fcMath_asin(CL_M_PI_4) != asin(CL_M_PI_4))
+ return JNI_FALSE;
+
+ if (fcMath_cosh(CL_M_PI_2) != cosh(CL_M_PI_2))
+ return JNI_FALSE;
+
+ if (fcMath_fract(3.25) != 0.25)
+ return JNI_FALSE;
+
+ // FIXME Will fail because Math.addSat is not implemented yet
+ // if (fcMath_addSat(CL_INT_MAX, 5) != CL_INT_MAX)
+ // return JNI_FALSE;
+
+ return JNI_TRUE;
+}
diff --git a/test/linux/jni/src/test/quick_test.c b/test/linux/jni/src/test/quick_test.c
new file mode 100644
index 0000000..7b00a8d
--- /dev/null
+++ b/test/linux/jni/src/test/quick_test.c
@@ -0,0 +1,168 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#include
+#include
+#include
+
+#define FC_LOG_TAG "QuickTest"
+#include
+
+
+typedef union {
+ uint8_t __attribute__((aligned(4))) v[4];
+ struct { uint8_t x, y, z, w; };
+} A;
+
+
+#define LAUNCH_REF_2D(_width, _height, _f, ...) \
+ for (int _y = 0; _y < _height; ++_y) { \
+ for (int _x = 0; _x < _width; ++_x) { \
+ _f(_x, _y, __VA_ARGS__); \
+ } \
+ }
+
+#define LAUNCH_FANCIER_2D(_dims, _f, ...) \
+ for (int _y = 0; _y < _dims.y; ++_y) { \
+ for (int _x = 0; _x < _dims.x; ++_x) { \
+ _f(_x, _y, __VA_ARGS__); \
+ } \
+ }
+
+#define LAUNCH_REF_1D_R(_reps, _ret, _f, ...) \
+ for (int _i = 0; _i < _reps; ++_i) { \
+ _ret += _f(_i, __VA_ARGS__); \
+ }
+
+#define LAUNCH_FANCIER_1D_R(_reps, _ret, _f, ...) \
+ for (int _i = 0; _i < _reps; ++_i) { \
+ _ret += _f(_i, __VA_ARGS__); \
+ }
+
+#define COMPARE_BENCHMARKS(_name, _global_reps, _local_reps, _t, _durations, _call_ref, _call_fancier) \
+ resetDurations(durations, 2); \
+ for (int j = 0; j < _global_reps; ++j) { \
+ clock_gettime(CLOCK_MONOTONIC_RAW, &_t[0]); \
+ _call_ref \
+ clock_gettime(CLOCK_MONOTONIC_RAW, &_t[1]); \
+ _call_fancier \
+ clock_gettime(CLOCK_MONOTONIC_RAW, &_t[2]); \
+ accDurations(_t, _durations, 2); \
+ } \
+ FC_LOGINFO_FMT(_name " REF: %.016f ns", _durations[0] / (double)(_global_reps * _local_reps)); \
+ FC_LOGINFO_FMT(_name " FAN: %.016f ns", _durations[1] / (double)(_global_reps * _local_reps));
+
+
+static void accDurations(const struct timespec* t, uint64_t* durations, int n) {
+ for (int i = 0; i < n; ++i)
+ durations[i] += ((t[i+1].tv_nsec - t[i].tv_nsec) +
+ (t[i+1].tv_sec - t[i].tv_sec) * 1000000000ULL);
+}
+
+static void resetDurations(uint64_t* durations, int n) {
+ for (int i = 0; i < n; ++i)
+ durations[i] = 0ULL;
+}
+
+
+static inline int indexRef(uint32_t w, int x, int y) {
+ return y * w + x;
+}
+
+static inline int indexFancier(fcInt2 d, int x, int y) {
+ return y * d.x + x;
+}
+
+
+static inline void getPixelRef(int x, int y, size_t width, int32_t* v) {
+ v[indexRef(width, x, y)] = v[0];
+}
+
+static inline void getPixelFancier(int x, int y, fcInt2 dims, A* v) {
+ v[indexFancier(dims, x, y)] = v[0];
+}
+
+/*static inline*/ float brightRef(int i, float enhancement) {
+ return exp2f(enhancement);
+}
+
+/*static inline*/ float brightFancier(int i, float enhancement) {
+ return fcMath_exp2f(enhancement);
+}
+
+static inline float loop(int i, float unused) {
+ return unused;
+}
+
+
+static void pixelOutRef();
+static void pixelOutFancier();
+static void clampRef();
+static void clampFancier();
+static void setPixelRef();
+static void setPixelFancier();
+
+bool justDoIt() {
+ return exp2f(0.5f) == fcMath_exp2f(0.5f);
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_activity_MainActivity_doQuickTest(JNIEnv* env, jobject obj) {
+ const int BENCH_REPS = 5;
+ const int GLOBAL_REPS = 5;
+
+ const size_t W = 3840, H = 2160;
+ const size_t N = W * H;
+ const fcInt2 DIMS = {.x = W, .y = H};
+
+ srand(time(NULL));
+ const float ENHANCEMENT = rand() / (float) RAND_MAX;
+
+ float tmp = 0.0f;
+
+ int32_t* v1 = malloc(W * H * sizeof(int32_t));
+ A* v2 = malloc(W * H * sizeof(A));
+
+ struct timespec t[3];
+ uint64_t durations[2];
+
+ FC_LOGINFO("Running quick test...");
+
+ for (int i = 0; i < BENCH_REPS; ++i) {
+ //COMPARE_BENCHMARKS("loop", GLOBAL_REPS, N, t, durations,
+ // LAUNCH_REF_1D_R(N, tmp, loop, ENHANCEMENT),
+ // LAUNCH_FANCIER_1D_R(N, tmp, loop, ENHANCEMENT));
+
+ //COMPARE_BENCHMARKS("getPixel", GLOBAL_REPS, W * H, t, durations,
+ // LAUNCH_REF_2D(W, H, getPixelRef, W, v1),
+ // LAUNCH_FANCIER_2D(DIMS, getPixelFancier, DIMS, v2));
+
+ COMPARE_BENCHMARKS("bright", GLOBAL_REPS, N, t, durations,
+ LAUNCH_REF_1D_R(N, tmp, brightRef, ENHANCEMENT),
+ LAUNCH_FANCIER_1D_R(N, tmp, brightFancier, ENHANCEMENT));
+
+ //COMPARE_BENCHMARKS("bright_reverse", GLOBAL_REPS, N, t, durations,
+ // LAUNCH_REF_1D_R(N, tmp, brightFancier, ENHANCEMENT),
+ // LAUNCH_FANCIER_1D_R(N, tmp, brightRef, ENHANCEMENT));
+ }
+
+ free(v2);
+ free(v1);
+
+ printf("%f", tmp);
+}
diff --git a/test/linux/jni/src/test/vector_array_test.c b/test/linux/jni/src/test/vector_array_test.c
new file mode 100644
index 0000000..8a53cac
--- /dev/null
+++ b/test/linux/jni/src/test/vector_array_test.c
@@ -0,0 +1,244 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#include
+#include
+
+
+static const char* kernel_src = "void kernel sums(__global char* v) {\n"
+ " size_t id = get_global_id(0);\n"
+ " char4 b = vload4(id, v);\n"
+ " b += (char4)(1, 2, 3, 4);\n"
+ " vstore4(b, id, v);\n"
+ "}";
+
+static const int n = 10;
+static const fcByte x[] = {10, 10, 10, 10, 20, 20, 20, 20, 30, 30, 30, 30, 40, 50, 60, 70};
+
+static int process(fcByte4Array* array) {
+ cl_int err;
+
+ err = fcByte4Array_syncToOCL(array);
+ if (err)
+ return err;
+
+ // Kernel compilation
+ cl_program program = fcOpenCL_compileKernel(1, &kernel_src, &err);
+ if (err)
+ return err;
+
+ cl_kernel kernel = clCreateKernel(program, "sums", &err);
+ if (err)
+ return err;
+
+ // Kernel execution
+ err = clSetKernelArg(kernel, 0, sizeof(cl_mem), &array->ocl);
+ if (err)
+ return err;
+
+ size_t sz = array->len * 4;
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, kernel, 1, NULL, &sz, NULL, 0, NULL, NULL);
+ if (err)
+ return err;
+
+ // Memory release
+ clReleaseKernel(kernel);
+ clReleaseProgram(program);
+
+ return CL_SUCCESS;
+}
+
+JNIEXPORT jboolean JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_test_VectorArrayTest_nativeRun(JNIEnv* env, jobject obj) {
+ int err;
+
+ fcFloat3Array* f0 = calloc(1, sizeof(fcFloat3Array));
+ err = fcFloat3Array_initSize(f0, n);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_initSize:f0", JNI_FALSE);
+
+ if (f0->len != n)
+ return JNI_FALSE;
+
+ for (int i = 0; i < n; ++i) {
+ err = fcFloat3Array_set(f0, i, fcFloat3_create111(1.0f * i, 1.5f * i, 2.0f * i));
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_set:f0", JNI_FALSE);
+ }
+
+ err = fcFloat3Array_syncToNative(f0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToNative:f0", JNI_FALSE);
+
+ for (int i = 0; i < n; ++i) {
+ if (fcInt3_any(fcFloat3_isNotEqual(f0->c[i], fcFloat3_create111(1.0f * i, 1.5f * i, 2.0f * i))))
+ return JNI_FALSE;
+ }
+
+ err = fcFloat3Array_syncToOCL(f0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToOCL:f0", JNI_FALSE);
+ err = fcFloat3Array_syncToNative(f0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_syncToNative:f0", JNI_FALSE);
+
+ const int f0_stride = sizeof(fcFloat3) / sizeof(fcFloat);
+ float f0_[f0->len * f0_stride];
+ memcpy(f0_, f0->c, f0->len * sizeof(fcFloat3));
+
+ for (int i = 0; i < n; ++i) {
+ fcFloat3 elem = f0->c[i];
+ int baseIdx = i * f0_stride;
+
+ if (elem.x != f0_[baseIdx] || elem.y != f0_[baseIdx + 1] || elem.z != f0_[baseIdx + 2])
+ return JNI_FALSE;
+ }
+
+ f0_[0] = f0_[0] + 10;
+ if (f0_[0] == f0->c[0].x || f0_[1] != f0->c[0].y || f0_[2] != f0->c[0].z)
+ return JNI_FALSE;
+
+ float f0_notaligned[f0->len * 3];
+ for (int i = 0; i < n; ++i) {
+ int srcIdx = i * f0_stride;
+ int outIdx = i * 3;
+
+ f0_notaligned[outIdx] = f0_[srcIdx];
+ f0_notaligned[outIdx + 1] = f0_[srcIdx + 1];
+ f0_notaligned[outIdx + 2] = f0_[srcIdx + 2];
+ }
+
+ err = fcFloat3Array_setArray(f0, f0->len * 3, f0_notaligned);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_setContents:f0", JNI_FALSE);
+
+ for (int i = 0; i < n; ++i) {
+ fcFloat3 elem = f0->c[i];
+ int baseIdx = i * 3;
+
+ if (elem.x != f0_notaligned[baseIdx] || elem.y != f0_notaligned[baseIdx + 1] ||
+ elem.z != f0_notaligned[baseIdx + 2])
+ return JNI_FALSE;
+ }
+
+ const size_t b0_len = sizeof(x) / sizeof(x[0]);
+ fcByte4Array* b0 = calloc(1, sizeof(fcByte4Array));
+ err = fcByte4Array_initArray(b0, b0_len, x);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_initArray:b0", JNI_FALSE);
+
+ if (b0->len != b0_len / 4)
+ return JNI_FALSE;
+
+ err = fcByte4Array_syncToNative(b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative:b0", JNI_FALSE);
+
+ for (int i = 0; i < b0->len; ++i) {
+ fcByte4 elem = b0->c[i];
+ int baseIdx = i * 4;
+
+ if (elem.x != x[baseIdx] || elem.y != x[baseIdx + 1] || elem.z != x[baseIdx + 2] ||
+ elem.w != x[baseIdx + 3])
+ return JNI_FALSE;
+ }
+
+ fcByte b0_[b0->len * 4];
+ for (int i = 0; i < b0->len; ++i) {
+ fcByte4 elem = b0->c[i];
+ int baseIdx = i * 4;
+
+ b0_[baseIdx] = elem.x;
+ b0_[baseIdx + 1] = elem.y;
+ b0_[baseIdx + 2] = elem.z;
+ b0_[baseIdx + 3] = elem.w;
+ }
+
+ err = process(b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "process", JNI_FALSE);
+ err = fcByte4Array_syncToNative(b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative:b0", JNI_FALSE);
+
+ for (int i = 0; i < b0->len; ++i) {
+ fcByte4 elem = b0->c[i];
+ int baseIdx = i * 4;
+
+ if (elem.x != b0_[baseIdx] + 1 || elem.y != b0_[baseIdx + 1] + 2 ||
+ elem.z != b0_[baseIdx + 2] + 3 || elem.w != b0_[baseIdx + 3] + 4)
+ return JNI_FALSE;
+ }
+
+ fcByte4Array* b1 = calloc(1, sizeof(fcByte4Array));
+ err = fcByte4Array_initCopy(b1, b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_initCopy:b1", JNI_FALSE);
+
+ if (b1->len != b0->len)
+ return JNI_FALSE;
+
+ err = fcByte4Array_syncToNative(b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative:b0", JNI_FALSE);
+ err = fcByte4Array_syncToNative(b1);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToNative:b1", JNI_FALSE);
+
+ for (int i = 0; i < b0->len; ++i) {
+ if (fcInt4_any(fcByte4_isNotEqual(b0->c[i], b1->c[i])))
+ return JNI_FALSE;
+ }
+
+ b1->c[0] = fcByte4_create112((fcByte) (b1->c[0].x + 10), b1->c[0].y, b1->c[0].hi);
+ fcInt4 b0b1_eq = fcByte4_isEqual(b0->c[0], b1->c[0]);
+
+ if (b0b1_eq.x != 0 || !fcInt3_all(fcInt3_create111(b0b1_eq.y, b0b1_eq.z, b0b1_eq.w)))
+ return JNI_FALSE;
+
+ err = fcFloat3Array_release(f0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcFloat3Array_release:f0", JNI_FALSE);
+ err = fcByte4Array_release(b0);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_release:b0", JNI_FALSE);
+ err = fcByte4Array_release(b1);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_release:b1", JNI_FALSE);
+
+ return JNI_TRUE;
+}
+
+JNIEXPORT void JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_test_VectorArrayTest_nativeProcess(JNIEnv* env, jobject obj,
+ jobject jniarray) {
+ cl_int err;
+
+ // Process parameter
+ fcByte4Array* array = fcByte4Array_getJava(env, jniarray);
+ FC_EXCEPTION_HANDLE_NULL(env, array, FC_EXCEPTION_BAD_PARAMETER, "fcDoubleArray_getJava",
+ FC_VOID_EXPR);
+
+ err = fcByte4Array_syncToOCL(array);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcByte4Array_syncToOCL", FC_VOID_EXPR);
+
+ // Kernel compilation
+ cl_program program = fcOpenCL_compileKernel(1, &kernel_src, &err);
+ FC_EXCEPTION_HANDLE_BUILD(env, err, "fcOpenCL_compileKernel", program, FC_VOID_EXPR);
+
+ cl_kernel kernel = clCreateKernel(program, "sums", &err);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "clCreateKernel", FC_VOID_EXPR);
+
+ // Kernel execution
+ err = clSetKernelArg(kernel, 0, sizeof(cl_mem), &array->ocl);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "clSetKernelArg", FC_VOID_EXPR);
+
+ size_t sz = array->len * 4;
+ err = clEnqueueNDRangeKernel(fcOpenCL_rt.queue, kernel, 1, NULL, &sz, NULL, 0, NULL, NULL);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "clEnqueueNDRangeKernel", FC_VOID_EXPR);
+
+ fcByte4Array_syncToNative(array);
+
+ // Memory release
+ clReleaseKernel(kernel);
+ clReleaseProgram(program);
+}
diff --git a/test/linux/jni/src/test/vector_test.c b/test/linux/jni/src/test/vector_test.c
new file mode 100644
index 0000000..c71dd92
--- /dev/null
+++ b/test/linux/jni/src/test/vector_test.c
@@ -0,0 +1,67 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#include
+
+
+JNIEXPORT jboolean JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_test_VectorTest_nativeRun(JNIEnv* env, jobject obj) {
+ fcByte2 b20 = fcByte2_create1(3);
+ fcByte2 b21 = fcByte2_create11(3, 4);
+
+ if (b20.x != 3 || b20.y != 3)
+ return JNI_FALSE;
+
+ if (b21.x != 3 || b21.y != 4)
+ return JNI_FALSE;
+
+ fcByte2 b22 = fcByte2_add(b20, b21);
+ if (b22.x != 6 || b22.y != 7)
+ return JNI_FALSE;
+
+ fcByte2 b23 = fcByte2_select(b22, b21, fcInt2_create11(0, 1));
+ if (b23.x != b22.x || b23.y != b21.y)
+ return JNI_FALSE;
+
+ fcDouble4 d40 = fcDouble4_create1111(CL_M_2_PI, CL_M_PI, CL_M_1_PI, CL_M_LN2);
+ fcDouble4 d41 = fcDouble4_create121(1.0, fcDouble4_asDouble2(d40), 5.0);
+
+ if (d40.x != CL_M_2_PI || d40.y != CL_M_PI || d40.z != CL_M_1_PI || d40.w != CL_M_LN2)
+ return JNI_FALSE;
+
+ if (d41.x != 1.0 || d41.y != d40.x || d41.z != d40.y || d41.w != 5.0)
+ return JNI_FALSE;
+
+ fcDouble4 d42 = fcDouble4_atan2(d40, d41);
+ if (d42.x != fcMath_atan2(d40.x, d41.x) || d42.y != fcMath_atan2(d40.y, d41.y) ||
+ d42.z != fcMath_atan2(d40.z, d41.z) || d42.w != fcMath_atan2(d40.w, d41.w))
+ return JNI_FALSE;
+
+ return JNI_TRUE;
+}
+
+JNIEXPORT jobject JNICALL
+Java_es_ull_pcg_hpc_fancier_linuxtest_test_VectorTest_nativeWrapUnwrap(JNIEnv* env, jobject obj,
+ jobject jnivec) {
+ int err;
+ fcDouble4 vec = fcDouble4_unwrap(env, jnivec, &err);
+ FC_EXCEPTION_HANDLE_ERROR(env, err, "fcDouble4_unwrap", NULL);
+
+ fcFloat4 fvec = fcDouble4_convertFloat4(vec);
+ return fcFloat4_wrap(env, fvec);
+}
diff --git a/test/linux/opencl/fc_image.cl b/test/linux/opencl/fc_image.cl
new file mode 100644
index 0000000..de50053
--- /dev/null
+++ b/test/linux/opencl/fc_image.cl
@@ -0,0 +1,45 @@
+
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/*
+ * DO NOT MANUALLY EDIT THIS FILE!
+ * This file has been automatically generated, any modifications will be lost
+ * when generating the Fancier library. Any modifications to this file must be
+ * done via the corresponding template.
+ */
+
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#endif // cl_khr_fp64
+
+#if defined(__EMBEDDED_PROFILE__) && defined(cles_khr_int64)
+#pragma OPENCL EXTENSION cles_khr_int64 : enable
+#endif // __EMBEDDED_PROFILE__ && cles_khr_int64
+
+uint index_img (uint2 dims, uint x, uint y) {
+ return y * dims.x + x;
+}
+
+int toRgba (uchar4 color) {
+ return ((color.x & 0xff) << 24) | ((color.y & 0xff) << 16) | ((color.z & 0xff) << 8) | ((color.w & 0xff) << 0);
+}
+
+uchar4 fromRgba (int rgba) {
+ return (uchar4)((uchar)((rgba >> 24) & 0xff), (uchar)((rgba >> 16) & 0xff), (uchar)((rgba >> 8) & 0xff), (uchar)((rgba >> 0) & 0xff));
+}
diff --git a/test/linux/opencl/fc_math.cl b/test/linux/opencl/fc_math.cl
new file mode 100644
index 0000000..8460397
--- /dev/null
+++ b/test/linux/opencl/fc_math.cl
@@ -0,0 +1,419 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+/*
+ * DO NOT MANUALLY EDIT THIS FILE!
+ * This file has been automatically generated, any modifications will be lost
+ * when generating the Fancier library. Any modifications to this file must be
+ * done via the corresponding template.
+ */
+
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#endif // cl_khr_fp64
+
+#if defined(__EMBEDDED_PROFILE__) && defined(cles_khr_int64)
+#pragma OPENCL EXTENSION cles_khr_int64 : enable
+#endif // __EMBEDDED_PROFILE__ && cles_khr_int64
+
+float scalbf(float a, int scaleFactor) {
+ return a * exp2((float) scaleFactor);
+}
+
+float2 float2_scalb(float2 a, int2 scaleFactor) {
+ return (float2)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y));
+}
+float3 float3_scalb(float3 a, int3 scaleFactor) {
+ return (float3)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z));
+}
+float4 float4_scalb(float4 a, int4 scaleFactor) {
+ return (float4)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z), scalbf(a.w, scaleFactor.w));
+}
+float8 float8_scalb(float8 a, int8 scaleFactor) {
+ return (float8)(scalbf(a.x, scaleFactor.x), scalbf(a.y, scaleFactor.y), scalbf(a.z, scaleFactor.z), scalbf(a.w, scaleFactor.w), scalbf(a.s4, scaleFactor.s4), scalbf(a.s5, scaleFactor.s5), scalbf(a.s6, scaleFactor.s6), scalbf(a.s7, scaleFactor.s7));
+}
+
+float2 float2_smoothstep(float2 a, float2 b, float c) {
+ return (float2)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c));
+}
+float3 float3_smoothstep(float3 a, float3 b, float c) {
+ return (float3)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c));
+}
+float4 float4_smoothstep(float4 a, float4 b, float c) {
+ return (float4)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c));
+}
+float8 float8_smoothstep(float8 a, float8 b, float c) {
+ return (float8)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c), smoothstep(a.s4, b.s4, c), smoothstep(a.s5, b.s5, c), smoothstep(a.s6, b.s6, c), smoothstep(a.s7, b.s7, c));
+}
+
+
+#ifdef cl_khr_fp64
+double scalb(double a, int scaleFactor) {
+ return a * exp2((double) scaleFactor);
+}
+
+double2 double2_scalb(double2 a, int2 scaleFactor) {
+ return (double2)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y));
+}
+double3 double3_scalb(double3 a, int3 scaleFactor) {
+ return (double3)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z));
+}
+double4 double4_scalb(double4 a, int4 scaleFactor) {
+ return (double4)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z), scalb(a.w, scaleFactor.w));
+}
+double8 double8_scalb(double8 a, int8 scaleFactor) {
+ return (double8)(scalb(a.x, scaleFactor.x), scalb(a.y, scaleFactor.y), scalb(a.z, scaleFactor.z), scalb(a.w, scaleFactor.w), scalb(a.s4, scaleFactor.s4), scalb(a.s5, scaleFactor.s5), scalb(a.s6, scaleFactor.s6), scalb(a.s7, scaleFactor.s7));
+}
+
+double2 double2_smoothstep(double2 a, double2 b, double c) {
+ return (double2)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c));
+}
+double3 double3_smoothstep(double3 a, double3 b, double c) {
+ return (double3)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c));
+}
+double4 double4_smoothstep(double4 a, double4 b, double c) {
+ return (double4)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c));
+}
+double8 double8_smoothstep(double8 a, double8 b, double c) {
+ return (double8)(smoothstep(a.x, b.x, c), smoothstep(a.y, b.y, c), smoothstep(a.z, b.z, c), smoothstep(a.w, b.w, c), smoothstep(a.s4, b.s4, c), smoothstep(a.s5, b.s5, c), smoothstep(a.s6, b.s6, c), smoothstep(a.s7, b.s7, c));
+}
+
+#endif // cl_khr_fp64
+
+char clampc(char a, char min, char max) {
+ return a < min? min : (a > max? max : a);
+}
+
+char mixc(char x, char y, char a) {
+ return x + (y - x) * a;
+}
+
+char maxmagc(char a, char b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+char minmagc(char a, char b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
+char2 char2_clamp(char2 a, char2 min, char2 max) {
+ return (char2)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y));
+}
+
+char2 char2_mix(char2 x, char2 y, char2 a) {
+ return (char2)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y));
+}
+
+char2 char2_maxmag(char2 a, char2 b) {
+ return (char2)(maxmagc(a.x, b.x), maxmagc(a.y, b.y));
+}
+
+char2 char2_minmag(char2 a, char2 b) {
+ return (char2)(minmagc(a.x, b.x), minmagc(a.y, b.y));
+}
+
+char3 char3_clamp(char3 a, char3 min, char3 max) {
+ return (char3)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z));
+}
+
+char3 char3_mix(char3 x, char3 y, char3 a) {
+ return (char3)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z));
+}
+
+char3 char3_maxmag(char3 a, char3 b) {
+ return (char3)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z));
+}
+
+char3 char3_minmag(char3 a, char3 b) {
+ return (char3)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z));
+}
+
+char4 char4_clamp(char4 a, char4 min, char4 max) {
+ return (char4)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z), clampc(a.w, min.w, max.w));
+}
+
+char4 char4_mix(char4 x, char4 y, char4 a) {
+ return (char4)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z), mixc(x.w, y.w, a.w));
+}
+
+char4 char4_maxmag(char4 a, char4 b) {
+ return (char4)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z), maxmagc(a.w, b.w));
+}
+
+char4 char4_minmag(char4 a, char4 b) {
+ return (char4)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z), minmagc(a.w, b.w));
+}
+
+char8 char8_clamp(char8 a, char8 min, char8 max) {
+ return (char8)(clampc(a.x, min.x, max.x), clampc(a.y, min.y, max.y), clampc(a.z, min.z, max.z), clampc(a.w, min.w, max.w), clampc(a.s4, min.s4, max.s4), clampc(a.s5, min.s5, max.s5), clampc(a.s6, min.s6, max.s6), clampc(a.s7, min.s7, max.s7));
+}
+
+char8 char8_mix(char8 x, char8 y, char8 a) {
+ return (char8)(mixc(x.x, y.x, a.x), mixc(x.y, y.y, a.y), mixc(x.z, y.z, a.z), mixc(x.w, y.w, a.w), mixc(x.s4, y.s4, a.s4), mixc(x.s5, y.s5, a.s5), mixc(x.s6, y.s6, a.s6), mixc(x.s7, y.s7, a.s7));
+}
+
+char8 char8_maxmag(char8 a, char8 b) {
+ return (char8)(maxmagc(a.x, b.x), maxmagc(a.y, b.y), maxmagc(a.z, b.z), maxmagc(a.w, b.w), maxmagc(a.s4, b.s4), maxmagc(a.s5, b.s5), maxmagc(a.s6, b.s6), maxmagc(a.s7, b.s7));
+}
+
+char8 char8_minmag(char8 a, char8 b) {
+ return (char8)(minmagc(a.x, b.x), minmagc(a.y, b.y), minmagc(a.z, b.z), minmagc(a.w, b.w), minmagc(a.s4, b.s4), minmagc(a.s5, b.s5), minmagc(a.s6, b.s6), minmagc(a.s7, b.s7));
+}
+
+short clamps(short a, short min, short max) {
+ return a < min? min : (a > max? max : a);
+}
+
+short mixs(short x, short y, short a) {
+ return x + (y - x) * a;
+}
+
+short maxmags(short a, short b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+short minmags(short a, short b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
+short2 short2_clamp(short2 a, short2 min, short2 max) {
+ return (short2)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y));
+}
+
+short2 short2_mix(short2 x, short2 y, short2 a) {
+ return (short2)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y));
+}
+
+short2 short2_maxmag(short2 a, short2 b) {
+ return (short2)(maxmags(a.x, b.x), maxmags(a.y, b.y));
+}
+
+short2 short2_minmag(short2 a, short2 b) {
+ return (short2)(minmags(a.x, b.x), minmags(a.y, b.y));
+}
+
+short3 short3_clamp(short3 a, short3 min, short3 max) {
+ return (short3)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z));
+}
+
+short3 short3_mix(short3 x, short3 y, short3 a) {
+ return (short3)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z));
+}
+
+short3 short3_maxmag(short3 a, short3 b) {
+ return (short3)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z));
+}
+
+short3 short3_minmag(short3 a, short3 b) {
+ return (short3)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z));
+}
+
+short4 short4_clamp(short4 a, short4 min, short4 max) {
+ return (short4)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z), clamps(a.w, min.w, max.w));
+}
+
+short4 short4_mix(short4 x, short4 y, short4 a) {
+ return (short4)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z), mixs(x.w, y.w, a.w));
+}
+
+short4 short4_maxmag(short4 a, short4 b) {
+ return (short4)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z), maxmags(a.w, b.w));
+}
+
+short4 short4_minmag(short4 a, short4 b) {
+ return (short4)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z), minmags(a.w, b.w));
+}
+
+short8 short8_clamp(short8 a, short8 min, short8 max) {
+ return (short8)(clamps(a.x, min.x, max.x), clamps(a.y, min.y, max.y), clamps(a.z, min.z, max.z), clamps(a.w, min.w, max.w), clamps(a.s4, min.s4, max.s4), clamps(a.s5, min.s5, max.s5), clamps(a.s6, min.s6, max.s6), clamps(a.s7, min.s7, max.s7));
+}
+
+short8 short8_mix(short8 x, short8 y, short8 a) {
+ return (short8)(mixs(x.x, y.x, a.x), mixs(x.y, y.y, a.y), mixs(x.z, y.z, a.z), mixs(x.w, y.w, a.w), mixs(x.s4, y.s4, a.s4), mixs(x.s5, y.s5, a.s5), mixs(x.s6, y.s6, a.s6), mixs(x.s7, y.s7, a.s7));
+}
+
+short8 short8_maxmag(short8 a, short8 b) {
+ return (short8)(maxmags(a.x, b.x), maxmags(a.y, b.y), maxmags(a.z, b.z), maxmags(a.w, b.w), maxmags(a.s4, b.s4), maxmags(a.s5, b.s5), maxmags(a.s6, b.s6), maxmags(a.s7, b.s7));
+}
+
+short8 short8_minmag(short8 a, short8 b) {
+ return (short8)(minmags(a.x, b.x), minmags(a.y, b.y), minmags(a.z, b.z), minmags(a.w, b.w), minmags(a.s4, b.s4), minmags(a.s5, b.s5), minmags(a.s6, b.s6), minmags(a.s7, b.s7));
+}
+
+int clampi(int a, int min, int max) {
+ return a < min? min : (a > max? max : a);
+}
+
+int mixi(int x, int y, int a) {
+ return x + (y - x) * a;
+}
+
+int maxmagi(int a, int b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+int minmagi(int a, int b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
+int2 int2_clamp(int2 a, int2 min, int2 max) {
+ return (int2)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y));
+}
+
+int2 int2_mix(int2 x, int2 y, int2 a) {
+ return (int2)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y));
+}
+
+int2 int2_maxmag(int2 a, int2 b) {
+ return (int2)(maxmagi(a.x, b.x), maxmagi(a.y, b.y));
+}
+
+int2 int2_minmag(int2 a, int2 b) {
+ return (int2)(minmagi(a.x, b.x), minmagi(a.y, b.y));
+}
+
+int3 int3_clamp(int3 a, int3 min, int3 max) {
+ return (int3)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z));
+}
+
+int3 int3_mix(int3 x, int3 y, int3 a) {
+ return (int3)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z));
+}
+
+int3 int3_maxmag(int3 a, int3 b) {
+ return (int3)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z));
+}
+
+int3 int3_minmag(int3 a, int3 b) {
+ return (int3)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z));
+}
+
+int4 int4_clamp(int4 a, int4 min, int4 max) {
+ return (int4)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z), clampi(a.w, min.w, max.w));
+}
+
+int4 int4_mix(int4 x, int4 y, int4 a) {
+ return (int4)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z), mixi(x.w, y.w, a.w));
+}
+
+int4 int4_maxmag(int4 a, int4 b) {
+ return (int4)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z), maxmagi(a.w, b.w));
+}
+
+int4 int4_minmag(int4 a, int4 b) {
+ return (int4)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z), minmagi(a.w, b.w));
+}
+
+int8 int8_clamp(int8 a, int8 min, int8 max) {
+ return (int8)(clampi(a.x, min.x, max.x), clampi(a.y, min.y, max.y), clampi(a.z, min.z, max.z), clampi(a.w, min.w, max.w), clampi(a.s4, min.s4, max.s4), clampi(a.s5, min.s5, max.s5), clampi(a.s6, min.s6, max.s6), clampi(a.s7, min.s7, max.s7));
+}
+
+int8 int8_mix(int8 x, int8 y, int8 a) {
+ return (int8)(mixi(x.x, y.x, a.x), mixi(x.y, y.y, a.y), mixi(x.z, y.z, a.z), mixi(x.w, y.w, a.w), mixi(x.s4, y.s4, a.s4), mixi(x.s5, y.s5, a.s5), mixi(x.s6, y.s6, a.s6), mixi(x.s7, y.s7, a.s7));
+}
+
+int8 int8_maxmag(int8 a, int8 b) {
+ return (int8)(maxmagi(a.x, b.x), maxmagi(a.y, b.y), maxmagi(a.z, b.z), maxmagi(a.w, b.w), maxmagi(a.s4, b.s4), maxmagi(a.s5, b.s5), maxmagi(a.s6, b.s6), maxmagi(a.s7, b.s7));
+}
+
+int8 int8_minmag(int8 a, int8 b) {
+ return (int8)(minmagi(a.x, b.x), minmagi(a.y, b.y), minmagi(a.z, b.z), minmagi(a.w, b.w), minmagi(a.s4, b.s4), minmagi(a.s5, b.s5), minmagi(a.s6, b.s6), minmagi(a.s7, b.s7));
+}
+
+#if !defined(__EMBEDDED_PROFILE__) || defined(cles_khr_int64)
+long clampl(long a, long min, long max) {
+ return a < min? min : (a > max? max : a);
+}
+
+long mixl(long x, long y, long a) {
+ return x + (y - x) * a;
+}
+
+long maxmagl(long a, long b) {
+ return abs(a) > abs(b) ? a : b;
+}
+
+long minmagl(long a, long b) {
+ return abs(a) < abs(b) ? a : b;
+}
+
+long2 long2_clamp(long2 a, long2 min, long2 max) {
+ return (long2)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y));
+}
+
+long2 long2_mix(long2 x, long2 y, long2 a) {
+ return (long2)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y));
+}
+
+long2 long2_maxmag(long2 a, long2 b) {
+ return (long2)(maxmagl(a.x, b.x), maxmagl(a.y, b.y));
+}
+
+long2 long2_minmag(long2 a, long2 b) {
+ return (long2)(minmagl(a.x, b.x), minmagl(a.y, b.y));
+}
+
+long3 long3_clamp(long3 a, long3 min, long3 max) {
+ return (long3)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z));
+}
+
+long3 long3_mix(long3 x, long3 y, long3 a) {
+ return (long3)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z));
+}
+
+long3 long3_maxmag(long3 a, long3 b) {
+ return (long3)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z));
+}
+
+long3 long3_minmag(long3 a, long3 b) {
+ return (long3)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z));
+}
+
+long4 long4_clamp(long4 a, long4 min, long4 max) {
+ return (long4)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z), clampl(a.w, min.w, max.w));
+}
+
+long4 long4_mix(long4 x, long4 y, long4 a) {
+ return (long4)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z), mixl(x.w, y.w, a.w));
+}
+
+long4 long4_maxmag(long4 a, long4 b) {
+ return (long4)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z), maxmagl(a.w, b.w));
+}
+
+long4 long4_minmag(long4 a, long4 b) {
+ return (long4)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z), minmagl(a.w, b.w));
+}
+
+long8 long8_clamp(long8 a, long8 min, long8 max) {
+ return (long8)(clampl(a.x, min.x, max.x), clampl(a.y, min.y, max.y), clampl(a.z, min.z, max.z), clampl(a.w, min.w, max.w), clampl(a.s4, min.s4, max.s4), clampl(a.s5, min.s5, max.s5), clampl(a.s6, min.s6, max.s6), clampl(a.s7, min.s7, max.s7));
+}
+
+long8 long8_mix(long8 x, long8 y, long8 a) {
+ return (long8)(mixl(x.x, y.x, a.x), mixl(x.y, y.y, a.y), mixl(x.z, y.z, a.z), mixl(x.w, y.w, a.w), mixl(x.s4, y.s4, a.s4), mixl(x.s5, y.s5, a.s5), mixl(x.s6, y.s6, a.s6), mixl(x.s7, y.s7, a.s7));
+}
+
+long8 long8_maxmag(long8 a, long8 b) {
+ return (long8)(maxmagl(a.x, b.x), maxmagl(a.y, b.y), maxmagl(a.z, b.z), maxmagl(a.w, b.w), maxmagl(a.s4, b.s4), maxmagl(a.s5, b.s5), maxmagl(a.s6, b.s6), maxmagl(a.s7, b.s7));
+}
+
+long8 long8_minmag(long8 a, long8 b) {
+ return (long8)(minmagl(a.x, b.x), minmagl(a.y, b.y), minmagl(a.z, b.z), minmagl(a.w, b.w), minmagl(a.s4, b.s4), minmagl(a.s5, b.s5), minmagl(a.s6, b.s6), minmagl(a.s7, b.s7));
+}
+
+#endif // !__EMBEDDED_PROFILE__ || cles_khr_int64
diff --git a/test/linux/opencl/filters.cl b/test/linux/opencl/filters.cl
new file mode 100644
index 0000000..de3a0af
--- /dev/null
+++ b/test/linux/opencl/filters.cl
@@ -0,0 +1,348 @@
+/*
+ * Fancier: Unified Java, JNI and OpenCL Integration High-Performance GPGPU API.
+ * Copyright (C) 2021 Universidad de La Laguna.
+ *
+ * Fancier is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Fancier is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Fancier. If not, see .
+ */
+
+#define GS_WEIGHTS ((float3)(0.299f, 0.587f, 0.114f))
+
+// Helper functions
+
+inline uint index_img(uint2 dims, uint x, uint y) {
+ return y * dims.x + x;
+}
+
+uchar4 bilinear_interp(global const uchar4* img, uint2 dims, float2 coord) {
+ const float2 pos_coord = fmax(coord, 0.0f);
+
+ const uint x0 = min((uint) trunc(pos_coord.x), dims.x - 1);
+ const uint x1 = min(x0 + 1, dims.x - 1);
+ const uint y0 = min((uint) trunc(pos_coord.y), dims.y - 1);
+ const uint y1 = min(y0 + 1, dims.y - 1);
+
+ const float4 p00 = convert_float4(img[index_img(dims, x0, y0)]);
+ const float4 p01 = convert_float4(img[index_img(dims, x0, y1)]);
+ const float4 p10 = convert_float4(img[index_img(dims, x1, y0)]);
+ const float4 p11 = convert_float4(img[index_img(dims, x1, y1)]);
+
+ const float slopex0 = (float) x1 - pos_coord.x;
+ const float slopex1 = pos_coord.x - (float) x0;
+
+ const float4 pxy0 = p00 * slopex0 + p10 * slopex1;
+ const float4 pxy1 = p01 * slopex0 + p11 * slopex1;
+
+ const float4 out = ((float) y1 - coord.y) * pxy0 + (coord.y - (float) y0) * pxy1;
+ return convert_uchar4_sat(out);
+}
+
+inline float3 matrix3x3_vector_multiply(global const float3* m, float3 v) {
+ return (float3)(dot(m[0], v), dot(m[1], v), dot(m[2], v));
+}
+
+// Kernels
+
+kernel void grayscale(global const uchar4* in, global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+ const uint index = index_img(dims, id.x, id.y);
+
+ const uchar4 pixel_in = in[index];
+ const uchar gray_value = convert_uchar(dot(convert_float3(pixel_in.xyz), GS_WEIGHTS));
+
+ out[index] = (uchar4)(gray_value, gray_value, gray_value, pixel_in.w);
+}
+
+kernel void blur_h(global const uchar4* in, global const float* gauss_kernel, const int radius,
+ global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+
+ float4 blurred_pixel = 0.0f;
+ int kernel_index = 0;
+
+ if (id.x <= radius || id.x >= dims.x - radius) {
+ for (int r = -radius; r <= radius; ++r) {
+ const uint x = clampi(id.x + r, 0, dims.x - 1);
+ blurred_pixel += convert_float4(in[index_img(dims, x, id.y)]) * gauss_kernel[kernel_index++];
+ }
+ }
+ else {
+ for (int r = -radius; r <= radius; ++r)
+ blurred_pixel += convert_float4(in[index_img(dims, id.x + r, id.y)]) * gauss_kernel[kernel_index++];
+ }
+
+ out[index_img(dims, id.x, id.y)] = convert_uchar4(blurred_pixel);
+}
+
+kernel void blur_v(global const uchar4* in, global const float* gauss_kernel, const int radius,
+ global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+
+ float4 blurred_pixel = 0.0f;
+ int kernel_index = 0;
+
+ if (id.y <= radius || id.y >= dims.y - radius) {
+ for (int r = -radius; r <= radius; ++r) {
+ const uint y = clampi(id.y + r, 0, dims.y - 1);
+ blurred_pixel += convert_float4(in[index_img(dims, id.x, y)]) * gauss_kernel[kernel_index++];
+ }
+ }
+ else {
+ for (int r = -radius; r <= radius; ++r)
+ blurred_pixel += convert_float4(in[index_img(dims, id.x, id.y + r)]) * gauss_kernel[kernel_index++];
+ }
+
+ out[index_img(dims, id.x, id.y)] = convert_uchar4(blurred_pixel);
+}
+
+kernel void convolve3x3(global const uchar4* in, global const float* weights, global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+ const uint index = index_img(dims, id.x, id.y);
+
+ const uint min_x = max((int) id.x - 1, 0);
+ const uint max_x = min(id.x + 1, dims.x - 1);
+ const uint min_y = max((int) id.y - 1, 0);
+ const uint max_y = min(id.y + 1, dims.y - 1);
+
+ const uchar4 pixel = in[index];
+
+ const float3 p00 = convert_float3(in[index_img(dims, min_x, min_y)].xyz) * weights[0];
+ const float3 p01 = convert_float3(in[index_img(dims, id.x, min_y)].xyz) * weights[1];
+ const float3 p02 = convert_float3(in[index_img(dims, max_x, min_y)].xyz) * weights[2];
+
+ const float3 p10 = convert_float3(in[index_img(dims, min_x, id.y)].xyz) * weights[3];
+ const float3 p11 = convert_float3(pixel.xyz) * weights[4];
+ const float3 p12 = convert_float3(in[index_img(dims, max_x, id.y)].xyz) * weights[5];
+
+ const float3 p20 = convert_float3(in[index_img(dims, min_x, max_y)].xyz) * weights[6];
+ const float3 p21 = convert_float3(in[index_img(dims, id.x, max_y)].xyz) * weights[7];
+ const float3 p22 = convert_float3(in[index_img(dims, max_x, max_y)].xyz) * weights[8];
+
+ out[index] =
+ (uchar4)(convert_uchar3_sat(p00 + p01 + p02 + p10 + p11 + p12 + p20 + p21 + p22), pixel.w);
+}
+
+kernel void convolve5x5(global const uchar4* in, global const float* weights, global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+ const uint index = index_img(dims, id.x, id.y);
+
+ const uint x0 = max((int) id.x - 2, 0);
+ const uint x1 = max((int) id.x - 1, 0);
+ const uint x2 = min(id.x + 1, dims.x - 1);
+ const uint x3 = min(id.x + 2, dims.x - 1);
+
+ const uint y0 = max((int) id.y - 2, 0);
+ const uint y1 = max((int) id.y - 1, 0);
+ const uint y2 = min(id.y + 1, dims.y - 1);
+ const uint y3 = min(id.y + 2, dims.y - 1);
+
+ const uchar4 pixel = in[index];
+
+ const float3 p00 = convert_float3(in[index_img(dims, x0, y0)].xyz) * weights[0];
+ const float3 p01 = convert_float3(in[index_img(dims, x1, y0)].xyz) * weights[1];
+ const float3 p02 = convert_float3(in[index_img(dims, id.x, y0)].xyz) * weights[2];
+ const float3 p03 = convert_float3(in[index_img(dims, x2, y0)].xyz) * weights[3];
+ const float3 p04 = convert_float3(in[index_img(dims, x3, y0)].xyz) * weights[4];
+
+ const float3 p10 = convert_float3(in[index_img(dims, x0, y1)].xyz) * weights[5];
+ const float3 p11 = convert_float3(in[index_img(dims, x1, y1)].xyz) * weights[6];
+ const float3 p12 = convert_float3(in[index_img(dims, id.x, y1)].xyz) * weights[7];
+ const float3 p13 = convert_float3(in[index_img(dims, x2, y1)].xyz) * weights[8];
+ const float3 p14 = convert_float3(in[index_img(dims, x3, y1)].xyz) * weights[9];
+
+ const float3 p20 = convert_float3(in[index_img(dims, x0, id.y)].xyz) * weights[10];
+ const float3 p21 = convert_float3(in[index_img(dims, x1, id.y)].xyz) * weights[11];
+ const float3 p22 = convert_float3(pixel.xyz) * weights[12];
+ const float3 p23 = convert_float3(in[index_img(dims, x2, id.y)].xyz) * weights[13];
+ const float3 p24 = convert_float3(in[index_img(dims, x3, id.y)].xyz) * weights[14];
+
+ const float3 p30 = convert_float3(in[index_img(dims, x0, y2)].xyz) * weights[15];
+ const float3 p31 = convert_float3(in[index_img(dims, x1, y2)].xyz) * weights[16];
+ const float3 p32 = convert_float3(in[index_img(dims, id.x, y2)].xyz) * weights[17];
+ const float3 p33 = convert_float3(in[index_img(dims, x2, y2)].xyz) * weights[18];
+ const float3 p34 = convert_float3(in[index_img(dims, x3, y2)].xyz) * weights[19];
+
+ const float3 p40 = convert_float3(in[index_img(dims, x0, y3)].xyz) * weights[20];
+ const float3 p41 = convert_float3(in[index_img(dims, x1, y3)].xyz) * weights[21];
+ const float3 p42 = convert_float3(in[index_img(dims, id.x, y3)].xyz) * weights[22];
+ const float3 p43 = convert_float3(in[index_img(dims, x2, y3)].xyz) * weights[23];
+ const float3 p44 = convert_float3(in[index_img(dims, x3, y3)].xyz) * weights[24];
+
+ out[index] =
+ (uchar4)(convert_uchar3_sat(p00 + p01 + p02 + p03 + p04 +
+ p10 + p11 + p12 + p13 + p14 +
+ p20 + p21 + p22 + p23 + p24 +
+ p30 + p31 + p32 + p33 + p34 +
+ p40 + p41 + p42 + p43 + p44), pixel.w);
+}
+
+kernel void bilateral(global const uchar4* in, const int radius, const float preservation,
+ global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+ const uint index = index_img(dims, id.x, id.y);
+
+ const uchar4 center_pixel = in[index];
+ const float3 center = convert_float3(center_pixel.xyz) / 0xff;
+
+ float3 sum = 0.0f;
+ float total_weight = 0.0f;
+
+ for (int rx = -radius; rx <= radius; ++rx) {
+ for (int ry = -radius; ry <= radius; ++ry) {
+ int x = clampi((int) id.x + rx, 0, (int) dims.x - 1);
+ int y = clampi((int) id.y + ry, 0, (int) dims.y - 1);
+
+ const float3 pixel = convert_float3(in[index_img(dims, x, y)].xyz) / 0xff;
+ float3 diff = (center - pixel);
+ diff *= diff;
+
+ const float diff_map = exp(-(diff.x + diff.y + diff.z) * preservation * 100.0f);
+ const float gaussian_weight = exp(-0.5f * ((rx * rx) + (ry * ry)) / (float) radius);
+
+ const float weight = diff_map * gaussian_weight;
+ sum += pixel * weight;
+ total_weight += weight;
+ }
+ }
+
+ out[index] = (uchar4)(convert_uchar3(0xff * (sum / total_weight)), center_pixel.w);
+}
+
+kernel void median(global const uchar4* in, const int radius, global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+
+ int3 val[256];
+ for (int i = 0; i < 256; i++)
+ val[i].xyz = 0;
+
+ for (int rx = -radius; rx <= radius; rx ++) {
+ for (int ry = -radius; ry <= radius; ry ++) {
+ int x = clampi((int) id.x + rx, 0, (int) dims.x - 1);
+ int y = clampi((int) id.y + ry, 0, (int) dims.y - 1);
+
+ const uchar pixel = in[index_img(dims, x, y)].x;
+ val[pixel].xyz += 1;
+ }
+ }
+
+ int median = ((radius * 2 + 1) * (radius * 2 + 1)) / 2;
+ int3 rgb = 0;
+ uchar4 out_pixel = 0xff;
+
+ for (uchar i = 0; any(out_pixel.xyz == (uchar3)(0xff)); ++i) {
+ if (out_pixel.x == 0xff) {
+ rgb.x += val[i].x;
+
+ if (rgb.x >= median)
+ out_pixel.x = i;
+ }
+
+ if (out_pixel.y == 0xff) {
+ rgb.y += val[i].y;
+
+ if (rgb.y >= median)
+ out_pixel.y = i;
+ }
+
+ if (out_pixel.z == 0xff) {
+ rgb.z += val[i].z;
+
+ if (rgb.z >= median)
+ out_pixel.z = i;
+ }
+ }
+
+ out[index_img(dims, id.x, id.y)] = out_pixel;
+}
+
+kernel void contrast(global const uchar4* in, const float enhancement, global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+ const uint index = index_img(dims, id.x, id.y);
+
+ const uchar4 pixel = in[index];
+ const float3 out_pixel = convert_float3(pixel.xyz);
+
+ const float bright_m = exp2(enhancement);
+
+ out[index] =
+ (uchar4)(convert_uchar3_sat(out_pixel * bright_m + 127.0f * (1 - bright_m)), pixel.w);
+}
+
+kernel void fisheye(global const uchar4* in, const float2 center, const float scale,
+ global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+
+ const float2 inv_dimensions = (float2)(1.0f / dims.x, 1.0f / dims.y);
+ const float alpha = scale * 2.0f + 0.75f;
+ float2 axis_scale = 1.0f;
+
+ if (dims.x > dims.y)
+ axis_scale.y = dims.y / (float) dims.x;
+ else
+ axis_scale.x = dims.x / (float) dims.y;
+
+ const float bound2 = 0.25f * (axis_scale.x * axis_scale.x + axis_scale.y * axis_scale.y);
+ const float bound = sqrt(bound2);
+ const float radius = 1.15f * bound;
+ const float radius2 = radius * radius;
+ const float factor = bound / (M_PI_2_F - atan(alpha / bound * sqrt(radius2 - bound2)));
+
+ const float2 coord = mad(convert_float2(id), inv_dimensions, -center);
+ const float2 scaled_coord = axis_scale * coord;
+
+ const float dist2 = scaled_coord.x * scaled_coord.x + scaled_coord.y * scaled_coord.y;
+ const float inv_dist = rsqrt(dist2);
+
+ const float radian = M_PI_2_F - atan((alpha * sqrt(radius2 - dist2)) * inv_dist);
+ const float scalar = radian * factor * inv_dist;
+ const float2 new_coord = convert_float2(dims) * mad(coord, scalar, center);
+
+ out[index_img(dims, id.x, id.y)] = bilinear_interp(in, dims, new_coord);
+}
+
+kernel void levels(global const uchar4* in, global const float3* sat_matrix,
+ const float2 black_levels, const float2 white_levels, global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+ const uint index = index_img(dims, id.x, id.y);
+
+ float4 pixel = convert_float4(in[index]);
+ pixel.xyz = matrix3x3_vector_multiply(sat_matrix, pixel.xyz);
+ pixel = clamp(pixel, 0.0f, 255.0f);
+ pixel = (pixel - black_levels.x) / (white_levels.x - black_levels.x);
+ pixel = pixel * (white_levels.y - black_levels.y) + black_levels.y;
+
+ out[index] = convert_uchar4_sat(pixel);
+}
+
+kernel void posterize(global const uchar4* in, const float2 intensity, const uchar4 color,
+ global uchar4* out) {
+ const uint2 id = (uint2)(get_global_id(0), get_global_id(1));
+ const uint2 dims = (uint2)(get_global_size(0), get_global_size(1));
+ const uint index = index_img(dims, id.x, id.y);
+
+ const uchar4 pixel = in[index];
+ const float pixel_intensity = dot(convert_float3(pixel.xyz) / 0xff, GS_WEIGHTS);
+
+ if ((pixel_intensity <= intensity.y) && (pixel_intensity >= intensity.x))
+ out[index] = color;
+}