diff --git a/CleanSpec.mk b/CleanSpec.mk
index 4c9c547..661ff73 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -45,6 +45,12 @@
 #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/*/src/RenderScript.stamp)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/*/src/renderscript/)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/*/src/renderscript)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/*/src/renderscript)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/*/src/RenderScript.stamp)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/*/src/RenderScript.stamp)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/obj/SHARED_LIBRARIES/lib*.bc_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/obj/SHARED_LIBRARIES/librs*_intermediates)
 
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/api/gen_runtime.cpp b/api/gen_runtime.cpp
new file mode 100644
index 0000000..cdfdf5d
--- /dev/null
+++ b/api/gen_runtime.cpp
@@ -0,0 +1,450 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#include <stdio.h>
+#include <vector>
+#include <list>
+#include <string>
+
+using namespace std;
+
+FILE *gIn;
+FILE *gOut;
+
+class Func {
+public:
+    Func() {
+        mMinVersion = 0;
+        mMaxVersion = 0;
+    }
+
+    string mName;
+    int mMinVersion;
+    int mMaxVersion;
+
+    vector<vector<string> > mReplaceables;
+    vector<string> mArgs;
+    string mRet;
+    vector<string> mComment;
+    vector<string> mInline;
+
+};
+
+vector<Func *> gFuncs;
+
+bool getNextLine(FILE *in, string *s) {
+    s->clear();
+    while (1) {
+        int c = fgetc(in);
+        if (c == EOF) return s->size() != 0;
+        if (c == '\n') break;
+        s->push_back((char)c);
+    }
+    return true;
+}
+
+void trim(string *s, size_t start) {
+    if (start > 0) {
+        s->erase(0, start);
+    }
+
+    while (s->size() && (s->at(0) == ' ')) {
+        s->erase(0, 1);
+    }
+
+    size_t p = s->find_first_of("\n\r");
+    if (p != string::npos) {
+        s->erase(p);
+    }
+
+    while ((s->size() > 0) && (s->at(s->size()-1) == ' ')) {
+        s->erase(s->size() -1);
+    }
+}
+
+Func * scanFunction(FILE *in) {
+    Func *f = new Func();
+    bool modeComment = false;
+    bool modeInline = false;
+    size_t replacables = 0;
+
+    while (1) {
+        string s;
+        bool ret = getNextLine(in, &s);
+        if (!ret) break;
+
+        if (modeComment) {
+            if (!s.size() || (s[0] == ' ')) {
+                trim(&s, 0);
+                f->mComment.push_back(s);
+                continue;
+            } else {
+                modeComment = false;
+            }
+        }
+
+        if (modeInline) {
+            if (!s.size() || (s[0] == ' ')) {
+                trim(&s, 0);
+                f->mInline.push_back(s);
+                continue;
+            } else {
+                modeInline = false;
+            }
+        }
+
+        if (s[0] == '#') {
+            continue;
+        }
+
+        if (s.compare(0, 5, "name:") == 0) {
+            trim(&s, 5);
+            f->mName = s;
+            continue;
+        }
+
+        if (s.compare(0, 4, "arg:") == 0) {
+            trim(&s, 4);
+            f->mArgs.push_back(s);
+            continue;
+        }
+
+        if (s.compare(0, 4, "ret:") == 0) {
+            trim(&s, 4);
+            f->mRet = s;
+            continue;
+        }
+
+        if (s.compare(0, 4, "end:") == 0) {
+            return f;
+        }
+
+        if (s.compare(0, 8, "comment:") == 0) {
+            modeComment = true;
+            continue;
+        }
+
+        if (s.compare(0, 7, "inline:") == 0) {
+            modeInline = true;
+            continue;
+        }
+
+        if (s.compare(0, 8, "version:") == 0) {
+            trim(&s, 8);
+            sscanf(s.c_str(), "%i %i", &f->mMinVersion, &f->mMaxVersion);
+            continue;
+        }
+
+        if (s.compare(0, 8, "start:") == 0) {
+            continue;
+        }
+
+        if (s.compare(0, 2, "w:") == 0) {
+            vector<string> t;
+            if (s.find("1") != string::npos) {
+                t.push_back("");
+            }
+            if (s.find("2") != string::npos) {
+                t.push_back("2");
+            }
+            if (s.find("3") != string::npos) {
+                t.push_back("3");
+            }
+            if (s.find("4") != string::npos) {
+                t.push_back("4");
+            }
+            f->mReplaceables.push_back(t);
+            continue;
+        }
+
+        if (s.compare(0, 2, "t:") == 0) {
+            vector<string> t;
+            if (s.find("f16") != string::npos) {
+                t.push_back("half");
+            }
+            if (s.find("f32") != string::npos) {
+                t.push_back("float");
+            }
+            if (s.find("f64") != string::npos) {
+                t.push_back("double");
+            }
+            if (s.find("i8") != string::npos) {
+                t.push_back("char");
+            }
+            if (s.find("u8") != string::npos) {
+                t.push_back("uchar");
+            }
+            if (s.find("i16") != string::npos) {
+                t.push_back("short");
+            }
+            if (s.find("u16") != string::npos) {
+                t.push_back("ushort");
+            }
+            if (s.find("i32") != string::npos) {
+                t.push_back("int");
+            }
+            if (s.find("u32") != string::npos) {
+                t.push_back("uint");
+            }
+            if (s.find("i64") != string::npos) {
+                t.push_back("long");
+            }
+            if (s.find("u64") != string::npos) {
+                t.push_back("ulong");
+            }
+            f->mReplaceables.push_back(t);
+            continue;
+        }
+
+        if (s.size() == 0) {
+            // eat empty line
+            continue;
+        }
+
+        printf("Error, line:\n");
+        printf("  %s\n", s.c_str());
+    }
+
+    delete f;
+    return NULL;
+}
+
+string stringReplace(string s, string match, string rep) {
+    while(1) {
+        size_t p = s.find(match);
+        if (p == string::npos) break;
+
+        s.erase(p, match.size());
+        s.insert(p, rep);
+    }
+    return s;
+}
+
+string stringExpand(string s, const Func *f, int i1, int i2, int i3, int i4) {
+    if (f->mReplaceables.size() > 0) {
+        s = stringReplace(s, "#1", f->mReplaceables[0][i1]);
+    }
+    if (f->mReplaceables.size() > 1) {
+        s = stringReplace(s, "#2", f->mReplaceables[1][i2]);
+    }
+    if (f->mReplaceables.size() > 2) {
+        s = stringReplace(s, "#3", f->mReplaceables[2][i3]);
+    }
+    if (f->mReplaceables.size() > 3) {
+        s = stringReplace(s, "#4", f->mReplaceables[3][i4]);
+    }
+    return s;
+}
+
+void writeLegal(FILE *o) {
+    fprintf(o, "/*\n");
+    fprintf(o, " * Copyright (C) 2014 The Android Open Source Project\n");
+    fprintf(o, " *\n");
+    fprintf(o, " * Licensed under the Apache License, Version 2.0 (the \"License\");\n");
+    fprintf(o, " * you may not use this file except in compliance with the License.\n");
+    fprintf(o, " * You may obtain a copy of the License at\n");
+    fprintf(o, " *\n");
+    fprintf(o, " *      http://www.apache.org/licenses/LICENSE-2.0\n");
+    fprintf(o, " *\n");
+    fprintf(o, " * Unless required by applicable law or agreed to in writing, software\n");
+    fprintf(o, " * distributed under the License is distributed on an \"AS IS\" BASIS,\n");
+    fprintf(o, " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n");
+    fprintf(o, " * See the License for the specific language governing permissions and\n");
+    fprintf(o, " * limitations under the License.\n");
+    fprintf(o, " */\n\n");
+}
+
+void writeIfdef(FILE *o, string filename, bool isStart) {
+    string t = "__";
+    t += filename;
+    t += "__";
+
+    for (size_t i = 2; i < t.size(); i++) {
+        if (t[i] == '.') {
+            t[i] = '_';
+        }
+    }
+
+    if (isStart) {
+        fprintf(o, "#ifndef %s\n", t.c_str());
+        fprintf(o, "#define %s\n", t.c_str());
+    } else {
+        fprintf(o, "#endif // %s\n", t.c_str());
+    }
+}
+
+
+
+void writeHeaderFunc(FILE *o, const Func *f, int i1, int i2, int i3, int i4) {
+    string s;
+
+    if (f->mMinVersion || f->mMaxVersion) {
+        if (f->mMaxVersion) {
+            fprintf(o, "#if (defined(RS_VERSION) && (RS_VERSION >= %i) && (RS_VERSION <= %i))\n",
+                    f->mMinVersion, f->mMaxVersion);
+        } else {
+            fprintf(o, "#if (defined(RS_VERSION) && (RS_VERSION >= %i))\n",
+                    f->mMinVersion);
+        }
+    }
+
+    fprintf(o, "/*\n");
+    for (size_t ct=0; ct < f->mComment.size(); ct++) {
+        s = stringExpand(f->mComment[ct], f, i1, i2, i3, i4);
+        if (s.size()) {
+            fprintf(o, " * %s\n", s.c_str());
+        } else {
+            fprintf(o, " *\n");
+        }
+    }
+    fprintf(o, " *\n");
+    if (f->mMinVersion || f->mMaxVersion) {
+        if (f->mMaxVersion) {
+            fprintf(o, " * Suppored by API versions %i - %i\n",
+                    f->mMinVersion, f->mMaxVersion);
+        } else {
+            fprintf(o, " * Supported by API versions %i and newer.\n",
+                    f->mMinVersion);
+        }
+    }
+
+    fprintf(o, " */\n");
+
+    s.clear();
+    if (f->mInline.size() > 0) {
+        s += "static ";
+    } else {
+        s += "extern ";
+    }
+    s += f->mRet;
+    s += " __attribute__((const, overloadable))";
+    s += f->mName;
+    s += "(";
+    if (f->mArgs.size()) {
+        s += f->mArgs[0];
+    }
+    for (size_t ct=1; ct < f->mArgs.size(); ct++) {
+        s += ", ";
+        s += f->mArgs[ct];
+    }
+    if (f->mInline.size() > 0) {
+        s += ") {";
+    } else {
+        s += ");";
+    }
+    s = stringExpand(s, f, i1, i2, i3, i4);
+    fprintf(o, "%s\n", s.c_str());
+
+    if (f->mInline.size() > 0) {
+        for (size_t ct=0; ct < f->mInline.size(); ct++) {
+            s = stringExpand(f->mInline[ct], f, i1, i2, i3, i4);
+            fprintf(o, " %s\n", s.c_str());
+        }
+        fprintf(o, "}\n");
+    }
+
+    if (f->mMinVersion || f->mMaxVersion) {
+        fprintf(o, "#endif\n");
+    }
+
+    fprintf(o, "\n", s.c_str());
+}
+
+
+void writeHeaderFuncs(FILE *o, const Func *f) {
+    switch(f->mReplaceables.size()) {
+    case 0:
+        writeHeaderFunc(o, f, -1, -1, -1, -1);
+        break;
+    case 1:
+        for (size_t i1 = 0; i1 < f->mReplaceables[0].size(); i1++) {
+            writeHeaderFunc(o, f, i1, -1, -1, -1);
+        }
+        break;
+    case 2:
+        for (size_t i2 = 0; i2 < f->mReplaceables[1].size(); i2++) {
+            for (size_t i1 = 0; i1 < f->mReplaceables[0].size(); i1++) {
+                writeHeaderFunc(o, f, i1, i2, -1, -1);
+            }
+        }
+        break;
+    case 3:
+        for (size_t i3 = 0; i3 < f->mReplaceables[2].size(); i3++) {
+            for (size_t i2 = 0; i2 < f->mReplaceables[1].size(); i2++) {
+                for (size_t i1 = 0; i1 < f->mReplaceables[0].size(); i1++) {
+                    writeHeaderFunc(o, f, i1, i2, i3, -1);
+                }
+            }
+        }
+        break;
+    case 4:
+        for (size_t i4 = 0; i4 < f->mReplaceables[3].size(); i4++) {
+            for (size_t i3 = 0; i3 < f->mReplaceables[2].size(); i3++) {
+                for (size_t i2 = 0; i2 < f->mReplaceables[1].size(); i2++) {
+                    for (size_t i1 = 0; i1 < f->mReplaceables[0].size(); i1++) {
+                        writeHeaderFunc(o, f, i1, i2, i3, i4);
+                    }
+                }
+            }
+        }
+        break;
+    }
+}
+
+
+
+int main(int argc, char* argv[])
+{
+    const char *inpath = "runtime.spec";
+    const char *outpath = "rs_core_math.rsh";
+
+    gIn = fopen(inpath, "rt");
+    if (!gIn) {
+        printf("Error opening input file: %s", inpath);
+        return -1;
+    }
+
+    while (1) {
+        Func *f = scanFunction(gIn);
+        if (f != NULL) {
+            gFuncs.push_back(f);
+        } else {
+            break;
+        }
+    }
+
+    gOut = fopen(outpath, "wt");
+    if (!gOut) {
+        printf("Error opening output file: %s", outpath);
+        return -1;
+    }
+
+    writeLegal(gOut);
+    writeIfdef(gOut, outpath, true);
+    for (size_t ct=0; ct < gFuncs.size(); ct++) {
+        writeHeaderFuncs(gOut, gFuncs[ct]);
+    }
+    writeIfdef(gOut, outpath, false);
+
+    fclose (gIn);
+    fclose (gOut);
+
+    printf("%i Functions processed.\n", (int)gFuncs.size());
+
+    return 0;
+}
+
+
diff --git a/api/runtime.spec b/api/runtime.spec
new file mode 100644
index 0000000..279d67f
--- /dev/null
+++ b/api/runtime.spec
@@ -0,0 +1,1439 @@
+#
+# Copyright (C) 2013 The Android Open Source Project
+#
+# 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.
+#
+
+start:
+w: 2, 3, 4
+t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
+t: u8, u16, u32, u64, i8, i16, i32, i64, f32, f64
+name: convert_#3#1
+arg: #2#1
+ret: #3#1
+comment:
+ Component wise conversion from #2#1 to #3#1
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: acos
+ret: #2#1
+arg: #2#1
+comment:
+ acos
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: acosh
+ret: #2#1
+arg: #2#1
+comment:
+ acosh
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: acospi
+ret: #2#1
+arg: #2#1
+comment:
+ acospi
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: asin
+ret: #2#1
+arg: #2#1
+comment:
+ asin
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: asinh
+ret: #2#1
+arg: #2#1
+comment:
+ asinh
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: asinpi
+ret: #2#1
+arg: #2#1
+comment:
+ Return the inverse sine divided by PI.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: atan
+ret: #2#1
+arg: #2#1
+comment:
+ Return the inverse tangent.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: atan2
+ret: #2#1
+arg: #2#1 y
+arg: #2#1 x
+comment:
+ Return the inverse tangent of y / x.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: atanh
+ret: #2#1
+arg: #2#1
+comment:
+ Return the inverse hyperbolic tangent.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: atanpi
+ret: #2#1
+arg: #2#1
+comment:
+ Return the inverse tangent divided by PI.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: atan2pi
+ret: #2#1
+arg: #2#1 y
+arg: #2#1 x
+comment:
+ Return the inverse tangent of y / x, divided by PI.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: cbrt
+ret: #2#1
+arg: #2#1
+comment:
+ Return the cube root.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: ceil
+ret: #2#1
+arg: #2#1
+comment:
+ Return the smallest integer not less than a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: copysign
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Copy the sign bit from y to x.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: cos
+ret: #2#1
+arg: #2#1
+comment:
+ Return the cosine.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: cosh
+ret: #2#1
+arg: #2#1
+comment:
+ Return the hypebolic cosine.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: cospi
+ret: #2#1
+arg: #2#1
+comment:
+ Return the cosine of the value * PI.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: erfc
+ret: #2#1
+arg: #2#1
+comment:
+ Return the complementary error function.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: erf
+ret: #2#1
+arg: #2#1
+comment:
+ Return the error function.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: exp
+ret: #2#1
+arg: #2#1
+comment:
+ Return e ^ value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: exp2
+ret: #2#1
+arg: #2#1
+comment:
+ Return 2 ^ value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: exp10
+ret: #2#1
+arg: #2#1
+comment:
+ Return 10 ^ value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: expm1
+ret: #2#1
+arg: #2#1
+comment:
+ Return (e ^ value) - 1.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fabs
+ret: #2#1
+arg: #2#1
+comment:
+ Return the absolute value of a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fdim
+ret: #2#1
+arg: #2#1
+arg: #2#1
+comment:
+ Return the positive difference between two values.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: floor
+ret: #2#1
+arg: #2#1
+comment:
+ Return the smallest integer not greater than a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fma
+ret: #2#1
+arg: #2#1 a
+arg: #2#1 b
+arg: #2#1 c
+comment:
+ Return (a * b) + c.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fmax
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Return (x < y ? y : x)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fmax
+ret: #2#1
+arg: #2#1 x
+arg: #2 y
+comment:
+ Return (x < y ? y : x)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fmin
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Return (x > y ? y : x)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fmin
+ret: #2#1
+arg: #2#1 x
+arg: #2 y
+comment:
+ Return (x > y ? y : x)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fmod
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Return the remainder from x / y
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fract
+ret: #2#1
+arg: #2#1 v
+arg: #2#1 *iptr
+comment:
+ Return fractional part of v
+
+ @param iptr  iptr[0] will be set to the floor of the input value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fract
+ret: #2#1
+arg: #2#1 v
+comment:
+ Return fractional part of v
+inline:
+    #2#1 unused;
+    return fract(v, &unused);
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: frexp
+ret: #2#1
+arg: #2#1 v
+arg: int#1 *iptr
+comment:
+ Return the mantissa and place the exponent into iptr[0]
+
+ @param v Supports float, float2, float3, float4.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: hypot
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Return sqrt(x*x + y*y)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: ilogb
+ret: int#1
+arg: float#1
+comment:
+ Return the integer exponent of a value
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: ilogb
+ret: #2#1
+arg: #2#1
+arg: int#1
+comment:
+ Return (x * 2^y)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: ilogb
+ret: #2#1
+arg: #2#1
+arg: int
+comment:
+ Return (x * 2^y)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+name: ldexp
+ret: float#1
+arg: float#1 x
+arg: int#1 y
+comment:
+ Return (x * 2^y)
+
+ @param x Supports 1,2,3,4 components
+ @param y Supports single component or matching vector.
+version: 9
+end:
+
+start:
+w: 2, 3, 4
+name: ldexp
+ret: float#1
+arg: float#1 x
+arg: int y
+comment:
+ Return (x * 2^y)
+
+ @param x Supports 1,2,3,4 components
+ @param y Supports single component or matching vector.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: lgamma
+ret: #2#1
+arg: #2#1 x
+comment:
+ Return the log gamma and sign
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: lgamma
+ret: #2#1
+arg: #2#1 x
+arg: int#1 *y
+comment:
+ Return the log gamma and sign
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: log
+ret: #2#1
+arg: #2#1 x
+comment:
+ Return the natural logarithm.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: log2
+ret: #2#1
+arg: #2#1 x
+comment:
+ Return the base 2 logarithm.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: log10
+ret: #2#1
+arg: #2#1 x
+comment:
+ Return the base 10 logarithm.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: log1p
+ret: #2#1
+arg: #2#1 x
+comment:
+ Return the natural logarithm of (v + 1.0f)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: logb
+ret: #2#1
+arg: #2#1 x
+comment:
+ Compute the exponent of the value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: mad
+ret: #2#1
+arg: #2#1 a
+arg: #2#1 b
+arg: #2#1 c
+comment:
+ Compute (a * b) + c
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: modf
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 *iret
+comment:
+ Return the integral and fractional components of a number.
+
+ @param x Source value
+ @param iret iret[0] will be set to the integral portion of the number.
+ @return The floating point portion of the value.
+version: 9
+end:
+
+start:
+w: 1
+t: f32
+name: nan
+ret: #2#1
+arg: uint#1
+comment:
+ generate a nan
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: nextafter
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Return the next floating point number from x towards y.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: pow
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Return x ^ y.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: pown
+ret: #2#1
+arg: #2#1 x
+arg: int#1 y
+comment:
+ Return x ^ y.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: powr
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Return x ^ y.
+ y must be > 0
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: remainder
+ret: #2#1
+arg: #2#1 x
+arg: #2#1 y
+comment:
+ Return round x/y to the nearest integer then compute the remander.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: remquo
+ret: #2#1
+arg: #2#1
+arg: #2#1
+arg: int#1 *
+comment:
+ todo
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: rint
+ret: #2#1
+arg: #2#1
+comment:
+ Round to the nearest integral value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: rootn
+ret: #2#1
+arg: #2#1 v
+arg: int#1 n
+comment:
+ Compute the Nth root of a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: round
+ret: #2#1
+arg: #2#1
+comment:
+ Round to the nearest integral value.  Half values are rounded away from zero.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: rsqrt
+ret: #2#1
+arg: #2#1
+comment:
+ Return (1 / sqrt(value)).
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: sqrt
+ret: #2#1
+arg: #2#1
+comment:
+ Return the square root of a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: sin
+ret: #2#1
+arg: #2#1
+comment:
+ Return the sine of a value specified in radians.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: sincos
+ret: #2#1
+arg: #2#1 v
+arg: #2#1 *cosptr
+comment:
+ Return the sine and cosine of a value.
+
+ @return sine
+ @param v The incoming value in radians
+ @param *cosptr cosptr[0] will be set to the cosine value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: sinh
+ret: #2#1
+arg: #2#1
+comment:
+ Return the hyperbolic sine of a value specified in radians.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: sinpi
+ret: #2#1
+arg: #2#1
+comment:
+ Return the sin(v * PI).
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: tan
+ret: #2#1
+arg: #2#1
+comment:
+ Return the tangent of a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: tanh
+ret: #2#1
+arg: #2#1
+comment:
+ Return the hyperbolic tangent of a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: tanpi
+ret: #2#1
+arg: #2#1
+comment:
+ Return tan(v * PI)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: tgamma
+ret: #2#1
+arg: #2#1
+comment:
+ Compute the gamma function of a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: trunc
+ret: #2#1
+arg: #2#1
+comment:
+ ound to integral using truncation.
+version: 9
+end:
+
+# int functions
+
+start:
+w: 1, 2, 3, 4
+t: i8, i16, i32
+name: abs
+ret: u#2#1
+arg: #2#1 value
+comment:
+ Return the absolute value of a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: u8, u16, u32, i8, i16, i32
+name: clz
+ret: #2#1
+arg: #2#1 value
+comment:
+ Return the number of leading 0-bits in a value.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: min
+ret: #2#1
+arg: #2#1
+arg: #2#1
+comment:
+ Return the minimum value from two arguments
+version: 9
+end:
+
+start:
+w: 1
+t: i8 i16 i32 u8 u16 u32
+name: min
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the minimum value from two arguments
+inline:
+ return (v1 < v2 ? v1 : v2);
+version: 9 19
+end:
+
+start:
+w: 2
+t: i8 i16 i32 u8 u16 u32
+name: min
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the minimum value from two arguments
+inline:
+ #2#1 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ return tmp;
+version: 9 19
+end:
+
+start:
+w: 3
+t: i8 i16 i32 u8 u16 u32
+name: min
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the minimum value from two arguments
+inline:
+ #2#1 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ return tmp;
+version: 9 19
+end:
+
+start:
+w: 4
+t: i8 i16 i32 u8 u16 u32
+name: min
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the minimum value from two arguments
+inline:
+ #2#1 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w < v2.w ? v1.w : v2.w);
+ return tmp;
+version: 9 19
+end:
+
+start:
+w: 1, 2, 3, 4
+t: i8 i16 i32 i64 u8 u16 u32 u64
+name: min
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the minimum value from two arguments
+version: 20
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: max
+ret: #2#1
+arg: #2#1
+arg: #2#1
+comment:
+ Return the maximum value from two arguments
+version: 9
+end:
+
+start:
+w: 1
+t: i8 i16 i32 u8 u16 u32
+name: max
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the maximum value from two arguments
+inline:
+ return (v1 > v2 ? v1 : v2);
+version: 9 19
+end:
+
+start:
+w: 2
+t: i8 i16 i32 u8 u16 u32
+name: max
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the maximum value from two arguments
+inline:
+ #2#1 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ return tmp;
+version: 9 19
+end:
+
+start:
+w: 3
+t: i8 i16 i32 u8 u16 u32
+name: max
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the maximum value from two arguments
+inline:
+ #2#1 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ return tmp;
+version: 9 19
+end:
+
+start:
+w: 4
+t: i8 i16 i32 u8 u16 u32
+name: max
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the maximum value from two arguments
+inline:
+ #2#1 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w > v2.w ? v1.w : v2.w);
+ return tmp;
+version: 9 19
+end:
+
+start:
+w: 1, 2, 3, 4
+t: i8 i16 i32 i64 u8 u16 u32 u64
+name: max
+ret: #2#1
+arg: #2#1 v1
+arg: #2#1 v2
+comment:
+ Return the maximum value from two arguments
+version: 20
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: clamp
+ret: #2#1
+arg: #2#1 value
+arg: #2#1 min_value
+arg: #2#1 max_value
+comment:
+ Clamp a value to a specified high and low bound.
+
+ @param amount value to be clamped.  Supports 1,2,3,4 components
+ @param min_value Lower bound, must be scalar or matching vector.
+ @param max_value High bound, must match type of low
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: clamp
+ret: #2#1
+arg: #2#1 value
+arg: #2 min_value
+arg: #2 max_value
+comment:
+ Clamp a value to a specified high and low bound.
+
+ @param amount value to be clamped.  Supports 1,2,3,4 components
+ @param min_value Lower bound, must be scalar or matching vector.
+ @param max_value High bound, must match type of low
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: u8, u16, u32, u64, i8, i16, i32, i64
+name: clamp
+ret: #2#1
+arg: #2#1 value
+arg: #2#1 min_value
+arg: #2#1 max_value
+comment:
+ Clamp a value to a specified high and low bound.
+
+ @param amount value to be clamped.  Supports 1,2,3,4 components
+ @param min_value Lower bound, must be scalar or matching vector.
+ @param max_value High bound, must match type of low
+version: 19
+end:
+
+start:
+w: 1, 2, 3, 4
+t: u8, u16, u32, u64, i8, i16, i32, i64
+name: clamp
+ret: #2#1
+arg: #2#1 value
+arg: #2 min_value
+arg: #2 max_value
+comment:
+ Clamp a value to a specified high and low bound.
+
+ @param amount value to be clamped.  Supports 1,2,3,4 components
+ @param min_value Lower bound, must be scalar or matching vector.
+ @param max_value High bound, must match type of low
+version: 19
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: degrees
+ret: #2#1
+arg: #2#1 value
+comment:
+ Convert from radians to degrees.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: mix
+ret: #2#1
+arg: #2#1 start
+arg: #2#1 stop
+arg: #2#1 amount
+comment:
+ return start + ((stop - start) * amount)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: mix
+ret: #2#1
+arg: #2#1 start
+arg: #2#1 stop
+arg: #2 amount
+comment:
+ return start + ((stop - start) * amount)
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: radians
+ret: #2#1
+arg: #2#1 value
+comment:
+ Convert from degrees to radians.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: step
+ret: #2#1
+arg: #2#1 edge
+arg: #2#1 v
+comment:
+ if (v < edge)
+     return 0.f;
+ else
+     return 1.f;
+version: 9
+end:
+
+start:
+w: 2, 3, 4
+t: f32
+name: step
+ret: #2#1
+arg: #2#1 edge
+arg: #2 v
+comment:
+ if (v < edge)
+     return 0.f;
+ else
+     return 1.f;
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: sign
+ret: #2#1
+arg: #2#1 v
+comment:
+ Return the sign of a value.
+
+ if (v < 0) return -1.f;
+ else if (v > 0) return 1.f;
+ else return 0.f;
+version: 9
+end:
+
+start:
+w: 3, 4
+t: f32
+name: cross
+ret: #2#1
+arg: #2#1 lhs
+arg: #2#1 rhs
+comment:
+ Compute the cross product of two vectors.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: dot
+ret: #2
+arg: #2#1 lhs
+arg: #2#1 rhs
+comment:
+ Compute the dot product of two vectors.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: length
+ret: #2
+arg: #2#1 v
+comment:
+ Compute the length of a vector.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: distance
+ret: #2
+arg: #2#1 lhs
+arg: #2#1 rhs
+comment:
+ Compute the distance between two points.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: normalize
+ret: #2#1
+arg: #2#1 v
+comment:
+ Normalize a vector.
+version: 9
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: half_recip
+ret: #2#1
+arg: #2#1 v
+comment:
+ Return the approximate reciprocal of a value.
+version: 17
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: half_sqrt
+ret: #2#1
+arg: #2#1 v
+comment:
+ Return the approximate square root of a value.
+version: 17
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: half_rsqrt
+ret: #2#1
+arg: #2#1 v
+comment:
+ Return the approximate value of (1.f / sqrt(value)).
+version: 17
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fast_length
+ret: #2
+arg: #2#1 v
+comment:
+ Compute the approximate length of a vector.
+version: 17
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fast_distance
+ret: #2
+arg: #2#1 lhs
+arg: #2#1 rhs
+comment:
+ Compute the approximate distance between two points.
+version: 17
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: fast_normalize
+ret: #2#1
+arg: #2#1 v
+comment:
+ Approximately normalize a vector.
+version: 17
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: native_exp
+ret: #2#1
+arg: #2#1 v
+comment:
+ Fast approximate exp
+ valid for inputs -86.f to 86.f
+ Max 8192 ulps of error
+version: 18
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: native_exp2
+ret: #2#1
+arg: #2#1 v
+comment:
+ Fast approximate exp2
+ valid for inputs -125.f to 125.f
+ Max 8192 ulps of error
+version: 18
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: native_exp10
+ret: #2#1
+arg: #2#1 v
+comment:
+ Fast approximate exp10
+ valid for inputs -37.f to 37.f
+ Max 8192 ulps of error
+version: 18
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: native_log
+ret: #2#1
+arg: #2#1 v
+comment:
+ Fast approximate log
+version: 18
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: native_log2
+ret: #2#1
+arg: #2#1 v
+comment:
+ Fast approximate log2
+version: 18
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: native_log10
+ret: #2#1
+arg: #2#1 v
+comment:
+ Fast approximate log10
+version: 18
+end:
+
+start:
+w: 1, 2, 3, 4
+t: f32
+name: native_powr
+ret: #2#1
+arg: #2#1 v
+arg: #2#1 y
+comment:
+ Fast approximate v ^ y
+version: 18
+end:
+
+
diff --git a/cpp/Android.mk b/cpp/Android.mk
index 9ed02fb..a5d6a69 100644
--- a/cpp/Android.mk
+++ b/cpp/Android.mk
@@ -21,9 +21,11 @@
   RS_VERSION := "(1 + $(PLATFORM_SDK_VERSION))"
 endif
 local_cflags_for_rs_cpp += -DRS_VERSION=$(RS_VERSION)
+local_cflags_for_rs_cpp += -Wno-unused-parameter
 
 LOCAL_SRC_FILES := $(rs_cpp_SRC_FILES)
 
+LOCAL_CLANG := true
 LOCAL_CFLAGS += $(local_cflags_for_rs_cpp)
 
 LOCAL_SHARED_LIBRARIES := \
@@ -47,6 +49,7 @@
 
 include $(CLEAR_VARS)
 
+LOCAL_CLANG := true
 LOCAL_CFLAGS += $(local_cflags_for_rs_cpp)
 
 LOCAL_SDK_VERSION := 8
diff --git a/java/Android.mk b/java/Android.mk
index 6145a3d..c8f64ce 100644
--- a/java/Android.mk
+++ b/java/Android.mk
@@ -1,3 +1,7 @@
 LOCAL_PATH:=$(call my-dir)
 
+# Only build our tests if we doing a top-level build. Do not build the
+# tests if we are just doing an mm or mmm in frameworks/rs.
+ifeq (,$(ONE_SHOT_MAKEFILE))
 include $(call all-makefiles-under,$(LOCAL_PATH))
+endif
diff --git a/java/tests/Balls/src/com/example/android/rs/balls/ball_physics.rs b/java/tests/Balls/src/com/example/android/rs/balls/ball_physics.rs
index 5b5d2e0..a8c781d 100644
--- a/java/tests/Balls/src/com/example/android/rs/balls/ball_physics.rs
+++ b/java/tests/Balls/src/com/example/android/rs/balls/ball_physics.rs
@@ -60,11 +60,11 @@
             float2 vec2 = vec * vec;
             float len2 = vec2.x + vec2.y;
 
-            if ((len2 < 10000.f) && (len2 > 0.f)) {
-                float t = native_powr(len2, 1.5f) + 16.0f;
-                float2 pfv = (vec / t) * 16000.f;
-                pressure += length(pfv);
-                fv -= pfv;
+            if ((len2 < 10000.f) && (len2 > 0.001f)) {
+                float len = rsqrt(len2 + 4.f);
+                float f = (len * len * len) * 20000.f;
+                fv -= vec * f;
+                pressure += f;
             }
         }
     }
@@ -137,7 +137,7 @@
     }
 
     // low pressure ~500, high ~2500
-    pressure = max(pressure - 400.f, 0.f);
+    pressure *= 12.f;
     ball->pressure = pressure;
 
     //rsDebug("p ", pressure);
diff --git a/java/tests/Balls/src/com/example/android/rs/balls/balls.rs b/java/tests/Balls/src/com/example/android/rs/balls/balls.rs
index 9be9f38..077916d 100644
--- a/java/tests/Balls/src/com/example/android/rs/balls/balls.rs
+++ b/java/tests/Balls/src/com/example/android/rs/balls/balls.rs
@@ -46,8 +46,9 @@
     int2 gridDims = (int2){ rsAllocationGetDimX(gGrid),
                             rsAllocationGetDimY(gGrid) };
 
-    rs_allocation ain = rsGetAllocation(balls);
-    int32_t dimX = rsAllocationGetDimX(ain);
+    rs_allocation aNull;  // Empty rs_allocation, since we don't have an input.
+    rs_allocation aout = rsGetAllocation(balls);
+    int32_t dimX = rsAllocationGetDimX(aout);
 
     // Binning
     // Clear the particle list
@@ -92,7 +93,7 @@
     }
 
 
-    rsForEach(physics_script, ain, ain);
+    rsForEach(physics_script, aNull, aout);
 
     for (uint32_t ct=0; ct < dimX; ct++) {
         point[ct].position = balls[ct].position;
diff --git a/java/tests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java b/java/tests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
index 1a36417..77f554a 100644
--- a/java/tests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
+++ b/java/tests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
@@ -112,7 +112,6 @@
      * Define enum type for test names
      */
     public enum TestName {
-        // totally there are 38 test cases
         LEVELS_VEC3_RELAXED ("Levels Vec3 Relaxed"),
         LEVELS_VEC4_RELAXED ("Levels Vec4 Relaxed"),
         LEVELS_VEC3_FULL ("Levels Vec3 Full"),
@@ -169,8 +168,6 @@
         }
     }
 
-    Bitmap mBitmapIn;
-    Bitmap mBitmapIn2;
     Bitmap mBitmapOut;
 
     private Spinner mSpinner;
@@ -423,7 +420,7 @@
             break;
         }
 
-        mTest.createBaseTest(this, mBitmapIn, mBitmapIn2, mBitmapOut);
+        mTest.createBaseTest(this);
         setupBars();
 
         mTest.runTest();
@@ -448,10 +445,15 @@
             };
 
     void init() {
-        mBitmapIn = loadBitmap(R.drawable.img1600x1067);
-        mBitmapIn2 = loadBitmap(R.drawable.img1600x1067b);
-        mBitmapOut = Bitmap.createBitmap(mBitmapIn.getWidth(), mBitmapIn.getHeight(),
-                                         mBitmapIn.getConfig());
+        mRS = RenderScript.create(this);
+        mInPixelsAllocation = Allocation.createFromBitmapResource(
+                mRS, getResources(), R.drawable.img1600x1067);
+        mInPixelsAllocation2 = Allocation.createFromBitmapResource(
+                mRS, getResources(), R.drawable.img1600x1067b);
+        mBitmapOut = Bitmap.createBitmap(mInPixelsAllocation.getType().getX(),
+                                         mInPixelsAllocation.getType().getY(),
+                                         Bitmap.Config.ARGB_8888);
+        mOutPixelsAllocation = Allocation.createFromBitmap(mRS, mBitmapOut);
 
         mDisplayView = (ImageView) findViewById(R.id.display);
         mDisplayView.setImageBitmap(mBitmapOut);
@@ -482,21 +484,6 @@
         mBenchmarkResult = (TextView) findViewById(R.id.benchmarkText);
         mBenchmarkResult.setText("Result: not run");
 
-
-        mRS = RenderScript.create(this);
-        mInPixelsAllocation = Allocation.createFromBitmap(mRS, mBitmapIn,
-                                                          Allocation.MipmapControl.MIPMAP_NONE,
-                                                          Allocation.USAGE_SHARED |
-                                                          Allocation.USAGE_GRAPHICS_TEXTURE |
-                                                          Allocation.USAGE_SCRIPT);
-        mInPixelsAllocation2 = Allocation.createFromBitmap(mRS, mBitmapIn2,
-                                                           Allocation.MipmapControl.MIPMAP_NONE,
-                                                           Allocation.USAGE_SHARED |
-                                                           Allocation.USAGE_GRAPHICS_TEXTURE |
-                                                           Allocation.USAGE_SCRIPT);
-        mOutPixelsAllocation = Allocation.createFromBitmap(mRS, mBitmapOut);
-
-
         setupTests();
         changeTest(TestName.LEVELS_VEC3_RELAXED);
     }
@@ -518,8 +505,6 @@
         mInPixelsAllocation = null;
         mInPixelsAllocation2 = null;
         mOutPixelsAllocation = null;
-        mBitmapIn = null;
-        mBitmapIn2 = null;
         mBitmapOut = null;
     }
 
@@ -546,12 +531,6 @@
         init();
     }
 
-    private Bitmap loadBitmap(int resource) {
-        final BitmapFactory.Options options = new BitmapFactory.Options();
-        options.inPreferredConfig = Bitmap.Config.ARGB_8888;
-        return BitmapFactory.decodeResource(getResources(), resource, options);
-    }
-
     // button hook
     public void benchmark(View v) {
         float t = getBenchmark();
diff --git a/java/tests/ImageProcessing/src/com/android/rs/image/TestBase.java b/java/tests/ImageProcessing/src/com/android/rs/image/TestBase.java
index a353d9c..cfa9897 100644
--- a/java/tests/ImageProcessing/src/com/android/rs/image/TestBase.java
+++ b/java/tests/ImageProcessing/src/com/android/rs/image/TestBase.java
@@ -19,9 +19,7 @@
 import android.app.Activity;
 import android.content.Context;
 import android.os.Bundle;
-import android.graphics.BitmapFactory;
 import android.graphics.Bitmap;
-import android.graphics.Canvas;
 import android.renderscript.ScriptC;
 import android.renderscript.RenderScript;
 import android.renderscript.Type;
@@ -104,7 +102,7 @@
         return false;
     }
 
-    public final void createBaseTest(ImageProcessingActivity ipact, Bitmap b, Bitmap b2, Bitmap outb) {
+    public final void createBaseTest(ImageProcessingActivity ipact) {
         act = ipact;
         mRS = ipact.mRS;
         mRS.setMessageHandler(new MessageProcessor(act));
diff --git a/java/tests/ImageProcessing_jb/src/com/android/rs/image/Blend.java b/java/tests/ImageProcessing_jb/src/com/android/rs/image/Blend.java
index 098830b..63c0c9c 100644
--- a/java/tests/ImageProcessing_jb/src/com/android/rs/image/Blend.java
+++ b/java/tests/ImageProcessing_jb/src/com/android/rs/image/Blend.java
@@ -121,10 +121,10 @@
         image2.copy2DRangeFrom(0, 0, mInPixelsAllocation2.getType().getX(), mInPixelsAllocation2.getType().getY(), mInPixelsAllocation2, 0, 0);
 
         mBlendHelper.set_alpha(image1Alpha);
-        mBlendHelper.forEach_setImageAlpha(image1);
+        mBlendHelper.forEach_setImageAlpha(image1, image1);
 
         mBlendHelper.set_alpha(image2Alpha);
-        mBlendHelper.forEach_setImageAlpha(image2);
+        mBlendHelper.forEach_setImageAlpha(image2, image2);
 
         switch (currentIntrinsic) {
         case 0:
diff --git a/java/tests/ImageProcessing_jb/src/com/android/rs/image/blend.rs b/java/tests/ImageProcessing_jb/src/com/android/rs/image/blend.rs
index 63e7ea5..3f2fdc5 100644
--- a/java/tests/ImageProcessing_jb/src/com/android/rs/image/blend.rs
+++ b/java/tests/ImageProcessing_jb/src/com/android/rs/image/blend.rs
@@ -17,8 +17,10 @@
 
 uchar alpha = 0x0;
 
-void setImageAlpha(uchar4 *v_out, uint32_t x, uint32_t y) {
-  v_out->rgba = convert_uchar4((convert_uint4(v_out->rgba) * alpha) >> (uint4)8);
-  v_out->a = alpha;
+uchar4 __attribute__((kernel)) setImageAlpha(uchar4 in, uint32_t x, uint32_t y) {
+    uchar4 out;
+    out.rgba = convert_uchar4((convert_uint4(in.rgba) * alpha) >> (uint4)8);
+    out.a = alpha;
+    return out;
 }
 
diff --git a/java/tests/LivePreview/src/com/android/rs/livepreview/RsYuv.java b/java/tests/LivePreview/src/com/android/rs/livepreview/RsYuv.java
index 12d3185..15cd72a 100644
--- a/java/tests/LivePreview/src/com/android/rs/livepreview/RsYuv.java
+++ b/java/tests/LivePreview/src/com/android/rs/livepreview/RsYuv.java
@@ -27,6 +27,7 @@
 import android.renderscript.RenderScript;
 import android.util.Log;
 import android.view.TextureView;
+import android.view.Surface;
 import android.view.View;
 
 import android.content.res.Resources;
@@ -44,7 +45,7 @@
     private ScriptC_yuv mScript;
     private ScriptIntrinsicYuvToRGB mYuv;
     private boolean mHaveSurface;
-    private SurfaceTexture mSurface;
+    private Surface mSurface;
     private ScriptGroup mGroup;
 
     RsYuv(RenderScript rs) {
@@ -55,7 +56,7 @@
 
     void setupSurface() {
         if (mAllocationOut != null) {
-            mAllocationOut.setSurfaceTexture(mSurface);
+            mAllocationOut.setSurface(mSurface);
         }
         if (mSurface != null) {
             mHaveSurface = true;
@@ -116,7 +117,7 @@
 
             //mYuv.forEach(mAllocationOut);
             //mScript.forEach_root(mAllocationOut, mAllocationOut);
-            mAllocationOut.ioSendOutput();
+            mAllocationOut.ioSend();
         }
     }
 
@@ -125,21 +126,21 @@
     @Override
     public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
         android.util.Log.v("cpa", "onSurfaceTextureAvailable " + surface);
-        mSurface = surface;
+        mSurface = new Surface(surface);
         setupSurface();
     }
 
     @Override
     public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
         android.util.Log.v("cpa", "onSurfaceTextureSizeChanged " + surface);
-        mSurface = surface;
+        mSurface = new Surface(surface);
         setupSurface();
     }
 
     @Override
     public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
         android.util.Log.v("cpa", "onSurfaceTextureDestroyed " + surface);
-        mSurface = surface;
+        mSurface = null;
         setupSurface();
         return true;
     }
diff --git a/java/tests/SampleTest/src/com/android/rs/sample/SampleRSActivity.java b/java/tests/SampleTest/src/com/android/rs/sample/SampleRSActivity.java
index dd4a98a..feaa81d 100644
--- a/java/tests/SampleTest/src/com/android/rs/sample/SampleRSActivity.java
+++ b/java/tests/SampleTest/src/com/android/rs/sample/SampleRSActivity.java
@@ -157,7 +157,7 @@
         long t = java.lang.System.currentTimeMillis();
         mScript.invoke_setSampleData(alloc, mTwoByTwoAlloc, sampler);
         mScript.forEach_root(alloc);
-        alloc.ioSendOutput();
+        alloc.ioSend();
         mRS.finish();
         t = java.lang.System.currentTimeMillis() - t;
         Log.i(TAG, "Filter time is: " + t + " ms");
diff --git a/rs.h b/rs.h
index 566d9ea..e31762d 100644
--- a/rs.h
+++ b/rs.h
@@ -45,10 +45,10 @@
     // Allocation update
     const void* rsaAllocationGetType(RsContext con, RsAllocation va);
     // Type update
-    void rsaTypeGetNativeData(RsContext, RsType, uint32_t *typeData, uint32_t typeDataSize);
+    void rsaTypeGetNativeData(RsContext, RsType, uintptr_t *typeData, uint32_t typeDataSize);
     // Element update
-    void rsaElementGetNativeData(RsContext, RsElement, uint32_t *elemData, uint32_t elemDataSize);
-    void rsaElementGetSubElements(RsContext, RsElement, uint32_t *ids, const char **names,
+    void rsaElementGetNativeData(RsContext, RsElement, uintptr_t *elemData, uint32_t elemDataSize);
+    void rsaElementGetSubElements(RsContext, RsElement, uintptr_t *ids, const char **names,
                                   uint32_t *arraySizes, uint32_t dataSize);
 
     RsDevice rsDeviceCreate();
diff --git a/rs.spec b/rs.spec
index d765866..6ce258a 100644
--- a/rs.spec
+++ b/rs.spec
@@ -105,6 +105,7 @@
 
 ObjDestroy {
     param RsAsyncVoidPtr objPtr
+    handcodeApi
     }
 
 ElementCreate {
diff --git a/rsAllocation.cpp b/rsAllocation.cpp
index bb7fc17..d4cecd0 100644
--- a/rsAllocation.cpp
+++ b/rsAllocation.cpp
@@ -99,8 +99,10 @@
     const size_t eSize = mHal.state.type->getElementSizeBytes();
 
     if ((count * eSize) != sizeBytes) {
-        ALOGE("Allocation::subData called with mismatched size expected %zu, got %zu",
-             (count * eSize), sizeBytes);
+        char buf[1024];
+        sprintf(buf, "Allocation::subData called with mismatched size expected %zu, got %zu",
+                (count * eSize), sizeBytes);
+        rsc->setError(RS_ERROR_BAD_VALUE, buf);
         mHal.state.type->dumpLOGV("type info");
         return;
     }
@@ -127,8 +129,10 @@
     const size_t eSize = mHal.state.type->getElementSizeBytes();
 
     if ((count * eSize) != sizeBytes) {
-        ALOGE("Allocation::read called with mismatched size expected %zu, got %zu",
-             (count * eSize), sizeBytes);
+        char buf[1024];
+        sprintf(buf, "Allocation::read called with mismatched size expected %zu, got %zu",
+                (count * eSize), sizeBytes);
+        rsc->setError(RS_ERROR_BAD_VALUE, buf);
         mHal.state.type->dumpLOGV("type info");
         return;
     }
@@ -144,8 +148,9 @@
         stride = lineSize;
     } else {
         if ((lineSize * h) != sizeBytes) {
-            ALOGE("Allocation size mismatch, expected %zu, got %zu", (lineSize * h), sizeBytes);
-            rsAssert(!"Allocation::read called with mismatched size");
+            char buf[1024];
+            sprintf(buf, "Allocation size mismatch, expected %zu, got %zu", (lineSize * h), sizeBytes);
+            rsc->setError(RS_ERROR_BAD_VALUE, buf);
             return;
         }
     }
@@ -170,13 +175,11 @@
     size_t eSize = mHal.state.elementSizeBytes;
 
     if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
-        ALOGE("Error Allocation::subElementData component %i out of range.", cIdx);
         rsc->setError(RS_ERROR_BAD_VALUE, "subElementData component out of range.");
         return;
     }
 
     if (x >= mHal.drvState.lod[0].dimX) {
-        ALOGE("Error Allocation::subElementData X offset %i out of range.", x);
         rsc->setError(RS_ERROR_BAD_VALUE, "subElementData X offset out of range.");
         return;
     }
@@ -184,7 +187,6 @@
     const Element * e = mHal.state.type->getElement()->getField(cIdx);
     uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
     if (sizeBytes != e->getSizeBytes() * elemArraySize) {
-        ALOGE("Error Allocation::subElementData data size %zu does not match field size %zu.", sizeBytes, e->getSizeBytes());
         rsc->setError(RS_ERROR_BAD_VALUE, "subElementData bad size.");
         return;
     }
@@ -198,19 +200,16 @@
     size_t eSize = mHal.state.elementSizeBytes;
 
     if (x >= mHal.drvState.lod[0].dimX) {
-        ALOGE("Error Allocation::subElementData X offset %i out of range.", x);
         rsc->setError(RS_ERROR_BAD_VALUE, "subElementData X offset out of range.");
         return;
     }
 
     if (y >= mHal.drvState.lod[0].dimY) {
-        ALOGE("Error Allocation::subElementData X offset %i out of range.", x);
         rsc->setError(RS_ERROR_BAD_VALUE, "subElementData X offset out of range.");
         return;
     }
 
     if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
-        ALOGE("Error Allocation::subElementData component %i out of range.", cIdx);
         rsc->setError(RS_ERROR_BAD_VALUE, "subElementData component out of range.");
         return;
     }
@@ -218,7 +217,6 @@
     const Element * e = mHal.state.type->getElement()->getField(cIdx);
     uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
     if (sizeBytes != e->getSizeBytes() * elemArraySize) {
-        ALOGE("Error Allocation::subElementData data size %zu does not match field size %zu.", sizeBytes, e->getSizeBytes());
         rsc->setError(RS_ERROR_BAD_VALUE, "subElementData bad size.");
         return;
     }
@@ -360,7 +358,8 @@
     // First make sure we are reading the correct object
     RsA3DClassID classID = (RsA3DClassID)stream->loadU32();
     if (classID != RS_A3D_CLASS_ID_ALLOCATION) {
-        ALOGE("allocation loading skipped due to invalid class id\n");
+        rsc->setError(RS_ERROR_FATAL_DRIVER,
+                      "allocation loading failed due to corrupt file. (invalid id)\n");
         return NULL;
     }
 
@@ -381,7 +380,8 @@
     uint32_t packedSize = alloc->getPackedSize();
     if (dataSize != type->getPackedSizeBytes() &&
         dataSize != packedSize) {
-        ALOGE("failed to read allocation because numbytes written is not the same loaded type wants\n");
+        rsc->setError(RS_ERROR_FATAL_DRIVER,
+                      "allocation loading failed due to corrupt file. (invalid size)\n");
         ObjectBase::checkDelete(alloc);
         ObjectBase::checkDelete(type);
         return NULL;
@@ -455,7 +455,7 @@
 }
 
 void Allocation::resize2D(Context *rsc, uint32_t dimX, uint32_t dimY) {
-    ALOGE("not implemented");
+    rsc->setError(RS_ERROR_FATAL_DRIVER, "resize2d not implemented");
 }
 
 #ifndef RS_COMPATIBILITY_LIB
diff --git a/rsContext.cpp b/rsContext.cpp
index 01debb2..0ef524c 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -19,6 +19,8 @@
 #include "rsContext.h"
 #include "rsThreadIO.h"
 
+#include "rsgApiStructs.h"
+
 #ifndef RS_COMPATIBILITY_LIB
 #include "rsMesh.h"
 #include <ui/FramebufferNativeWindow.h>
@@ -319,14 +321,14 @@
 #define OVERRIDE_RS_DRIVER_STRING STR(OVERRIDE_RS_DRIVER)
 
     if (getProp("debug.rs.default-CPU-driver") != 0) {
-        ALOGE("Skipping override driver and loading default CPU driver");
+        ALOGD("Skipping override driver and loading default CPU driver");
     } else if (rsc->mForceCpu) {
         ALOGV("Application requested CPU execution");
     } else if (rsc->getContextType() == RS_CONTEXT_TYPE_DEBUG) {
         ALOGV("Application requested debug context");
     } else {
         if (loadRuntime(OVERRIDE_RS_DRIVER_STRING, rsc)) {
-            ALOGE("Successfully loaded runtime: %s", OVERRIDE_RS_DRIVER_STRING);
+            ALOGV("Successfully loaded runtime: %s", OVERRIDE_RS_DRIVER_STRING);
             loadDefault = false;
         } else {
             ALOGE("Failed to load runtime %s, loading default", OVERRIDE_RS_DRIVER_STRING);
@@ -910,6 +912,32 @@
     rsc->sendMessageToClient(data, RS_MESSAGE_TO_CLIENT_USER, id, len, true);
 }
 
+// implementation of handcode LF_ObjDestroy
+// required so nObjDestroy can be run from finalizer without blocking
+void LF_ObjDestroy_handcode(const Context *rsc, RsAsyncVoidPtr objPtr) {
+    if (((Context *)rsc)->isSynchronous()) {
+        rsi_ObjDestroy((Context *)rsc, objPtr);
+        return;
+    }
+
+    // struct has two parts:
+    // RsPlaybackRemoteHeader (cmdID and bytes)
+    // RS_CMD_ObjDestroy (ptr)
+    struct destroyCmd {
+        uint32_t cmdID;
+        uint32_t bytes;
+        RsAsyncVoidPtr ptr;
+     };
+
+    destroyCmd cmd;
+    cmd.cmdID = RS_CMD_ID_ObjDestroy;
+    cmd.bytes = sizeof(RsAsyncVoidPtr);
+    cmd.ptr = objPtr;
+    ThreadIO *io = &((Context *)rsc)->mIO;
+    io->coreWrite((void*)&cmd, sizeof(destroyCmd));
+
+}
+
 }
 }
 
@@ -946,3 +974,4 @@
     ObjectBase *ob = static_cast<ObjectBase *>(obj);
     (*name) = ob->getName();
 }
+
diff --git a/rsContext.h b/rsContext.h
index ab56c27..d21227e 100644
--- a/rsContext.h
+++ b/rsContext.h
@@ -312,6 +312,8 @@
     uint32_t mAverageFPS;
 };
 
+void LF_ObjDestroy_handcode(const Context *rsc, RsAsyncVoidPtr objPtr);
+
 } // renderscript
 } // android
 #endif
diff --git a/rsg_generator.c b/rsg_generator.c
index fd531b6..bbaaeb4 100644
--- a/rsg_generator.c
+++ b/rsg_generator.c
@@ -226,6 +226,21 @@
                 fprintf(f, "%s", vt->name);
             }
             fprintf(f, ");\n");
+        } else if (api->handcodeApi) {
+            // handle handcode path
+            fprintf(f, "    LF_%s_handcode(", api->name);
+            if (!api->nocontext) {
+                fprintf(f, "(Context *)rsc");
+            }
+            for (ct2=0; ct2 < api->paramCount; ct2++) {
+                const VarType *vt = &api->params[ct2];
+                if (ct2 > 0 || !api->nocontext) {
+                    fprintf(f, ", ");
+                }
+                fprintf(f, "%s", vt->name);
+            }
+            fprintf(f, ");\n");
+
         } else {
             // handle synchronous path
             fprintf(f, "    if (((Context *)rsc)->isSynchronous()) {\n");
diff --git a/scriptc/rs_cl.rsh b/scriptc/rs_cl.rsh
deleted file mode 100644
index 7ba2cb6..0000000
--- a/scriptc/rs_cl.rsh
+++ /dev/null
@@ -1,1122 +0,0 @@
-/*
- * Copyright (C) 2011-2012 The Android Open Source Project
- *
- * 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.
- */
-
-/** @file rs_cl.rsh
- *  \brief Basic math functions
- *
- *
- */
-
-#ifndef __RS_CL_RSH__
-#define __RS_CL_RSH__
-
-// Conversions
-#define CVT_FUNC_2(typeout, typein)                             \
-_RS_RUNTIME typeout##2 __attribute__((const, overloadable))     \
-        convert_##typeout##2(typein##2 v);                      \
-_RS_RUNTIME typeout##3 __attribute__((const, overloadable))     \
-        convert_##typeout##3(typein##3 v);                      \
-_RS_RUNTIME typeout##4 __attribute__((const, overloadable))     \
-        convert_##typeout##4(typein##4 v);
-
-
-#define CVT_FUNC(type)  CVT_FUNC_2(type, uchar)     \
-                        CVT_FUNC_2(type, char)      \
-                        CVT_FUNC_2(type, ushort)    \
-                        CVT_FUNC_2(type, short)     \
-                        CVT_FUNC_2(type, uint)      \
-                        CVT_FUNC_2(type, int)       \
-                        CVT_FUNC_2(type, float)
-
-/**
- * Convert to char.
- *
- * Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-CVT_FUNC(char)
-
-/**
- * Convert to unsigned char.
- *
- * Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-CVT_FUNC(uchar)
-
-/**
- * Convert to short.
- *
- * Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-CVT_FUNC(short)
-
-/**
- * Convert to unsigned short.
- *
- * Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-CVT_FUNC(ushort)
-
-/**
- * Convert to int.
- *
- * Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-CVT_FUNC(int)
-
-/**
- * Convert to unsigned int.
- *
- * Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-CVT_FUNC(uint)
-
-/**
- * Convert to float.
- *
- * Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-CVT_FUNC(float)
-
-// Float ops, 6.11.2
-
-#ifdef DOXYGEN
-
-#define FN_FUNC_FN(fnc)
-#define F_FUNC_FN(fnc)
-#define IN_FUNC_FN(fnc)
-#define FN_FUNC_FN_FN(fnc)
-#define F_FUNC_FN_FN(fnc)
-#define FN_FUNC_FN_F(fnc)
-#define FN_FUNC_FN_IN(fnc)
-#define FN_FUNC_FN_I(fnc)
-#define FN_FUNC_FN_PFN(fnc)
-#define FN_FUNC_FN_PIN(fnc)
-#define FN_FUNC_FN_FN_FN(fnc)
-#define FN_FUNC_FN_FN_F(fnc)
-#define FN_FUNC_FN_F_F(fnc)
-#define FN_FUNC_FN_FN_PIN(fnc)
-
-#else
-
-#define FN_FUNC_FN(fnc)                                                \
-_RS_RUNTIME float2 __attribute__((const, overloadable)) fnc(float2 v); \
-_RS_RUNTIME float3 __attribute__((const, overloadable)) fnc(float3 v); \
-_RS_RUNTIME float4 __attribute__((const, overloadable)) fnc(float4 v);
-
-#define F_FUNC_FN(fnc)                                                \
-_RS_RUNTIME float __attribute__((const, overloadable)) fnc(float2 v); \
-_RS_RUNTIME float __attribute__((const, overloadable)) fnc(float3 v); \
-_RS_RUNTIME float __attribute__((const, overloadable)) fnc(float4 v);
-
-#define IN_FUNC_FN(fnc)                                              \
-_RS_RUNTIME int2 __attribute__((const, overloadable)) fnc(float2 v); \
-_RS_RUNTIME int3 __attribute__((const, overloadable)) fnc(float3 v); \
-_RS_RUNTIME int4 __attribute__((const, overloadable)) fnc(float4 v);
-
-#define FN_FUNC_FN_FN(fnc)                                                         \
-_RS_RUNTIME float2 __attribute__((const, overloadable)) fnc(float2 v1, float2 v2); \
-_RS_RUNTIME float3 __attribute__((const, overloadable)) fnc(float3 v1, float3 v2); \
-_RS_RUNTIME float4 __attribute__((const, overloadable)) fnc(float4 v1, float4 v2);
-
-#define F_FUNC_FN_FN(fnc)                                                         \
-_RS_RUNTIME float __attribute__((const, overloadable)) fnc(float2 v1, float2 v2); \
-_RS_RUNTIME float __attribute__((const, overloadable)) fnc(float3 v1, float3 v2); \
-_RS_RUNTIME float __attribute__((const, overloadable)) fnc(float4 v1, float4 v2);
-
-#define FN_FUNC_FN_F(fnc)                                                         \
-_RS_RUNTIME float2 __attribute__((const, overloadable)) fnc(float2 v1, float v2); \
-_RS_RUNTIME float3 __attribute__((const, overloadable)) fnc(float3 v1, float v2); \
-_RS_RUNTIME float4 __attribute__((const, overloadable)) fnc(float4 v1, float v2);
-
-#define FN_FUNC_FN_IN(fnc)                                                       \
-_RS_RUNTIME float2 __attribute__((const, overloadable)) fnc(float2 v1, int2 v2); \
-_RS_RUNTIME float3 __attribute__((const, overloadable)) fnc(float3 v1, int3 v2); \
-_RS_RUNTIME float4 __attribute__((const, overloadable)) fnc(float4 v1, int4 v2);
-
-#define FN_FUNC_FN_I(fnc)                                                       \
-_RS_RUNTIME float2 __attribute__((const, overloadable)) fnc(float2 v1, int v2); \
-_RS_RUNTIME float3 __attribute__((const, overloadable)) fnc(float3 v1, int v2); \
-_RS_RUNTIME float4 __attribute__((const, overloadable)) fnc(float4 v1, int v2);
-
-#define FN_FUNC_FN_PFN(fnc)                            \
-_RS_RUNTIME float2 __attribute__((pure, overloadable)) \
-        fnc(float2 v1, float2 *v2);                    \
-_RS_RUNTIME float3 __attribute__((pure, overloadable)) \
-        fnc(float3 v1, float3 *v2);                    \
-_RS_RUNTIME float4 __attribute__((pure, overloadable)) \
-        fnc(float4 v1, float4 *v2);
-
-#define FN_FUNC_FN_PIN(fnc)                                                      \
-_RS_RUNTIME float2 __attribute__((pure, overloadable)) fnc(float2 v1, int2 *v2); \
-_RS_RUNTIME float3 __attribute__((pure, overloadable)) fnc(float3 v1, int3 *v2); \
-_RS_RUNTIME float4 __attribute__((pure, overloadable)) fnc(float4 v1, int4 *v2);
-
-#define FN_FUNC_FN_FN_FN(fnc)                           \
-_RS_RUNTIME float2 __attribute__((const, overloadable)) \
-        fnc(float2 v1, float2 v2, float2 v3);           \
-_RS_RUNTIME float3 __attribute__((const, overloadable)) \
-        fnc(float3 v1, float3 v2, float3 v3);           \
-_RS_RUNTIME float4 __attribute__((const, overloadable)) \
-        fnc(float4 v1, float4 v2, float4 v3);
-
-#define FN_FUNC_FN_FN_F(fnc)                            \
-_RS_RUNTIME float2 __attribute__((const, overloadable)) \
-        fnc(float2 v1, float2 v2, float v3);            \
-_RS_RUNTIME float3 __attribute__((const, overloadable)) \
-        fnc(float3 v1, float3 v2, float v3);            \
-_RS_RUNTIME float4 __attribute__((const, overloadable)) \
-        fnc(float4 v1, float4 v2, float v3);
-
-#define FN_FUNC_FN_F_F(fnc)                             \
-_RS_RUNTIME float2 __attribute__((const, overloadable)) \
-        fnc(float2 v1, float v2, float v3);             \
-_RS_RUNTIME float3 __attribute__((const, overloadable)) \
-        fnc(float3 v1, float v2, float v3);             \
-_RS_RUNTIME float4 __attribute__((const, overloadable)) \
-        fnc(float4 v1, float v2, float v3);
-
-#define FN_FUNC_FN_FN_PIN(fnc)                         \
-_RS_RUNTIME float2 __attribute__((pure, overloadable)) \
-        fnc(float2 v1, float2 v2, int2 *v3);           \
-_RS_RUNTIME float3 __attribute__((pure, overloadable)) \
-        fnc(float3 v1, float3 v2, int3 *v3);           \
-_RS_RUNTIME float4 __attribute__((pure, overloadable)) \
-        fnc(float4 v1, float4 v2, int4 *v3);
-
-#endif  // DOXYGEN
-
-
-/**
- * Return the inverse cosine.
- *
- * Supports float, float2, float3, float4
- */
-extern float __attribute__((const, overloadable)) acos(float);
-FN_FUNC_FN(acos)
-
-/**
- * Return the inverse hyperbolic cosine.
- *
- * Supports float, float2, float3, float4
- */
-extern float __attribute__((const, overloadable)) acosh(float);
-FN_FUNC_FN(acosh)
-
-/**
- * Return the inverse cosine divided by PI.
- *
- * Supports float, float2, float3, float4
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) acospi(float v);
-FN_FUNC_FN(acospi)
-
-/**
- * Return the inverse sine.
- *
- * Supports float, float2, float3, float4
- */
-extern float __attribute__((const, overloadable)) asin(float);
-FN_FUNC_FN(asin)
-
-/**
- * Return the inverse hyperbolic sine.
- *
- * Supports float, float2, float3, float4
- */
-extern float __attribute__((const, overloadable)) asinh(float);
-FN_FUNC_FN(asinh)
-
-
-/**
- * Return the inverse sine divided by PI.
- *
- * Supports float, float2, float3, float4
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) asinpi(float v);
-FN_FUNC_FN(asinpi)
-
-/**
- * Return the inverse tangent.
- *
- * Supports float, float2, float3, float4
- */
-extern float __attribute__((const, overloadable)) atan(float);
-FN_FUNC_FN(atan)
-
-/**
- * Return the inverse tangent of y / x.
- *
- * Supports float, float2, float3, float4.  Both arguments must be of the same
- * type.
- *
- * @param y
- * @param x
- */
-extern float __attribute__((const, overloadable)) atan2(float y, float x);
-FN_FUNC_FN_FN(atan2)
-
-/**
- * Return the inverse hyperbolic tangent.
- *
- * Supports float, float2, float3, float4
- */
-extern float __attribute__((const, overloadable)) atanh(float);
-FN_FUNC_FN(atanh)
-
-/**
- * Return the inverse tangent divided by PI.
- *
- * Supports float, float2, float3, float4
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) atanpi(float v);
-FN_FUNC_FN(atanpi)
-
-/**
- * Return the inverse tangent of y / x, divided by PI.
- *
- * Supports float, float2, float3, float4.  Both arguments must be of the same
- * type.
- *
- * @param y
- * @param x
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) atan2pi(float y, float x);
-FN_FUNC_FN_FN(atan2pi)
-
-
-/**
- * Return the cube root.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) cbrt(float);
-FN_FUNC_FN(cbrt)
-
-/**
- * Return the smallest integer not less than a value.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) ceil(float);
-FN_FUNC_FN(ceil)
-
-/**
- * Copy the sign bit from y to x.
- *
- * Supports float, float2, float3, float4.  Both arguments must be of the same
- * type.
- *
- * @param x
- * @param y
- */
-extern float __attribute__((const, overloadable)) copysign(float x, float y);
-FN_FUNC_FN_FN(copysign)
-
-/**
- * Return the cosine.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) cos(float);
-FN_FUNC_FN(cos)
-
-/**
- * Return the hypebolic cosine.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) cosh(float);
-FN_FUNC_FN(cosh)
-
-/**
- * Return the cosine of the value * PI.
- *
- * Supports float, float2, float3, float4.
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) cospi(float v);
-FN_FUNC_FN(cospi)
-
-/**
- * Return the complementary error function.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) erfc(float);
-FN_FUNC_FN(erfc)
-
-/**
- * Return the error function.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) erf(float);
-FN_FUNC_FN(erf)
-
-/**
- * Return e ^ value.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) exp(float);
-FN_FUNC_FN(exp)
-
-/**
- * Return 2 ^ value.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) exp2(float);
-FN_FUNC_FN(exp2)
-
-/**
- * Return x ^ y.
- *
- * Supports float, float2, float3, float4. Both arguments must be of the same
- * type.
- */
-extern float __attribute__((const, overloadable)) pow(float x, float y);
-FN_FUNC_FN_FN(pow)
-
-/**
- * Return 10 ^ value.
- *
- * Supports float, float2, float3, float4.
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) exp10(float v);
-FN_FUNC_FN(exp10)
-
-/**
- * Return (e ^ value) - 1.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) expm1(float);
-FN_FUNC_FN(expm1)
-
-/**
- * Return the absolute value of a value.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) fabs(float);
-FN_FUNC_FN(fabs)
-
-/**
- * Return the positive difference between two values.
- *
- * Supports float, float2, float3, float4.  Both arguments must be of the same
- * type.
- */
-extern float __attribute__((const, overloadable)) fdim(float, float);
-FN_FUNC_FN_FN(fdim)
-
-/**
- * Return the smallest integer not greater than a value.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) floor(float);
-FN_FUNC_FN(floor)
-
-/**
- * Return a*b + c.
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) fma(float a, float b, float c);
-FN_FUNC_FN_FN_FN(fma)
-
-/**
- * Return (x < y ? y : x)
- *
- * Supports float, float2, float3, float4.
- * @param x: may be float, float2, float3, float4
- * @param y: may be float or vector.  If vector must match type of x.
- */
-extern float __attribute__((const, overloadable)) fmax(float x, float y);
-FN_FUNC_FN_FN(fmax);
-FN_FUNC_FN_F(fmax);
-
-/**
- * Return (x > y ? y : x)
- *
- * @param x: may be float, float2, float3, float4
- * @param y: may be float or vector.  If vector must match type of x.
- */
-extern float __attribute__((const, overloadable)) fmin(float x, float y);
-FN_FUNC_FN_FN(fmin);
-FN_FUNC_FN_F(fmin);
-
-/**
- * Return the remainder from x / y
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) fmod(float x, float y);
-FN_FUNC_FN_FN(fmod)
-
-/**
- * Return fractional part of v
- *
- * @param iptr  iptr[0] will be set to the floor of the input value.
- * Supports float, float2, float3, float4.
- */
-_RS_RUNTIME float __attribute__((pure, overloadable)) fract(float v, float *iptr);
-FN_FUNC_FN_PFN(fract)
-
-/**
- * Return fractional part of v
- *
- * Supports float, float2, float3, float4.
- */
-static inline float __attribute__((const, overloadable)) fract(float v) {
-    float unused;
-    return fract(v, &unused);
-}
-
-static inline float2 __attribute__((const, overloadable)) fract(float2 v) {
-    float2 unused;
-    return fract(v, &unused);
-}
-
-static inline float3 __attribute__((const, overloadable)) fract(float3 v) {
-    float3 unused;
-    return fract(v, &unused);
-}
-
-static inline float4 __attribute__((const, overloadable)) fract(float4 v) {
-    float4 unused;
-    return fract(v, &unused);
-}
-
-/**
- * Return the mantissa and place the exponent into iptr[0]
- *
- * @param v Supports float, float2, float3, float4.
- * @param iptr  Must have the same vector size as v.
- */
-extern float __attribute__((pure, overloadable)) frexp(float v, int *iptr);
-FN_FUNC_FN_PIN(frexp)
-
-/**
- * Return sqrt(x*x + y*y)
- *
- * Supports float, float2, float3, float4.
- */
-extern float __attribute__((const, overloadable)) hypot(float x, float y);
-FN_FUNC_FN_FN(hypot)
-
-/**
- * Return the integer exponent of a value
- *
- * Supports 1,2,3,4 components
- */
-extern int __attribute__((const, overloadable)) ilogb(float);
-IN_FUNC_FN(ilogb)
-
-/**
- * Return (x * 2^y)
- *
- * @param x Supports 1,2,3,4 components
- * @param y Supports single component or matching vector.
- */
-extern float __attribute__((const, overloadable)) ldexp(float x, int y);
-FN_FUNC_FN_IN(ldexp)
-FN_FUNC_FN_I(ldexp)
-
-/**
- * Return the log gamma
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) lgamma(float);
-FN_FUNC_FN(lgamma)
-
-/**
- * Return the log gamma and sign
- *
- * @param x Supports 1,2,3,4 components
- * @param y Supports matching vector.
- */
-extern float __attribute__((pure, overloadable)) lgamma(float x, int* y);
-FN_FUNC_FN_PIN(lgamma)
-
-/**
- * Return the natural logarithm
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) log(float);
-FN_FUNC_FN(log)
-
-/**
- * Return the base 10 logarithm
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) log10(float);
-FN_FUNC_FN(log10)
-
-/**
- * Return the base 2 logarithm
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) log2(float v);
-FN_FUNC_FN(log2)
-
-/**
- * Return the natural logarithm of (v + 1.0f)
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) log1p(float v);
-FN_FUNC_FN(log1p)
-
-/**
- * Compute the exponent of the value.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) logb(float);
-FN_FUNC_FN(logb)
-
-/**
- * Compute (a * b) + c
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) mad(float a, float b, float c);
-FN_FUNC_FN_FN_FN(mad)
-
-/**
- * Return the integral and fractional components of a number.
- * Supports 1,2,3,4 components
- *
- * @param x Source value
- * @param iret iret[0] will be set to the integral portion of the number.
- * @return The floating point portion of the value.
- */
-extern float __attribute__((pure, overloadable)) modf(float x, float *iret);
-FN_FUNC_FN_PFN(modf);
-
-extern float __attribute__((const, overloadable)) nan(uint);
-
-/**
- * Return the next floating point number from x towards y.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) nextafter(float x, float y);
-FN_FUNC_FN_FN(nextafter)
-
-/**
- * Return (v ^ p).
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) pown(float v, int p);
-FN_FUNC_FN_IN(pown)
-
-/**
- * Return (v ^ p).
- * @param v must be greater than 0.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) powr(float v, float p);
-FN_FUNC_FN_FN(powr)
-
-/**
- * Return round x/y to the nearest integer then compute the remander.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) remainder(float x, float y);
-FN_FUNC_FN_FN(remainder)
-
-// document once we know the precision of bionic
-extern float __attribute__((pure, overloadable)) remquo(float, float, int *);
-FN_FUNC_FN_FN_PIN(remquo)
-
-/**
- * Round to the nearest integral value.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) rint(float);
-FN_FUNC_FN(rint)
-
-/**
- * Compute the Nth root of a value.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) rootn(float v, int n);
-FN_FUNC_FN_IN(rootn)
-
-/**
- * Round to the nearest integral value.  Half values are rounded away from zero.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) round(float);
-FN_FUNC_FN(round)
-
-/**
- * Return the square root of a value.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) sqrt(float);
-FN_FUNC_FN(sqrt)
-
-/**
- * Return (1 / sqrt(value)).
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) rsqrt(float v);
-FN_FUNC_FN(rsqrt)
-
-/**
- * Return the sine of a value specified in radians.
- *
- * @param v The incoming value in radians
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) sin(float v);
-FN_FUNC_FN(sin)
-
-/**
- * Return the sine and cosine of a value.
- *
- * @return sine
- * @param v The incoming value in radians
- * @param *cosptr cosptr[0] will be set to the cosine value.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((pure, overloadable)) sincos(float v, float *cosptr);
-FN_FUNC_FN_PFN(sincos);
-
-/**
- * Return the hyperbolic sine of a value specified in radians.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) sinh(float);
-FN_FUNC_FN(sinh)
-
-/**
- * Return the sin(v * PI).
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) sinpi(float v);
-FN_FUNC_FN(sinpi)
-
-/**
- * Return the tangent of a value.
- *
- * Supports 1,2,3,4 components
- * @param v The incoming value in radians
- */
-extern float __attribute__((const, overloadable)) tan(float v);
-FN_FUNC_FN(tan)
-
-/**
- * Return the hyperbolic tangent of a value.
- *
- * Supports 1,2,3,4 components
- * @param v The incoming value in radians
- */
-extern float __attribute__((const, overloadable)) tanh(float);
-FN_FUNC_FN(tanh)
-
-/**
- * Return tan(v * PI)
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) tanpi(float v);
-FN_FUNC_FN(tanpi)
-
-/**
- * Compute the gamma function of a value.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) tgamma(float);
-FN_FUNC_FN(tgamma)
-
-/**
- * Round to integral using truncation.
- *
- * Supports 1,2,3,4 components
- */
-extern float __attribute__((const, overloadable)) trunc(float);
-FN_FUNC_FN(trunc)
-
-#ifdef DOXYGEN
-
-#define XN_FUNC_YN(typeout, fnc, typein)                                \
-extern typeout __attribute__((overloadable)) fnc(typein v);
-
-#define XN_FUNC_XN_XN_BODY(type, fnc, body)         \
-_RS_RUNTIME type __attribute__((overloadable))      \
-        fnc(type v1, type v2);
-
-#else
-
-#define XN_FUNC_YN(typeout, fnc, typein)                                      \
-extern typeout __attribute__((const, overloadable)) fnc(typein v);            \
-_RS_RUNTIME typeout##2 __attribute__((const, overloadable)) fnc(typein##2 v); \
-_RS_RUNTIME typeout##3 __attribute__((const, overloadable)) fnc(typein##3 v); \
-_RS_RUNTIME typeout##4 __attribute__((const, overloadable)) fnc(typein##4 v);
-
-#define XN_FUNC_XN_XN_BODY(type, fnc, body)              \
-_RS_RUNTIME type __attribute__((const, overloadable))    \
-        fnc(type v1, type v2);                           \
-_RS_RUNTIME type##2 __attribute__((const, overloadable)) \
-        fnc(type##2 v1, type##2 v2);                     \
-_RS_RUNTIME type##3 __attribute__((const, overloadable)) \
-        fnc(type##3 v1, type##3 v2);                     \
-_RS_RUNTIME type##4 __attribute__((const, overloadable)) \
-        fnc(type##4 v1, type##4 v2);
-
-#endif  // DOXYGEN
-
-#define UIN_FUNC_IN(fnc)          \
-XN_FUNC_YN(uchar, fnc, char)      \
-XN_FUNC_YN(ushort, fnc, short)    \
-XN_FUNC_YN(uint, fnc, int)
-
-#define IN_FUNC_IN(fnc)           \
-XN_FUNC_YN(uchar, fnc, uchar)     \
-XN_FUNC_YN(char, fnc, char)       \
-XN_FUNC_YN(ushort, fnc, ushort)   \
-XN_FUNC_YN(short, fnc, short)     \
-XN_FUNC_YN(uint, fnc, uint)       \
-XN_FUNC_YN(int, fnc, int)
-
-#define IN_FUNC_IN_IN_BODY(fnc, body)   \
-XN_FUNC_XN_XN_BODY(uchar, fnc, body)    \
-XN_FUNC_XN_XN_BODY(char, fnc, body)     \
-XN_FUNC_XN_XN_BODY(ushort, fnc, body)   \
-XN_FUNC_XN_XN_BODY(short, fnc, body)    \
-XN_FUNC_XN_XN_BODY(uint, fnc, body)     \
-XN_FUNC_XN_XN_BODY(int, fnc, body)      \
-XN_FUNC_XN_XN_BODY(float, fnc, body)
-
-/**
- * \fn uchar abs(char)
- * Return the absolute value of a value.
- *
- * Supports 1,2,3,4 components of char, short, int.
- */
-UIN_FUNC_IN(abs)
-
-/**
- * Return the number of leading 0-bits in a value.
- *
- * Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int.
- */
-IN_FUNC_IN(clz)
-
-/**
- * Return the minimum of two values.
- *
- * Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-IN_FUNC_IN_IN_BODY(min, (v1 < v2 ? v1 : v2))
-FN_FUNC_FN_F(min)
-
-/**
- * Return the maximum of two values.
- *
- * Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float.
- */
-IN_FUNC_IN_IN_BODY(max, (v1 > v2 ? v1 : v2))
-FN_FUNC_FN_F(max)
-
-/**
- *  Clamp a value to a specified high and low bound.
- *
- * @param amount value to be clamped.  Supports 1,2,3,4 components
- * @param low Lower bound, must be scalar or matching vector.
- * @param high High bound, must match type of low
- */
-
-#if !defined(RS_VERSION) || (RS_VERSION < 19)
-_RS_RUNTIME float __attribute__((const, overloadable)) clamp(float amount, float low, float high);
-FN_FUNC_FN_FN_FN(clamp)
-FN_FUNC_FN_F_F(clamp)
-#else
-#define _CLAMP(T)                                                                   \
-extern T __attribute__((overloadable)) clamp(T amount, T low, T high);              \
-extern T##2 __attribute__((overloadable)) clamp(T##2 amount, T##2 low, T##2 high);  \
-extern T##3 __attribute__((overloadable)) clamp(T##3 amount, T##3 low, T##3 high);  \
-extern T##4 __attribute__((overloadable)) clamp(T##4 amount, T##4 low, T##4 high);  \
-extern T##2 __attribute__((overloadable)) clamp(T##2 amount, T low, T high);        \
-extern T##3 __attribute__((overloadable)) clamp(T##3 amount, T low, T high);        \
-extern T##4 __attribute__((overloadable)) clamp(T##4 amount, T low, T high)
-
-_CLAMP(float);
-_CLAMP(double);
-_CLAMP(char);
-_CLAMP(uchar);
-_CLAMP(short);
-_CLAMP(ushort);
-_CLAMP(int);
-_CLAMP(uint);
-_CLAMP(long);
-_CLAMP(ulong);
-
-#undef _CLAMP
-#endif
-
-/**
- * Convert from radians to degrees.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) degrees(float radians);
-FN_FUNC_FN(degrees)
-
-/**
- * return start + ((stop - start) * amount);
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) mix(float start, float stop, float amount);
-FN_FUNC_FN_FN_FN(mix)
-FN_FUNC_FN_FN_F(mix)
-
-/**
- * Convert from degrees to radians.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) radians(float degrees);
-FN_FUNC_FN(radians)
-
-/**
- * if (v < edge)
- *     return 0.f;
- * else
- *     return 1.f;
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) step(float edge, float v);
-FN_FUNC_FN_FN(step)
-FN_FUNC_FN_F(step)
-
-// FIXME: not implemented
-#if 0
-extern float __attribute__((const, overloadable)) smoothstep(float, float, float);
-extern float2 __attribute__((const, overloadable)) smoothstep(float2, float2, float2);
-extern float3 __attribute__((const, overloadable)) smoothstep(float3, float3, float3);
-extern float4 __attribute__((const, overloadable)) smoothstep(float4, float4, float4);
-extern float2 __attribute__((const, overloadable)) smoothstep(float, float, float2);
-extern float3 __attribute__((const, overloadable)) smoothstep(float, float, float3);
-extern float4 __attribute__((const, overloadable)) smoothstep(float, float, float4);
-#endif
-
-/**
- * Return the sign of a value.
- *
- * if (v < 0) return -1.f;
- * else if (v > 0) return 1.f;
- * else return 0.f;
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) sign(float v);
-FN_FUNC_FN(sign)
-
-/**
- * Compute the cross product of two vectors.
- *
- * Supports 3,4 components
- */
-_RS_RUNTIME float3 __attribute__((const, overloadable)) cross(float3 lhs, float3 rhs);
-_RS_RUNTIME float4 __attribute__((const, overloadable)) cross(float4 lhs, float4 rhs);
-
-/**
- * Compute the dot product of two vectors.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) dot(float lhs, float rhs);
-F_FUNC_FN_FN(dot)
-
-/**
- * Compute the length of a vector.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) length(float v);
-F_FUNC_FN(length)
-
-/**
- * Compute the distance between two points.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) distance(float lhs, float rhs);
-F_FUNC_FN_FN(distance)
-
-/**
- * Normalize a vector.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) normalize(float v);
-FN_FUNC_FN(normalize)
-
-
-// New approx API functions
-#if (defined(RS_VERSION) && (RS_VERSION >= 17))
-
-/**
- * Return the approximate reciprocal of a value.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) half_recip(float);
-FN_FUNC_FN(half_recip)
-
-/**
- * Return the approximate square root of a value.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) half_sqrt(float);
-FN_FUNC_FN(half_sqrt)
-
-/**
- * Return the approximate value of (1 / sqrt(value)).
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) half_rsqrt(float v);
-FN_FUNC_FN(half_rsqrt)
-
-/**
- * Compute the approximate length of a vector.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) fast_length(float v);
-F_FUNC_FN(fast_length)
-
-/**
- * Compute the approximate distance between two points.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) fast_distance(float lhs, float rhs);
-F_FUNC_FN_FN(fast_distance)
-
-/**
- * Approximately normalize a vector.
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) fast_normalize(float v);
-F_FUNC_FN(fast_normalize)
-
-#endif  // (defined(RS_VERSION) && (RS_VERSION >= 17))
-
-
-
-#if (defined(RS_VERSION) && (RS_VERSION >= 18))
-// Fast native math functions.
-
-
-/**
- * Fast approximate exp2
- * valid for inputs -125.f to 125.f
- * Max 8192 ulps of error
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) native_exp2(float v);
-FN_FUNC_FN(native_exp2)
-
-/**
- * Fast approximate exp
- * valid for inputs -86.f to 86.f
- * Max 8192 ulps of error
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) native_exp(float v);
-FN_FUNC_FN(native_exp)
-
-/**
- * Fast approximate exp10
- * valid for inputs -37.f to 37.f
- * Max 8192 ulps of error
- *
- * Supports 1,2,3,4 components
- */
-_RS_RUNTIME float __attribute__((const, overloadable)) native_exp10(float v);
-FN_FUNC_FN(native_exp10)
-
-
-_RS_RUNTIME float __attribute__((const, overloadable)) native_log2(float v);
-FN_FUNC_FN(native_log2)
-
-_RS_RUNTIME float __attribute__((const, overloadable)) native_log(float v);
-FN_FUNC_FN(native_log)
-
-_RS_RUNTIME float __attribute__((const, overloadable)) native_log10(float v);
-FN_FUNC_FN(native_log10)
-
-
-_RS_RUNTIME float __attribute__((const, overloadable)) native_powr(float v, float y);
-FN_FUNC_FN_FN(native_powr)
-
-
-#endif  // (defined(RS_VERSION) && (RS_VERSION >= 18))
-
-
-#undef CVT_FUNC
-#undef CVT_FUNC_2
-#undef FN_FUNC_FN
-#undef F_FUNC_FN
-#undef IN_FUNC_FN
-#undef FN_FUNC_FN_FN
-#undef F_FUNC_FN_FN
-#undef FN_FUNC_FN_F
-#undef FN_FUNC_FN_IN
-#undef FN_FUNC_FN_I
-#undef FN_FUNC_FN_PFN
-#undef FN_FUNC_FN_PIN
-#undef FN_FUNC_FN_FN_FN
-#undef FN_FUNC_FN_FN_F
-#undef FN_FUNC_FN_F_F
-#undef FN_FUNC_FN_FN_PIN
-#undef XN_FUNC_YN
-#undef UIN_FUNC_IN
-#undef IN_FUNC_IN
-#undef XN_FUNC_XN_XN_BODY
-#undef IN_FUNC_IN_IN_BODY
-
-#endif
diff --git a/scriptc/rs_core.rsh b/scriptc/rs_core.rsh
index 9caf355..0d3642e 100644
--- a/scriptc/rs_core.rsh
+++ b/scriptc/rs_core.rsh
@@ -51,7 +51,7 @@
 #include "rs_types.rsh"
 #include "rs_allocation.rsh"
 #include "rs_atomic.rsh"
-#include "rs_cl.rsh"
+#include "rs_core_math.rsh"
 #include "rs_debug.rsh"
 #include "rs_element.rsh"
 #include "rs_math.rsh"
diff --git a/scriptc/rs_core_math.rsh b/scriptc/rs_core_math.rsh
new file mode 100644
index 0000000..3984c6d
--- /dev/null
+++ b/scriptc/rs_core_math.rsh
@@ -0,0 +1,8838 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * 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 __rs_core_math_rsh__
+#define __rs_core_math_rsh__
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to float2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))convert_float2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to float3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))convert_float3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to float4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))convert_float4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to double2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double2 __attribute__((const, overloadable))convert_double2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to double3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double3 __attribute__((const, overloadable))convert_double3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to double4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern double4 __attribute__((const, overloadable))convert_double4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to char2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))convert_char2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to char3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))convert_char3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to char4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))convert_char4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to uchar2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))convert_uchar2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to uchar3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))convert_uchar3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to uchar4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))convert_uchar4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to short2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))convert_short2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to short3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))convert_short3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to short4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))convert_short4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to ushort2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))convert_ushort2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to ushort3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))convert_ushort3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to ushort4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))convert_ushort4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to int2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))convert_int2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to int3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))convert_int3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to int4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))convert_int4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to uint2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))convert_uint2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to uint3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))convert_uint3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to uint4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))convert_uint4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to long2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long2 __attribute__((const, overloadable))convert_long2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to long3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long3 __attribute__((const, overloadable))convert_long3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to long4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern long4 __attribute__((const, overloadable))convert_long4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from float4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(double2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(double3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from double4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(double4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(char2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(char3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from char4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(char4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(uchar2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(uchar3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uchar4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(uchar4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(short2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(short3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from short4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(short4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(ushort2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(ushort3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ushort4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(ushort4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from int4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(uint2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(uint3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from uint4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(uint4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(long2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(long3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from long4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(long4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong2 to ulong2
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))convert_ulong2(ulong2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong3 to ulong3
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))convert_ulong3(ulong3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Component wise conversion from ulong4 to ulong4
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))convert_ulong4(ulong4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acos
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))acos(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acos
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))acos(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acos
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))acos(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acos
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))acos(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acosh
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))acosh(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acosh
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))acosh(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acosh
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))acosh(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acosh
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))acosh(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acospi
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))acospi(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acospi
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))acospi(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acospi
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))acospi(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * acospi
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))acospi(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * asin
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))asin(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * asin
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))asin(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * asin
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))asin(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * asin
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))asin(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * asinh
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))asinh(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * asinh
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))asinh(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * asinh
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))asinh(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * asinh
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))asinh(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse sine divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))asinpi(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse sine divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))asinpi(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse sine divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))asinpi(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse sine divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))asinpi(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))atan(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))atan(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))atan(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))atan(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent of y / x.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))atan2(float y, float x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent of y / x.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))atan2(float2 y, float2 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent of y / x.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))atan2(float3 y, float3 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent of y / x.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))atan2(float4 y, float4 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse hyperbolic tangent.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))atanh(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse hyperbolic tangent.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))atanh(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse hyperbolic tangent.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))atanh(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse hyperbolic tangent.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))atanh(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))atanpi(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))atanpi(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))atanpi(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))atanpi(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent of y / x, divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))atan2pi(float y, float x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent of y / x, divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))atan2pi(float2 y, float2 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent of y / x, divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))atan2pi(float3 y, float3 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the inverse tangent of y / x, divided by PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))atan2pi(float4 y, float4 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cube root.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))cbrt(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cube root.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))cbrt(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cube root.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))cbrt(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cube root.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))cbrt(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the smallest integer not less than a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))ceil(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the smallest integer not less than a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))ceil(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the smallest integer not less than a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))ceil(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the smallest integer not less than a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))ceil(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Copy the sign bit from y to x.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))copysign(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Copy the sign bit from y to x.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))copysign(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Copy the sign bit from y to x.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))copysign(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Copy the sign bit from y to x.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))copysign(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cosine.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))cos(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cosine.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))cos(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cosine.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))cos(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cosine.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))cos(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hypebolic cosine.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))cosh(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hypebolic cosine.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))cosh(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hypebolic cosine.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))cosh(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hypebolic cosine.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))cosh(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cosine of the value * PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))cospi(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cosine of the value * PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))cospi(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cosine of the value * PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))cospi(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the cosine of the value * PI.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))cospi(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the complementary error function.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))erfc(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the complementary error function.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))erfc(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the complementary error function.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))erfc(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the complementary error function.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))erfc(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the error function.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))erf(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the error function.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))erf(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the error function.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))erf(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the error function.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))erf(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return e ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))exp(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return e ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))exp(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return e ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))exp(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return e ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))exp(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return 2 ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))exp2(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return 2 ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))exp2(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return 2 ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))exp2(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return 2 ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))exp2(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return 10 ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))exp10(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return 10 ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))exp10(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return 10 ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))exp10(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return 10 ^ value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))exp10(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (e ^ value) - 1.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))expm1(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (e ^ value) - 1.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))expm1(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (e ^ value) - 1.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))expm1(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (e ^ value) - 1.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))expm1(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fabs(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fabs(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fabs(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fabs(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the positive difference between two values.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fdim(float, float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the positive difference between two values.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fdim(float2, float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the positive difference between two values.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fdim(float3, float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the positive difference between two values.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fdim(float4, float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the smallest integer not greater than a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))floor(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the smallest integer not greater than a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))floor(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the smallest integer not greater than a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))floor(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the smallest integer not greater than a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))floor(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (a * b) + c.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fma(float a, float b, float c);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (a * b) + c.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fma(float2 a, float2 b, float2 c);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (a * b) + c.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fma(float3 a, float3 b, float3 c);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (a * b) + c.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fma(float4 a, float4 b, float4 c);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x < y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fmax(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x < y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fmax(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x < y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fmax(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x < y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fmax(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x < y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fmax(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x < y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fmax(float2 x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x < y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fmax(float3 x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x < y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fmax(float4 x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x > y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fmin(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x > y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fmin(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x > y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fmin(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x > y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fmin(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x > y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fmin(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x > y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fmin(float2 x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x > y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fmin(float3 x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x > y ? y : x)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fmin(float4 x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the remainder from x / y
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fmod(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the remainder from x / y
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fmod(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the remainder from x / y
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fmod(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the remainder from x / y
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fmod(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return fractional part of v
+ *
+ * @param iptr  iptr[0] will be set to the floor of the input value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))fract(float v, float *iptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return fractional part of v
+ *
+ * @param iptr  iptr[0] will be set to the floor of the input value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fract(float2 v, float2 *iptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return fractional part of v
+ *
+ * @param iptr  iptr[0] will be set to the floor of the input value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fract(float3 v, float3 *iptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return fractional part of v
+ *
+ * @param iptr  iptr[0] will be set to the floor of the input value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fract(float4 v, float4 *iptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return fractional part of v
+ *
+ * Supported by API versions 9 and newer.
+ */
+static float __attribute__((const, overloadable))fract(float v) {
+ float unused;
+ return fract(v, &unused);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return fractional part of v
+ *
+ * Supported by API versions 9 and newer.
+ */
+static float2 __attribute__((const, overloadable))fract(float2 v) {
+ float2 unused;
+ return fract(v, &unused);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return fractional part of v
+ *
+ * Supported by API versions 9 and newer.
+ */
+static float3 __attribute__((const, overloadable))fract(float3 v) {
+ float3 unused;
+ return fract(v, &unused);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return fractional part of v
+ *
+ * Supported by API versions 9 and newer.
+ */
+static float4 __attribute__((const, overloadable))fract(float4 v) {
+ float4 unused;
+ return fract(v, &unused);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the mantissa and place the exponent into iptr[0]
+ *
+ * @param v Supports float, float2, float3, float4.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))frexp(float v, int *iptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the mantissa and place the exponent into iptr[0]
+ *
+ * @param v Supports float, float2, float3, float4.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))frexp(float2 v, int2 *iptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the mantissa and place the exponent into iptr[0]
+ *
+ * @param v Supports float, float2, float3, float4.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))frexp(float3 v, int3 *iptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the mantissa and place the exponent into iptr[0]
+ *
+ * @param v Supports float, float2, float3, float4.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))frexp(float4 v, int4 *iptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return sqrt(x*x + y*y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))hypot(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return sqrt(x*x + y*y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))hypot(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return sqrt(x*x + y*y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))hypot(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return sqrt(x*x + y*y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))hypot(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the integer exponent of a value
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int __attribute__((const, overloadable))ilogb(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the integer exponent of a value
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))ilogb(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the integer exponent of a value
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))ilogb(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the integer exponent of a value
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))ilogb(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))ilogb(float, int);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))ilogb(float2, int2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))ilogb(float3, int3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))ilogb(float4, int4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))ilogb(float, int);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))ilogb(float2, int);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))ilogb(float3, int);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))ilogb(float4, int);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * @param x Supports 1,2,3,4 components
+ * @param y Supports single component or matching vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))ldexp(float x, int y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * @param x Supports 1,2,3,4 components
+ * @param y Supports single component or matching vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))ldexp(float2 x, int2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * @param x Supports 1,2,3,4 components
+ * @param y Supports single component or matching vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))ldexp(float3 x, int3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * @param x Supports 1,2,3,4 components
+ * @param y Supports single component or matching vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))ldexp(float4 x, int4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * @param x Supports 1,2,3,4 components
+ * @param y Supports single component or matching vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))ldexp(float2 x, int y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * @param x Supports 1,2,3,4 components
+ * @param y Supports single component or matching vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))ldexp(float3 x, int y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (x * 2^y)
+ *
+ * @param x Supports 1,2,3,4 components
+ * @param y Supports single component or matching vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))ldexp(float4 x, int y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the log gamma and sign
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))lgamma(float x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the log gamma and sign
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))lgamma(float2 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the log gamma and sign
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))lgamma(float3 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the log gamma and sign
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))lgamma(float4 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the log gamma and sign
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))lgamma(float x, int *y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the log gamma and sign
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))lgamma(float2 x, int2 *y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the log gamma and sign
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))lgamma(float3 x, int3 *y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the log gamma and sign
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))lgamma(float4 x, int4 *y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the natural logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))log(float x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the natural logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))log(float2 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the natural logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))log(float3 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the natural logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))log(float4 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the base 2 logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))log2(float x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the base 2 logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))log2(float2 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the base 2 logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))log2(float3 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the base 2 logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))log2(float4 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the base 10 logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))log10(float x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the base 10 logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))log10(float2 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the base 10 logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))log10(float3 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the base 10 logarithm.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))log10(float4 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the natural logarithm of (v + 1.0f)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))log1p(float x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the natural logarithm of (v + 1.0f)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))log1p(float2 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the natural logarithm of (v + 1.0f)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))log1p(float3 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the natural logarithm of (v + 1.0f)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))log1p(float4 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the exponent of the value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))logb(float x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the exponent of the value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))logb(float2 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the exponent of the value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))logb(float3 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the exponent of the value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))logb(float4 x);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute (a * b) + c
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))mad(float a, float b, float c);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute (a * b) + c
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))mad(float2 a, float2 b, float2 c);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute (a * b) + c
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))mad(float3 a, float3 b, float3 c);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute (a * b) + c
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))mad(float4 a, float4 b, float4 c);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the integral and fractional components of a number.
+ *
+ * @param x Source value
+ * @param iret iret[0] will be set to the integral portion of the number.
+ * @return The floating point portion of the value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))modf(float x, float *iret);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the integral and fractional components of a number.
+ *
+ * @param x Source value
+ * @param iret iret[0] will be set to the integral portion of the number.
+ * @return The floating point portion of the value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))modf(float2 x, float2 *iret);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the integral and fractional components of a number.
+ *
+ * @param x Source value
+ * @param iret iret[0] will be set to the integral portion of the number.
+ * @return The floating point portion of the value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))modf(float3 x, float3 *iret);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the integral and fractional components of a number.
+ *
+ * @param x Source value
+ * @param iret iret[0] will be set to the integral portion of the number.
+ * @return The floating point portion of the value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))modf(float4 x, float4 *iret);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * generate a nan
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))nan(uint);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the next floating point number from x towards y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))nextafter(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the next floating point number from x towards y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))nextafter(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the next floating point number from x towards y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))nextafter(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the next floating point number from x towards y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))nextafter(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))pow(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))pow(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))pow(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))pow(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))pown(float x, int y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))pown(float2 x, int2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))pown(float3 x, int3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))pown(float4 x, int4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ * y must be > 0
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))powr(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ * y must be > 0
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))powr(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ * y must be > 0
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))powr(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return x ^ y.
+ * y must be > 0
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))powr(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return round x/y to the nearest integer then compute the remander.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))remainder(float x, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return round x/y to the nearest integer then compute the remander.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))remainder(float2 x, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return round x/y to the nearest integer then compute the remander.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))remainder(float3 x, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return round x/y to the nearest integer then compute the remander.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))remainder(float4 x, float4 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * todo
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))remquo(float, float, int *);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * todo
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))remquo(float2, float2, int2 *);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * todo
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))remquo(float3, float3, int3 *);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * todo
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))remquo(float4, float4, int4 *);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Round to the nearest integral value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))rint(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Round to the nearest integral value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))rint(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Round to the nearest integral value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))rint(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Round to the nearest integral value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))rint(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the Nth root of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))rootn(float v, int n);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the Nth root of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))rootn(float2 v, int2 n);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the Nth root of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))rootn(float3 v, int3 n);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the Nth root of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))rootn(float4 v, int4 n);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Round to the nearest integral value.  Half values are rounded away from zero.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))round(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Round to the nearest integral value.  Half values are rounded away from zero.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))round(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Round to the nearest integral value.  Half values are rounded away from zero.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))round(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Round to the nearest integral value.  Half values are rounded away from zero.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))round(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (1 / sqrt(value)).
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))rsqrt(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (1 / sqrt(value)).
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))rsqrt(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (1 / sqrt(value)).
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))rsqrt(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return (1 / sqrt(value)).
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))rsqrt(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the square root of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))sqrt(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the square root of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))sqrt(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the square root of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))sqrt(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the square root of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))sqrt(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sine of a value specified in radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))sin(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sine of a value specified in radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))sin(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sine of a value specified in radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))sin(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sine of a value specified in radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))sin(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sine and cosine of a value.
+ *
+ * @return sine
+ * @param v The incoming value in radians
+ * @param *cosptr cosptr[0] will be set to the cosine value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))sincos(float v, float *cosptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sine and cosine of a value.
+ *
+ * @return sine
+ * @param v The incoming value in radians
+ * @param *cosptr cosptr[0] will be set to the cosine value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))sincos(float2 v, float2 *cosptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sine and cosine of a value.
+ *
+ * @return sine
+ * @param v The incoming value in radians
+ * @param *cosptr cosptr[0] will be set to the cosine value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))sincos(float3 v, float3 *cosptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sine and cosine of a value.
+ *
+ * @return sine
+ * @param v The incoming value in radians
+ * @param *cosptr cosptr[0] will be set to the cosine value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))sincos(float4 v, float4 *cosptr);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hyperbolic sine of a value specified in radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))sinh(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hyperbolic sine of a value specified in radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))sinh(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hyperbolic sine of a value specified in radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))sinh(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hyperbolic sine of a value specified in radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))sinh(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sin(v * PI).
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))sinpi(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sin(v * PI).
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))sinpi(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sin(v * PI).
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))sinpi(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sin(v * PI).
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))sinpi(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the tangent of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))tan(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the tangent of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))tan(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the tangent of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))tan(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the tangent of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))tan(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hyperbolic tangent of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))tanh(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hyperbolic tangent of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))tanh(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hyperbolic tangent of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))tanh(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the hyperbolic tangent of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))tanh(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return tan(v * PI)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))tanpi(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return tan(v * PI)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))tanpi(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return tan(v * PI)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))tanpi(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return tan(v * PI)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))tanpi(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the gamma function of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))tgamma(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the gamma function of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))tgamma(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the gamma function of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))tgamma(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the gamma function of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))tgamma(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * ound to integral using truncation.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))trunc(float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * ound to integral using truncation.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))trunc(float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * ound to integral using truncation.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))trunc(float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * ound to integral using truncation.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))trunc(float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar __attribute__((const, overloadable))abs(char value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))abs(char2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))abs(char3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))abs(char4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort __attribute__((const, overloadable))abs(short value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))abs(short2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))abs(short3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))abs(short4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint __attribute__((const, overloadable))abs(int value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))abs(int2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))abs(int3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the absolute value of a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))abs(int4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char __attribute__((const, overloadable))clz(char value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char2 __attribute__((const, overloadable))clz(char2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char3 __attribute__((const, overloadable))clz(char3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern char4 __attribute__((const, overloadable))clz(char4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar __attribute__((const, overloadable))clz(uchar value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))clz(uchar2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))clz(uchar3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))clz(uchar4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short __attribute__((const, overloadable))clz(short value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short2 __attribute__((const, overloadable))clz(short2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short3 __attribute__((const, overloadable))clz(short3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern short4 __attribute__((const, overloadable))clz(short4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort __attribute__((const, overloadable))clz(ushort value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))clz(ushort2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))clz(ushort3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))clz(ushort4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int __attribute__((const, overloadable))clz(int value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int2 __attribute__((const, overloadable))clz(int2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int3 __attribute__((const, overloadable))clz(int3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern int4 __attribute__((const, overloadable))clz(int4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint __attribute__((const, overloadable))clz(uint value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))clz(uint2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))clz(uint3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the number of leading 0-bits in a value.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))clz(uint4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))min(float, float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))min(float2, float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))min(float3, float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))min(float4, float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static char __attribute__((const, overloadable))min(char v1, char v2) {
+ return (v1 < v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uchar __attribute__((const, overloadable))min(uchar v1, uchar v2) {
+ return (v1 < v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static short __attribute__((const, overloadable))min(short v1, short v2) {
+ return (v1 < v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static ushort __attribute__((const, overloadable))min(ushort v1, ushort v2) {
+ return (v1 < v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static int __attribute__((const, overloadable))min(int v1, int v2) {
+ return (v1 < v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uint __attribute__((const, overloadable))min(uint v1, uint v2) {
+ return (v1 < v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static char2 __attribute__((const, overloadable))min(char2 v1, char2 v2) {
+ char2 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2) {
+ uchar2 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static short2 __attribute__((const, overloadable))min(short2 v1, short2 v2) {
+ short2 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2) {
+ ushort2 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static int2 __attribute__((const, overloadable))min(int2 v1, int2 v2) {
+ int2 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2) {
+ uint2 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static char3 __attribute__((const, overloadable))min(char3 v1, char3 v2) {
+ char3 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2) {
+ uchar3 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static short3 __attribute__((const, overloadable))min(short3 v1, short3 v2) {
+ short3 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2) {
+ ushort3 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static int3 __attribute__((const, overloadable))min(int3 v1, int3 v2) {
+ int3 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2) {
+ uint3 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static char4 __attribute__((const, overloadable))min(char4 v1, char4 v2) {
+ char4 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w < v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2) {
+ uchar4 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w < v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static short4 __attribute__((const, overloadable))min(short4 v1, short4 v2) {
+ short4 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w < v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2) {
+ ushort4 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w < v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static int4 __attribute__((const, overloadable))min(int4 v1, int4 v2) {
+ int4 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w < v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2) {
+ uint4 tmp;
+ tmp.x = (v1.x < v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y < v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z < v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w < v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern char __attribute__((const, overloadable))min(char v1, char v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern char2 __attribute__((const, overloadable))min(char2 v1, char2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern char3 __attribute__((const, overloadable))min(char3 v1, char3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern char4 __attribute__((const, overloadable))min(char4 v1, char4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uchar __attribute__((const, overloadable))min(uchar v1, uchar v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))min(uchar2 v1, uchar2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))min(uchar3 v1, uchar3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))min(uchar4 v1, uchar4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern short __attribute__((const, overloadable))min(short v1, short v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern short2 __attribute__((const, overloadable))min(short2 v1, short2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern short3 __attribute__((const, overloadable))min(short3 v1, short3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern short4 __attribute__((const, overloadable))min(short4 v1, short4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ushort __attribute__((const, overloadable))min(ushort v1, ushort v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))min(ushort2 v1, ushort2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))min(ushort3 v1, ushort3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))min(ushort4 v1, ushort4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern int __attribute__((const, overloadable))min(int v1, int v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern int2 __attribute__((const, overloadable))min(int2 v1, int2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern int3 __attribute__((const, overloadable))min(int3 v1, int3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern int4 __attribute__((const, overloadable))min(int4 v1, int4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uint __attribute__((const, overloadable))min(uint v1, uint v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))min(uint2 v1, uint2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))min(uint3 v1, uint3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))min(uint4 v1, uint4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern long __attribute__((const, overloadable))min(long v1, long v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern long2 __attribute__((const, overloadable))min(long2 v1, long2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern long3 __attribute__((const, overloadable))min(long3 v1, long3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern long4 __attribute__((const, overloadable))min(long4 v1, long4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ulong __attribute__((const, overloadable))min(ulong v1, ulong v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))min(ulong2 v1, ulong2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))min(ulong3 v1, ulong3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the minimum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))min(ulong4 v1, ulong4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))max(float, float);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))max(float2, float2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))max(float3, float3);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))max(float4, float4);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static char __attribute__((const, overloadable))max(char v1, char v2) {
+ return (v1 > v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uchar __attribute__((const, overloadable))max(uchar v1, uchar v2) {
+ return (v1 > v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static short __attribute__((const, overloadable))max(short v1, short v2) {
+ return (v1 > v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static ushort __attribute__((const, overloadable))max(ushort v1, ushort v2) {
+ return (v1 > v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static int __attribute__((const, overloadable))max(int v1, int v2) {
+ return (v1 > v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uint __attribute__((const, overloadable))max(uint v1, uint v2) {
+ return (v1 > v2 ? v1 : v2);
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static char2 __attribute__((const, overloadable))max(char2 v1, char2 v2) {
+ char2 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2) {
+ uchar2 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static short2 __attribute__((const, overloadable))max(short2 v1, short2 v2) {
+ short2 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2) {
+ ushort2 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static int2 __attribute__((const, overloadable))max(int2 v1, int2 v2) {
+ int2 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2) {
+ uint2 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static char3 __attribute__((const, overloadable))max(char3 v1, char3 v2) {
+ char3 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2) {
+ uchar3 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static short3 __attribute__((const, overloadable))max(short3 v1, short3 v2) {
+ short3 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2) {
+ ushort3 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static int3 __attribute__((const, overloadable))max(int3 v1, int3 v2) {
+ int3 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2) {
+ uint3 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static char4 __attribute__((const, overloadable))max(char4 v1, char4 v2) {
+ char4 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w > v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2) {
+ uchar4 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w > v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static short4 __attribute__((const, overloadable))max(short4 v1, short4 v2) {
+ short4 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w > v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2) {
+ ushort4 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w > v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static int4 __attribute__((const, overloadable))max(int4 v1, int4 v2) {
+ int4 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w > v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9) && (RS_VERSION <= 19))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Suppored by API versions 9 - 19
+ */
+static uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2) {
+ uint4 tmp;
+ tmp.x = (v1.x > v2.x ? v1.x : v2.x);
+ tmp.y = (v1.y > v2.y ? v1.y : v2.y);
+ tmp.z = (v1.z > v2.z ? v1.z : v2.z);
+ tmp.w = (v1.w > v2.w ? v1.w : v2.w);
+ return tmp;
+}
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern char __attribute__((const, overloadable))max(char v1, char v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern char2 __attribute__((const, overloadable))max(char2 v1, char2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern char3 __attribute__((const, overloadable))max(char3 v1, char3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern char4 __attribute__((const, overloadable))max(char4 v1, char4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uchar __attribute__((const, overloadable))max(uchar v1, uchar v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))max(uchar2 v1, uchar2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))max(uchar3 v1, uchar3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))max(uchar4 v1, uchar4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern short __attribute__((const, overloadable))max(short v1, short v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern short2 __attribute__((const, overloadable))max(short2 v1, short2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern short3 __attribute__((const, overloadable))max(short3 v1, short3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern short4 __attribute__((const, overloadable))max(short4 v1, short4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ushort __attribute__((const, overloadable))max(ushort v1, ushort v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))max(ushort2 v1, ushort2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))max(ushort3 v1, ushort3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))max(ushort4 v1, ushort4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern int __attribute__((const, overloadable))max(int v1, int v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern int2 __attribute__((const, overloadable))max(int2 v1, int2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern int3 __attribute__((const, overloadable))max(int3 v1, int3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern int4 __attribute__((const, overloadable))max(int4 v1, int4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uint __attribute__((const, overloadable))max(uint v1, uint v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))max(uint2 v1, uint2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))max(uint3 v1, uint3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))max(uint4 v1, uint4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern long __attribute__((const, overloadable))max(long v1, long v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern long2 __attribute__((const, overloadable))max(long2 v1, long2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern long3 __attribute__((const, overloadable))max(long3 v1, long3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern long4 __attribute__((const, overloadable))max(long4 v1, long4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ulong __attribute__((const, overloadable))max(ulong v1, ulong v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))max(ulong2 v1, ulong2 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))max(ulong3 v1, ulong3 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 20))
+/*
+ * Return the maximum value from two arguments
+ *
+ * Supported by API versions 20 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))max(ulong4 v1, ulong4 v2);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))clamp(float value, float min_value, float max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))clamp(float2 value, float2 min_value, float2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))clamp(float3 value, float3 min_value, float3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))clamp(float4 value, float4 min_value, float4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))clamp(float value, float min_value, float max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))clamp(float2 value, float min_value, float max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))clamp(float3 value, float min_value, float max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))clamp(float4 value, float min_value, float max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern char __attribute__((const, overloadable))clamp(char value, char min_value, char max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern char2 __attribute__((const, overloadable))clamp(char2 value, char2 min_value, char2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern char3 __attribute__((const, overloadable))clamp(char3 value, char3 min_value, char3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern char4 __attribute__((const, overloadable))clamp(char4 value, char4 min_value, char4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uchar __attribute__((const, overloadable))clamp(uchar value, uchar min_value, uchar max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))clamp(uchar2 value, uchar2 min_value, uchar2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))clamp(uchar3 value, uchar3 min_value, uchar3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))clamp(uchar4 value, uchar4 min_value, uchar4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern short __attribute__((const, overloadable))clamp(short value, short min_value, short max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern short2 __attribute__((const, overloadable))clamp(short2 value, short2 min_value, short2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern short3 __attribute__((const, overloadable))clamp(short3 value, short3 min_value, short3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern short4 __attribute__((const, overloadable))clamp(short4 value, short4 min_value, short4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ushort __attribute__((const, overloadable))clamp(ushort value, ushort min_value, ushort max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))clamp(ushort2 value, ushort2 min_value, ushort2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))clamp(ushort3 value, ushort3 min_value, ushort3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))clamp(ushort4 value, ushort4 min_value, ushort4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern int __attribute__((const, overloadable))clamp(int value, int min_value, int max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern int2 __attribute__((const, overloadable))clamp(int2 value, int2 min_value, int2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern int3 __attribute__((const, overloadable))clamp(int3 value, int3 min_value, int3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern int4 __attribute__((const, overloadable))clamp(int4 value, int4 min_value, int4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uint __attribute__((const, overloadable))clamp(uint value, uint min_value, uint max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))clamp(uint2 value, uint2 min_value, uint2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))clamp(uint3 value, uint3 min_value, uint3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))clamp(uint4 value, uint4 min_value, uint4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern long __attribute__((const, overloadable))clamp(long value, long min_value, long max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern long2 __attribute__((const, overloadable))clamp(long2 value, long2 min_value, long2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern long3 __attribute__((const, overloadable))clamp(long3 value, long3 min_value, long3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern long4 __attribute__((const, overloadable))clamp(long4 value, long4 min_value, long4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ulong __attribute__((const, overloadable))clamp(ulong value, ulong min_value, ulong max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))clamp(ulong2 value, ulong2 min_value, ulong2 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))clamp(ulong3 value, ulong3 min_value, ulong3 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))clamp(ulong4 value, ulong4 min_value, ulong4 max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern char __attribute__((const, overloadable))clamp(char value, char min_value, char max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern char2 __attribute__((const, overloadable))clamp(char2 value, char min_value, char max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern char3 __attribute__((const, overloadable))clamp(char3 value, char min_value, char max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern char4 __attribute__((const, overloadable))clamp(char4 value, char min_value, char max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uchar __attribute__((const, overloadable))clamp(uchar value, uchar min_value, uchar max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uchar2 __attribute__((const, overloadable))clamp(uchar2 value, uchar min_value, uchar max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uchar3 __attribute__((const, overloadable))clamp(uchar3 value, uchar min_value, uchar max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uchar4 __attribute__((const, overloadable))clamp(uchar4 value, uchar min_value, uchar max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern short __attribute__((const, overloadable))clamp(short value, short min_value, short max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern short2 __attribute__((const, overloadable))clamp(short2 value, short min_value, short max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern short3 __attribute__((const, overloadable))clamp(short3 value, short min_value, short max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern short4 __attribute__((const, overloadable))clamp(short4 value, short min_value, short max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ushort __attribute__((const, overloadable))clamp(ushort value, ushort min_value, ushort max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ushort2 __attribute__((const, overloadable))clamp(ushort2 value, ushort min_value, ushort max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ushort3 __attribute__((const, overloadable))clamp(ushort3 value, ushort min_value, ushort max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ushort4 __attribute__((const, overloadable))clamp(ushort4 value, ushort min_value, ushort max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern int __attribute__((const, overloadable))clamp(int value, int min_value, int max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern int2 __attribute__((const, overloadable))clamp(int2 value, int min_value, int max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern int3 __attribute__((const, overloadable))clamp(int3 value, int min_value, int max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern int4 __attribute__((const, overloadable))clamp(int4 value, int min_value, int max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uint __attribute__((const, overloadable))clamp(uint value, uint min_value, uint max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uint2 __attribute__((const, overloadable))clamp(uint2 value, uint min_value, uint max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uint3 __attribute__((const, overloadable))clamp(uint3 value, uint min_value, uint max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern uint4 __attribute__((const, overloadable))clamp(uint4 value, uint min_value, uint max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern long __attribute__((const, overloadable))clamp(long value, long min_value, long max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern long2 __attribute__((const, overloadable))clamp(long2 value, long min_value, long max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern long3 __attribute__((const, overloadable))clamp(long3 value, long min_value, long max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern long4 __attribute__((const, overloadable))clamp(long4 value, long min_value, long max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ulong __attribute__((const, overloadable))clamp(ulong value, ulong min_value, ulong max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ulong2 __attribute__((const, overloadable))clamp(ulong2 value, ulong min_value, ulong max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ulong3 __attribute__((const, overloadable))clamp(ulong3 value, ulong min_value, ulong max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 19))
+/*
+ * Clamp a value to a specified high and low bound.
+ *
+ * @param amount value to be clamped.  Supports 1,2,3,4 components
+ * @param min_value Lower bound, must be scalar or matching vector.
+ * @param max_value High bound, must match type of low
+ *
+ * Supported by API versions 19 and newer.
+ */
+extern ulong4 __attribute__((const, overloadable))clamp(ulong4 value, ulong min_value, ulong max_value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Convert from radians to degrees.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))degrees(float value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Convert from radians to degrees.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))degrees(float2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Convert from radians to degrees.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))degrees(float3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Convert from radians to degrees.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))degrees(float4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * return start + ((stop - start) * amount)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))mix(float start, float stop, float amount);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * return start + ((stop - start) * amount)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))mix(float2 start, float2 stop, float2 amount);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * return start + ((stop - start) * amount)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))mix(float3 start, float3 stop, float3 amount);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * return start + ((stop - start) * amount)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))mix(float4 start, float4 stop, float4 amount);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * return start + ((stop - start) * amount)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))mix(float start, float stop, float amount);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * return start + ((stop - start) * amount)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))mix(float2 start, float2 stop, float amount);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * return start + ((stop - start) * amount)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))mix(float3 start, float3 stop, float amount);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * return start + ((stop - start) * amount)
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))mix(float4 start, float4 stop, float amount);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Convert from degrees to radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))radians(float value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Convert from degrees to radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))radians(float2 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Convert from degrees to radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))radians(float3 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Convert from degrees to radians.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))radians(float4 value);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * if (v < edge)
+ * return 0.f;
+ * else
+ * return 1.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))step(float edge, float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * if (v < edge)
+ * return 0.f;
+ * else
+ * return 1.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))step(float2 edge, float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * if (v < edge)
+ * return 0.f;
+ * else
+ * return 1.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))step(float3 edge, float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * if (v < edge)
+ * return 0.f;
+ * else
+ * return 1.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))step(float4 edge, float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * if (v < edge)
+ * return 0.f;
+ * else
+ * return 1.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))step(float2 edge, float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * if (v < edge)
+ * return 0.f;
+ * else
+ * return 1.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))step(float3 edge, float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * if (v < edge)
+ * return 0.f;
+ * else
+ * return 1.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))step(float4 edge, float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sign of a value.
+ *
+ * if (v < 0) return -1.f;
+ * else if (v > 0) return 1.f;
+ * else return 0.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))sign(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sign of a value.
+ *
+ * if (v < 0) return -1.f;
+ * else if (v > 0) return 1.f;
+ * else return 0.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))sign(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sign of a value.
+ *
+ * if (v < 0) return -1.f;
+ * else if (v > 0) return 1.f;
+ * else return 0.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))sign(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Return the sign of a value.
+ *
+ * if (v < 0) return -1.f;
+ * else if (v > 0) return 1.f;
+ * else return 0.f;
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))sign(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the cross product of two vectors.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))cross(float3 lhs, float3 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the cross product of two vectors.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))cross(float4 lhs, float4 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the dot product of two vectors.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))dot(float lhs, float rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the dot product of two vectors.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))dot(float2 lhs, float2 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the dot product of two vectors.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))dot(float3 lhs, float3 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the dot product of two vectors.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))dot(float4 lhs, float4 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the length of a vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))length(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the length of a vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))length(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the length of a vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))length(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the length of a vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))length(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the distance between two points.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))distance(float lhs, float rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the distance between two points.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))distance(float2 lhs, float2 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the distance between two points.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))distance(float3 lhs, float3 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Compute the distance between two points.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))distance(float4 lhs, float4 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Normalize a vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float __attribute__((const, overloadable))normalize(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Normalize a vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float2 __attribute__((const, overloadable))normalize(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Normalize a vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float3 __attribute__((const, overloadable))normalize(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 9))
+/*
+ * Normalize a vector.
+ *
+ * Supported by API versions 9 and newer.
+ */
+extern float4 __attribute__((const, overloadable))normalize(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate reciprocal of a value.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))half_recip(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate reciprocal of a value.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float2 __attribute__((const, overloadable))half_recip(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate reciprocal of a value.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float3 __attribute__((const, overloadable))half_recip(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate reciprocal of a value.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float4 __attribute__((const, overloadable))half_recip(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate square root of a value.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))half_sqrt(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate square root of a value.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float2 __attribute__((const, overloadable))half_sqrt(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate square root of a value.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float3 __attribute__((const, overloadable))half_sqrt(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate square root of a value.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float4 __attribute__((const, overloadable))half_sqrt(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate value of (1.f / sqrt(value)).
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))half_rsqrt(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate value of (1.f / sqrt(value)).
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float2 __attribute__((const, overloadable))half_rsqrt(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate value of (1.f / sqrt(value)).
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float3 __attribute__((const, overloadable))half_rsqrt(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Return the approximate value of (1.f / sqrt(value)).
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float4 __attribute__((const, overloadable))half_rsqrt(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Compute the approximate length of a vector.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_length(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Compute the approximate length of a vector.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_length(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Compute the approximate length of a vector.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_length(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Compute the approximate length of a vector.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_length(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Compute the approximate distance between two points.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_distance(float lhs, float rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Compute the approximate distance between two points.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_distance(float2 lhs, float2 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Compute the approximate distance between two points.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_distance(float3 lhs, float3 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Compute the approximate distance between two points.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_distance(float4 lhs, float4 rhs);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Approximately normalize a vector.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float __attribute__((const, overloadable))fast_normalize(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Approximately normalize a vector.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float2 __attribute__((const, overloadable))fast_normalize(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Approximately normalize a vector.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float3 __attribute__((const, overloadable))fast_normalize(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 17))
+/*
+ * Approximately normalize a vector.
+ *
+ * Supported by API versions 17 and newer.
+ */
+extern float4 __attribute__((const, overloadable))fast_normalize(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp
+ * valid for inputs -86.f to 86.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float __attribute__((const, overloadable))native_exp(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp
+ * valid for inputs -86.f to 86.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float2 __attribute__((const, overloadable))native_exp(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp
+ * valid for inputs -86.f to 86.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float3 __attribute__((const, overloadable))native_exp(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp
+ * valid for inputs -86.f to 86.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float4 __attribute__((const, overloadable))native_exp(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp2
+ * valid for inputs -125.f to 125.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float __attribute__((const, overloadable))native_exp2(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp2
+ * valid for inputs -125.f to 125.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float2 __attribute__((const, overloadable))native_exp2(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp2
+ * valid for inputs -125.f to 125.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float3 __attribute__((const, overloadable))native_exp2(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp2
+ * valid for inputs -125.f to 125.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float4 __attribute__((const, overloadable))native_exp2(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp10
+ * valid for inputs -37.f to 37.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float __attribute__((const, overloadable))native_exp10(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp10
+ * valid for inputs -37.f to 37.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float2 __attribute__((const, overloadable))native_exp10(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp10
+ * valid for inputs -37.f to 37.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float3 __attribute__((const, overloadable))native_exp10(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate exp10
+ * valid for inputs -37.f to 37.f
+ * Max 8192 ulps of error
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float4 __attribute__((const, overloadable))native_exp10(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float __attribute__((const, overloadable))native_log(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float2 __attribute__((const, overloadable))native_log(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float3 __attribute__((const, overloadable))native_log(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float4 __attribute__((const, overloadable))native_log(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log2
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float __attribute__((const, overloadable))native_log2(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log2
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float2 __attribute__((const, overloadable))native_log2(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log2
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float3 __attribute__((const, overloadable))native_log2(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log2
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float4 __attribute__((const, overloadable))native_log2(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log10
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float __attribute__((const, overloadable))native_log10(float v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log10
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float2 __attribute__((const, overloadable))native_log10(float2 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log10
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float3 __attribute__((const, overloadable))native_log10(float3 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate log10
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float4 __attribute__((const, overloadable))native_log10(float4 v);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate v ^ y
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float __attribute__((const, overloadable))native_powr(float v, float y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate v ^ y
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float2 __attribute__((const, overloadable))native_powr(float2 v, float2 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate v ^ y
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float3 __attribute__((const, overloadable))native_powr(float3 v, float3 y);
+#endif
+
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+/*
+ * Fast approximate v ^ y
+ *
+ * Supported by API versions 18 and newer.
+ */
+extern float4 __attribute__((const, overloadable))native_powr(float4 v, float4 y);
+#endif
+
+#endif // __rs_core_math_rsh__
diff --git a/update_rs_prebuilts.sh b/update_rs_prebuilts.sh
index 7e6631e..b592a1f 100755
--- a/update_rs_prebuilts.sh
+++ b/update_rs_prebuilts.sh
@@ -4,8 +4,29 @@
 MY_ANDROID_DIR=$PWD/../../
 cd $MY_ANDROID_DIR
 
+if [ $OSTYPE == 'darwin13' ];
+then
+
+  DARWIN=1
+  SHORT_OSNAME=darwin
+  SONAME=dylib
+  # Only build arm on darwin.
+  TARGETS=(arm)
+  SYS_NAMES=(generic)
+
+else
+
+  DARWIN=0
+  SHORT_OSNAME=linux
+  SONAME=so
+  # Target architectures and their system library names.
+  TARGETS=(arm mips x86)
+  SYS_NAMES=(generic generic_mips generic_x86)
+
+fi
+
 # ANDROID_HOST_OUT is where the new prebuilts will be constructed/copied from.
-ANDROID_HOST_OUT=$MY_ANDROID_DIR/out/host/linux-x86/
+ANDROID_HOST_OUT=$MY_ANDROID_DIR/out/host/$SHORT_OSNAME-x86/
 
 # HOST_LIB_DIR allows us to pick up the built librsrt_*.bc libraries.
 HOST_LIB_DIR=$ANDROID_HOST_OUT/lib
@@ -13,10 +34,6 @@
 # PREBUILTS_DIR is where we want to copy our new files to.
 PREBUILTS_DIR=$MY_ANDROID_DIR/prebuilts/sdk/
 
-# Target architectures and their system library names.
-TARGETS=(arm mips x86)
-SYS_NAMES=(generic generic_mips generic_x86)
-
 print_usage() {
   echo "USAGE: $0 [-h|--help] [-n|--no-build] [-x]"
   echo "OPTIONS:"
@@ -85,50 +102,55 @@
 cd $PREBUILTS_DIR || exit 3
 repo start pb_$DATE .
 
-for i in $(seq 0 $((${#TARGETS[@]} - 1))); do
-  t=${TARGETS[$i]}
-  sys_lib_dir=$MY_ANDROID_DIR/out/target/product/${SYS_NAMES[$i]}/system/lib
-  for a in `find renderscript/lib/$t -name \*.so`; do
-    file=`basename $a`
-    cp `find $sys_lib_dir -name $file` $a || exit 4
+# Don't copy device prebuilts on Darwin. We don't need/use them.
+if [ $DARWIN -eq 0 ]; then
+  for i in $(seq 0 $((${#TARGETS[@]} - 1))); do
+    t=${TARGETS[$i]}
+    sys_lib_dir=$MY_ANDROID_DIR/out/target/product/${SYS_NAMES[$i]}/system/lib
+    for a in `find renderscript/lib/$t -name \*.so`; do
+      file=`basename $a`
+      cp `find $sys_lib_dir -name $file` $a || exit 4
+    done
+
+    for a in `find renderscript/lib/$t -name \*.bc`; do
+      file=`basename $a`
+      cp `find $HOST_LIB_DIR $sys_lib_dir -name $file` $a || exit 5
+    done
   done
 
-  for a in `find renderscript/lib/$t -name \*.bc`; do
-    file=`basename $a`
-    cp `find $HOST_LIB_DIR $sys_lib_dir -name $file` $a || exit 5
-  done
-done
+  # javalib.jar
+  cp $MY_ANDROID_DIR/out/target/common/obj/JAVA_LIBRARIES/android-support-v8-renderscript_intermediates/javalib.jar renderscript/lib
 
-# general
-# javalib.jar
-cp $MY_ANDROID_DIR/out/target/common/obj/JAVA_LIBRARIES/android-support-v8-renderscript_intermediates/javalib.jar renderscript/lib
+fi
 
 # Copy header files for compilers
 cp $MY_ANDROID_DIR/external/clang/lib/Headers/*.h renderscript/clang-include
 cp $MY_ANDROID_DIR/frameworks/rs/scriptc/* renderscript/include
 
 
-# Linux-specific tools (bin/ and lib/)
+# Host-specific tools (bin/ and lib/)
 TOOLS_BIN="
 bcc_compat
 llvm-rs-cc
 "
 
 TOOLS_LIB="
-libbcc.so
-libbcinfo.so
-libclang.so
-libLLVM.so
+libbcc.$SONAME
+libbcinfo.$SONAME
+libclang.$SONAME
+libLLVM.$SONAME
 "
 
 for a in $TOOLS_BIN; do
-  cp $ANDROID_HOST_OUT/bin/$a tools/linux/
-  strip tools/linux/$a
+  cp $ANDROID_HOST_OUT/bin/$a tools/$SHORT_OSNAME/
+  strip tools/$SHORT_OSNAME/$a
 done
 
 for a in $TOOLS_LIB; do
-  cp $ANDROID_HOST_OUT/lib/$a tools/linux/
-  strip tools/linux/$a
+  cp $ANDROID_HOST_OUT/lib/$a tools/$SHORT_OSNAME/
+  strip tools/$SHORT_OSNAME/$a
 done
 
-echo "DON'T FORGET TO UPDATE THE DARWIN COMPILER PREBUILTS!!!"
+if [ $DARWIN -eq 0 ]; then
+  echo "DON'T FORGET TO UPDATE THE DARWIN COMPILER PREBUILTS!!!"
+fi
