1/*
2 * Copyright (C) 2011-2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * This file is auto-generated. DO NOT MODIFY!
19 * The source Renderscript file: reduce_general_inputs.rs
20 */
21
22package inputs;
23
24import android.renderscript.*;
25import inputs.reduce_general_inputsBitCode;
26
27/**
28 * @hide
29 */
30public class ScriptC_reduce_general_inputs extends ScriptC {
31    private static final String __rs_resource_name = "reduce_general_inputs";
32    // Constructor
33    public  ScriptC_reduce_general_inputs(RenderScript rs) {
34        super(rs,
35              __rs_resource_name,
36              reduce_general_inputsBitCode.getBitCode32(),
37              reduce_general_inputsBitCode.getBitCode64());
38        mRSLocal = rs;
39        __I32 = Element.I32(rs);
40        __F16 = Element.F16(rs);
41        __F16_2 = Element.F16_2(rs);
42        __F16_4 = Element.F16_4(rs);
43        __F32 = Element.F32(rs);
44        __F32_2 = Element.F32_2(rs);
45        __F32_4 = Element.F32_4(rs);
46        __I8 = Element.I8(rs);
47        __I8_2 = Element.I8_2(rs);
48        __I8_4 = Element.I8_4(rs);
49        __I16 = Element.I16(rs);
50        __I16_2 = Element.I16_2(rs);
51        __I16_4 = Element.I16_4(rs);
52        __U8 = Element.U8(rs);
53        __U8_2 = Element.U8_2(rs);
54        __U8_4 = Element.U8_4(rs);
55        __U16 = Element.U16(rs);
56        __U16_2 = Element.U16_2(rs);
57        __U16_4 = Element.U16_4(rs);
58        __BOOLEAN = Element.BOOLEAN(rs);
59        __ScriptField_MyStruct = ScriptField_MyStruct.createElement(rs);
60    }
61
62    private Element __BOOLEAN;
63    private Element __F16;
64    private Element __F16_2;
65    private Element __F16_4;
66    private Element __F32;
67    private Element __F32_2;
68    private Element __F32_4;
69    private Element __I16;
70    private Element __I16_2;
71    private Element __I16_4;
72    private Element __I32;
73    private Element __I8;
74    private Element __I8_2;
75    private Element __I8_4;
76    private Element __ScriptField_MyStruct;
77    private Element __U16;
78    private Element __U16_2;
79    private Element __U16_4;
80    private Element __U8;
81    private Element __U8_2;
82    private Element __U8_4;
83    private RenderScript mRSLocal;
84    // To obtain the result, invoke get(), which blocks
85    // until the asynchronously-launched operation has completed.
86    public static class result_int {
87        public int get() {
88            if (!mGotResult) {
89                int[] outArray = new int[1];
90                mOut.copyTo(outArray);
91                mResult = outArray[0];
92                mOut.destroy();
93                mOut = null;  // make Java object eligible for garbage collection
94                if (mTempIns != null) {
95                    for (Allocation tempIn : mTempIns) {
96                        tempIn.destroy();
97                    }
98
99                    mTempIns = null;  // make Java objects eligible for garbage collection
100                }
101
102                mGotResult = true;
103            }
104
105            return mResult;
106        }
107
108        private  result_int(Allocation out) {
109            mTempIns = null;
110            mOut = out;
111            mGotResult = false;
112        }
113
114        private Allocation[] mTempIns;
115        private Allocation mOut;
116        private boolean mGotResult;
117        private int mResult;
118    }
119
120    private final static int mExportReduceIdx_my_half_half_0 = 0;
121    // in1 = "a"
122    // in2 = "b"
123    public result_int reduce_my_half_half_0(short[] in1, short[] in2) {
124        // Verify that "in1" is non-null.
125        if (in1 == null) {
126            throw new RSIllegalArgumentException("Array \"in1\" is null!");
127        }
128        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
129        ain1.setAutoPadding(true);
130        ain1.copyFrom(in1);
131        // Verify that "in2" is non-null.
132        if (in2 == null) {
133            throw new RSIllegalArgumentException("Array \"in2\" is null!");
134        }
135        // Verify that input array lengths are the same.
136        if (in1.length != in2.length) {
137            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
138        }
139        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
140        ain2.setAutoPadding(true);
141        ain2.copyFrom(in2);
142
143        result_int result = reduce_my_half_half_0(ain1, ain2, null);
144        result.mTempIns = new Allocation[]{ain1, ain2};
145        return result;
146    }
147
148    // ain1 = "half a"
149    // ain2 = "half b"
150    public result_int reduce_my_half_half_0(Allocation ain1, Allocation ain2) {
151        return reduce_my_half_half_0(ain1, ain2, null);
152    }
153
154    // ain1 = "half a"
155    // ain2 = "half b"
156    public result_int reduce_my_half_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
157        Type t0, t1;
158        // check ain1
159        if (!ain1.getType().getElement().isCompatible(__F16)) {
160            throw new RSRuntimeException("Type mismatch with F16!");
161        }
162        // check ain2
163        if (!ain2.getType().getElement().isCompatible(__F16)) {
164            throw new RSRuntimeException("Type mismatch with F16!");
165        }
166        // Verify dimensions
167        t0 = ain1.getType();
168        t1 = ain2.getType();
169        if ((t0.getCount() != t1.getCount()) ||
170            (t0.getX() != t1.getX()) ||
171            (t0.getY() != t1.getY()) ||
172            (t0.getZ() != t1.getZ()) ||
173            (t0.hasFaces()   != t1.hasFaces()) ||
174            (t0.hasMipmaps() != t1.hasMipmaps())) {
175            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
176        }
177
178        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
179        aout.setAutoPadding(true);
180        reduce(mExportReduceIdx_my_half_half_0, new Allocation[]{ain1, ain2}, aout, sc);
181        return new result_int(aout);
182    }
183
184    private final static int mExportReduceIdx_my_half_half_1 = 1;
185    // in1 = "a"
186    // in2 = "b"
187    public result_int reduce_my_half_half_1(short[] in1, short[] in2) {
188        // Verify that "in1" is non-null.
189        if (in1 == null) {
190            throw new RSIllegalArgumentException("Array \"in1\" is null!");
191        }
192        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
193        ain1.setAutoPadding(true);
194        ain1.copyFrom(in1);
195        // Verify that "in2" is non-null.
196        if (in2 == null) {
197            throw new RSIllegalArgumentException("Array \"in2\" is null!");
198        }
199        // Verify that input array lengths are the same.
200        if (in1.length != in2.length) {
201            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
202        }
203        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
204        ain2.setAutoPadding(true);
205        ain2.copyFrom(in2);
206
207        result_int result = reduce_my_half_half_1(ain1, ain2, null);
208        result.mTempIns = new Allocation[]{ain1, ain2};
209        return result;
210    }
211
212    // ain1 = "half a"
213    // ain2 = "half b"
214    public result_int reduce_my_half_half_1(Allocation ain1, Allocation ain2) {
215        return reduce_my_half_half_1(ain1, ain2, null);
216    }
217
218    // ain1 = "half a"
219    // ain2 = "half b"
220    public result_int reduce_my_half_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
221        Type t0, t1;
222        // check ain1
223        if (!ain1.getType().getElement().isCompatible(__F16)) {
224            throw new RSRuntimeException("Type mismatch with F16!");
225        }
226        // check ain2
227        if (!ain2.getType().getElement().isCompatible(__F16)) {
228            throw new RSRuntimeException("Type mismatch with F16!");
229        }
230        // Verify dimensions
231        t0 = ain1.getType();
232        t1 = ain2.getType();
233        if ((t0.getCount() != t1.getCount()) ||
234            (t0.getX() != t1.getX()) ||
235            (t0.getY() != t1.getY()) ||
236            (t0.getZ() != t1.getZ()) ||
237            (t0.hasFaces()   != t1.hasFaces()) ||
238            (t0.hasMipmaps() != t1.hasMipmaps())) {
239            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
240        }
241
242        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
243        aout.setAutoPadding(true);
244        reduce(mExportReduceIdx_my_half_half_1, new Allocation[]{ain1, ain2}, aout, sc);
245        return new result_int(aout);
246    }
247
248    private final static int mExportReduceIdx_my_half_half2_0 = 2;
249    // in1 = "a"
250    // in2 = "b", flattened 2-vectors
251    public result_int reduce_my_half_half2_0(short[] in1, short[] in2) {
252        // Verify that "in1" is non-null.
253        if (in1 == null) {
254            throw new RSIllegalArgumentException("Array \"in1\" is null!");
255        }
256        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
257        ain1.setAutoPadding(true);
258        ain1.copyFrom(in1);
259        // Verify that "in2" is non-null.
260        if (in2 == null) {
261            throw new RSIllegalArgumentException("Array \"in2\" is null!");
262        }
263        // Verify that the array length is a multiple of the vector size.
264        if (in2.length % 2 != 0) {
265            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
266        }
267        // Verify that input array lengths are the same.
268        if (in1.length != in2.length / 2) {
269            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
270        }
271        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
272        ain2.setAutoPadding(true);
273        ain2.copyFrom(in2);
274
275        result_int result = reduce_my_half_half2_0(ain1, ain2, null);
276        result.mTempIns = new Allocation[]{ain1, ain2};
277        return result;
278    }
279
280    // ain1 = "half a"
281    // ain2 = "half2 b"
282    public result_int reduce_my_half_half2_0(Allocation ain1, Allocation ain2) {
283        return reduce_my_half_half2_0(ain1, ain2, null);
284    }
285
286    // ain1 = "half a"
287    // ain2 = "half2 b"
288    public result_int reduce_my_half_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
289        Type t0, t1;
290        // check ain1
291        if (!ain1.getType().getElement().isCompatible(__F16)) {
292            throw new RSRuntimeException("Type mismatch with F16!");
293        }
294        // check ain2
295        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
296            throw new RSRuntimeException("Type mismatch with F16_2!");
297        }
298        // Verify dimensions
299        t0 = ain1.getType();
300        t1 = ain2.getType();
301        if ((t0.getCount() != t1.getCount()) ||
302            (t0.getX() != t1.getX()) ||
303            (t0.getY() != t1.getY()) ||
304            (t0.getZ() != t1.getZ()) ||
305            (t0.hasFaces()   != t1.hasFaces()) ||
306            (t0.hasMipmaps() != t1.hasMipmaps())) {
307            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
308        }
309
310        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
311        aout.setAutoPadding(true);
312        reduce(mExportReduceIdx_my_half_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
313        return new result_int(aout);
314    }
315
316    private final static int mExportReduceIdx_my_half_half2_1 = 3;
317    // in1 = "a"
318    // in2 = "b", flattened 2-vectors
319    public result_int reduce_my_half_half2_1(short[] in1, short[] in2) {
320        // Verify that "in1" is non-null.
321        if (in1 == null) {
322            throw new RSIllegalArgumentException("Array \"in1\" is null!");
323        }
324        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
325        ain1.setAutoPadding(true);
326        ain1.copyFrom(in1);
327        // Verify that "in2" is non-null.
328        if (in2 == null) {
329            throw new RSIllegalArgumentException("Array \"in2\" is null!");
330        }
331        // Verify that the array length is a multiple of the vector size.
332        if (in2.length % 2 != 0) {
333            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
334        }
335        // Verify that input array lengths are the same.
336        if (in1.length != in2.length / 2) {
337            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
338        }
339        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
340        ain2.setAutoPadding(true);
341        ain2.copyFrom(in2);
342
343        result_int result = reduce_my_half_half2_1(ain1, ain2, null);
344        result.mTempIns = new Allocation[]{ain1, ain2};
345        return result;
346    }
347
348    // ain1 = "half a"
349    // ain2 = "half2 b"
350    public result_int reduce_my_half_half2_1(Allocation ain1, Allocation ain2) {
351        return reduce_my_half_half2_1(ain1, ain2, null);
352    }
353
354    // ain1 = "half a"
355    // ain2 = "half2 b"
356    public result_int reduce_my_half_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
357        Type t0, t1;
358        // check ain1
359        if (!ain1.getType().getElement().isCompatible(__F16)) {
360            throw new RSRuntimeException("Type mismatch with F16!");
361        }
362        // check ain2
363        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
364            throw new RSRuntimeException("Type mismatch with F16_2!");
365        }
366        // Verify dimensions
367        t0 = ain1.getType();
368        t1 = ain2.getType();
369        if ((t0.getCount() != t1.getCount()) ||
370            (t0.getX() != t1.getX()) ||
371            (t0.getY() != t1.getY()) ||
372            (t0.getZ() != t1.getZ()) ||
373            (t0.hasFaces()   != t1.hasFaces()) ||
374            (t0.hasMipmaps() != t1.hasMipmaps())) {
375            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
376        }
377
378        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
379        aout.setAutoPadding(true);
380        reduce(mExportReduceIdx_my_half_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
381        return new result_int(aout);
382    }
383
384    private final static int mExportReduceIdx_my_half_half4_0 = 4;
385    // in1 = "a"
386    // in2 = "b", flattened 4-vectors
387    public result_int reduce_my_half_half4_0(short[] in1, short[] in2) {
388        // Verify that "in1" is non-null.
389        if (in1 == null) {
390            throw new RSIllegalArgumentException("Array \"in1\" is null!");
391        }
392        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
393        ain1.setAutoPadding(true);
394        ain1.copyFrom(in1);
395        // Verify that "in2" is non-null.
396        if (in2 == null) {
397            throw new RSIllegalArgumentException("Array \"in2\" is null!");
398        }
399        // Verify that the array length is a multiple of the vector size.
400        if (in2.length % 4 != 0) {
401            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
402        }
403        // Verify that input array lengths are the same.
404        if (in1.length != in2.length / 4) {
405            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
406        }
407        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
408        ain2.setAutoPadding(true);
409        ain2.copyFrom(in2);
410
411        result_int result = reduce_my_half_half4_0(ain1, ain2, null);
412        result.mTempIns = new Allocation[]{ain1, ain2};
413        return result;
414    }
415
416    // ain1 = "half a"
417    // ain2 = "half4 b"
418    public result_int reduce_my_half_half4_0(Allocation ain1, Allocation ain2) {
419        return reduce_my_half_half4_0(ain1, ain2, null);
420    }
421
422    // ain1 = "half a"
423    // ain2 = "half4 b"
424    public result_int reduce_my_half_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
425        Type t0, t1;
426        // check ain1
427        if (!ain1.getType().getElement().isCompatible(__F16)) {
428            throw new RSRuntimeException("Type mismatch with F16!");
429        }
430        // check ain2
431        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
432            throw new RSRuntimeException("Type mismatch with F16_4!");
433        }
434        // Verify dimensions
435        t0 = ain1.getType();
436        t1 = ain2.getType();
437        if ((t0.getCount() != t1.getCount()) ||
438            (t0.getX() != t1.getX()) ||
439            (t0.getY() != t1.getY()) ||
440            (t0.getZ() != t1.getZ()) ||
441            (t0.hasFaces()   != t1.hasFaces()) ||
442            (t0.hasMipmaps() != t1.hasMipmaps())) {
443            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
444        }
445
446        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
447        aout.setAutoPadding(true);
448        reduce(mExportReduceIdx_my_half_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
449        return new result_int(aout);
450    }
451
452    private final static int mExportReduceIdx_my_half_half4_1 = 5;
453    // in1 = "a"
454    // in2 = "b", flattened 4-vectors
455    public result_int reduce_my_half_half4_1(short[] in1, short[] in2) {
456        // Verify that "in1" is non-null.
457        if (in1 == null) {
458            throw new RSIllegalArgumentException("Array \"in1\" is null!");
459        }
460        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
461        ain1.setAutoPadding(true);
462        ain1.copyFrom(in1);
463        // Verify that "in2" is non-null.
464        if (in2 == null) {
465            throw new RSIllegalArgumentException("Array \"in2\" is null!");
466        }
467        // Verify that the array length is a multiple of the vector size.
468        if (in2.length % 4 != 0) {
469            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
470        }
471        // Verify that input array lengths are the same.
472        if (in1.length != in2.length / 4) {
473            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
474        }
475        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
476        ain2.setAutoPadding(true);
477        ain2.copyFrom(in2);
478
479        result_int result = reduce_my_half_half4_1(ain1, ain2, null);
480        result.mTempIns = new Allocation[]{ain1, ain2};
481        return result;
482    }
483
484    // ain1 = "half a"
485    // ain2 = "half4 b"
486    public result_int reduce_my_half_half4_1(Allocation ain1, Allocation ain2) {
487        return reduce_my_half_half4_1(ain1, ain2, null);
488    }
489
490    // ain1 = "half a"
491    // ain2 = "half4 b"
492    public result_int reduce_my_half_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
493        Type t0, t1;
494        // check ain1
495        if (!ain1.getType().getElement().isCompatible(__F16)) {
496            throw new RSRuntimeException("Type mismatch with F16!");
497        }
498        // check ain2
499        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
500            throw new RSRuntimeException("Type mismatch with F16_4!");
501        }
502        // Verify dimensions
503        t0 = ain1.getType();
504        t1 = ain2.getType();
505        if ((t0.getCount() != t1.getCount()) ||
506            (t0.getX() != t1.getX()) ||
507            (t0.getY() != t1.getY()) ||
508            (t0.getZ() != t1.getZ()) ||
509            (t0.hasFaces()   != t1.hasFaces()) ||
510            (t0.hasMipmaps() != t1.hasMipmaps())) {
511            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
512        }
513
514        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
515        aout.setAutoPadding(true);
516        reduce(mExportReduceIdx_my_half_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
517        return new result_int(aout);
518    }
519
520    private final static int mExportReduceIdx_my_half_float_0 = 6;
521    // in1 = "a"
522    // in2 = "b"
523    public result_int reduce_my_half_float_0(short[] in1, float[] in2) {
524        // Verify that "in1" is non-null.
525        if (in1 == null) {
526            throw new RSIllegalArgumentException("Array \"in1\" is null!");
527        }
528        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
529        ain1.setAutoPadding(true);
530        ain1.copyFrom(in1);
531        // Verify that "in2" is non-null.
532        if (in2 == null) {
533            throw new RSIllegalArgumentException("Array \"in2\" is null!");
534        }
535        // Verify that input array lengths are the same.
536        if (in1.length != in2.length) {
537            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
538        }
539        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
540        ain2.setAutoPadding(true);
541        ain2.copyFrom(in2);
542
543        result_int result = reduce_my_half_float_0(ain1, ain2, null);
544        result.mTempIns = new Allocation[]{ain1, ain2};
545        return result;
546    }
547
548    // ain1 = "half a"
549    // ain2 = "float b"
550    public result_int reduce_my_half_float_0(Allocation ain1, Allocation ain2) {
551        return reduce_my_half_float_0(ain1, ain2, null);
552    }
553
554    // ain1 = "half a"
555    // ain2 = "float b"
556    public result_int reduce_my_half_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
557        Type t0, t1;
558        // check ain1
559        if (!ain1.getType().getElement().isCompatible(__F16)) {
560            throw new RSRuntimeException("Type mismatch with F16!");
561        }
562        // check ain2
563        if (!ain2.getType().getElement().isCompatible(__F32)) {
564            throw new RSRuntimeException("Type mismatch with F32!");
565        }
566        // Verify dimensions
567        t0 = ain1.getType();
568        t1 = ain2.getType();
569        if ((t0.getCount() != t1.getCount()) ||
570            (t0.getX() != t1.getX()) ||
571            (t0.getY() != t1.getY()) ||
572            (t0.getZ() != t1.getZ()) ||
573            (t0.hasFaces()   != t1.hasFaces()) ||
574            (t0.hasMipmaps() != t1.hasMipmaps())) {
575            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
576        }
577
578        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
579        aout.setAutoPadding(true);
580        reduce(mExportReduceIdx_my_half_float_0, new Allocation[]{ain1, ain2}, aout, sc);
581        return new result_int(aout);
582    }
583
584    private final static int mExportReduceIdx_my_half_float_1 = 7;
585    // in1 = "a"
586    // in2 = "b"
587    public result_int reduce_my_half_float_1(short[] in1, float[] in2) {
588        // Verify that "in1" is non-null.
589        if (in1 == null) {
590            throw new RSIllegalArgumentException("Array \"in1\" is null!");
591        }
592        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
593        ain1.setAutoPadding(true);
594        ain1.copyFrom(in1);
595        // Verify that "in2" is non-null.
596        if (in2 == null) {
597            throw new RSIllegalArgumentException("Array \"in2\" is null!");
598        }
599        // Verify that input array lengths are the same.
600        if (in1.length != in2.length) {
601            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
602        }
603        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
604        ain2.setAutoPadding(true);
605        ain2.copyFrom(in2);
606
607        result_int result = reduce_my_half_float_1(ain1, ain2, null);
608        result.mTempIns = new Allocation[]{ain1, ain2};
609        return result;
610    }
611
612    // ain1 = "half a"
613    // ain2 = "float b"
614    public result_int reduce_my_half_float_1(Allocation ain1, Allocation ain2) {
615        return reduce_my_half_float_1(ain1, ain2, null);
616    }
617
618    // ain1 = "half a"
619    // ain2 = "float b"
620    public result_int reduce_my_half_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
621        Type t0, t1;
622        // check ain1
623        if (!ain1.getType().getElement().isCompatible(__F16)) {
624            throw new RSRuntimeException("Type mismatch with F16!");
625        }
626        // check ain2
627        if (!ain2.getType().getElement().isCompatible(__F32)) {
628            throw new RSRuntimeException("Type mismatch with F32!");
629        }
630        // Verify dimensions
631        t0 = ain1.getType();
632        t1 = ain2.getType();
633        if ((t0.getCount() != t1.getCount()) ||
634            (t0.getX() != t1.getX()) ||
635            (t0.getY() != t1.getY()) ||
636            (t0.getZ() != t1.getZ()) ||
637            (t0.hasFaces()   != t1.hasFaces()) ||
638            (t0.hasMipmaps() != t1.hasMipmaps())) {
639            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
640        }
641
642        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
643        aout.setAutoPadding(true);
644        reduce(mExportReduceIdx_my_half_float_1, new Allocation[]{ain1, ain2}, aout, sc);
645        return new result_int(aout);
646    }
647
648    private final static int mExportReduceIdx_my_half_float2_0 = 8;
649    // in1 = "a"
650    // in2 = "b", flattened 2-vectors
651    public result_int reduce_my_half_float2_0(short[] in1, float[] in2) {
652        // Verify that "in1" is non-null.
653        if (in1 == null) {
654            throw new RSIllegalArgumentException("Array \"in1\" is null!");
655        }
656        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
657        ain1.setAutoPadding(true);
658        ain1.copyFrom(in1);
659        // Verify that "in2" is non-null.
660        if (in2 == null) {
661            throw new RSIllegalArgumentException("Array \"in2\" is null!");
662        }
663        // Verify that the array length is a multiple of the vector size.
664        if (in2.length % 2 != 0) {
665            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
666        }
667        // Verify that input array lengths are the same.
668        if (in1.length != in2.length / 2) {
669            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
670        }
671        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
672        ain2.setAutoPadding(true);
673        ain2.copyFrom(in2);
674
675        result_int result = reduce_my_half_float2_0(ain1, ain2, null);
676        result.mTempIns = new Allocation[]{ain1, ain2};
677        return result;
678    }
679
680    // ain1 = "half a"
681    // ain2 = "float2 b"
682    public result_int reduce_my_half_float2_0(Allocation ain1, Allocation ain2) {
683        return reduce_my_half_float2_0(ain1, ain2, null);
684    }
685
686    // ain1 = "half a"
687    // ain2 = "float2 b"
688    public result_int reduce_my_half_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
689        Type t0, t1;
690        // check ain1
691        if (!ain1.getType().getElement().isCompatible(__F16)) {
692            throw new RSRuntimeException("Type mismatch with F16!");
693        }
694        // check ain2
695        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
696            throw new RSRuntimeException("Type mismatch with F32_2!");
697        }
698        // Verify dimensions
699        t0 = ain1.getType();
700        t1 = ain2.getType();
701        if ((t0.getCount() != t1.getCount()) ||
702            (t0.getX() != t1.getX()) ||
703            (t0.getY() != t1.getY()) ||
704            (t0.getZ() != t1.getZ()) ||
705            (t0.hasFaces()   != t1.hasFaces()) ||
706            (t0.hasMipmaps() != t1.hasMipmaps())) {
707            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
708        }
709
710        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
711        aout.setAutoPadding(true);
712        reduce(mExportReduceIdx_my_half_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
713        return new result_int(aout);
714    }
715
716    private final static int mExportReduceIdx_my_half_float2_1 = 9;
717    // in1 = "a"
718    // in2 = "b", flattened 2-vectors
719    public result_int reduce_my_half_float2_1(short[] in1, float[] in2) {
720        // Verify that "in1" is non-null.
721        if (in1 == null) {
722            throw new RSIllegalArgumentException("Array \"in1\" is null!");
723        }
724        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
725        ain1.setAutoPadding(true);
726        ain1.copyFrom(in1);
727        // Verify that "in2" is non-null.
728        if (in2 == null) {
729            throw new RSIllegalArgumentException("Array \"in2\" is null!");
730        }
731        // Verify that the array length is a multiple of the vector size.
732        if (in2.length % 2 != 0) {
733            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
734        }
735        // Verify that input array lengths are the same.
736        if (in1.length != in2.length / 2) {
737            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
738        }
739        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
740        ain2.setAutoPadding(true);
741        ain2.copyFrom(in2);
742
743        result_int result = reduce_my_half_float2_1(ain1, ain2, null);
744        result.mTempIns = new Allocation[]{ain1, ain2};
745        return result;
746    }
747
748    // ain1 = "half a"
749    // ain2 = "float2 b"
750    public result_int reduce_my_half_float2_1(Allocation ain1, Allocation ain2) {
751        return reduce_my_half_float2_1(ain1, ain2, null);
752    }
753
754    // ain1 = "half a"
755    // ain2 = "float2 b"
756    public result_int reduce_my_half_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
757        Type t0, t1;
758        // check ain1
759        if (!ain1.getType().getElement().isCompatible(__F16)) {
760            throw new RSRuntimeException("Type mismatch with F16!");
761        }
762        // check ain2
763        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
764            throw new RSRuntimeException("Type mismatch with F32_2!");
765        }
766        // Verify dimensions
767        t0 = ain1.getType();
768        t1 = ain2.getType();
769        if ((t0.getCount() != t1.getCount()) ||
770            (t0.getX() != t1.getX()) ||
771            (t0.getY() != t1.getY()) ||
772            (t0.getZ() != t1.getZ()) ||
773            (t0.hasFaces()   != t1.hasFaces()) ||
774            (t0.hasMipmaps() != t1.hasMipmaps())) {
775            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
776        }
777
778        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
779        aout.setAutoPadding(true);
780        reduce(mExportReduceIdx_my_half_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
781        return new result_int(aout);
782    }
783
784    private final static int mExportReduceIdx_my_half_float4_0 = 10;
785    // in1 = "a"
786    // in2 = "b", flattened 4-vectors
787    public result_int reduce_my_half_float4_0(short[] in1, float[] in2) {
788        // Verify that "in1" is non-null.
789        if (in1 == null) {
790            throw new RSIllegalArgumentException("Array \"in1\" is null!");
791        }
792        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
793        ain1.setAutoPadding(true);
794        ain1.copyFrom(in1);
795        // Verify that "in2" is non-null.
796        if (in2 == null) {
797            throw new RSIllegalArgumentException("Array \"in2\" is null!");
798        }
799        // Verify that the array length is a multiple of the vector size.
800        if (in2.length % 4 != 0) {
801            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
802        }
803        // Verify that input array lengths are the same.
804        if (in1.length != in2.length / 4) {
805            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
806        }
807        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
808        ain2.setAutoPadding(true);
809        ain2.copyFrom(in2);
810
811        result_int result = reduce_my_half_float4_0(ain1, ain2, null);
812        result.mTempIns = new Allocation[]{ain1, ain2};
813        return result;
814    }
815
816    // ain1 = "half a"
817    // ain2 = "float4 b"
818    public result_int reduce_my_half_float4_0(Allocation ain1, Allocation ain2) {
819        return reduce_my_half_float4_0(ain1, ain2, null);
820    }
821
822    // ain1 = "half a"
823    // ain2 = "float4 b"
824    public result_int reduce_my_half_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
825        Type t0, t1;
826        // check ain1
827        if (!ain1.getType().getElement().isCompatible(__F16)) {
828            throw new RSRuntimeException("Type mismatch with F16!");
829        }
830        // check ain2
831        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
832            throw new RSRuntimeException("Type mismatch with F32_4!");
833        }
834        // Verify dimensions
835        t0 = ain1.getType();
836        t1 = ain2.getType();
837        if ((t0.getCount() != t1.getCount()) ||
838            (t0.getX() != t1.getX()) ||
839            (t0.getY() != t1.getY()) ||
840            (t0.getZ() != t1.getZ()) ||
841            (t0.hasFaces()   != t1.hasFaces()) ||
842            (t0.hasMipmaps() != t1.hasMipmaps())) {
843            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
844        }
845
846        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
847        aout.setAutoPadding(true);
848        reduce(mExportReduceIdx_my_half_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
849        return new result_int(aout);
850    }
851
852    private final static int mExportReduceIdx_my_half_float4_1 = 11;
853    // in1 = "a"
854    // in2 = "b", flattened 4-vectors
855    public result_int reduce_my_half_float4_1(short[] in1, float[] in2) {
856        // Verify that "in1" is non-null.
857        if (in1 == null) {
858            throw new RSIllegalArgumentException("Array \"in1\" is null!");
859        }
860        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
861        ain1.setAutoPadding(true);
862        ain1.copyFrom(in1);
863        // Verify that "in2" is non-null.
864        if (in2 == null) {
865            throw new RSIllegalArgumentException("Array \"in2\" is null!");
866        }
867        // Verify that the array length is a multiple of the vector size.
868        if (in2.length % 4 != 0) {
869            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
870        }
871        // Verify that input array lengths are the same.
872        if (in1.length != in2.length / 4) {
873            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
874        }
875        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
876        ain2.setAutoPadding(true);
877        ain2.copyFrom(in2);
878
879        result_int result = reduce_my_half_float4_1(ain1, ain2, null);
880        result.mTempIns = new Allocation[]{ain1, ain2};
881        return result;
882    }
883
884    // ain1 = "half a"
885    // ain2 = "float4 b"
886    public result_int reduce_my_half_float4_1(Allocation ain1, Allocation ain2) {
887        return reduce_my_half_float4_1(ain1, ain2, null);
888    }
889
890    // ain1 = "half a"
891    // ain2 = "float4 b"
892    public result_int reduce_my_half_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
893        Type t0, t1;
894        // check ain1
895        if (!ain1.getType().getElement().isCompatible(__F16)) {
896            throw new RSRuntimeException("Type mismatch with F16!");
897        }
898        // check ain2
899        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
900            throw new RSRuntimeException("Type mismatch with F32_4!");
901        }
902        // Verify dimensions
903        t0 = ain1.getType();
904        t1 = ain2.getType();
905        if ((t0.getCount() != t1.getCount()) ||
906            (t0.getX() != t1.getX()) ||
907            (t0.getY() != t1.getY()) ||
908            (t0.getZ() != t1.getZ()) ||
909            (t0.hasFaces()   != t1.hasFaces()) ||
910            (t0.hasMipmaps() != t1.hasMipmaps())) {
911            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
912        }
913
914        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
915        aout.setAutoPadding(true);
916        reduce(mExportReduceIdx_my_half_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
917        return new result_int(aout);
918    }
919
920    private final static int mExportReduceIdx_my_half_char_0 = 12;
921    // in1 = "a"
922    // in2 = "b"
923    public result_int reduce_my_half_char_0(short[] in1, byte[] in2) {
924        // Verify that "in1" is non-null.
925        if (in1 == null) {
926            throw new RSIllegalArgumentException("Array \"in1\" is null!");
927        }
928        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
929        ain1.setAutoPadding(true);
930        ain1.copyFrom(in1);
931        // Verify that "in2" is non-null.
932        if (in2 == null) {
933            throw new RSIllegalArgumentException("Array \"in2\" is null!");
934        }
935        // Verify that input array lengths are the same.
936        if (in1.length != in2.length) {
937            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
938        }
939        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
940        ain2.setAutoPadding(true);
941        ain2.copyFrom(in2);
942
943        result_int result = reduce_my_half_char_0(ain1, ain2, null);
944        result.mTempIns = new Allocation[]{ain1, ain2};
945        return result;
946    }
947
948    // ain1 = "half a"
949    // ain2 = "char b"
950    public result_int reduce_my_half_char_0(Allocation ain1, Allocation ain2) {
951        return reduce_my_half_char_0(ain1, ain2, null);
952    }
953
954    // ain1 = "half a"
955    // ain2 = "char b"
956    public result_int reduce_my_half_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
957        Type t0, t1;
958        // check ain1
959        if (!ain1.getType().getElement().isCompatible(__F16)) {
960            throw new RSRuntimeException("Type mismatch with F16!");
961        }
962        // check ain2
963        if (!ain2.getType().getElement().isCompatible(__I8)) {
964            throw new RSRuntimeException("Type mismatch with I8!");
965        }
966        // Verify dimensions
967        t0 = ain1.getType();
968        t1 = ain2.getType();
969        if ((t0.getCount() != t1.getCount()) ||
970            (t0.getX() != t1.getX()) ||
971            (t0.getY() != t1.getY()) ||
972            (t0.getZ() != t1.getZ()) ||
973            (t0.hasFaces()   != t1.hasFaces()) ||
974            (t0.hasMipmaps() != t1.hasMipmaps())) {
975            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
976        }
977
978        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
979        aout.setAutoPadding(true);
980        reduce(mExportReduceIdx_my_half_char_0, new Allocation[]{ain1, ain2}, aout, sc);
981        return new result_int(aout);
982    }
983
984    private final static int mExportReduceIdx_my_half_char_1 = 13;
985    // in1 = "a"
986    // in2 = "b"
987    public result_int reduce_my_half_char_1(short[] in1, byte[] in2) {
988        // Verify that "in1" is non-null.
989        if (in1 == null) {
990            throw new RSIllegalArgumentException("Array \"in1\" is null!");
991        }
992        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
993        ain1.setAutoPadding(true);
994        ain1.copyFrom(in1);
995        // Verify that "in2" is non-null.
996        if (in2 == null) {
997            throw new RSIllegalArgumentException("Array \"in2\" is null!");
998        }
999        // Verify that input array lengths are the same.
1000        if (in1.length != in2.length) {
1001            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1002        }
1003        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
1004        ain2.setAutoPadding(true);
1005        ain2.copyFrom(in2);
1006
1007        result_int result = reduce_my_half_char_1(ain1, ain2, null);
1008        result.mTempIns = new Allocation[]{ain1, ain2};
1009        return result;
1010    }
1011
1012    // ain1 = "half a"
1013    // ain2 = "char b"
1014    public result_int reduce_my_half_char_1(Allocation ain1, Allocation ain2) {
1015        return reduce_my_half_char_1(ain1, ain2, null);
1016    }
1017
1018    // ain1 = "half a"
1019    // ain2 = "char b"
1020    public result_int reduce_my_half_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1021        Type t0, t1;
1022        // check ain1
1023        if (!ain1.getType().getElement().isCompatible(__F16)) {
1024            throw new RSRuntimeException("Type mismatch with F16!");
1025        }
1026        // check ain2
1027        if (!ain2.getType().getElement().isCompatible(__I8)) {
1028            throw new RSRuntimeException("Type mismatch with I8!");
1029        }
1030        // Verify dimensions
1031        t0 = ain1.getType();
1032        t1 = ain2.getType();
1033        if ((t0.getCount() != t1.getCount()) ||
1034            (t0.getX() != t1.getX()) ||
1035            (t0.getY() != t1.getY()) ||
1036            (t0.getZ() != t1.getZ()) ||
1037            (t0.hasFaces()   != t1.hasFaces()) ||
1038            (t0.hasMipmaps() != t1.hasMipmaps())) {
1039            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1040        }
1041
1042        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1043        aout.setAutoPadding(true);
1044        reduce(mExportReduceIdx_my_half_char_1, new Allocation[]{ain1, ain2}, aout, sc);
1045        return new result_int(aout);
1046    }
1047
1048    private final static int mExportReduceIdx_my_half_char2_0 = 14;
1049    // in1 = "a"
1050    // in2 = "b", flattened 2-vectors
1051    public result_int reduce_my_half_char2_0(short[] in1, byte[] in2) {
1052        // Verify that "in1" is non-null.
1053        if (in1 == null) {
1054            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1055        }
1056        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1057        ain1.setAutoPadding(true);
1058        ain1.copyFrom(in1);
1059        // Verify that "in2" is non-null.
1060        if (in2 == null) {
1061            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1062        }
1063        // Verify that the array length is a multiple of the vector size.
1064        if (in2.length % 2 != 0) {
1065            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
1066        }
1067        // Verify that input array lengths are the same.
1068        if (in1.length != in2.length / 2) {
1069            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1070        }
1071        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
1072        ain2.setAutoPadding(true);
1073        ain2.copyFrom(in2);
1074
1075        result_int result = reduce_my_half_char2_0(ain1, ain2, null);
1076        result.mTempIns = new Allocation[]{ain1, ain2};
1077        return result;
1078    }
1079
1080    // ain1 = "half a"
1081    // ain2 = "char2 b"
1082    public result_int reduce_my_half_char2_0(Allocation ain1, Allocation ain2) {
1083        return reduce_my_half_char2_0(ain1, ain2, null);
1084    }
1085
1086    // ain1 = "half a"
1087    // ain2 = "char2 b"
1088    public result_int reduce_my_half_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1089        Type t0, t1;
1090        // check ain1
1091        if (!ain1.getType().getElement().isCompatible(__F16)) {
1092            throw new RSRuntimeException("Type mismatch with F16!");
1093        }
1094        // check ain2
1095        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
1096            throw new RSRuntimeException("Type mismatch with I8_2!");
1097        }
1098        // Verify dimensions
1099        t0 = ain1.getType();
1100        t1 = ain2.getType();
1101        if ((t0.getCount() != t1.getCount()) ||
1102            (t0.getX() != t1.getX()) ||
1103            (t0.getY() != t1.getY()) ||
1104            (t0.getZ() != t1.getZ()) ||
1105            (t0.hasFaces()   != t1.hasFaces()) ||
1106            (t0.hasMipmaps() != t1.hasMipmaps())) {
1107            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1108        }
1109
1110        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1111        aout.setAutoPadding(true);
1112        reduce(mExportReduceIdx_my_half_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
1113        return new result_int(aout);
1114    }
1115
1116    private final static int mExportReduceIdx_my_half_char2_1 = 15;
1117    // in1 = "a"
1118    // in2 = "b", flattened 2-vectors
1119    public result_int reduce_my_half_char2_1(short[] in1, byte[] in2) {
1120        // Verify that "in1" is non-null.
1121        if (in1 == null) {
1122            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1123        }
1124        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1125        ain1.setAutoPadding(true);
1126        ain1.copyFrom(in1);
1127        // Verify that "in2" is non-null.
1128        if (in2 == null) {
1129            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1130        }
1131        // Verify that the array length is a multiple of the vector size.
1132        if (in2.length % 2 != 0) {
1133            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
1134        }
1135        // Verify that input array lengths are the same.
1136        if (in1.length != in2.length / 2) {
1137            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1138        }
1139        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
1140        ain2.setAutoPadding(true);
1141        ain2.copyFrom(in2);
1142
1143        result_int result = reduce_my_half_char2_1(ain1, ain2, null);
1144        result.mTempIns = new Allocation[]{ain1, ain2};
1145        return result;
1146    }
1147
1148    // ain1 = "half a"
1149    // ain2 = "char2 b"
1150    public result_int reduce_my_half_char2_1(Allocation ain1, Allocation ain2) {
1151        return reduce_my_half_char2_1(ain1, ain2, null);
1152    }
1153
1154    // ain1 = "half a"
1155    // ain2 = "char2 b"
1156    public result_int reduce_my_half_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1157        Type t0, t1;
1158        // check ain1
1159        if (!ain1.getType().getElement().isCompatible(__F16)) {
1160            throw new RSRuntimeException("Type mismatch with F16!");
1161        }
1162        // check ain2
1163        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
1164            throw new RSRuntimeException("Type mismatch with I8_2!");
1165        }
1166        // Verify dimensions
1167        t0 = ain1.getType();
1168        t1 = ain2.getType();
1169        if ((t0.getCount() != t1.getCount()) ||
1170            (t0.getX() != t1.getX()) ||
1171            (t0.getY() != t1.getY()) ||
1172            (t0.getZ() != t1.getZ()) ||
1173            (t0.hasFaces()   != t1.hasFaces()) ||
1174            (t0.hasMipmaps() != t1.hasMipmaps())) {
1175            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1176        }
1177
1178        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1179        aout.setAutoPadding(true);
1180        reduce(mExportReduceIdx_my_half_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
1181        return new result_int(aout);
1182    }
1183
1184    private final static int mExportReduceIdx_my_half_char4_0 = 16;
1185    // in1 = "a"
1186    // in2 = "b", flattened 4-vectors
1187    public result_int reduce_my_half_char4_0(short[] in1, byte[] in2) {
1188        // Verify that "in1" is non-null.
1189        if (in1 == null) {
1190            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1191        }
1192        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1193        ain1.setAutoPadding(true);
1194        ain1.copyFrom(in1);
1195        // Verify that "in2" is non-null.
1196        if (in2 == null) {
1197            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1198        }
1199        // Verify that the array length is a multiple of the vector size.
1200        if (in2.length % 4 != 0) {
1201            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
1202        }
1203        // Verify that input array lengths are the same.
1204        if (in1.length != in2.length / 4) {
1205            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1206        }
1207        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
1208        ain2.setAutoPadding(true);
1209        ain2.copyFrom(in2);
1210
1211        result_int result = reduce_my_half_char4_0(ain1, ain2, null);
1212        result.mTempIns = new Allocation[]{ain1, ain2};
1213        return result;
1214    }
1215
1216    // ain1 = "half a"
1217    // ain2 = "char4 b"
1218    public result_int reduce_my_half_char4_0(Allocation ain1, Allocation ain2) {
1219        return reduce_my_half_char4_0(ain1, ain2, null);
1220    }
1221
1222    // ain1 = "half a"
1223    // ain2 = "char4 b"
1224    public result_int reduce_my_half_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1225        Type t0, t1;
1226        // check ain1
1227        if (!ain1.getType().getElement().isCompatible(__F16)) {
1228            throw new RSRuntimeException("Type mismatch with F16!");
1229        }
1230        // check ain2
1231        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
1232            throw new RSRuntimeException("Type mismatch with I8_4!");
1233        }
1234        // Verify dimensions
1235        t0 = ain1.getType();
1236        t1 = ain2.getType();
1237        if ((t0.getCount() != t1.getCount()) ||
1238            (t0.getX() != t1.getX()) ||
1239            (t0.getY() != t1.getY()) ||
1240            (t0.getZ() != t1.getZ()) ||
1241            (t0.hasFaces()   != t1.hasFaces()) ||
1242            (t0.hasMipmaps() != t1.hasMipmaps())) {
1243            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1244        }
1245
1246        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1247        aout.setAutoPadding(true);
1248        reduce(mExportReduceIdx_my_half_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
1249        return new result_int(aout);
1250    }
1251
1252    private final static int mExportReduceIdx_my_half_char4_1 = 17;
1253    // in1 = "a"
1254    // in2 = "b", flattened 4-vectors
1255    public result_int reduce_my_half_char4_1(short[] in1, byte[] in2) {
1256        // Verify that "in1" is non-null.
1257        if (in1 == null) {
1258            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1259        }
1260        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1261        ain1.setAutoPadding(true);
1262        ain1.copyFrom(in1);
1263        // Verify that "in2" is non-null.
1264        if (in2 == null) {
1265            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1266        }
1267        // Verify that the array length is a multiple of the vector size.
1268        if (in2.length % 4 != 0) {
1269            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
1270        }
1271        // Verify that input array lengths are the same.
1272        if (in1.length != in2.length / 4) {
1273            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1274        }
1275        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
1276        ain2.setAutoPadding(true);
1277        ain2.copyFrom(in2);
1278
1279        result_int result = reduce_my_half_char4_1(ain1, ain2, null);
1280        result.mTempIns = new Allocation[]{ain1, ain2};
1281        return result;
1282    }
1283
1284    // ain1 = "half a"
1285    // ain2 = "char4 b"
1286    public result_int reduce_my_half_char4_1(Allocation ain1, Allocation ain2) {
1287        return reduce_my_half_char4_1(ain1, ain2, null);
1288    }
1289
1290    // ain1 = "half a"
1291    // ain2 = "char4 b"
1292    public result_int reduce_my_half_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1293        Type t0, t1;
1294        // check ain1
1295        if (!ain1.getType().getElement().isCompatible(__F16)) {
1296            throw new RSRuntimeException("Type mismatch with F16!");
1297        }
1298        // check ain2
1299        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
1300            throw new RSRuntimeException("Type mismatch with I8_4!");
1301        }
1302        // Verify dimensions
1303        t0 = ain1.getType();
1304        t1 = ain2.getType();
1305        if ((t0.getCount() != t1.getCount()) ||
1306            (t0.getX() != t1.getX()) ||
1307            (t0.getY() != t1.getY()) ||
1308            (t0.getZ() != t1.getZ()) ||
1309            (t0.hasFaces()   != t1.hasFaces()) ||
1310            (t0.hasMipmaps() != t1.hasMipmaps())) {
1311            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1312        }
1313
1314        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1315        aout.setAutoPadding(true);
1316        reduce(mExportReduceIdx_my_half_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
1317        return new result_int(aout);
1318    }
1319
1320    private final static int mExportReduceIdx_my_half_short_0 = 18;
1321    // in1 = "a"
1322    // in2 = "b"
1323    public result_int reduce_my_half_short_0(short[] in1, short[] in2) {
1324        // Verify that "in1" is non-null.
1325        if (in1 == null) {
1326            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1327        }
1328        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1329        ain1.setAutoPadding(true);
1330        ain1.copyFrom(in1);
1331        // Verify that "in2" is non-null.
1332        if (in2 == null) {
1333            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1334        }
1335        // Verify that input array lengths are the same.
1336        if (in1.length != in2.length) {
1337            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1338        }
1339        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
1340        ain2.setAutoPadding(true);
1341        ain2.copyFrom(in2);
1342
1343        result_int result = reduce_my_half_short_0(ain1, ain2, null);
1344        result.mTempIns = new Allocation[]{ain1, ain2};
1345        return result;
1346    }
1347
1348    // ain1 = "half a"
1349    // ain2 = "short b"
1350    public result_int reduce_my_half_short_0(Allocation ain1, Allocation ain2) {
1351        return reduce_my_half_short_0(ain1, ain2, null);
1352    }
1353
1354    // ain1 = "half a"
1355    // ain2 = "short b"
1356    public result_int reduce_my_half_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1357        Type t0, t1;
1358        // check ain1
1359        if (!ain1.getType().getElement().isCompatible(__F16)) {
1360            throw new RSRuntimeException("Type mismatch with F16!");
1361        }
1362        // check ain2
1363        if (!ain2.getType().getElement().isCompatible(__I16)) {
1364            throw new RSRuntimeException("Type mismatch with I16!");
1365        }
1366        // Verify dimensions
1367        t0 = ain1.getType();
1368        t1 = ain2.getType();
1369        if ((t0.getCount() != t1.getCount()) ||
1370            (t0.getX() != t1.getX()) ||
1371            (t0.getY() != t1.getY()) ||
1372            (t0.getZ() != t1.getZ()) ||
1373            (t0.hasFaces()   != t1.hasFaces()) ||
1374            (t0.hasMipmaps() != t1.hasMipmaps())) {
1375            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1376        }
1377
1378        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1379        aout.setAutoPadding(true);
1380        reduce(mExportReduceIdx_my_half_short_0, new Allocation[]{ain1, ain2}, aout, sc);
1381        return new result_int(aout);
1382    }
1383
1384    private final static int mExportReduceIdx_my_half_short_1 = 19;
1385    // in1 = "a"
1386    // in2 = "b"
1387    public result_int reduce_my_half_short_1(short[] in1, short[] in2) {
1388        // Verify that "in1" is non-null.
1389        if (in1 == null) {
1390            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1391        }
1392        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1393        ain1.setAutoPadding(true);
1394        ain1.copyFrom(in1);
1395        // Verify that "in2" is non-null.
1396        if (in2 == null) {
1397            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1398        }
1399        // Verify that input array lengths are the same.
1400        if (in1.length != in2.length) {
1401            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1402        }
1403        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
1404        ain2.setAutoPadding(true);
1405        ain2.copyFrom(in2);
1406
1407        result_int result = reduce_my_half_short_1(ain1, ain2, null);
1408        result.mTempIns = new Allocation[]{ain1, ain2};
1409        return result;
1410    }
1411
1412    // ain1 = "half a"
1413    // ain2 = "short b"
1414    public result_int reduce_my_half_short_1(Allocation ain1, Allocation ain2) {
1415        return reduce_my_half_short_1(ain1, ain2, null);
1416    }
1417
1418    // ain1 = "half a"
1419    // ain2 = "short b"
1420    public result_int reduce_my_half_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1421        Type t0, t1;
1422        // check ain1
1423        if (!ain1.getType().getElement().isCompatible(__F16)) {
1424            throw new RSRuntimeException("Type mismatch with F16!");
1425        }
1426        // check ain2
1427        if (!ain2.getType().getElement().isCompatible(__I16)) {
1428            throw new RSRuntimeException("Type mismatch with I16!");
1429        }
1430        // Verify dimensions
1431        t0 = ain1.getType();
1432        t1 = ain2.getType();
1433        if ((t0.getCount() != t1.getCount()) ||
1434            (t0.getX() != t1.getX()) ||
1435            (t0.getY() != t1.getY()) ||
1436            (t0.getZ() != t1.getZ()) ||
1437            (t0.hasFaces()   != t1.hasFaces()) ||
1438            (t0.hasMipmaps() != t1.hasMipmaps())) {
1439            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1440        }
1441
1442        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1443        aout.setAutoPadding(true);
1444        reduce(mExportReduceIdx_my_half_short_1, new Allocation[]{ain1, ain2}, aout, sc);
1445        return new result_int(aout);
1446    }
1447
1448    private final static int mExportReduceIdx_my_half_short2_0 = 20;
1449    // in1 = "a"
1450    // in2 = "b", flattened 2-vectors
1451    public result_int reduce_my_half_short2_0(short[] in1, short[] in2) {
1452        // Verify that "in1" is non-null.
1453        if (in1 == null) {
1454            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1455        }
1456        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1457        ain1.setAutoPadding(true);
1458        ain1.copyFrom(in1);
1459        // Verify that "in2" is non-null.
1460        if (in2 == null) {
1461            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1462        }
1463        // Verify that the array length is a multiple of the vector size.
1464        if (in2.length % 2 != 0) {
1465            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
1466        }
1467        // Verify that input array lengths are the same.
1468        if (in1.length != in2.length / 2) {
1469            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1470        }
1471        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
1472        ain2.setAutoPadding(true);
1473        ain2.copyFrom(in2);
1474
1475        result_int result = reduce_my_half_short2_0(ain1, ain2, null);
1476        result.mTempIns = new Allocation[]{ain1, ain2};
1477        return result;
1478    }
1479
1480    // ain1 = "half a"
1481    // ain2 = "short2 b"
1482    public result_int reduce_my_half_short2_0(Allocation ain1, Allocation ain2) {
1483        return reduce_my_half_short2_0(ain1, ain2, null);
1484    }
1485
1486    // ain1 = "half a"
1487    // ain2 = "short2 b"
1488    public result_int reduce_my_half_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1489        Type t0, t1;
1490        // check ain1
1491        if (!ain1.getType().getElement().isCompatible(__F16)) {
1492            throw new RSRuntimeException("Type mismatch with F16!");
1493        }
1494        // check ain2
1495        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
1496            throw new RSRuntimeException("Type mismatch with I16_2!");
1497        }
1498        // Verify dimensions
1499        t0 = ain1.getType();
1500        t1 = ain2.getType();
1501        if ((t0.getCount() != t1.getCount()) ||
1502            (t0.getX() != t1.getX()) ||
1503            (t0.getY() != t1.getY()) ||
1504            (t0.getZ() != t1.getZ()) ||
1505            (t0.hasFaces()   != t1.hasFaces()) ||
1506            (t0.hasMipmaps() != t1.hasMipmaps())) {
1507            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1508        }
1509
1510        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1511        aout.setAutoPadding(true);
1512        reduce(mExportReduceIdx_my_half_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
1513        return new result_int(aout);
1514    }
1515
1516    private final static int mExportReduceIdx_my_half_short2_1 = 21;
1517    // in1 = "a"
1518    // in2 = "b", flattened 2-vectors
1519    public result_int reduce_my_half_short2_1(short[] in1, short[] in2) {
1520        // Verify that "in1" is non-null.
1521        if (in1 == null) {
1522            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1523        }
1524        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1525        ain1.setAutoPadding(true);
1526        ain1.copyFrom(in1);
1527        // Verify that "in2" is non-null.
1528        if (in2 == null) {
1529            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1530        }
1531        // Verify that the array length is a multiple of the vector size.
1532        if (in2.length % 2 != 0) {
1533            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
1534        }
1535        // Verify that input array lengths are the same.
1536        if (in1.length != in2.length / 2) {
1537            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1538        }
1539        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
1540        ain2.setAutoPadding(true);
1541        ain2.copyFrom(in2);
1542
1543        result_int result = reduce_my_half_short2_1(ain1, ain2, null);
1544        result.mTempIns = new Allocation[]{ain1, ain2};
1545        return result;
1546    }
1547
1548    // ain1 = "half a"
1549    // ain2 = "short2 b"
1550    public result_int reduce_my_half_short2_1(Allocation ain1, Allocation ain2) {
1551        return reduce_my_half_short2_1(ain1, ain2, null);
1552    }
1553
1554    // ain1 = "half a"
1555    // ain2 = "short2 b"
1556    public result_int reduce_my_half_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1557        Type t0, t1;
1558        // check ain1
1559        if (!ain1.getType().getElement().isCompatible(__F16)) {
1560            throw new RSRuntimeException("Type mismatch with F16!");
1561        }
1562        // check ain2
1563        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
1564            throw new RSRuntimeException("Type mismatch with I16_2!");
1565        }
1566        // Verify dimensions
1567        t0 = ain1.getType();
1568        t1 = ain2.getType();
1569        if ((t0.getCount() != t1.getCount()) ||
1570            (t0.getX() != t1.getX()) ||
1571            (t0.getY() != t1.getY()) ||
1572            (t0.getZ() != t1.getZ()) ||
1573            (t0.hasFaces()   != t1.hasFaces()) ||
1574            (t0.hasMipmaps() != t1.hasMipmaps())) {
1575            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1576        }
1577
1578        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1579        aout.setAutoPadding(true);
1580        reduce(mExportReduceIdx_my_half_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
1581        return new result_int(aout);
1582    }
1583
1584    private final static int mExportReduceIdx_my_half_short4_0 = 22;
1585    // in1 = "a"
1586    // in2 = "b", flattened 4-vectors
1587    public result_int reduce_my_half_short4_0(short[] in1, short[] in2) {
1588        // Verify that "in1" is non-null.
1589        if (in1 == null) {
1590            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1591        }
1592        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1593        ain1.setAutoPadding(true);
1594        ain1.copyFrom(in1);
1595        // Verify that "in2" is non-null.
1596        if (in2 == null) {
1597            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1598        }
1599        // Verify that the array length is a multiple of the vector size.
1600        if (in2.length % 4 != 0) {
1601            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
1602        }
1603        // Verify that input array lengths are the same.
1604        if (in1.length != in2.length / 4) {
1605            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1606        }
1607        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
1608        ain2.setAutoPadding(true);
1609        ain2.copyFrom(in2);
1610
1611        result_int result = reduce_my_half_short4_0(ain1, ain2, null);
1612        result.mTempIns = new Allocation[]{ain1, ain2};
1613        return result;
1614    }
1615
1616    // ain1 = "half a"
1617    // ain2 = "short4 b"
1618    public result_int reduce_my_half_short4_0(Allocation ain1, Allocation ain2) {
1619        return reduce_my_half_short4_0(ain1, ain2, null);
1620    }
1621
1622    // ain1 = "half a"
1623    // ain2 = "short4 b"
1624    public result_int reduce_my_half_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1625        Type t0, t1;
1626        // check ain1
1627        if (!ain1.getType().getElement().isCompatible(__F16)) {
1628            throw new RSRuntimeException("Type mismatch with F16!");
1629        }
1630        // check ain2
1631        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
1632            throw new RSRuntimeException("Type mismatch with I16_4!");
1633        }
1634        // Verify dimensions
1635        t0 = ain1.getType();
1636        t1 = ain2.getType();
1637        if ((t0.getCount() != t1.getCount()) ||
1638            (t0.getX() != t1.getX()) ||
1639            (t0.getY() != t1.getY()) ||
1640            (t0.getZ() != t1.getZ()) ||
1641            (t0.hasFaces()   != t1.hasFaces()) ||
1642            (t0.hasMipmaps() != t1.hasMipmaps())) {
1643            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1644        }
1645
1646        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1647        aout.setAutoPadding(true);
1648        reduce(mExportReduceIdx_my_half_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
1649        return new result_int(aout);
1650    }
1651
1652    private final static int mExportReduceIdx_my_half_short4_1 = 23;
1653    // in1 = "a"
1654    // in2 = "b", flattened 4-vectors
1655    public result_int reduce_my_half_short4_1(short[] in1, short[] in2) {
1656        // Verify that "in1" is non-null.
1657        if (in1 == null) {
1658            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1659        }
1660        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1661        ain1.setAutoPadding(true);
1662        ain1.copyFrom(in1);
1663        // Verify that "in2" is non-null.
1664        if (in2 == null) {
1665            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1666        }
1667        // Verify that the array length is a multiple of the vector size.
1668        if (in2.length % 4 != 0) {
1669            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
1670        }
1671        // Verify that input array lengths are the same.
1672        if (in1.length != in2.length / 4) {
1673            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1674        }
1675        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
1676        ain2.setAutoPadding(true);
1677        ain2.copyFrom(in2);
1678
1679        result_int result = reduce_my_half_short4_1(ain1, ain2, null);
1680        result.mTempIns = new Allocation[]{ain1, ain2};
1681        return result;
1682    }
1683
1684    // ain1 = "half a"
1685    // ain2 = "short4 b"
1686    public result_int reduce_my_half_short4_1(Allocation ain1, Allocation ain2) {
1687        return reduce_my_half_short4_1(ain1, ain2, null);
1688    }
1689
1690    // ain1 = "half a"
1691    // ain2 = "short4 b"
1692    public result_int reduce_my_half_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1693        Type t0, t1;
1694        // check ain1
1695        if (!ain1.getType().getElement().isCompatible(__F16)) {
1696            throw new RSRuntimeException("Type mismatch with F16!");
1697        }
1698        // check ain2
1699        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
1700            throw new RSRuntimeException("Type mismatch with I16_4!");
1701        }
1702        // Verify dimensions
1703        t0 = ain1.getType();
1704        t1 = ain2.getType();
1705        if ((t0.getCount() != t1.getCount()) ||
1706            (t0.getX() != t1.getX()) ||
1707            (t0.getY() != t1.getY()) ||
1708            (t0.getZ() != t1.getZ()) ||
1709            (t0.hasFaces()   != t1.hasFaces()) ||
1710            (t0.hasMipmaps() != t1.hasMipmaps())) {
1711            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1712        }
1713
1714        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1715        aout.setAutoPadding(true);
1716        reduce(mExportReduceIdx_my_half_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
1717        return new result_int(aout);
1718    }
1719
1720    private final static int mExportReduceIdx_my_half_uchar_0 = 24;
1721    // in1 = "a"
1722    // in2 = "b"
1723    public result_int reduce_my_half_uchar_0(short[] in1, byte[] in2) {
1724        // Verify that "in1" is non-null.
1725        if (in1 == null) {
1726            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1727        }
1728        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1729        ain1.setAutoPadding(true);
1730        ain1.copyFrom(in1);
1731        // Verify that "in2" is non-null.
1732        if (in2 == null) {
1733            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1734        }
1735        // Verify that input array lengths are the same.
1736        if (in1.length != in2.length) {
1737            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1738        }
1739        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
1740        ain2.setAutoPadding(true);
1741        ain2.copyFrom(in2);
1742
1743        result_int result = reduce_my_half_uchar_0(ain1, ain2, null);
1744        result.mTempIns = new Allocation[]{ain1, ain2};
1745        return result;
1746    }
1747
1748    // ain1 = "half a"
1749    // ain2 = "uchar b"
1750    public result_int reduce_my_half_uchar_0(Allocation ain1, Allocation ain2) {
1751        return reduce_my_half_uchar_0(ain1, ain2, null);
1752    }
1753
1754    // ain1 = "half a"
1755    // ain2 = "uchar b"
1756    public result_int reduce_my_half_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1757        Type t0, t1;
1758        // check ain1
1759        if (!ain1.getType().getElement().isCompatible(__F16)) {
1760            throw new RSRuntimeException("Type mismatch with F16!");
1761        }
1762        // check ain2
1763        if (!ain2.getType().getElement().isCompatible(__U8)) {
1764            throw new RSRuntimeException("Type mismatch with U8!");
1765        }
1766        // Verify dimensions
1767        t0 = ain1.getType();
1768        t1 = ain2.getType();
1769        if ((t0.getCount() != t1.getCount()) ||
1770            (t0.getX() != t1.getX()) ||
1771            (t0.getY() != t1.getY()) ||
1772            (t0.getZ() != t1.getZ()) ||
1773            (t0.hasFaces()   != t1.hasFaces()) ||
1774            (t0.hasMipmaps() != t1.hasMipmaps())) {
1775            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1776        }
1777
1778        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1779        aout.setAutoPadding(true);
1780        reduce(mExportReduceIdx_my_half_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
1781        return new result_int(aout);
1782    }
1783
1784    private final static int mExportReduceIdx_my_half_uchar_1 = 25;
1785    // in1 = "a"
1786    // in2 = "b"
1787    public result_int reduce_my_half_uchar_1(short[] in1, byte[] in2) {
1788        // Verify that "in1" is non-null.
1789        if (in1 == null) {
1790            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1791        }
1792        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1793        ain1.setAutoPadding(true);
1794        ain1.copyFrom(in1);
1795        // Verify that "in2" is non-null.
1796        if (in2 == null) {
1797            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1798        }
1799        // Verify that input array lengths are the same.
1800        if (in1.length != in2.length) {
1801            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1802        }
1803        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
1804        ain2.setAutoPadding(true);
1805        ain2.copyFrom(in2);
1806
1807        result_int result = reduce_my_half_uchar_1(ain1, ain2, null);
1808        result.mTempIns = new Allocation[]{ain1, ain2};
1809        return result;
1810    }
1811
1812    // ain1 = "half a"
1813    // ain2 = "uchar b"
1814    public result_int reduce_my_half_uchar_1(Allocation ain1, Allocation ain2) {
1815        return reduce_my_half_uchar_1(ain1, ain2, null);
1816    }
1817
1818    // ain1 = "half a"
1819    // ain2 = "uchar b"
1820    public result_int reduce_my_half_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1821        Type t0, t1;
1822        // check ain1
1823        if (!ain1.getType().getElement().isCompatible(__F16)) {
1824            throw new RSRuntimeException("Type mismatch with F16!");
1825        }
1826        // check ain2
1827        if (!ain2.getType().getElement().isCompatible(__U8)) {
1828            throw new RSRuntimeException("Type mismatch with U8!");
1829        }
1830        // Verify dimensions
1831        t0 = ain1.getType();
1832        t1 = ain2.getType();
1833        if ((t0.getCount() != t1.getCount()) ||
1834            (t0.getX() != t1.getX()) ||
1835            (t0.getY() != t1.getY()) ||
1836            (t0.getZ() != t1.getZ()) ||
1837            (t0.hasFaces()   != t1.hasFaces()) ||
1838            (t0.hasMipmaps() != t1.hasMipmaps())) {
1839            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1840        }
1841
1842        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1843        aout.setAutoPadding(true);
1844        reduce(mExportReduceIdx_my_half_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
1845        return new result_int(aout);
1846    }
1847
1848    private final static int mExportReduceIdx_my_half_uchar2_0 = 26;
1849    // in1 = "a"
1850    // in2 = "b", flattened 2-vectors
1851    public result_int reduce_my_half_uchar2_0(short[] in1, byte[] in2) {
1852        // Verify that "in1" is non-null.
1853        if (in1 == null) {
1854            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1855        }
1856        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1857        ain1.setAutoPadding(true);
1858        ain1.copyFrom(in1);
1859        // Verify that "in2" is non-null.
1860        if (in2 == null) {
1861            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1862        }
1863        // Verify that the array length is a multiple of the vector size.
1864        if (in2.length % 2 != 0) {
1865            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
1866        }
1867        // Verify that input array lengths are the same.
1868        if (in1.length != in2.length / 2) {
1869            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1870        }
1871        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
1872        ain2.setAutoPadding(true);
1873        ain2.copyFrom(in2);
1874
1875        result_int result = reduce_my_half_uchar2_0(ain1, ain2, null);
1876        result.mTempIns = new Allocation[]{ain1, ain2};
1877        return result;
1878    }
1879
1880    // ain1 = "half a"
1881    // ain2 = "uchar2 b"
1882    public result_int reduce_my_half_uchar2_0(Allocation ain1, Allocation ain2) {
1883        return reduce_my_half_uchar2_0(ain1, ain2, null);
1884    }
1885
1886    // ain1 = "half a"
1887    // ain2 = "uchar2 b"
1888    public result_int reduce_my_half_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1889        Type t0, t1;
1890        // check ain1
1891        if (!ain1.getType().getElement().isCompatible(__F16)) {
1892            throw new RSRuntimeException("Type mismatch with F16!");
1893        }
1894        // check ain2
1895        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
1896            throw new RSRuntimeException("Type mismatch with U8_2!");
1897        }
1898        // Verify dimensions
1899        t0 = ain1.getType();
1900        t1 = ain2.getType();
1901        if ((t0.getCount() != t1.getCount()) ||
1902            (t0.getX() != t1.getX()) ||
1903            (t0.getY() != t1.getY()) ||
1904            (t0.getZ() != t1.getZ()) ||
1905            (t0.hasFaces()   != t1.hasFaces()) ||
1906            (t0.hasMipmaps() != t1.hasMipmaps())) {
1907            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1908        }
1909
1910        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1911        aout.setAutoPadding(true);
1912        reduce(mExportReduceIdx_my_half_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
1913        return new result_int(aout);
1914    }
1915
1916    private final static int mExportReduceIdx_my_half_uchar2_1 = 27;
1917    // in1 = "a"
1918    // in2 = "b", flattened 2-vectors
1919    public result_int reduce_my_half_uchar2_1(short[] in1, byte[] in2) {
1920        // Verify that "in1" is non-null.
1921        if (in1 == null) {
1922            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1923        }
1924        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1925        ain1.setAutoPadding(true);
1926        ain1.copyFrom(in1);
1927        // Verify that "in2" is non-null.
1928        if (in2 == null) {
1929            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1930        }
1931        // Verify that the array length is a multiple of the vector size.
1932        if (in2.length % 2 != 0) {
1933            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
1934        }
1935        // Verify that input array lengths are the same.
1936        if (in1.length != in2.length / 2) {
1937            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
1938        }
1939        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
1940        ain2.setAutoPadding(true);
1941        ain2.copyFrom(in2);
1942
1943        result_int result = reduce_my_half_uchar2_1(ain1, ain2, null);
1944        result.mTempIns = new Allocation[]{ain1, ain2};
1945        return result;
1946    }
1947
1948    // ain1 = "half a"
1949    // ain2 = "uchar2 b"
1950    public result_int reduce_my_half_uchar2_1(Allocation ain1, Allocation ain2) {
1951        return reduce_my_half_uchar2_1(ain1, ain2, null);
1952    }
1953
1954    // ain1 = "half a"
1955    // ain2 = "uchar2 b"
1956    public result_int reduce_my_half_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
1957        Type t0, t1;
1958        // check ain1
1959        if (!ain1.getType().getElement().isCompatible(__F16)) {
1960            throw new RSRuntimeException("Type mismatch with F16!");
1961        }
1962        // check ain2
1963        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
1964            throw new RSRuntimeException("Type mismatch with U8_2!");
1965        }
1966        // Verify dimensions
1967        t0 = ain1.getType();
1968        t1 = ain2.getType();
1969        if ((t0.getCount() != t1.getCount()) ||
1970            (t0.getX() != t1.getX()) ||
1971            (t0.getY() != t1.getY()) ||
1972            (t0.getZ() != t1.getZ()) ||
1973            (t0.hasFaces()   != t1.hasFaces()) ||
1974            (t0.hasMipmaps() != t1.hasMipmaps())) {
1975            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
1976        }
1977
1978        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
1979        aout.setAutoPadding(true);
1980        reduce(mExportReduceIdx_my_half_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
1981        return new result_int(aout);
1982    }
1983
1984    private final static int mExportReduceIdx_my_half_uchar4_0 = 28;
1985    // in1 = "a"
1986    // in2 = "b", flattened 4-vectors
1987    public result_int reduce_my_half_uchar4_0(short[] in1, byte[] in2) {
1988        // Verify that "in1" is non-null.
1989        if (in1 == null) {
1990            throw new RSIllegalArgumentException("Array \"in1\" is null!");
1991        }
1992        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
1993        ain1.setAutoPadding(true);
1994        ain1.copyFrom(in1);
1995        // Verify that "in2" is non-null.
1996        if (in2 == null) {
1997            throw new RSIllegalArgumentException("Array \"in2\" is null!");
1998        }
1999        // Verify that the array length is a multiple of the vector size.
2000        if (in2.length % 4 != 0) {
2001            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
2002        }
2003        // Verify that input array lengths are the same.
2004        if (in1.length != in2.length / 4) {
2005            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2006        }
2007        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
2008        ain2.setAutoPadding(true);
2009        ain2.copyFrom(in2);
2010
2011        result_int result = reduce_my_half_uchar4_0(ain1, ain2, null);
2012        result.mTempIns = new Allocation[]{ain1, ain2};
2013        return result;
2014    }
2015
2016    // ain1 = "half a"
2017    // ain2 = "uchar4 b"
2018    public result_int reduce_my_half_uchar4_0(Allocation ain1, Allocation ain2) {
2019        return reduce_my_half_uchar4_0(ain1, ain2, null);
2020    }
2021
2022    // ain1 = "half a"
2023    // ain2 = "uchar4 b"
2024    public result_int reduce_my_half_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2025        Type t0, t1;
2026        // check ain1
2027        if (!ain1.getType().getElement().isCompatible(__F16)) {
2028            throw new RSRuntimeException("Type mismatch with F16!");
2029        }
2030        // check ain2
2031        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
2032            throw new RSRuntimeException("Type mismatch with U8_4!");
2033        }
2034        // Verify dimensions
2035        t0 = ain1.getType();
2036        t1 = ain2.getType();
2037        if ((t0.getCount() != t1.getCount()) ||
2038            (t0.getX() != t1.getX()) ||
2039            (t0.getY() != t1.getY()) ||
2040            (t0.getZ() != t1.getZ()) ||
2041            (t0.hasFaces()   != t1.hasFaces()) ||
2042            (t0.hasMipmaps() != t1.hasMipmaps())) {
2043            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2044        }
2045
2046        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2047        aout.setAutoPadding(true);
2048        reduce(mExportReduceIdx_my_half_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
2049        return new result_int(aout);
2050    }
2051
2052    private final static int mExportReduceIdx_my_half_uchar4_1 = 29;
2053    // in1 = "a"
2054    // in2 = "b", flattened 4-vectors
2055    public result_int reduce_my_half_uchar4_1(short[] in1, byte[] in2) {
2056        // Verify that "in1" is non-null.
2057        if (in1 == null) {
2058            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2059        }
2060        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2061        ain1.setAutoPadding(true);
2062        ain1.copyFrom(in1);
2063        // Verify that "in2" is non-null.
2064        if (in2 == null) {
2065            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2066        }
2067        // Verify that the array length is a multiple of the vector size.
2068        if (in2.length % 4 != 0) {
2069            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
2070        }
2071        // Verify that input array lengths are the same.
2072        if (in1.length != in2.length / 4) {
2073            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2074        }
2075        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
2076        ain2.setAutoPadding(true);
2077        ain2.copyFrom(in2);
2078
2079        result_int result = reduce_my_half_uchar4_1(ain1, ain2, null);
2080        result.mTempIns = new Allocation[]{ain1, ain2};
2081        return result;
2082    }
2083
2084    // ain1 = "half a"
2085    // ain2 = "uchar4 b"
2086    public result_int reduce_my_half_uchar4_1(Allocation ain1, Allocation ain2) {
2087        return reduce_my_half_uchar4_1(ain1, ain2, null);
2088    }
2089
2090    // ain1 = "half a"
2091    // ain2 = "uchar4 b"
2092    public result_int reduce_my_half_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2093        Type t0, t1;
2094        // check ain1
2095        if (!ain1.getType().getElement().isCompatible(__F16)) {
2096            throw new RSRuntimeException("Type mismatch with F16!");
2097        }
2098        // check ain2
2099        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
2100            throw new RSRuntimeException("Type mismatch with U8_4!");
2101        }
2102        // Verify dimensions
2103        t0 = ain1.getType();
2104        t1 = ain2.getType();
2105        if ((t0.getCount() != t1.getCount()) ||
2106            (t0.getX() != t1.getX()) ||
2107            (t0.getY() != t1.getY()) ||
2108            (t0.getZ() != t1.getZ()) ||
2109            (t0.hasFaces()   != t1.hasFaces()) ||
2110            (t0.hasMipmaps() != t1.hasMipmaps())) {
2111            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2112        }
2113
2114        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2115        aout.setAutoPadding(true);
2116        reduce(mExportReduceIdx_my_half_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
2117        return new result_int(aout);
2118    }
2119
2120    private final static int mExportReduceIdx_my_half_ushort_0 = 30;
2121    // in1 = "a"
2122    // in2 = "b"
2123    public result_int reduce_my_half_ushort_0(short[] in1, short[] in2) {
2124        // Verify that "in1" is non-null.
2125        if (in1 == null) {
2126            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2127        }
2128        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2129        ain1.setAutoPadding(true);
2130        ain1.copyFrom(in1);
2131        // Verify that "in2" is non-null.
2132        if (in2 == null) {
2133            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2134        }
2135        // Verify that input array lengths are the same.
2136        if (in1.length != in2.length) {
2137            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2138        }
2139        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
2140        ain2.setAutoPadding(true);
2141        ain2.copyFrom(in2);
2142
2143        result_int result = reduce_my_half_ushort_0(ain1, ain2, null);
2144        result.mTempIns = new Allocation[]{ain1, ain2};
2145        return result;
2146    }
2147
2148    // ain1 = "half a"
2149    // ain2 = "ushort b"
2150    public result_int reduce_my_half_ushort_0(Allocation ain1, Allocation ain2) {
2151        return reduce_my_half_ushort_0(ain1, ain2, null);
2152    }
2153
2154    // ain1 = "half a"
2155    // ain2 = "ushort b"
2156    public result_int reduce_my_half_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2157        Type t0, t1;
2158        // check ain1
2159        if (!ain1.getType().getElement().isCompatible(__F16)) {
2160            throw new RSRuntimeException("Type mismatch with F16!");
2161        }
2162        // check ain2
2163        if (!ain2.getType().getElement().isCompatible(__U16)) {
2164            throw new RSRuntimeException("Type mismatch with U16!");
2165        }
2166        // Verify dimensions
2167        t0 = ain1.getType();
2168        t1 = ain2.getType();
2169        if ((t0.getCount() != t1.getCount()) ||
2170            (t0.getX() != t1.getX()) ||
2171            (t0.getY() != t1.getY()) ||
2172            (t0.getZ() != t1.getZ()) ||
2173            (t0.hasFaces()   != t1.hasFaces()) ||
2174            (t0.hasMipmaps() != t1.hasMipmaps())) {
2175            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2176        }
2177
2178        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2179        aout.setAutoPadding(true);
2180        reduce(mExportReduceIdx_my_half_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
2181        return new result_int(aout);
2182    }
2183
2184    private final static int mExportReduceIdx_my_half_ushort_1 = 31;
2185    // in1 = "a"
2186    // in2 = "b"
2187    public result_int reduce_my_half_ushort_1(short[] in1, short[] in2) {
2188        // Verify that "in1" is non-null.
2189        if (in1 == null) {
2190            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2191        }
2192        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2193        ain1.setAutoPadding(true);
2194        ain1.copyFrom(in1);
2195        // Verify that "in2" is non-null.
2196        if (in2 == null) {
2197            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2198        }
2199        // Verify that input array lengths are the same.
2200        if (in1.length != in2.length) {
2201            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2202        }
2203        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
2204        ain2.setAutoPadding(true);
2205        ain2.copyFrom(in2);
2206
2207        result_int result = reduce_my_half_ushort_1(ain1, ain2, null);
2208        result.mTempIns = new Allocation[]{ain1, ain2};
2209        return result;
2210    }
2211
2212    // ain1 = "half a"
2213    // ain2 = "ushort b"
2214    public result_int reduce_my_half_ushort_1(Allocation ain1, Allocation ain2) {
2215        return reduce_my_half_ushort_1(ain1, ain2, null);
2216    }
2217
2218    // ain1 = "half a"
2219    // ain2 = "ushort b"
2220    public result_int reduce_my_half_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2221        Type t0, t1;
2222        // check ain1
2223        if (!ain1.getType().getElement().isCompatible(__F16)) {
2224            throw new RSRuntimeException("Type mismatch with F16!");
2225        }
2226        // check ain2
2227        if (!ain2.getType().getElement().isCompatible(__U16)) {
2228            throw new RSRuntimeException("Type mismatch with U16!");
2229        }
2230        // Verify dimensions
2231        t0 = ain1.getType();
2232        t1 = ain2.getType();
2233        if ((t0.getCount() != t1.getCount()) ||
2234            (t0.getX() != t1.getX()) ||
2235            (t0.getY() != t1.getY()) ||
2236            (t0.getZ() != t1.getZ()) ||
2237            (t0.hasFaces()   != t1.hasFaces()) ||
2238            (t0.hasMipmaps() != t1.hasMipmaps())) {
2239            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2240        }
2241
2242        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2243        aout.setAutoPadding(true);
2244        reduce(mExportReduceIdx_my_half_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
2245        return new result_int(aout);
2246    }
2247
2248    private final static int mExportReduceIdx_my_half_ushort2_0 = 32;
2249    // in1 = "a"
2250    // in2 = "b", flattened 2-vectors
2251    public result_int reduce_my_half_ushort2_0(short[] in1, short[] in2) {
2252        // Verify that "in1" is non-null.
2253        if (in1 == null) {
2254            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2255        }
2256        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2257        ain1.setAutoPadding(true);
2258        ain1.copyFrom(in1);
2259        // Verify that "in2" is non-null.
2260        if (in2 == null) {
2261            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2262        }
2263        // Verify that the array length is a multiple of the vector size.
2264        if (in2.length % 2 != 0) {
2265            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
2266        }
2267        // Verify that input array lengths are the same.
2268        if (in1.length != in2.length / 2) {
2269            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2270        }
2271        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
2272        ain2.setAutoPadding(true);
2273        ain2.copyFrom(in2);
2274
2275        result_int result = reduce_my_half_ushort2_0(ain1, ain2, null);
2276        result.mTempIns = new Allocation[]{ain1, ain2};
2277        return result;
2278    }
2279
2280    // ain1 = "half a"
2281    // ain2 = "ushort2 b"
2282    public result_int reduce_my_half_ushort2_0(Allocation ain1, Allocation ain2) {
2283        return reduce_my_half_ushort2_0(ain1, ain2, null);
2284    }
2285
2286    // ain1 = "half a"
2287    // ain2 = "ushort2 b"
2288    public result_int reduce_my_half_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2289        Type t0, t1;
2290        // check ain1
2291        if (!ain1.getType().getElement().isCompatible(__F16)) {
2292            throw new RSRuntimeException("Type mismatch with F16!");
2293        }
2294        // check ain2
2295        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
2296            throw new RSRuntimeException("Type mismatch with U16_2!");
2297        }
2298        // Verify dimensions
2299        t0 = ain1.getType();
2300        t1 = ain2.getType();
2301        if ((t0.getCount() != t1.getCount()) ||
2302            (t0.getX() != t1.getX()) ||
2303            (t0.getY() != t1.getY()) ||
2304            (t0.getZ() != t1.getZ()) ||
2305            (t0.hasFaces()   != t1.hasFaces()) ||
2306            (t0.hasMipmaps() != t1.hasMipmaps())) {
2307            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2308        }
2309
2310        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2311        aout.setAutoPadding(true);
2312        reduce(mExportReduceIdx_my_half_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
2313        return new result_int(aout);
2314    }
2315
2316    private final static int mExportReduceIdx_my_half_ushort2_1 = 33;
2317    // in1 = "a"
2318    // in2 = "b", flattened 2-vectors
2319    public result_int reduce_my_half_ushort2_1(short[] in1, short[] in2) {
2320        // Verify that "in1" is non-null.
2321        if (in1 == null) {
2322            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2323        }
2324        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2325        ain1.setAutoPadding(true);
2326        ain1.copyFrom(in1);
2327        // Verify that "in2" is non-null.
2328        if (in2 == null) {
2329            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2330        }
2331        // Verify that the array length is a multiple of the vector size.
2332        if (in2.length % 2 != 0) {
2333            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
2334        }
2335        // Verify that input array lengths are the same.
2336        if (in1.length != in2.length / 2) {
2337            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2338        }
2339        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
2340        ain2.setAutoPadding(true);
2341        ain2.copyFrom(in2);
2342
2343        result_int result = reduce_my_half_ushort2_1(ain1, ain2, null);
2344        result.mTempIns = new Allocation[]{ain1, ain2};
2345        return result;
2346    }
2347
2348    // ain1 = "half a"
2349    // ain2 = "ushort2 b"
2350    public result_int reduce_my_half_ushort2_1(Allocation ain1, Allocation ain2) {
2351        return reduce_my_half_ushort2_1(ain1, ain2, null);
2352    }
2353
2354    // ain1 = "half a"
2355    // ain2 = "ushort2 b"
2356    public result_int reduce_my_half_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2357        Type t0, t1;
2358        // check ain1
2359        if (!ain1.getType().getElement().isCompatible(__F16)) {
2360            throw new RSRuntimeException("Type mismatch with F16!");
2361        }
2362        // check ain2
2363        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
2364            throw new RSRuntimeException("Type mismatch with U16_2!");
2365        }
2366        // Verify dimensions
2367        t0 = ain1.getType();
2368        t1 = ain2.getType();
2369        if ((t0.getCount() != t1.getCount()) ||
2370            (t0.getX() != t1.getX()) ||
2371            (t0.getY() != t1.getY()) ||
2372            (t0.getZ() != t1.getZ()) ||
2373            (t0.hasFaces()   != t1.hasFaces()) ||
2374            (t0.hasMipmaps() != t1.hasMipmaps())) {
2375            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2376        }
2377
2378        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2379        aout.setAutoPadding(true);
2380        reduce(mExportReduceIdx_my_half_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
2381        return new result_int(aout);
2382    }
2383
2384    private final static int mExportReduceIdx_my_half_ushort4_0 = 34;
2385    // in1 = "a"
2386    // in2 = "b", flattened 4-vectors
2387    public result_int reduce_my_half_ushort4_0(short[] in1, short[] in2) {
2388        // Verify that "in1" is non-null.
2389        if (in1 == null) {
2390            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2391        }
2392        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2393        ain1.setAutoPadding(true);
2394        ain1.copyFrom(in1);
2395        // Verify that "in2" is non-null.
2396        if (in2 == null) {
2397            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2398        }
2399        // Verify that the array length is a multiple of the vector size.
2400        if (in2.length % 4 != 0) {
2401            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
2402        }
2403        // Verify that input array lengths are the same.
2404        if (in1.length != in2.length / 4) {
2405            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2406        }
2407        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
2408        ain2.setAutoPadding(true);
2409        ain2.copyFrom(in2);
2410
2411        result_int result = reduce_my_half_ushort4_0(ain1, ain2, null);
2412        result.mTempIns = new Allocation[]{ain1, ain2};
2413        return result;
2414    }
2415
2416    // ain1 = "half a"
2417    // ain2 = "ushort4 b"
2418    public result_int reduce_my_half_ushort4_0(Allocation ain1, Allocation ain2) {
2419        return reduce_my_half_ushort4_0(ain1, ain2, null);
2420    }
2421
2422    // ain1 = "half a"
2423    // ain2 = "ushort4 b"
2424    public result_int reduce_my_half_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2425        Type t0, t1;
2426        // check ain1
2427        if (!ain1.getType().getElement().isCompatible(__F16)) {
2428            throw new RSRuntimeException("Type mismatch with F16!");
2429        }
2430        // check ain2
2431        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
2432            throw new RSRuntimeException("Type mismatch with U16_4!");
2433        }
2434        // Verify dimensions
2435        t0 = ain1.getType();
2436        t1 = ain2.getType();
2437        if ((t0.getCount() != t1.getCount()) ||
2438            (t0.getX() != t1.getX()) ||
2439            (t0.getY() != t1.getY()) ||
2440            (t0.getZ() != t1.getZ()) ||
2441            (t0.hasFaces()   != t1.hasFaces()) ||
2442            (t0.hasMipmaps() != t1.hasMipmaps())) {
2443            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2444        }
2445
2446        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2447        aout.setAutoPadding(true);
2448        reduce(mExportReduceIdx_my_half_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
2449        return new result_int(aout);
2450    }
2451
2452    private final static int mExportReduceIdx_my_half_ushort4_1 = 35;
2453    // in1 = "a"
2454    // in2 = "b", flattened 4-vectors
2455    public result_int reduce_my_half_ushort4_1(short[] in1, short[] in2) {
2456        // Verify that "in1" is non-null.
2457        if (in1 == null) {
2458            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2459        }
2460        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2461        ain1.setAutoPadding(true);
2462        ain1.copyFrom(in1);
2463        // Verify that "in2" is non-null.
2464        if (in2 == null) {
2465            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2466        }
2467        // Verify that the array length is a multiple of the vector size.
2468        if (in2.length % 4 != 0) {
2469            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
2470        }
2471        // Verify that input array lengths are the same.
2472        if (in1.length != in2.length / 4) {
2473            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2474        }
2475        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
2476        ain2.setAutoPadding(true);
2477        ain2.copyFrom(in2);
2478
2479        result_int result = reduce_my_half_ushort4_1(ain1, ain2, null);
2480        result.mTempIns = new Allocation[]{ain1, ain2};
2481        return result;
2482    }
2483
2484    // ain1 = "half a"
2485    // ain2 = "ushort4 b"
2486    public result_int reduce_my_half_ushort4_1(Allocation ain1, Allocation ain2) {
2487        return reduce_my_half_ushort4_1(ain1, ain2, null);
2488    }
2489
2490    // ain1 = "half a"
2491    // ain2 = "ushort4 b"
2492    public result_int reduce_my_half_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2493        Type t0, t1;
2494        // check ain1
2495        if (!ain1.getType().getElement().isCompatible(__F16)) {
2496            throw new RSRuntimeException("Type mismatch with F16!");
2497        }
2498        // check ain2
2499        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
2500            throw new RSRuntimeException("Type mismatch with U16_4!");
2501        }
2502        // Verify dimensions
2503        t0 = ain1.getType();
2504        t1 = ain2.getType();
2505        if ((t0.getCount() != t1.getCount()) ||
2506            (t0.getX() != t1.getX()) ||
2507            (t0.getY() != t1.getY()) ||
2508            (t0.getZ() != t1.getZ()) ||
2509            (t0.hasFaces()   != t1.hasFaces()) ||
2510            (t0.hasMipmaps() != t1.hasMipmaps())) {
2511            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2512        }
2513
2514        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2515        aout.setAutoPadding(true);
2516        reduce(mExportReduceIdx_my_half_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
2517        return new result_int(aout);
2518    }
2519
2520    private final static int mExportReduceIdx_my_half_bool_0 = 36;
2521    // in1 = "a"
2522    // in2 = "b"
2523    public result_int reduce_my_half_bool_0(short[] in1, byte[] in2) {
2524        // Verify that "in1" is non-null.
2525        if (in1 == null) {
2526            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2527        }
2528        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2529        ain1.setAutoPadding(true);
2530        ain1.copyFrom(in1);
2531        // Verify that "in2" is non-null.
2532        if (in2 == null) {
2533            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2534        }
2535        // Verify that input array lengths are the same.
2536        if (in1.length != in2.length) {
2537            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2538        }
2539        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
2540        ain2.setAutoPadding(true);
2541        ain2.copyFrom(in2);
2542
2543        result_int result = reduce_my_half_bool_0(ain1, ain2, null);
2544        result.mTempIns = new Allocation[]{ain1, ain2};
2545        return result;
2546    }
2547
2548    // ain1 = "half a"
2549    // ain2 = "bool b"
2550    public result_int reduce_my_half_bool_0(Allocation ain1, Allocation ain2) {
2551        return reduce_my_half_bool_0(ain1, ain2, null);
2552    }
2553
2554    // ain1 = "half a"
2555    // ain2 = "bool b"
2556    public result_int reduce_my_half_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2557        Type t0, t1;
2558        // check ain1
2559        if (!ain1.getType().getElement().isCompatible(__F16)) {
2560            throw new RSRuntimeException("Type mismatch with F16!");
2561        }
2562        // check ain2
2563        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
2564            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
2565        }
2566        // Verify dimensions
2567        t0 = ain1.getType();
2568        t1 = ain2.getType();
2569        if ((t0.getCount() != t1.getCount()) ||
2570            (t0.getX() != t1.getX()) ||
2571            (t0.getY() != t1.getY()) ||
2572            (t0.getZ() != t1.getZ()) ||
2573            (t0.hasFaces()   != t1.hasFaces()) ||
2574            (t0.hasMipmaps() != t1.hasMipmaps())) {
2575            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2576        }
2577
2578        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2579        aout.setAutoPadding(true);
2580        reduce(mExportReduceIdx_my_half_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
2581        return new result_int(aout);
2582    }
2583
2584    private final static int mExportReduceIdx_my_half_bool_1 = 37;
2585    // in1 = "a"
2586    // in2 = "b"
2587    public result_int reduce_my_half_bool_1(short[] in1, byte[] in2) {
2588        // Verify that "in1" is non-null.
2589        if (in1 == null) {
2590            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2591        }
2592        Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length);
2593        ain1.setAutoPadding(true);
2594        ain1.copyFrom(in1);
2595        // Verify that "in2" is non-null.
2596        if (in2 == null) {
2597            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2598        }
2599        // Verify that input array lengths are the same.
2600        if (in1.length != in2.length) {
2601            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2602        }
2603        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
2604        ain2.setAutoPadding(true);
2605        ain2.copyFrom(in2);
2606
2607        result_int result = reduce_my_half_bool_1(ain1, ain2, null);
2608        result.mTempIns = new Allocation[]{ain1, ain2};
2609        return result;
2610    }
2611
2612    // ain1 = "half a"
2613    // ain2 = "bool b"
2614    public result_int reduce_my_half_bool_1(Allocation ain1, Allocation ain2) {
2615        return reduce_my_half_bool_1(ain1, ain2, null);
2616    }
2617
2618    // ain1 = "half a"
2619    // ain2 = "bool b"
2620    public result_int reduce_my_half_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2621        Type t0, t1;
2622        // check ain1
2623        if (!ain1.getType().getElement().isCompatible(__F16)) {
2624            throw new RSRuntimeException("Type mismatch with F16!");
2625        }
2626        // check ain2
2627        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
2628            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
2629        }
2630        // Verify dimensions
2631        t0 = ain1.getType();
2632        t1 = ain2.getType();
2633        if ((t0.getCount() != t1.getCount()) ||
2634            (t0.getX() != t1.getX()) ||
2635            (t0.getY() != t1.getY()) ||
2636            (t0.getZ() != t1.getZ()) ||
2637            (t0.hasFaces()   != t1.hasFaces()) ||
2638            (t0.hasMipmaps() != t1.hasMipmaps())) {
2639            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2640        }
2641
2642        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2643        aout.setAutoPadding(true);
2644        reduce(mExportReduceIdx_my_half_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
2645        return new result_int(aout);
2646    }
2647
2648    private final static int mExportReduceIdx_my_half_rs_matrix2x2_0 = 38;
2649    // ain1 = "half a"
2650    // ain2 = "rs_matrix2x2 b"
2651    public result_int reduce_my_half_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
2652        return reduce_my_half_rs_matrix2x2_0(ain1, ain2, null);
2653    }
2654
2655    // ain1 = "half a"
2656    // ain2 = "rs_matrix2x2 b"
2657    public result_int reduce_my_half_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2658        Type t0, t1;
2659        // check ain1
2660        if (!ain1.getType().getElement().isCompatible(__F16)) {
2661            throw new RSRuntimeException("Type mismatch with F16!");
2662        }
2663        // check ain2
2664        // Verify dimensions
2665        t0 = ain1.getType();
2666        t1 = ain2.getType();
2667        if ((t0.getCount() != t1.getCount()) ||
2668            (t0.getX() != t1.getX()) ||
2669            (t0.getY() != t1.getY()) ||
2670            (t0.getZ() != t1.getZ()) ||
2671            (t0.hasFaces()   != t1.hasFaces()) ||
2672            (t0.hasMipmaps() != t1.hasMipmaps())) {
2673            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2674        }
2675
2676        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2677        aout.setAutoPadding(true);
2678        reduce(mExportReduceIdx_my_half_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
2679        return new result_int(aout);
2680    }
2681
2682    private final static int mExportReduceIdx_my_half_rs_matrix2x2_1 = 39;
2683    // ain1 = "half a"
2684    // ain2 = "rs_matrix2x2 b"
2685    public result_int reduce_my_half_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
2686        return reduce_my_half_rs_matrix2x2_1(ain1, ain2, null);
2687    }
2688
2689    // ain1 = "half a"
2690    // ain2 = "rs_matrix2x2 b"
2691    public result_int reduce_my_half_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2692        Type t0, t1;
2693        // check ain1
2694        if (!ain1.getType().getElement().isCompatible(__F16)) {
2695            throw new RSRuntimeException("Type mismatch with F16!");
2696        }
2697        // check ain2
2698        // Verify dimensions
2699        t0 = ain1.getType();
2700        t1 = ain2.getType();
2701        if ((t0.getCount() != t1.getCount()) ||
2702            (t0.getX() != t1.getX()) ||
2703            (t0.getY() != t1.getY()) ||
2704            (t0.getZ() != t1.getZ()) ||
2705            (t0.hasFaces()   != t1.hasFaces()) ||
2706            (t0.hasMipmaps() != t1.hasMipmaps())) {
2707            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2708        }
2709
2710        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2711        aout.setAutoPadding(true);
2712        reduce(mExportReduceIdx_my_half_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
2713        return new result_int(aout);
2714    }
2715
2716    private final static int mExportReduceIdx_my_half_MyStruct_0 = 40;
2717    // ain1 = "half a"
2718    // ain2 = "/* struct <> */ b"
2719    public result_int reduce_my_half_MyStruct_0(Allocation ain1, Allocation ain2) {
2720        return reduce_my_half_MyStruct_0(ain1, ain2, null);
2721    }
2722
2723    // ain1 = "half a"
2724    // ain2 = "/* struct <> */ b"
2725    public result_int reduce_my_half_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2726        Type t0, t1;
2727        // check ain1
2728        if (!ain1.getType().getElement().isCompatible(__F16)) {
2729            throw new RSRuntimeException("Type mismatch with F16!");
2730        }
2731        // check ain2
2732        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
2733            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
2734        }
2735        // Verify dimensions
2736        t0 = ain1.getType();
2737        t1 = ain2.getType();
2738        if ((t0.getCount() != t1.getCount()) ||
2739            (t0.getX() != t1.getX()) ||
2740            (t0.getY() != t1.getY()) ||
2741            (t0.getZ() != t1.getZ()) ||
2742            (t0.hasFaces()   != t1.hasFaces()) ||
2743            (t0.hasMipmaps() != t1.hasMipmaps())) {
2744            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2745        }
2746
2747        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2748        aout.setAutoPadding(true);
2749        reduce(mExportReduceIdx_my_half_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
2750        return new result_int(aout);
2751    }
2752
2753    private final static int mExportReduceIdx_my_half_MyStruct_1 = 41;
2754    // ain1 = "half a"
2755    // ain2 = "/* struct <> */ b"
2756    public result_int reduce_my_half_MyStruct_1(Allocation ain1, Allocation ain2) {
2757        return reduce_my_half_MyStruct_1(ain1, ain2, null);
2758    }
2759
2760    // ain1 = "half a"
2761    // ain2 = "/* struct <> */ b"
2762    public result_int reduce_my_half_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2763        Type t0, t1;
2764        // check ain1
2765        if (!ain1.getType().getElement().isCompatible(__F16)) {
2766            throw new RSRuntimeException("Type mismatch with F16!");
2767        }
2768        // check ain2
2769        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
2770            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
2771        }
2772        // Verify dimensions
2773        t0 = ain1.getType();
2774        t1 = ain2.getType();
2775        if ((t0.getCount() != t1.getCount()) ||
2776            (t0.getX() != t1.getX()) ||
2777            (t0.getY() != t1.getY()) ||
2778            (t0.getZ() != t1.getZ()) ||
2779            (t0.hasFaces()   != t1.hasFaces()) ||
2780            (t0.hasMipmaps() != t1.hasMipmaps())) {
2781            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2782        }
2783
2784        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2785        aout.setAutoPadding(true);
2786        reduce(mExportReduceIdx_my_half_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
2787        return new result_int(aout);
2788    }
2789
2790    private final static int mExportReduceIdx_my_half2_half_0 = 42;
2791    // in1 = "a", flattened 2-vectors
2792    // in2 = "b"
2793    public result_int reduce_my_half2_half_0(short[] in1, short[] in2) {
2794        // Verify that "in1" is non-null.
2795        if (in1 == null) {
2796            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2797        }
2798        // Verify that the array length is a multiple of the vector size.
2799        if (in1.length % 2 != 0) {
2800            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
2801        }
2802        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
2803        ain1.setAutoPadding(true);
2804        ain1.copyFrom(in1);
2805        // Verify that "in2" is non-null.
2806        if (in2 == null) {
2807            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2808        }
2809        // Verify that input array lengths are the same.
2810        if (in1.length / 2 != in2.length) {
2811            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2812        }
2813        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
2814        ain2.setAutoPadding(true);
2815        ain2.copyFrom(in2);
2816
2817        result_int result = reduce_my_half2_half_0(ain1, ain2, null);
2818        result.mTempIns = new Allocation[]{ain1, ain2};
2819        return result;
2820    }
2821
2822    // ain1 = "half2 a"
2823    // ain2 = "half b"
2824    public result_int reduce_my_half2_half_0(Allocation ain1, Allocation ain2) {
2825        return reduce_my_half2_half_0(ain1, ain2, null);
2826    }
2827
2828    // ain1 = "half2 a"
2829    // ain2 = "half b"
2830    public result_int reduce_my_half2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2831        Type t0, t1;
2832        // check ain1
2833        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
2834            throw new RSRuntimeException("Type mismatch with F16_2!");
2835        }
2836        // check ain2
2837        if (!ain2.getType().getElement().isCompatible(__F16)) {
2838            throw new RSRuntimeException("Type mismatch with F16!");
2839        }
2840        // Verify dimensions
2841        t0 = ain1.getType();
2842        t1 = ain2.getType();
2843        if ((t0.getCount() != t1.getCount()) ||
2844            (t0.getX() != t1.getX()) ||
2845            (t0.getY() != t1.getY()) ||
2846            (t0.getZ() != t1.getZ()) ||
2847            (t0.hasFaces()   != t1.hasFaces()) ||
2848            (t0.hasMipmaps() != t1.hasMipmaps())) {
2849            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2850        }
2851
2852        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2853        aout.setAutoPadding(true);
2854        reduce(mExportReduceIdx_my_half2_half_0, new Allocation[]{ain1, ain2}, aout, sc);
2855        return new result_int(aout);
2856    }
2857
2858    private final static int mExportReduceIdx_my_half2_half_1 = 43;
2859    // in1 = "a", flattened 2-vectors
2860    // in2 = "b"
2861    public result_int reduce_my_half2_half_1(short[] in1, short[] in2) {
2862        // Verify that "in1" is non-null.
2863        if (in1 == null) {
2864            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2865        }
2866        // Verify that the array length is a multiple of the vector size.
2867        if (in1.length % 2 != 0) {
2868            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
2869        }
2870        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
2871        ain1.setAutoPadding(true);
2872        ain1.copyFrom(in1);
2873        // Verify that "in2" is non-null.
2874        if (in2 == null) {
2875            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2876        }
2877        // Verify that input array lengths are the same.
2878        if (in1.length / 2 != in2.length) {
2879            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2880        }
2881        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
2882        ain2.setAutoPadding(true);
2883        ain2.copyFrom(in2);
2884
2885        result_int result = reduce_my_half2_half_1(ain1, ain2, null);
2886        result.mTempIns = new Allocation[]{ain1, ain2};
2887        return result;
2888    }
2889
2890    // ain1 = "half2 a"
2891    // ain2 = "half b"
2892    public result_int reduce_my_half2_half_1(Allocation ain1, Allocation ain2) {
2893        return reduce_my_half2_half_1(ain1, ain2, null);
2894    }
2895
2896    // ain1 = "half2 a"
2897    // ain2 = "half b"
2898    public result_int reduce_my_half2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2899        Type t0, t1;
2900        // check ain1
2901        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
2902            throw new RSRuntimeException("Type mismatch with F16_2!");
2903        }
2904        // check ain2
2905        if (!ain2.getType().getElement().isCompatible(__F16)) {
2906            throw new RSRuntimeException("Type mismatch with F16!");
2907        }
2908        // Verify dimensions
2909        t0 = ain1.getType();
2910        t1 = ain2.getType();
2911        if ((t0.getCount() != t1.getCount()) ||
2912            (t0.getX() != t1.getX()) ||
2913            (t0.getY() != t1.getY()) ||
2914            (t0.getZ() != t1.getZ()) ||
2915            (t0.hasFaces()   != t1.hasFaces()) ||
2916            (t0.hasMipmaps() != t1.hasMipmaps())) {
2917            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2918        }
2919
2920        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2921        aout.setAutoPadding(true);
2922        reduce(mExportReduceIdx_my_half2_half_1, new Allocation[]{ain1, ain2}, aout, sc);
2923        return new result_int(aout);
2924    }
2925
2926    private final static int mExportReduceIdx_my_half2_half2_0 = 44;
2927    // in1 = "a", flattened 2-vectors
2928    // in2 = "b", flattened 2-vectors
2929    public result_int reduce_my_half2_half2_0(short[] in1, short[] in2) {
2930        // Verify that "in1" is non-null.
2931        if (in1 == null) {
2932            throw new RSIllegalArgumentException("Array \"in1\" is null!");
2933        }
2934        // Verify that the array length is a multiple of the vector size.
2935        if (in1.length % 2 != 0) {
2936            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
2937        }
2938        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
2939        ain1.setAutoPadding(true);
2940        ain1.copyFrom(in1);
2941        // Verify that "in2" is non-null.
2942        if (in2 == null) {
2943            throw new RSIllegalArgumentException("Array \"in2\" is null!");
2944        }
2945        // Verify that the array length is a multiple of the vector size.
2946        if (in2.length % 2 != 0) {
2947            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
2948        }
2949        // Verify that input array lengths are the same.
2950        if (in1.length / 2 != in2.length / 2) {
2951            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
2952        }
2953        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
2954        ain2.setAutoPadding(true);
2955        ain2.copyFrom(in2);
2956
2957        result_int result = reduce_my_half2_half2_0(ain1, ain2, null);
2958        result.mTempIns = new Allocation[]{ain1, ain2};
2959        return result;
2960    }
2961
2962    // ain1 = "half2 a"
2963    // ain2 = "half2 b"
2964    public result_int reduce_my_half2_half2_0(Allocation ain1, Allocation ain2) {
2965        return reduce_my_half2_half2_0(ain1, ain2, null);
2966    }
2967
2968    // ain1 = "half2 a"
2969    // ain2 = "half2 b"
2970    public result_int reduce_my_half2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
2971        Type t0, t1;
2972        // check ain1
2973        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
2974            throw new RSRuntimeException("Type mismatch with F16_2!");
2975        }
2976        // check ain2
2977        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
2978            throw new RSRuntimeException("Type mismatch with F16_2!");
2979        }
2980        // Verify dimensions
2981        t0 = ain1.getType();
2982        t1 = ain2.getType();
2983        if ((t0.getCount() != t1.getCount()) ||
2984            (t0.getX() != t1.getX()) ||
2985            (t0.getY() != t1.getY()) ||
2986            (t0.getZ() != t1.getZ()) ||
2987            (t0.hasFaces()   != t1.hasFaces()) ||
2988            (t0.hasMipmaps() != t1.hasMipmaps())) {
2989            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
2990        }
2991
2992        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
2993        aout.setAutoPadding(true);
2994        reduce(mExportReduceIdx_my_half2_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
2995        return new result_int(aout);
2996    }
2997
2998    private final static int mExportReduceIdx_my_half2_half2_1 = 45;
2999    // in1 = "a", flattened 2-vectors
3000    // in2 = "b", flattened 2-vectors
3001    public result_int reduce_my_half2_half2_1(short[] in1, short[] in2) {
3002        // Verify that "in1" is non-null.
3003        if (in1 == null) {
3004            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3005        }
3006        // Verify that the array length is a multiple of the vector size.
3007        if (in1.length % 2 != 0) {
3008            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3009        }
3010        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3011        ain1.setAutoPadding(true);
3012        ain1.copyFrom(in1);
3013        // Verify that "in2" is non-null.
3014        if (in2 == null) {
3015            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3016        }
3017        // Verify that the array length is a multiple of the vector size.
3018        if (in2.length % 2 != 0) {
3019            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
3020        }
3021        // Verify that input array lengths are the same.
3022        if (in1.length / 2 != in2.length / 2) {
3023            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3024        }
3025        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
3026        ain2.setAutoPadding(true);
3027        ain2.copyFrom(in2);
3028
3029        result_int result = reduce_my_half2_half2_1(ain1, ain2, null);
3030        result.mTempIns = new Allocation[]{ain1, ain2};
3031        return result;
3032    }
3033
3034    // ain1 = "half2 a"
3035    // ain2 = "half2 b"
3036    public result_int reduce_my_half2_half2_1(Allocation ain1, Allocation ain2) {
3037        return reduce_my_half2_half2_1(ain1, ain2, null);
3038    }
3039
3040    // ain1 = "half2 a"
3041    // ain2 = "half2 b"
3042    public result_int reduce_my_half2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3043        Type t0, t1;
3044        // check ain1
3045        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3046            throw new RSRuntimeException("Type mismatch with F16_2!");
3047        }
3048        // check ain2
3049        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
3050            throw new RSRuntimeException("Type mismatch with F16_2!");
3051        }
3052        // Verify dimensions
3053        t0 = ain1.getType();
3054        t1 = ain2.getType();
3055        if ((t0.getCount() != t1.getCount()) ||
3056            (t0.getX() != t1.getX()) ||
3057            (t0.getY() != t1.getY()) ||
3058            (t0.getZ() != t1.getZ()) ||
3059            (t0.hasFaces()   != t1.hasFaces()) ||
3060            (t0.hasMipmaps() != t1.hasMipmaps())) {
3061            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3062        }
3063
3064        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3065        aout.setAutoPadding(true);
3066        reduce(mExportReduceIdx_my_half2_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
3067        return new result_int(aout);
3068    }
3069
3070    private final static int mExportReduceIdx_my_half2_half4_0 = 46;
3071    // in1 = "a", flattened 2-vectors
3072    // in2 = "b", flattened 4-vectors
3073    public result_int reduce_my_half2_half4_0(short[] in1, short[] in2) {
3074        // Verify that "in1" is non-null.
3075        if (in1 == null) {
3076            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3077        }
3078        // Verify that the array length is a multiple of the vector size.
3079        if (in1.length % 2 != 0) {
3080            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3081        }
3082        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3083        ain1.setAutoPadding(true);
3084        ain1.copyFrom(in1);
3085        // Verify that "in2" is non-null.
3086        if (in2 == null) {
3087            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3088        }
3089        // Verify that the array length is a multiple of the vector size.
3090        if (in2.length % 4 != 0) {
3091            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
3092        }
3093        // Verify that input array lengths are the same.
3094        if (in1.length / 2 != in2.length / 4) {
3095            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3096        }
3097        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
3098        ain2.setAutoPadding(true);
3099        ain2.copyFrom(in2);
3100
3101        result_int result = reduce_my_half2_half4_0(ain1, ain2, null);
3102        result.mTempIns = new Allocation[]{ain1, ain2};
3103        return result;
3104    }
3105
3106    // ain1 = "half2 a"
3107    // ain2 = "half4 b"
3108    public result_int reduce_my_half2_half4_0(Allocation ain1, Allocation ain2) {
3109        return reduce_my_half2_half4_0(ain1, ain2, null);
3110    }
3111
3112    // ain1 = "half2 a"
3113    // ain2 = "half4 b"
3114    public result_int reduce_my_half2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3115        Type t0, t1;
3116        // check ain1
3117        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3118            throw new RSRuntimeException("Type mismatch with F16_2!");
3119        }
3120        // check ain2
3121        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
3122            throw new RSRuntimeException("Type mismatch with F16_4!");
3123        }
3124        // Verify dimensions
3125        t0 = ain1.getType();
3126        t1 = ain2.getType();
3127        if ((t0.getCount() != t1.getCount()) ||
3128            (t0.getX() != t1.getX()) ||
3129            (t0.getY() != t1.getY()) ||
3130            (t0.getZ() != t1.getZ()) ||
3131            (t0.hasFaces()   != t1.hasFaces()) ||
3132            (t0.hasMipmaps() != t1.hasMipmaps())) {
3133            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3134        }
3135
3136        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3137        aout.setAutoPadding(true);
3138        reduce(mExportReduceIdx_my_half2_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
3139        return new result_int(aout);
3140    }
3141
3142    private final static int mExportReduceIdx_my_half2_half4_1 = 47;
3143    // in1 = "a", flattened 2-vectors
3144    // in2 = "b", flattened 4-vectors
3145    public result_int reduce_my_half2_half4_1(short[] in1, short[] in2) {
3146        // Verify that "in1" is non-null.
3147        if (in1 == null) {
3148            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3149        }
3150        // Verify that the array length is a multiple of the vector size.
3151        if (in1.length % 2 != 0) {
3152            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3153        }
3154        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3155        ain1.setAutoPadding(true);
3156        ain1.copyFrom(in1);
3157        // Verify that "in2" is non-null.
3158        if (in2 == null) {
3159            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3160        }
3161        // Verify that the array length is a multiple of the vector size.
3162        if (in2.length % 4 != 0) {
3163            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
3164        }
3165        // Verify that input array lengths are the same.
3166        if (in1.length / 2 != in2.length / 4) {
3167            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3168        }
3169        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
3170        ain2.setAutoPadding(true);
3171        ain2.copyFrom(in2);
3172
3173        result_int result = reduce_my_half2_half4_1(ain1, ain2, null);
3174        result.mTempIns = new Allocation[]{ain1, ain2};
3175        return result;
3176    }
3177
3178    // ain1 = "half2 a"
3179    // ain2 = "half4 b"
3180    public result_int reduce_my_half2_half4_1(Allocation ain1, Allocation ain2) {
3181        return reduce_my_half2_half4_1(ain1, ain2, null);
3182    }
3183
3184    // ain1 = "half2 a"
3185    // ain2 = "half4 b"
3186    public result_int reduce_my_half2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3187        Type t0, t1;
3188        // check ain1
3189        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3190            throw new RSRuntimeException("Type mismatch with F16_2!");
3191        }
3192        // check ain2
3193        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
3194            throw new RSRuntimeException("Type mismatch with F16_4!");
3195        }
3196        // Verify dimensions
3197        t0 = ain1.getType();
3198        t1 = ain2.getType();
3199        if ((t0.getCount() != t1.getCount()) ||
3200            (t0.getX() != t1.getX()) ||
3201            (t0.getY() != t1.getY()) ||
3202            (t0.getZ() != t1.getZ()) ||
3203            (t0.hasFaces()   != t1.hasFaces()) ||
3204            (t0.hasMipmaps() != t1.hasMipmaps())) {
3205            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3206        }
3207
3208        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3209        aout.setAutoPadding(true);
3210        reduce(mExportReduceIdx_my_half2_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
3211        return new result_int(aout);
3212    }
3213
3214    private final static int mExportReduceIdx_my_half2_float_0 = 48;
3215    // in1 = "a", flattened 2-vectors
3216    // in2 = "b"
3217    public result_int reduce_my_half2_float_0(short[] in1, float[] in2) {
3218        // Verify that "in1" is non-null.
3219        if (in1 == null) {
3220            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3221        }
3222        // Verify that the array length is a multiple of the vector size.
3223        if (in1.length % 2 != 0) {
3224            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3225        }
3226        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3227        ain1.setAutoPadding(true);
3228        ain1.copyFrom(in1);
3229        // Verify that "in2" is non-null.
3230        if (in2 == null) {
3231            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3232        }
3233        // Verify that input array lengths are the same.
3234        if (in1.length / 2 != in2.length) {
3235            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3236        }
3237        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
3238        ain2.setAutoPadding(true);
3239        ain2.copyFrom(in2);
3240
3241        result_int result = reduce_my_half2_float_0(ain1, ain2, null);
3242        result.mTempIns = new Allocation[]{ain1, ain2};
3243        return result;
3244    }
3245
3246    // ain1 = "half2 a"
3247    // ain2 = "float b"
3248    public result_int reduce_my_half2_float_0(Allocation ain1, Allocation ain2) {
3249        return reduce_my_half2_float_0(ain1, ain2, null);
3250    }
3251
3252    // ain1 = "half2 a"
3253    // ain2 = "float b"
3254    public result_int reduce_my_half2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3255        Type t0, t1;
3256        // check ain1
3257        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3258            throw new RSRuntimeException("Type mismatch with F16_2!");
3259        }
3260        // check ain2
3261        if (!ain2.getType().getElement().isCompatible(__F32)) {
3262            throw new RSRuntimeException("Type mismatch with F32!");
3263        }
3264        // Verify dimensions
3265        t0 = ain1.getType();
3266        t1 = ain2.getType();
3267        if ((t0.getCount() != t1.getCount()) ||
3268            (t0.getX() != t1.getX()) ||
3269            (t0.getY() != t1.getY()) ||
3270            (t0.getZ() != t1.getZ()) ||
3271            (t0.hasFaces()   != t1.hasFaces()) ||
3272            (t0.hasMipmaps() != t1.hasMipmaps())) {
3273            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3274        }
3275
3276        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3277        aout.setAutoPadding(true);
3278        reduce(mExportReduceIdx_my_half2_float_0, new Allocation[]{ain1, ain2}, aout, sc);
3279        return new result_int(aout);
3280    }
3281
3282    private final static int mExportReduceIdx_my_half2_float_1 = 49;
3283    // in1 = "a", flattened 2-vectors
3284    // in2 = "b"
3285    public result_int reduce_my_half2_float_1(short[] in1, float[] in2) {
3286        // Verify that "in1" is non-null.
3287        if (in1 == null) {
3288            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3289        }
3290        // Verify that the array length is a multiple of the vector size.
3291        if (in1.length % 2 != 0) {
3292            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3293        }
3294        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3295        ain1.setAutoPadding(true);
3296        ain1.copyFrom(in1);
3297        // Verify that "in2" is non-null.
3298        if (in2 == null) {
3299            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3300        }
3301        // Verify that input array lengths are the same.
3302        if (in1.length / 2 != in2.length) {
3303            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3304        }
3305        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
3306        ain2.setAutoPadding(true);
3307        ain2.copyFrom(in2);
3308
3309        result_int result = reduce_my_half2_float_1(ain1, ain2, null);
3310        result.mTempIns = new Allocation[]{ain1, ain2};
3311        return result;
3312    }
3313
3314    // ain1 = "half2 a"
3315    // ain2 = "float b"
3316    public result_int reduce_my_half2_float_1(Allocation ain1, Allocation ain2) {
3317        return reduce_my_half2_float_1(ain1, ain2, null);
3318    }
3319
3320    // ain1 = "half2 a"
3321    // ain2 = "float b"
3322    public result_int reduce_my_half2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3323        Type t0, t1;
3324        // check ain1
3325        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3326            throw new RSRuntimeException("Type mismatch with F16_2!");
3327        }
3328        // check ain2
3329        if (!ain2.getType().getElement().isCompatible(__F32)) {
3330            throw new RSRuntimeException("Type mismatch with F32!");
3331        }
3332        // Verify dimensions
3333        t0 = ain1.getType();
3334        t1 = ain2.getType();
3335        if ((t0.getCount() != t1.getCount()) ||
3336            (t0.getX() != t1.getX()) ||
3337            (t0.getY() != t1.getY()) ||
3338            (t0.getZ() != t1.getZ()) ||
3339            (t0.hasFaces()   != t1.hasFaces()) ||
3340            (t0.hasMipmaps() != t1.hasMipmaps())) {
3341            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3342        }
3343
3344        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3345        aout.setAutoPadding(true);
3346        reduce(mExportReduceIdx_my_half2_float_1, new Allocation[]{ain1, ain2}, aout, sc);
3347        return new result_int(aout);
3348    }
3349
3350    private final static int mExportReduceIdx_my_half2_float2_0 = 50;
3351    // in1 = "a", flattened 2-vectors
3352    // in2 = "b", flattened 2-vectors
3353    public result_int reduce_my_half2_float2_0(short[] in1, float[] in2) {
3354        // Verify that "in1" is non-null.
3355        if (in1 == null) {
3356            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3357        }
3358        // Verify that the array length is a multiple of the vector size.
3359        if (in1.length % 2 != 0) {
3360            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3361        }
3362        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3363        ain1.setAutoPadding(true);
3364        ain1.copyFrom(in1);
3365        // Verify that "in2" is non-null.
3366        if (in2 == null) {
3367            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3368        }
3369        // Verify that the array length is a multiple of the vector size.
3370        if (in2.length % 2 != 0) {
3371            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
3372        }
3373        // Verify that input array lengths are the same.
3374        if (in1.length / 2 != in2.length / 2) {
3375            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3376        }
3377        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
3378        ain2.setAutoPadding(true);
3379        ain2.copyFrom(in2);
3380
3381        result_int result = reduce_my_half2_float2_0(ain1, ain2, null);
3382        result.mTempIns = new Allocation[]{ain1, ain2};
3383        return result;
3384    }
3385
3386    // ain1 = "half2 a"
3387    // ain2 = "float2 b"
3388    public result_int reduce_my_half2_float2_0(Allocation ain1, Allocation ain2) {
3389        return reduce_my_half2_float2_0(ain1, ain2, null);
3390    }
3391
3392    // ain1 = "half2 a"
3393    // ain2 = "float2 b"
3394    public result_int reduce_my_half2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3395        Type t0, t1;
3396        // check ain1
3397        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3398            throw new RSRuntimeException("Type mismatch with F16_2!");
3399        }
3400        // check ain2
3401        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
3402            throw new RSRuntimeException("Type mismatch with F32_2!");
3403        }
3404        // Verify dimensions
3405        t0 = ain1.getType();
3406        t1 = ain2.getType();
3407        if ((t0.getCount() != t1.getCount()) ||
3408            (t0.getX() != t1.getX()) ||
3409            (t0.getY() != t1.getY()) ||
3410            (t0.getZ() != t1.getZ()) ||
3411            (t0.hasFaces()   != t1.hasFaces()) ||
3412            (t0.hasMipmaps() != t1.hasMipmaps())) {
3413            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3414        }
3415
3416        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3417        aout.setAutoPadding(true);
3418        reduce(mExportReduceIdx_my_half2_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
3419        return new result_int(aout);
3420    }
3421
3422    private final static int mExportReduceIdx_my_half2_float2_1 = 51;
3423    // in1 = "a", flattened 2-vectors
3424    // in2 = "b", flattened 2-vectors
3425    public result_int reduce_my_half2_float2_1(short[] in1, float[] in2) {
3426        // Verify that "in1" is non-null.
3427        if (in1 == null) {
3428            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3429        }
3430        // Verify that the array length is a multiple of the vector size.
3431        if (in1.length % 2 != 0) {
3432            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3433        }
3434        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3435        ain1.setAutoPadding(true);
3436        ain1.copyFrom(in1);
3437        // Verify that "in2" is non-null.
3438        if (in2 == null) {
3439            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3440        }
3441        // Verify that the array length is a multiple of the vector size.
3442        if (in2.length % 2 != 0) {
3443            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
3444        }
3445        // Verify that input array lengths are the same.
3446        if (in1.length / 2 != in2.length / 2) {
3447            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3448        }
3449        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
3450        ain2.setAutoPadding(true);
3451        ain2.copyFrom(in2);
3452
3453        result_int result = reduce_my_half2_float2_1(ain1, ain2, null);
3454        result.mTempIns = new Allocation[]{ain1, ain2};
3455        return result;
3456    }
3457
3458    // ain1 = "half2 a"
3459    // ain2 = "float2 b"
3460    public result_int reduce_my_half2_float2_1(Allocation ain1, Allocation ain2) {
3461        return reduce_my_half2_float2_1(ain1, ain2, null);
3462    }
3463
3464    // ain1 = "half2 a"
3465    // ain2 = "float2 b"
3466    public result_int reduce_my_half2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3467        Type t0, t1;
3468        // check ain1
3469        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3470            throw new RSRuntimeException("Type mismatch with F16_2!");
3471        }
3472        // check ain2
3473        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
3474            throw new RSRuntimeException("Type mismatch with F32_2!");
3475        }
3476        // Verify dimensions
3477        t0 = ain1.getType();
3478        t1 = ain2.getType();
3479        if ((t0.getCount() != t1.getCount()) ||
3480            (t0.getX() != t1.getX()) ||
3481            (t0.getY() != t1.getY()) ||
3482            (t0.getZ() != t1.getZ()) ||
3483            (t0.hasFaces()   != t1.hasFaces()) ||
3484            (t0.hasMipmaps() != t1.hasMipmaps())) {
3485            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3486        }
3487
3488        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3489        aout.setAutoPadding(true);
3490        reduce(mExportReduceIdx_my_half2_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
3491        return new result_int(aout);
3492    }
3493
3494    private final static int mExportReduceIdx_my_half2_float4_0 = 52;
3495    // in1 = "a", flattened 2-vectors
3496    // in2 = "b", flattened 4-vectors
3497    public result_int reduce_my_half2_float4_0(short[] in1, float[] in2) {
3498        // Verify that "in1" is non-null.
3499        if (in1 == null) {
3500            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3501        }
3502        // Verify that the array length is a multiple of the vector size.
3503        if (in1.length % 2 != 0) {
3504            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3505        }
3506        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3507        ain1.setAutoPadding(true);
3508        ain1.copyFrom(in1);
3509        // Verify that "in2" is non-null.
3510        if (in2 == null) {
3511            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3512        }
3513        // Verify that the array length is a multiple of the vector size.
3514        if (in2.length % 4 != 0) {
3515            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
3516        }
3517        // Verify that input array lengths are the same.
3518        if (in1.length / 2 != in2.length / 4) {
3519            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3520        }
3521        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
3522        ain2.setAutoPadding(true);
3523        ain2.copyFrom(in2);
3524
3525        result_int result = reduce_my_half2_float4_0(ain1, ain2, null);
3526        result.mTempIns = new Allocation[]{ain1, ain2};
3527        return result;
3528    }
3529
3530    // ain1 = "half2 a"
3531    // ain2 = "float4 b"
3532    public result_int reduce_my_half2_float4_0(Allocation ain1, Allocation ain2) {
3533        return reduce_my_half2_float4_0(ain1, ain2, null);
3534    }
3535
3536    // ain1 = "half2 a"
3537    // ain2 = "float4 b"
3538    public result_int reduce_my_half2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3539        Type t0, t1;
3540        // check ain1
3541        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3542            throw new RSRuntimeException("Type mismatch with F16_2!");
3543        }
3544        // check ain2
3545        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
3546            throw new RSRuntimeException("Type mismatch with F32_4!");
3547        }
3548        // Verify dimensions
3549        t0 = ain1.getType();
3550        t1 = ain2.getType();
3551        if ((t0.getCount() != t1.getCount()) ||
3552            (t0.getX() != t1.getX()) ||
3553            (t0.getY() != t1.getY()) ||
3554            (t0.getZ() != t1.getZ()) ||
3555            (t0.hasFaces()   != t1.hasFaces()) ||
3556            (t0.hasMipmaps() != t1.hasMipmaps())) {
3557            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3558        }
3559
3560        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3561        aout.setAutoPadding(true);
3562        reduce(mExportReduceIdx_my_half2_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
3563        return new result_int(aout);
3564    }
3565
3566    private final static int mExportReduceIdx_my_half2_float4_1 = 53;
3567    // in1 = "a", flattened 2-vectors
3568    // in2 = "b", flattened 4-vectors
3569    public result_int reduce_my_half2_float4_1(short[] in1, float[] in2) {
3570        // Verify that "in1" is non-null.
3571        if (in1 == null) {
3572            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3573        }
3574        // Verify that the array length is a multiple of the vector size.
3575        if (in1.length % 2 != 0) {
3576            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3577        }
3578        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3579        ain1.setAutoPadding(true);
3580        ain1.copyFrom(in1);
3581        // Verify that "in2" is non-null.
3582        if (in2 == null) {
3583            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3584        }
3585        // Verify that the array length is a multiple of the vector size.
3586        if (in2.length % 4 != 0) {
3587            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
3588        }
3589        // Verify that input array lengths are the same.
3590        if (in1.length / 2 != in2.length / 4) {
3591            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3592        }
3593        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
3594        ain2.setAutoPadding(true);
3595        ain2.copyFrom(in2);
3596
3597        result_int result = reduce_my_half2_float4_1(ain1, ain2, null);
3598        result.mTempIns = new Allocation[]{ain1, ain2};
3599        return result;
3600    }
3601
3602    // ain1 = "half2 a"
3603    // ain2 = "float4 b"
3604    public result_int reduce_my_half2_float4_1(Allocation ain1, Allocation ain2) {
3605        return reduce_my_half2_float4_1(ain1, ain2, null);
3606    }
3607
3608    // ain1 = "half2 a"
3609    // ain2 = "float4 b"
3610    public result_int reduce_my_half2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3611        Type t0, t1;
3612        // check ain1
3613        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3614            throw new RSRuntimeException("Type mismatch with F16_2!");
3615        }
3616        // check ain2
3617        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
3618            throw new RSRuntimeException("Type mismatch with F32_4!");
3619        }
3620        // Verify dimensions
3621        t0 = ain1.getType();
3622        t1 = ain2.getType();
3623        if ((t0.getCount() != t1.getCount()) ||
3624            (t0.getX() != t1.getX()) ||
3625            (t0.getY() != t1.getY()) ||
3626            (t0.getZ() != t1.getZ()) ||
3627            (t0.hasFaces()   != t1.hasFaces()) ||
3628            (t0.hasMipmaps() != t1.hasMipmaps())) {
3629            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3630        }
3631
3632        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3633        aout.setAutoPadding(true);
3634        reduce(mExportReduceIdx_my_half2_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
3635        return new result_int(aout);
3636    }
3637
3638    private final static int mExportReduceIdx_my_half2_char_0 = 54;
3639    // in1 = "a", flattened 2-vectors
3640    // in2 = "b"
3641    public result_int reduce_my_half2_char_0(short[] in1, byte[] in2) {
3642        // Verify that "in1" is non-null.
3643        if (in1 == null) {
3644            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3645        }
3646        // Verify that the array length is a multiple of the vector size.
3647        if (in1.length % 2 != 0) {
3648            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3649        }
3650        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3651        ain1.setAutoPadding(true);
3652        ain1.copyFrom(in1);
3653        // Verify that "in2" is non-null.
3654        if (in2 == null) {
3655            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3656        }
3657        // Verify that input array lengths are the same.
3658        if (in1.length / 2 != in2.length) {
3659            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3660        }
3661        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
3662        ain2.setAutoPadding(true);
3663        ain2.copyFrom(in2);
3664
3665        result_int result = reduce_my_half2_char_0(ain1, ain2, null);
3666        result.mTempIns = new Allocation[]{ain1, ain2};
3667        return result;
3668    }
3669
3670    // ain1 = "half2 a"
3671    // ain2 = "char b"
3672    public result_int reduce_my_half2_char_0(Allocation ain1, Allocation ain2) {
3673        return reduce_my_half2_char_0(ain1, ain2, null);
3674    }
3675
3676    // ain1 = "half2 a"
3677    // ain2 = "char b"
3678    public result_int reduce_my_half2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3679        Type t0, t1;
3680        // check ain1
3681        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3682            throw new RSRuntimeException("Type mismatch with F16_2!");
3683        }
3684        // check ain2
3685        if (!ain2.getType().getElement().isCompatible(__I8)) {
3686            throw new RSRuntimeException("Type mismatch with I8!");
3687        }
3688        // Verify dimensions
3689        t0 = ain1.getType();
3690        t1 = ain2.getType();
3691        if ((t0.getCount() != t1.getCount()) ||
3692            (t0.getX() != t1.getX()) ||
3693            (t0.getY() != t1.getY()) ||
3694            (t0.getZ() != t1.getZ()) ||
3695            (t0.hasFaces()   != t1.hasFaces()) ||
3696            (t0.hasMipmaps() != t1.hasMipmaps())) {
3697            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3698        }
3699
3700        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3701        aout.setAutoPadding(true);
3702        reduce(mExportReduceIdx_my_half2_char_0, new Allocation[]{ain1, ain2}, aout, sc);
3703        return new result_int(aout);
3704    }
3705
3706    private final static int mExportReduceIdx_my_half2_char_1 = 55;
3707    // in1 = "a", flattened 2-vectors
3708    // in2 = "b"
3709    public result_int reduce_my_half2_char_1(short[] in1, byte[] in2) {
3710        // Verify that "in1" is non-null.
3711        if (in1 == null) {
3712            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3713        }
3714        // Verify that the array length is a multiple of the vector size.
3715        if (in1.length % 2 != 0) {
3716            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3717        }
3718        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3719        ain1.setAutoPadding(true);
3720        ain1.copyFrom(in1);
3721        // Verify that "in2" is non-null.
3722        if (in2 == null) {
3723            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3724        }
3725        // Verify that input array lengths are the same.
3726        if (in1.length / 2 != in2.length) {
3727            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3728        }
3729        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
3730        ain2.setAutoPadding(true);
3731        ain2.copyFrom(in2);
3732
3733        result_int result = reduce_my_half2_char_1(ain1, ain2, null);
3734        result.mTempIns = new Allocation[]{ain1, ain2};
3735        return result;
3736    }
3737
3738    // ain1 = "half2 a"
3739    // ain2 = "char b"
3740    public result_int reduce_my_half2_char_1(Allocation ain1, Allocation ain2) {
3741        return reduce_my_half2_char_1(ain1, ain2, null);
3742    }
3743
3744    // ain1 = "half2 a"
3745    // ain2 = "char b"
3746    public result_int reduce_my_half2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3747        Type t0, t1;
3748        // check ain1
3749        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3750            throw new RSRuntimeException("Type mismatch with F16_2!");
3751        }
3752        // check ain2
3753        if (!ain2.getType().getElement().isCompatible(__I8)) {
3754            throw new RSRuntimeException("Type mismatch with I8!");
3755        }
3756        // Verify dimensions
3757        t0 = ain1.getType();
3758        t1 = ain2.getType();
3759        if ((t0.getCount() != t1.getCount()) ||
3760            (t0.getX() != t1.getX()) ||
3761            (t0.getY() != t1.getY()) ||
3762            (t0.getZ() != t1.getZ()) ||
3763            (t0.hasFaces()   != t1.hasFaces()) ||
3764            (t0.hasMipmaps() != t1.hasMipmaps())) {
3765            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3766        }
3767
3768        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3769        aout.setAutoPadding(true);
3770        reduce(mExportReduceIdx_my_half2_char_1, new Allocation[]{ain1, ain2}, aout, sc);
3771        return new result_int(aout);
3772    }
3773
3774    private final static int mExportReduceIdx_my_half2_char2_0 = 56;
3775    // in1 = "a", flattened 2-vectors
3776    // in2 = "b", flattened 2-vectors
3777    public result_int reduce_my_half2_char2_0(short[] in1, byte[] in2) {
3778        // Verify that "in1" is non-null.
3779        if (in1 == null) {
3780            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3781        }
3782        // Verify that the array length is a multiple of the vector size.
3783        if (in1.length % 2 != 0) {
3784            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3785        }
3786        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3787        ain1.setAutoPadding(true);
3788        ain1.copyFrom(in1);
3789        // Verify that "in2" is non-null.
3790        if (in2 == null) {
3791            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3792        }
3793        // Verify that the array length is a multiple of the vector size.
3794        if (in2.length % 2 != 0) {
3795            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
3796        }
3797        // Verify that input array lengths are the same.
3798        if (in1.length / 2 != in2.length / 2) {
3799            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3800        }
3801        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
3802        ain2.setAutoPadding(true);
3803        ain2.copyFrom(in2);
3804
3805        result_int result = reduce_my_half2_char2_0(ain1, ain2, null);
3806        result.mTempIns = new Allocation[]{ain1, ain2};
3807        return result;
3808    }
3809
3810    // ain1 = "half2 a"
3811    // ain2 = "char2 b"
3812    public result_int reduce_my_half2_char2_0(Allocation ain1, Allocation ain2) {
3813        return reduce_my_half2_char2_0(ain1, ain2, null);
3814    }
3815
3816    // ain1 = "half2 a"
3817    // ain2 = "char2 b"
3818    public result_int reduce_my_half2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3819        Type t0, t1;
3820        // check ain1
3821        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3822            throw new RSRuntimeException("Type mismatch with F16_2!");
3823        }
3824        // check ain2
3825        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
3826            throw new RSRuntimeException("Type mismatch with I8_2!");
3827        }
3828        // Verify dimensions
3829        t0 = ain1.getType();
3830        t1 = ain2.getType();
3831        if ((t0.getCount() != t1.getCount()) ||
3832            (t0.getX() != t1.getX()) ||
3833            (t0.getY() != t1.getY()) ||
3834            (t0.getZ() != t1.getZ()) ||
3835            (t0.hasFaces()   != t1.hasFaces()) ||
3836            (t0.hasMipmaps() != t1.hasMipmaps())) {
3837            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3838        }
3839
3840        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3841        aout.setAutoPadding(true);
3842        reduce(mExportReduceIdx_my_half2_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
3843        return new result_int(aout);
3844    }
3845
3846    private final static int mExportReduceIdx_my_half2_char2_1 = 57;
3847    // in1 = "a", flattened 2-vectors
3848    // in2 = "b", flattened 2-vectors
3849    public result_int reduce_my_half2_char2_1(short[] in1, byte[] in2) {
3850        // Verify that "in1" is non-null.
3851        if (in1 == null) {
3852            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3853        }
3854        // Verify that the array length is a multiple of the vector size.
3855        if (in1.length % 2 != 0) {
3856            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3857        }
3858        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3859        ain1.setAutoPadding(true);
3860        ain1.copyFrom(in1);
3861        // Verify that "in2" is non-null.
3862        if (in2 == null) {
3863            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3864        }
3865        // Verify that the array length is a multiple of the vector size.
3866        if (in2.length % 2 != 0) {
3867            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
3868        }
3869        // Verify that input array lengths are the same.
3870        if (in1.length / 2 != in2.length / 2) {
3871            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3872        }
3873        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
3874        ain2.setAutoPadding(true);
3875        ain2.copyFrom(in2);
3876
3877        result_int result = reduce_my_half2_char2_1(ain1, ain2, null);
3878        result.mTempIns = new Allocation[]{ain1, ain2};
3879        return result;
3880    }
3881
3882    // ain1 = "half2 a"
3883    // ain2 = "char2 b"
3884    public result_int reduce_my_half2_char2_1(Allocation ain1, Allocation ain2) {
3885        return reduce_my_half2_char2_1(ain1, ain2, null);
3886    }
3887
3888    // ain1 = "half2 a"
3889    // ain2 = "char2 b"
3890    public result_int reduce_my_half2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3891        Type t0, t1;
3892        // check ain1
3893        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3894            throw new RSRuntimeException("Type mismatch with F16_2!");
3895        }
3896        // check ain2
3897        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
3898            throw new RSRuntimeException("Type mismatch with I8_2!");
3899        }
3900        // Verify dimensions
3901        t0 = ain1.getType();
3902        t1 = ain2.getType();
3903        if ((t0.getCount() != t1.getCount()) ||
3904            (t0.getX() != t1.getX()) ||
3905            (t0.getY() != t1.getY()) ||
3906            (t0.getZ() != t1.getZ()) ||
3907            (t0.hasFaces()   != t1.hasFaces()) ||
3908            (t0.hasMipmaps() != t1.hasMipmaps())) {
3909            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3910        }
3911
3912        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3913        aout.setAutoPadding(true);
3914        reduce(mExportReduceIdx_my_half2_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
3915        return new result_int(aout);
3916    }
3917
3918    private final static int mExportReduceIdx_my_half2_char4_0 = 58;
3919    // in1 = "a", flattened 2-vectors
3920    // in2 = "b", flattened 4-vectors
3921    public result_int reduce_my_half2_char4_0(short[] in1, byte[] in2) {
3922        // Verify that "in1" is non-null.
3923        if (in1 == null) {
3924            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3925        }
3926        // Verify that the array length is a multiple of the vector size.
3927        if (in1.length % 2 != 0) {
3928            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
3929        }
3930        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
3931        ain1.setAutoPadding(true);
3932        ain1.copyFrom(in1);
3933        // Verify that "in2" is non-null.
3934        if (in2 == null) {
3935            throw new RSIllegalArgumentException("Array \"in2\" is null!");
3936        }
3937        // Verify that the array length is a multiple of the vector size.
3938        if (in2.length % 4 != 0) {
3939            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
3940        }
3941        // Verify that input array lengths are the same.
3942        if (in1.length / 2 != in2.length / 4) {
3943            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
3944        }
3945        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
3946        ain2.setAutoPadding(true);
3947        ain2.copyFrom(in2);
3948
3949        result_int result = reduce_my_half2_char4_0(ain1, ain2, null);
3950        result.mTempIns = new Allocation[]{ain1, ain2};
3951        return result;
3952    }
3953
3954    // ain1 = "half2 a"
3955    // ain2 = "char4 b"
3956    public result_int reduce_my_half2_char4_0(Allocation ain1, Allocation ain2) {
3957        return reduce_my_half2_char4_0(ain1, ain2, null);
3958    }
3959
3960    // ain1 = "half2 a"
3961    // ain2 = "char4 b"
3962    public result_int reduce_my_half2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
3963        Type t0, t1;
3964        // check ain1
3965        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
3966            throw new RSRuntimeException("Type mismatch with F16_2!");
3967        }
3968        // check ain2
3969        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
3970            throw new RSRuntimeException("Type mismatch with I8_4!");
3971        }
3972        // Verify dimensions
3973        t0 = ain1.getType();
3974        t1 = ain2.getType();
3975        if ((t0.getCount() != t1.getCount()) ||
3976            (t0.getX() != t1.getX()) ||
3977            (t0.getY() != t1.getY()) ||
3978            (t0.getZ() != t1.getZ()) ||
3979            (t0.hasFaces()   != t1.hasFaces()) ||
3980            (t0.hasMipmaps() != t1.hasMipmaps())) {
3981            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
3982        }
3983
3984        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
3985        aout.setAutoPadding(true);
3986        reduce(mExportReduceIdx_my_half2_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
3987        return new result_int(aout);
3988    }
3989
3990    private final static int mExportReduceIdx_my_half2_char4_1 = 59;
3991    // in1 = "a", flattened 2-vectors
3992    // in2 = "b", flattened 4-vectors
3993    public result_int reduce_my_half2_char4_1(short[] in1, byte[] in2) {
3994        // Verify that "in1" is non-null.
3995        if (in1 == null) {
3996            throw new RSIllegalArgumentException("Array \"in1\" is null!");
3997        }
3998        // Verify that the array length is a multiple of the vector size.
3999        if (in1.length % 2 != 0) {
4000            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4001        }
4002        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4003        ain1.setAutoPadding(true);
4004        ain1.copyFrom(in1);
4005        // Verify that "in2" is non-null.
4006        if (in2 == null) {
4007            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4008        }
4009        // Verify that the array length is a multiple of the vector size.
4010        if (in2.length % 4 != 0) {
4011            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
4012        }
4013        // Verify that input array lengths are the same.
4014        if (in1.length / 2 != in2.length / 4) {
4015            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4016        }
4017        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
4018        ain2.setAutoPadding(true);
4019        ain2.copyFrom(in2);
4020
4021        result_int result = reduce_my_half2_char4_1(ain1, ain2, null);
4022        result.mTempIns = new Allocation[]{ain1, ain2};
4023        return result;
4024    }
4025
4026    // ain1 = "half2 a"
4027    // ain2 = "char4 b"
4028    public result_int reduce_my_half2_char4_1(Allocation ain1, Allocation ain2) {
4029        return reduce_my_half2_char4_1(ain1, ain2, null);
4030    }
4031
4032    // ain1 = "half2 a"
4033    // ain2 = "char4 b"
4034    public result_int reduce_my_half2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4035        Type t0, t1;
4036        // check ain1
4037        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4038            throw new RSRuntimeException("Type mismatch with F16_2!");
4039        }
4040        // check ain2
4041        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
4042            throw new RSRuntimeException("Type mismatch with I8_4!");
4043        }
4044        // Verify dimensions
4045        t0 = ain1.getType();
4046        t1 = ain2.getType();
4047        if ((t0.getCount() != t1.getCount()) ||
4048            (t0.getX() != t1.getX()) ||
4049            (t0.getY() != t1.getY()) ||
4050            (t0.getZ() != t1.getZ()) ||
4051            (t0.hasFaces()   != t1.hasFaces()) ||
4052            (t0.hasMipmaps() != t1.hasMipmaps())) {
4053            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4054        }
4055
4056        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4057        aout.setAutoPadding(true);
4058        reduce(mExportReduceIdx_my_half2_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
4059        return new result_int(aout);
4060    }
4061
4062    private final static int mExportReduceIdx_my_half2_short_0 = 60;
4063    // in1 = "a", flattened 2-vectors
4064    // in2 = "b"
4065    public result_int reduce_my_half2_short_0(short[] in1, short[] in2) {
4066        // Verify that "in1" is non-null.
4067        if (in1 == null) {
4068            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4069        }
4070        // Verify that the array length is a multiple of the vector size.
4071        if (in1.length % 2 != 0) {
4072            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4073        }
4074        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4075        ain1.setAutoPadding(true);
4076        ain1.copyFrom(in1);
4077        // Verify that "in2" is non-null.
4078        if (in2 == null) {
4079            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4080        }
4081        // Verify that input array lengths are the same.
4082        if (in1.length / 2 != in2.length) {
4083            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4084        }
4085        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
4086        ain2.setAutoPadding(true);
4087        ain2.copyFrom(in2);
4088
4089        result_int result = reduce_my_half2_short_0(ain1, ain2, null);
4090        result.mTempIns = new Allocation[]{ain1, ain2};
4091        return result;
4092    }
4093
4094    // ain1 = "half2 a"
4095    // ain2 = "short b"
4096    public result_int reduce_my_half2_short_0(Allocation ain1, Allocation ain2) {
4097        return reduce_my_half2_short_0(ain1, ain2, null);
4098    }
4099
4100    // ain1 = "half2 a"
4101    // ain2 = "short b"
4102    public result_int reduce_my_half2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4103        Type t0, t1;
4104        // check ain1
4105        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4106            throw new RSRuntimeException("Type mismatch with F16_2!");
4107        }
4108        // check ain2
4109        if (!ain2.getType().getElement().isCompatible(__I16)) {
4110            throw new RSRuntimeException("Type mismatch with I16!");
4111        }
4112        // Verify dimensions
4113        t0 = ain1.getType();
4114        t1 = ain2.getType();
4115        if ((t0.getCount() != t1.getCount()) ||
4116            (t0.getX() != t1.getX()) ||
4117            (t0.getY() != t1.getY()) ||
4118            (t0.getZ() != t1.getZ()) ||
4119            (t0.hasFaces()   != t1.hasFaces()) ||
4120            (t0.hasMipmaps() != t1.hasMipmaps())) {
4121            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4122        }
4123
4124        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4125        aout.setAutoPadding(true);
4126        reduce(mExportReduceIdx_my_half2_short_0, new Allocation[]{ain1, ain2}, aout, sc);
4127        return new result_int(aout);
4128    }
4129
4130    private final static int mExportReduceIdx_my_half2_short_1 = 61;
4131    // in1 = "a", flattened 2-vectors
4132    // in2 = "b"
4133    public result_int reduce_my_half2_short_1(short[] in1, short[] in2) {
4134        // Verify that "in1" is non-null.
4135        if (in1 == null) {
4136            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4137        }
4138        // Verify that the array length is a multiple of the vector size.
4139        if (in1.length % 2 != 0) {
4140            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4141        }
4142        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4143        ain1.setAutoPadding(true);
4144        ain1.copyFrom(in1);
4145        // Verify that "in2" is non-null.
4146        if (in2 == null) {
4147            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4148        }
4149        // Verify that input array lengths are the same.
4150        if (in1.length / 2 != in2.length) {
4151            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4152        }
4153        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
4154        ain2.setAutoPadding(true);
4155        ain2.copyFrom(in2);
4156
4157        result_int result = reduce_my_half2_short_1(ain1, ain2, null);
4158        result.mTempIns = new Allocation[]{ain1, ain2};
4159        return result;
4160    }
4161
4162    // ain1 = "half2 a"
4163    // ain2 = "short b"
4164    public result_int reduce_my_half2_short_1(Allocation ain1, Allocation ain2) {
4165        return reduce_my_half2_short_1(ain1, ain2, null);
4166    }
4167
4168    // ain1 = "half2 a"
4169    // ain2 = "short b"
4170    public result_int reduce_my_half2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4171        Type t0, t1;
4172        // check ain1
4173        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4174            throw new RSRuntimeException("Type mismatch with F16_2!");
4175        }
4176        // check ain2
4177        if (!ain2.getType().getElement().isCompatible(__I16)) {
4178            throw new RSRuntimeException("Type mismatch with I16!");
4179        }
4180        // Verify dimensions
4181        t0 = ain1.getType();
4182        t1 = ain2.getType();
4183        if ((t0.getCount() != t1.getCount()) ||
4184            (t0.getX() != t1.getX()) ||
4185            (t0.getY() != t1.getY()) ||
4186            (t0.getZ() != t1.getZ()) ||
4187            (t0.hasFaces()   != t1.hasFaces()) ||
4188            (t0.hasMipmaps() != t1.hasMipmaps())) {
4189            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4190        }
4191
4192        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4193        aout.setAutoPadding(true);
4194        reduce(mExportReduceIdx_my_half2_short_1, new Allocation[]{ain1, ain2}, aout, sc);
4195        return new result_int(aout);
4196    }
4197
4198    private final static int mExportReduceIdx_my_half2_short2_0 = 62;
4199    // in1 = "a", flattened 2-vectors
4200    // in2 = "b", flattened 2-vectors
4201    public result_int reduce_my_half2_short2_0(short[] in1, short[] in2) {
4202        // Verify that "in1" is non-null.
4203        if (in1 == null) {
4204            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4205        }
4206        // Verify that the array length is a multiple of the vector size.
4207        if (in1.length % 2 != 0) {
4208            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4209        }
4210        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4211        ain1.setAutoPadding(true);
4212        ain1.copyFrom(in1);
4213        // Verify that "in2" is non-null.
4214        if (in2 == null) {
4215            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4216        }
4217        // Verify that the array length is a multiple of the vector size.
4218        if (in2.length % 2 != 0) {
4219            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
4220        }
4221        // Verify that input array lengths are the same.
4222        if (in1.length / 2 != in2.length / 2) {
4223            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4224        }
4225        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
4226        ain2.setAutoPadding(true);
4227        ain2.copyFrom(in2);
4228
4229        result_int result = reduce_my_half2_short2_0(ain1, ain2, null);
4230        result.mTempIns = new Allocation[]{ain1, ain2};
4231        return result;
4232    }
4233
4234    // ain1 = "half2 a"
4235    // ain2 = "short2 b"
4236    public result_int reduce_my_half2_short2_0(Allocation ain1, Allocation ain2) {
4237        return reduce_my_half2_short2_0(ain1, ain2, null);
4238    }
4239
4240    // ain1 = "half2 a"
4241    // ain2 = "short2 b"
4242    public result_int reduce_my_half2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4243        Type t0, t1;
4244        // check ain1
4245        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4246            throw new RSRuntimeException("Type mismatch with F16_2!");
4247        }
4248        // check ain2
4249        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
4250            throw new RSRuntimeException("Type mismatch with I16_2!");
4251        }
4252        // Verify dimensions
4253        t0 = ain1.getType();
4254        t1 = ain2.getType();
4255        if ((t0.getCount() != t1.getCount()) ||
4256            (t0.getX() != t1.getX()) ||
4257            (t0.getY() != t1.getY()) ||
4258            (t0.getZ() != t1.getZ()) ||
4259            (t0.hasFaces()   != t1.hasFaces()) ||
4260            (t0.hasMipmaps() != t1.hasMipmaps())) {
4261            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4262        }
4263
4264        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4265        aout.setAutoPadding(true);
4266        reduce(mExportReduceIdx_my_half2_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
4267        return new result_int(aout);
4268    }
4269
4270    private final static int mExportReduceIdx_my_half2_short2_1 = 63;
4271    // in1 = "a", flattened 2-vectors
4272    // in2 = "b", flattened 2-vectors
4273    public result_int reduce_my_half2_short2_1(short[] in1, short[] in2) {
4274        // Verify that "in1" is non-null.
4275        if (in1 == null) {
4276            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4277        }
4278        // Verify that the array length is a multiple of the vector size.
4279        if (in1.length % 2 != 0) {
4280            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4281        }
4282        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4283        ain1.setAutoPadding(true);
4284        ain1.copyFrom(in1);
4285        // Verify that "in2" is non-null.
4286        if (in2 == null) {
4287            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4288        }
4289        // Verify that the array length is a multiple of the vector size.
4290        if (in2.length % 2 != 0) {
4291            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
4292        }
4293        // Verify that input array lengths are the same.
4294        if (in1.length / 2 != in2.length / 2) {
4295            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4296        }
4297        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
4298        ain2.setAutoPadding(true);
4299        ain2.copyFrom(in2);
4300
4301        result_int result = reduce_my_half2_short2_1(ain1, ain2, null);
4302        result.mTempIns = new Allocation[]{ain1, ain2};
4303        return result;
4304    }
4305
4306    // ain1 = "half2 a"
4307    // ain2 = "short2 b"
4308    public result_int reduce_my_half2_short2_1(Allocation ain1, Allocation ain2) {
4309        return reduce_my_half2_short2_1(ain1, ain2, null);
4310    }
4311
4312    // ain1 = "half2 a"
4313    // ain2 = "short2 b"
4314    public result_int reduce_my_half2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4315        Type t0, t1;
4316        // check ain1
4317        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4318            throw new RSRuntimeException("Type mismatch with F16_2!");
4319        }
4320        // check ain2
4321        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
4322            throw new RSRuntimeException("Type mismatch with I16_2!");
4323        }
4324        // Verify dimensions
4325        t0 = ain1.getType();
4326        t1 = ain2.getType();
4327        if ((t0.getCount() != t1.getCount()) ||
4328            (t0.getX() != t1.getX()) ||
4329            (t0.getY() != t1.getY()) ||
4330            (t0.getZ() != t1.getZ()) ||
4331            (t0.hasFaces()   != t1.hasFaces()) ||
4332            (t0.hasMipmaps() != t1.hasMipmaps())) {
4333            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4334        }
4335
4336        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4337        aout.setAutoPadding(true);
4338        reduce(mExportReduceIdx_my_half2_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
4339        return new result_int(aout);
4340    }
4341
4342    private final static int mExportReduceIdx_my_half2_short4_0 = 64;
4343    // in1 = "a", flattened 2-vectors
4344    // in2 = "b", flattened 4-vectors
4345    public result_int reduce_my_half2_short4_0(short[] in1, short[] in2) {
4346        // Verify that "in1" is non-null.
4347        if (in1 == null) {
4348            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4349        }
4350        // Verify that the array length is a multiple of the vector size.
4351        if (in1.length % 2 != 0) {
4352            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4353        }
4354        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4355        ain1.setAutoPadding(true);
4356        ain1.copyFrom(in1);
4357        // Verify that "in2" is non-null.
4358        if (in2 == null) {
4359            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4360        }
4361        // Verify that the array length is a multiple of the vector size.
4362        if (in2.length % 4 != 0) {
4363            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
4364        }
4365        // Verify that input array lengths are the same.
4366        if (in1.length / 2 != in2.length / 4) {
4367            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4368        }
4369        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
4370        ain2.setAutoPadding(true);
4371        ain2.copyFrom(in2);
4372
4373        result_int result = reduce_my_half2_short4_0(ain1, ain2, null);
4374        result.mTempIns = new Allocation[]{ain1, ain2};
4375        return result;
4376    }
4377
4378    // ain1 = "half2 a"
4379    // ain2 = "short4 b"
4380    public result_int reduce_my_half2_short4_0(Allocation ain1, Allocation ain2) {
4381        return reduce_my_half2_short4_0(ain1, ain2, null);
4382    }
4383
4384    // ain1 = "half2 a"
4385    // ain2 = "short4 b"
4386    public result_int reduce_my_half2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4387        Type t0, t1;
4388        // check ain1
4389        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4390            throw new RSRuntimeException("Type mismatch with F16_2!");
4391        }
4392        // check ain2
4393        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
4394            throw new RSRuntimeException("Type mismatch with I16_4!");
4395        }
4396        // Verify dimensions
4397        t0 = ain1.getType();
4398        t1 = ain2.getType();
4399        if ((t0.getCount() != t1.getCount()) ||
4400            (t0.getX() != t1.getX()) ||
4401            (t0.getY() != t1.getY()) ||
4402            (t0.getZ() != t1.getZ()) ||
4403            (t0.hasFaces()   != t1.hasFaces()) ||
4404            (t0.hasMipmaps() != t1.hasMipmaps())) {
4405            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4406        }
4407
4408        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4409        aout.setAutoPadding(true);
4410        reduce(mExportReduceIdx_my_half2_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
4411        return new result_int(aout);
4412    }
4413
4414    private final static int mExportReduceIdx_my_half2_short4_1 = 65;
4415    // in1 = "a", flattened 2-vectors
4416    // in2 = "b", flattened 4-vectors
4417    public result_int reduce_my_half2_short4_1(short[] in1, short[] in2) {
4418        // Verify that "in1" is non-null.
4419        if (in1 == null) {
4420            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4421        }
4422        // Verify that the array length is a multiple of the vector size.
4423        if (in1.length % 2 != 0) {
4424            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4425        }
4426        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4427        ain1.setAutoPadding(true);
4428        ain1.copyFrom(in1);
4429        // Verify that "in2" is non-null.
4430        if (in2 == null) {
4431            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4432        }
4433        // Verify that the array length is a multiple of the vector size.
4434        if (in2.length % 4 != 0) {
4435            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
4436        }
4437        // Verify that input array lengths are the same.
4438        if (in1.length / 2 != in2.length / 4) {
4439            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4440        }
4441        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
4442        ain2.setAutoPadding(true);
4443        ain2.copyFrom(in2);
4444
4445        result_int result = reduce_my_half2_short4_1(ain1, ain2, null);
4446        result.mTempIns = new Allocation[]{ain1, ain2};
4447        return result;
4448    }
4449
4450    // ain1 = "half2 a"
4451    // ain2 = "short4 b"
4452    public result_int reduce_my_half2_short4_1(Allocation ain1, Allocation ain2) {
4453        return reduce_my_half2_short4_1(ain1, ain2, null);
4454    }
4455
4456    // ain1 = "half2 a"
4457    // ain2 = "short4 b"
4458    public result_int reduce_my_half2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4459        Type t0, t1;
4460        // check ain1
4461        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4462            throw new RSRuntimeException("Type mismatch with F16_2!");
4463        }
4464        // check ain2
4465        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
4466            throw new RSRuntimeException("Type mismatch with I16_4!");
4467        }
4468        // Verify dimensions
4469        t0 = ain1.getType();
4470        t1 = ain2.getType();
4471        if ((t0.getCount() != t1.getCount()) ||
4472            (t0.getX() != t1.getX()) ||
4473            (t0.getY() != t1.getY()) ||
4474            (t0.getZ() != t1.getZ()) ||
4475            (t0.hasFaces()   != t1.hasFaces()) ||
4476            (t0.hasMipmaps() != t1.hasMipmaps())) {
4477            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4478        }
4479
4480        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4481        aout.setAutoPadding(true);
4482        reduce(mExportReduceIdx_my_half2_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
4483        return new result_int(aout);
4484    }
4485
4486    private final static int mExportReduceIdx_my_half2_uchar_0 = 66;
4487    // in1 = "a", flattened 2-vectors
4488    // in2 = "b"
4489    public result_int reduce_my_half2_uchar_0(short[] in1, byte[] in2) {
4490        // Verify that "in1" is non-null.
4491        if (in1 == null) {
4492            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4493        }
4494        // Verify that the array length is a multiple of the vector size.
4495        if (in1.length % 2 != 0) {
4496            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4497        }
4498        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4499        ain1.setAutoPadding(true);
4500        ain1.copyFrom(in1);
4501        // Verify that "in2" is non-null.
4502        if (in2 == null) {
4503            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4504        }
4505        // Verify that input array lengths are the same.
4506        if (in1.length / 2 != in2.length) {
4507            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4508        }
4509        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
4510        ain2.setAutoPadding(true);
4511        ain2.copyFrom(in2);
4512
4513        result_int result = reduce_my_half2_uchar_0(ain1, ain2, null);
4514        result.mTempIns = new Allocation[]{ain1, ain2};
4515        return result;
4516    }
4517
4518    // ain1 = "half2 a"
4519    // ain2 = "uchar b"
4520    public result_int reduce_my_half2_uchar_0(Allocation ain1, Allocation ain2) {
4521        return reduce_my_half2_uchar_0(ain1, ain2, null);
4522    }
4523
4524    // ain1 = "half2 a"
4525    // ain2 = "uchar b"
4526    public result_int reduce_my_half2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4527        Type t0, t1;
4528        // check ain1
4529        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4530            throw new RSRuntimeException("Type mismatch with F16_2!");
4531        }
4532        // check ain2
4533        if (!ain2.getType().getElement().isCompatible(__U8)) {
4534            throw new RSRuntimeException("Type mismatch with U8!");
4535        }
4536        // Verify dimensions
4537        t0 = ain1.getType();
4538        t1 = ain2.getType();
4539        if ((t0.getCount() != t1.getCount()) ||
4540            (t0.getX() != t1.getX()) ||
4541            (t0.getY() != t1.getY()) ||
4542            (t0.getZ() != t1.getZ()) ||
4543            (t0.hasFaces()   != t1.hasFaces()) ||
4544            (t0.hasMipmaps() != t1.hasMipmaps())) {
4545            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4546        }
4547
4548        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4549        aout.setAutoPadding(true);
4550        reduce(mExportReduceIdx_my_half2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
4551        return new result_int(aout);
4552    }
4553
4554    private final static int mExportReduceIdx_my_half2_uchar_1 = 67;
4555    // in1 = "a", flattened 2-vectors
4556    // in2 = "b"
4557    public result_int reduce_my_half2_uchar_1(short[] in1, byte[] in2) {
4558        // Verify that "in1" is non-null.
4559        if (in1 == null) {
4560            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4561        }
4562        // Verify that the array length is a multiple of the vector size.
4563        if (in1.length % 2 != 0) {
4564            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4565        }
4566        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4567        ain1.setAutoPadding(true);
4568        ain1.copyFrom(in1);
4569        // Verify that "in2" is non-null.
4570        if (in2 == null) {
4571            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4572        }
4573        // Verify that input array lengths are the same.
4574        if (in1.length / 2 != in2.length) {
4575            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4576        }
4577        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
4578        ain2.setAutoPadding(true);
4579        ain2.copyFrom(in2);
4580
4581        result_int result = reduce_my_half2_uchar_1(ain1, ain2, null);
4582        result.mTempIns = new Allocation[]{ain1, ain2};
4583        return result;
4584    }
4585
4586    // ain1 = "half2 a"
4587    // ain2 = "uchar b"
4588    public result_int reduce_my_half2_uchar_1(Allocation ain1, Allocation ain2) {
4589        return reduce_my_half2_uchar_1(ain1, ain2, null);
4590    }
4591
4592    // ain1 = "half2 a"
4593    // ain2 = "uchar b"
4594    public result_int reduce_my_half2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4595        Type t0, t1;
4596        // check ain1
4597        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4598            throw new RSRuntimeException("Type mismatch with F16_2!");
4599        }
4600        // check ain2
4601        if (!ain2.getType().getElement().isCompatible(__U8)) {
4602            throw new RSRuntimeException("Type mismatch with U8!");
4603        }
4604        // Verify dimensions
4605        t0 = ain1.getType();
4606        t1 = ain2.getType();
4607        if ((t0.getCount() != t1.getCount()) ||
4608            (t0.getX() != t1.getX()) ||
4609            (t0.getY() != t1.getY()) ||
4610            (t0.getZ() != t1.getZ()) ||
4611            (t0.hasFaces()   != t1.hasFaces()) ||
4612            (t0.hasMipmaps() != t1.hasMipmaps())) {
4613            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4614        }
4615
4616        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4617        aout.setAutoPadding(true);
4618        reduce(mExportReduceIdx_my_half2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
4619        return new result_int(aout);
4620    }
4621
4622    private final static int mExportReduceIdx_my_half2_uchar2_0 = 68;
4623    // in1 = "a", flattened 2-vectors
4624    // in2 = "b", flattened 2-vectors
4625    public result_int reduce_my_half2_uchar2_0(short[] in1, byte[] in2) {
4626        // Verify that "in1" is non-null.
4627        if (in1 == null) {
4628            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4629        }
4630        // Verify that the array length is a multiple of the vector size.
4631        if (in1.length % 2 != 0) {
4632            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4633        }
4634        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4635        ain1.setAutoPadding(true);
4636        ain1.copyFrom(in1);
4637        // Verify that "in2" is non-null.
4638        if (in2 == null) {
4639            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4640        }
4641        // Verify that the array length is a multiple of the vector size.
4642        if (in2.length % 2 != 0) {
4643            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
4644        }
4645        // Verify that input array lengths are the same.
4646        if (in1.length / 2 != in2.length / 2) {
4647            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4648        }
4649        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
4650        ain2.setAutoPadding(true);
4651        ain2.copyFrom(in2);
4652
4653        result_int result = reduce_my_half2_uchar2_0(ain1, ain2, null);
4654        result.mTempIns = new Allocation[]{ain1, ain2};
4655        return result;
4656    }
4657
4658    // ain1 = "half2 a"
4659    // ain2 = "uchar2 b"
4660    public result_int reduce_my_half2_uchar2_0(Allocation ain1, Allocation ain2) {
4661        return reduce_my_half2_uchar2_0(ain1, ain2, null);
4662    }
4663
4664    // ain1 = "half2 a"
4665    // ain2 = "uchar2 b"
4666    public result_int reduce_my_half2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4667        Type t0, t1;
4668        // check ain1
4669        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4670            throw new RSRuntimeException("Type mismatch with F16_2!");
4671        }
4672        // check ain2
4673        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
4674            throw new RSRuntimeException("Type mismatch with U8_2!");
4675        }
4676        // Verify dimensions
4677        t0 = ain1.getType();
4678        t1 = ain2.getType();
4679        if ((t0.getCount() != t1.getCount()) ||
4680            (t0.getX() != t1.getX()) ||
4681            (t0.getY() != t1.getY()) ||
4682            (t0.getZ() != t1.getZ()) ||
4683            (t0.hasFaces()   != t1.hasFaces()) ||
4684            (t0.hasMipmaps() != t1.hasMipmaps())) {
4685            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4686        }
4687
4688        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4689        aout.setAutoPadding(true);
4690        reduce(mExportReduceIdx_my_half2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
4691        return new result_int(aout);
4692    }
4693
4694    private final static int mExportReduceIdx_my_half2_uchar2_1 = 69;
4695    // in1 = "a", flattened 2-vectors
4696    // in2 = "b", flattened 2-vectors
4697    public result_int reduce_my_half2_uchar2_1(short[] in1, byte[] in2) {
4698        // Verify that "in1" is non-null.
4699        if (in1 == null) {
4700            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4701        }
4702        // Verify that the array length is a multiple of the vector size.
4703        if (in1.length % 2 != 0) {
4704            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4705        }
4706        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4707        ain1.setAutoPadding(true);
4708        ain1.copyFrom(in1);
4709        // Verify that "in2" is non-null.
4710        if (in2 == null) {
4711            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4712        }
4713        // Verify that the array length is a multiple of the vector size.
4714        if (in2.length % 2 != 0) {
4715            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
4716        }
4717        // Verify that input array lengths are the same.
4718        if (in1.length / 2 != in2.length / 2) {
4719            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4720        }
4721        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
4722        ain2.setAutoPadding(true);
4723        ain2.copyFrom(in2);
4724
4725        result_int result = reduce_my_half2_uchar2_1(ain1, ain2, null);
4726        result.mTempIns = new Allocation[]{ain1, ain2};
4727        return result;
4728    }
4729
4730    // ain1 = "half2 a"
4731    // ain2 = "uchar2 b"
4732    public result_int reduce_my_half2_uchar2_1(Allocation ain1, Allocation ain2) {
4733        return reduce_my_half2_uchar2_1(ain1, ain2, null);
4734    }
4735
4736    // ain1 = "half2 a"
4737    // ain2 = "uchar2 b"
4738    public result_int reduce_my_half2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4739        Type t0, t1;
4740        // check ain1
4741        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4742            throw new RSRuntimeException("Type mismatch with F16_2!");
4743        }
4744        // check ain2
4745        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
4746            throw new RSRuntimeException("Type mismatch with U8_2!");
4747        }
4748        // Verify dimensions
4749        t0 = ain1.getType();
4750        t1 = ain2.getType();
4751        if ((t0.getCount() != t1.getCount()) ||
4752            (t0.getX() != t1.getX()) ||
4753            (t0.getY() != t1.getY()) ||
4754            (t0.getZ() != t1.getZ()) ||
4755            (t0.hasFaces()   != t1.hasFaces()) ||
4756            (t0.hasMipmaps() != t1.hasMipmaps())) {
4757            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4758        }
4759
4760        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4761        aout.setAutoPadding(true);
4762        reduce(mExportReduceIdx_my_half2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
4763        return new result_int(aout);
4764    }
4765
4766    private final static int mExportReduceIdx_my_half2_uchar4_0 = 70;
4767    // in1 = "a", flattened 2-vectors
4768    // in2 = "b", flattened 4-vectors
4769    public result_int reduce_my_half2_uchar4_0(short[] in1, byte[] in2) {
4770        // Verify that "in1" is non-null.
4771        if (in1 == null) {
4772            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4773        }
4774        // Verify that the array length is a multiple of the vector size.
4775        if (in1.length % 2 != 0) {
4776            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4777        }
4778        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4779        ain1.setAutoPadding(true);
4780        ain1.copyFrom(in1);
4781        // Verify that "in2" is non-null.
4782        if (in2 == null) {
4783            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4784        }
4785        // Verify that the array length is a multiple of the vector size.
4786        if (in2.length % 4 != 0) {
4787            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
4788        }
4789        // Verify that input array lengths are the same.
4790        if (in1.length / 2 != in2.length / 4) {
4791            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4792        }
4793        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
4794        ain2.setAutoPadding(true);
4795        ain2.copyFrom(in2);
4796
4797        result_int result = reduce_my_half2_uchar4_0(ain1, ain2, null);
4798        result.mTempIns = new Allocation[]{ain1, ain2};
4799        return result;
4800    }
4801
4802    // ain1 = "half2 a"
4803    // ain2 = "uchar4 b"
4804    public result_int reduce_my_half2_uchar4_0(Allocation ain1, Allocation ain2) {
4805        return reduce_my_half2_uchar4_0(ain1, ain2, null);
4806    }
4807
4808    // ain1 = "half2 a"
4809    // ain2 = "uchar4 b"
4810    public result_int reduce_my_half2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4811        Type t0, t1;
4812        // check ain1
4813        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4814            throw new RSRuntimeException("Type mismatch with F16_2!");
4815        }
4816        // check ain2
4817        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
4818            throw new RSRuntimeException("Type mismatch with U8_4!");
4819        }
4820        // Verify dimensions
4821        t0 = ain1.getType();
4822        t1 = ain2.getType();
4823        if ((t0.getCount() != t1.getCount()) ||
4824            (t0.getX() != t1.getX()) ||
4825            (t0.getY() != t1.getY()) ||
4826            (t0.getZ() != t1.getZ()) ||
4827            (t0.hasFaces()   != t1.hasFaces()) ||
4828            (t0.hasMipmaps() != t1.hasMipmaps())) {
4829            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4830        }
4831
4832        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4833        aout.setAutoPadding(true);
4834        reduce(mExportReduceIdx_my_half2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
4835        return new result_int(aout);
4836    }
4837
4838    private final static int mExportReduceIdx_my_half2_uchar4_1 = 71;
4839    // in1 = "a", flattened 2-vectors
4840    // in2 = "b", flattened 4-vectors
4841    public result_int reduce_my_half2_uchar4_1(short[] in1, byte[] in2) {
4842        // Verify that "in1" is non-null.
4843        if (in1 == null) {
4844            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4845        }
4846        // Verify that the array length is a multiple of the vector size.
4847        if (in1.length % 2 != 0) {
4848            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4849        }
4850        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4851        ain1.setAutoPadding(true);
4852        ain1.copyFrom(in1);
4853        // Verify that "in2" is non-null.
4854        if (in2 == null) {
4855            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4856        }
4857        // Verify that the array length is a multiple of the vector size.
4858        if (in2.length % 4 != 0) {
4859            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
4860        }
4861        // Verify that input array lengths are the same.
4862        if (in1.length / 2 != in2.length / 4) {
4863            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4864        }
4865        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
4866        ain2.setAutoPadding(true);
4867        ain2.copyFrom(in2);
4868
4869        result_int result = reduce_my_half2_uchar4_1(ain1, ain2, null);
4870        result.mTempIns = new Allocation[]{ain1, ain2};
4871        return result;
4872    }
4873
4874    // ain1 = "half2 a"
4875    // ain2 = "uchar4 b"
4876    public result_int reduce_my_half2_uchar4_1(Allocation ain1, Allocation ain2) {
4877        return reduce_my_half2_uchar4_1(ain1, ain2, null);
4878    }
4879
4880    // ain1 = "half2 a"
4881    // ain2 = "uchar4 b"
4882    public result_int reduce_my_half2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4883        Type t0, t1;
4884        // check ain1
4885        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4886            throw new RSRuntimeException("Type mismatch with F16_2!");
4887        }
4888        // check ain2
4889        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
4890            throw new RSRuntimeException("Type mismatch with U8_4!");
4891        }
4892        // Verify dimensions
4893        t0 = ain1.getType();
4894        t1 = ain2.getType();
4895        if ((t0.getCount() != t1.getCount()) ||
4896            (t0.getX() != t1.getX()) ||
4897            (t0.getY() != t1.getY()) ||
4898            (t0.getZ() != t1.getZ()) ||
4899            (t0.hasFaces()   != t1.hasFaces()) ||
4900            (t0.hasMipmaps() != t1.hasMipmaps())) {
4901            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4902        }
4903
4904        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4905        aout.setAutoPadding(true);
4906        reduce(mExportReduceIdx_my_half2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
4907        return new result_int(aout);
4908    }
4909
4910    private final static int mExportReduceIdx_my_half2_ushort_0 = 72;
4911    // in1 = "a", flattened 2-vectors
4912    // in2 = "b"
4913    public result_int reduce_my_half2_ushort_0(short[] in1, short[] in2) {
4914        // Verify that "in1" is non-null.
4915        if (in1 == null) {
4916            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4917        }
4918        // Verify that the array length is a multiple of the vector size.
4919        if (in1.length % 2 != 0) {
4920            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4921        }
4922        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4923        ain1.setAutoPadding(true);
4924        ain1.copyFrom(in1);
4925        // Verify that "in2" is non-null.
4926        if (in2 == null) {
4927            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4928        }
4929        // Verify that input array lengths are the same.
4930        if (in1.length / 2 != in2.length) {
4931            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
4932        }
4933        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
4934        ain2.setAutoPadding(true);
4935        ain2.copyFrom(in2);
4936
4937        result_int result = reduce_my_half2_ushort_0(ain1, ain2, null);
4938        result.mTempIns = new Allocation[]{ain1, ain2};
4939        return result;
4940    }
4941
4942    // ain1 = "half2 a"
4943    // ain2 = "ushort b"
4944    public result_int reduce_my_half2_ushort_0(Allocation ain1, Allocation ain2) {
4945        return reduce_my_half2_ushort_0(ain1, ain2, null);
4946    }
4947
4948    // ain1 = "half2 a"
4949    // ain2 = "ushort b"
4950    public result_int reduce_my_half2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
4951        Type t0, t1;
4952        // check ain1
4953        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
4954            throw new RSRuntimeException("Type mismatch with F16_2!");
4955        }
4956        // check ain2
4957        if (!ain2.getType().getElement().isCompatible(__U16)) {
4958            throw new RSRuntimeException("Type mismatch with U16!");
4959        }
4960        // Verify dimensions
4961        t0 = ain1.getType();
4962        t1 = ain2.getType();
4963        if ((t0.getCount() != t1.getCount()) ||
4964            (t0.getX() != t1.getX()) ||
4965            (t0.getY() != t1.getY()) ||
4966            (t0.getZ() != t1.getZ()) ||
4967            (t0.hasFaces()   != t1.hasFaces()) ||
4968            (t0.hasMipmaps() != t1.hasMipmaps())) {
4969            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
4970        }
4971
4972        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
4973        aout.setAutoPadding(true);
4974        reduce(mExportReduceIdx_my_half2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
4975        return new result_int(aout);
4976    }
4977
4978    private final static int mExportReduceIdx_my_half2_ushort_1 = 73;
4979    // in1 = "a", flattened 2-vectors
4980    // in2 = "b"
4981    public result_int reduce_my_half2_ushort_1(short[] in1, short[] in2) {
4982        // Verify that "in1" is non-null.
4983        if (in1 == null) {
4984            throw new RSIllegalArgumentException("Array \"in1\" is null!");
4985        }
4986        // Verify that the array length is a multiple of the vector size.
4987        if (in1.length % 2 != 0) {
4988            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
4989        }
4990        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
4991        ain1.setAutoPadding(true);
4992        ain1.copyFrom(in1);
4993        // Verify that "in2" is non-null.
4994        if (in2 == null) {
4995            throw new RSIllegalArgumentException("Array \"in2\" is null!");
4996        }
4997        // Verify that input array lengths are the same.
4998        if (in1.length / 2 != in2.length) {
4999            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5000        }
5001        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
5002        ain2.setAutoPadding(true);
5003        ain2.copyFrom(in2);
5004
5005        result_int result = reduce_my_half2_ushort_1(ain1, ain2, null);
5006        result.mTempIns = new Allocation[]{ain1, ain2};
5007        return result;
5008    }
5009
5010    // ain1 = "half2 a"
5011    // ain2 = "ushort b"
5012    public result_int reduce_my_half2_ushort_1(Allocation ain1, Allocation ain2) {
5013        return reduce_my_half2_ushort_1(ain1, ain2, null);
5014    }
5015
5016    // ain1 = "half2 a"
5017    // ain2 = "ushort b"
5018    public result_int reduce_my_half2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5019        Type t0, t1;
5020        // check ain1
5021        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5022            throw new RSRuntimeException("Type mismatch with F16_2!");
5023        }
5024        // check ain2
5025        if (!ain2.getType().getElement().isCompatible(__U16)) {
5026            throw new RSRuntimeException("Type mismatch with U16!");
5027        }
5028        // Verify dimensions
5029        t0 = ain1.getType();
5030        t1 = ain2.getType();
5031        if ((t0.getCount() != t1.getCount()) ||
5032            (t0.getX() != t1.getX()) ||
5033            (t0.getY() != t1.getY()) ||
5034            (t0.getZ() != t1.getZ()) ||
5035            (t0.hasFaces()   != t1.hasFaces()) ||
5036            (t0.hasMipmaps() != t1.hasMipmaps())) {
5037            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5038        }
5039
5040        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5041        aout.setAutoPadding(true);
5042        reduce(mExportReduceIdx_my_half2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
5043        return new result_int(aout);
5044    }
5045
5046    private final static int mExportReduceIdx_my_half2_ushort2_0 = 74;
5047    // in1 = "a", flattened 2-vectors
5048    // in2 = "b", flattened 2-vectors
5049    public result_int reduce_my_half2_ushort2_0(short[] in1, short[] in2) {
5050        // Verify that "in1" is non-null.
5051        if (in1 == null) {
5052            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5053        }
5054        // Verify that the array length is a multiple of the vector size.
5055        if (in1.length % 2 != 0) {
5056            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
5057        }
5058        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
5059        ain1.setAutoPadding(true);
5060        ain1.copyFrom(in1);
5061        // Verify that "in2" is non-null.
5062        if (in2 == null) {
5063            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5064        }
5065        // Verify that the array length is a multiple of the vector size.
5066        if (in2.length % 2 != 0) {
5067            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
5068        }
5069        // Verify that input array lengths are the same.
5070        if (in1.length / 2 != in2.length / 2) {
5071            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5072        }
5073        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
5074        ain2.setAutoPadding(true);
5075        ain2.copyFrom(in2);
5076
5077        result_int result = reduce_my_half2_ushort2_0(ain1, ain2, null);
5078        result.mTempIns = new Allocation[]{ain1, ain2};
5079        return result;
5080    }
5081
5082    // ain1 = "half2 a"
5083    // ain2 = "ushort2 b"
5084    public result_int reduce_my_half2_ushort2_0(Allocation ain1, Allocation ain2) {
5085        return reduce_my_half2_ushort2_0(ain1, ain2, null);
5086    }
5087
5088    // ain1 = "half2 a"
5089    // ain2 = "ushort2 b"
5090    public result_int reduce_my_half2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5091        Type t0, t1;
5092        // check ain1
5093        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5094            throw new RSRuntimeException("Type mismatch with F16_2!");
5095        }
5096        // check ain2
5097        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
5098            throw new RSRuntimeException("Type mismatch with U16_2!");
5099        }
5100        // Verify dimensions
5101        t0 = ain1.getType();
5102        t1 = ain2.getType();
5103        if ((t0.getCount() != t1.getCount()) ||
5104            (t0.getX() != t1.getX()) ||
5105            (t0.getY() != t1.getY()) ||
5106            (t0.getZ() != t1.getZ()) ||
5107            (t0.hasFaces()   != t1.hasFaces()) ||
5108            (t0.hasMipmaps() != t1.hasMipmaps())) {
5109            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5110        }
5111
5112        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5113        aout.setAutoPadding(true);
5114        reduce(mExportReduceIdx_my_half2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
5115        return new result_int(aout);
5116    }
5117
5118    private final static int mExportReduceIdx_my_half2_ushort2_1 = 75;
5119    // in1 = "a", flattened 2-vectors
5120    // in2 = "b", flattened 2-vectors
5121    public result_int reduce_my_half2_ushort2_1(short[] in1, short[] in2) {
5122        // Verify that "in1" is non-null.
5123        if (in1 == null) {
5124            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5125        }
5126        // Verify that the array length is a multiple of the vector size.
5127        if (in1.length % 2 != 0) {
5128            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
5129        }
5130        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
5131        ain1.setAutoPadding(true);
5132        ain1.copyFrom(in1);
5133        // Verify that "in2" is non-null.
5134        if (in2 == null) {
5135            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5136        }
5137        // Verify that the array length is a multiple of the vector size.
5138        if (in2.length % 2 != 0) {
5139            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
5140        }
5141        // Verify that input array lengths are the same.
5142        if (in1.length / 2 != in2.length / 2) {
5143            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5144        }
5145        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
5146        ain2.setAutoPadding(true);
5147        ain2.copyFrom(in2);
5148
5149        result_int result = reduce_my_half2_ushort2_1(ain1, ain2, null);
5150        result.mTempIns = new Allocation[]{ain1, ain2};
5151        return result;
5152    }
5153
5154    // ain1 = "half2 a"
5155    // ain2 = "ushort2 b"
5156    public result_int reduce_my_half2_ushort2_1(Allocation ain1, Allocation ain2) {
5157        return reduce_my_half2_ushort2_1(ain1, ain2, null);
5158    }
5159
5160    // ain1 = "half2 a"
5161    // ain2 = "ushort2 b"
5162    public result_int reduce_my_half2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5163        Type t0, t1;
5164        // check ain1
5165        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5166            throw new RSRuntimeException("Type mismatch with F16_2!");
5167        }
5168        // check ain2
5169        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
5170            throw new RSRuntimeException("Type mismatch with U16_2!");
5171        }
5172        // Verify dimensions
5173        t0 = ain1.getType();
5174        t1 = ain2.getType();
5175        if ((t0.getCount() != t1.getCount()) ||
5176            (t0.getX() != t1.getX()) ||
5177            (t0.getY() != t1.getY()) ||
5178            (t0.getZ() != t1.getZ()) ||
5179            (t0.hasFaces()   != t1.hasFaces()) ||
5180            (t0.hasMipmaps() != t1.hasMipmaps())) {
5181            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5182        }
5183
5184        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5185        aout.setAutoPadding(true);
5186        reduce(mExportReduceIdx_my_half2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
5187        return new result_int(aout);
5188    }
5189
5190    private final static int mExportReduceIdx_my_half2_ushort4_0 = 76;
5191    // in1 = "a", flattened 2-vectors
5192    // in2 = "b", flattened 4-vectors
5193    public result_int reduce_my_half2_ushort4_0(short[] in1, short[] in2) {
5194        // Verify that "in1" is non-null.
5195        if (in1 == null) {
5196            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5197        }
5198        // Verify that the array length is a multiple of the vector size.
5199        if (in1.length % 2 != 0) {
5200            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
5201        }
5202        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
5203        ain1.setAutoPadding(true);
5204        ain1.copyFrom(in1);
5205        // Verify that "in2" is non-null.
5206        if (in2 == null) {
5207            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5208        }
5209        // Verify that the array length is a multiple of the vector size.
5210        if (in2.length % 4 != 0) {
5211            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
5212        }
5213        // Verify that input array lengths are the same.
5214        if (in1.length / 2 != in2.length / 4) {
5215            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5216        }
5217        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
5218        ain2.setAutoPadding(true);
5219        ain2.copyFrom(in2);
5220
5221        result_int result = reduce_my_half2_ushort4_0(ain1, ain2, null);
5222        result.mTempIns = new Allocation[]{ain1, ain2};
5223        return result;
5224    }
5225
5226    // ain1 = "half2 a"
5227    // ain2 = "ushort4 b"
5228    public result_int reduce_my_half2_ushort4_0(Allocation ain1, Allocation ain2) {
5229        return reduce_my_half2_ushort4_0(ain1, ain2, null);
5230    }
5231
5232    // ain1 = "half2 a"
5233    // ain2 = "ushort4 b"
5234    public result_int reduce_my_half2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5235        Type t0, t1;
5236        // check ain1
5237        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5238            throw new RSRuntimeException("Type mismatch with F16_2!");
5239        }
5240        // check ain2
5241        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
5242            throw new RSRuntimeException("Type mismatch with U16_4!");
5243        }
5244        // Verify dimensions
5245        t0 = ain1.getType();
5246        t1 = ain2.getType();
5247        if ((t0.getCount() != t1.getCount()) ||
5248            (t0.getX() != t1.getX()) ||
5249            (t0.getY() != t1.getY()) ||
5250            (t0.getZ() != t1.getZ()) ||
5251            (t0.hasFaces()   != t1.hasFaces()) ||
5252            (t0.hasMipmaps() != t1.hasMipmaps())) {
5253            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5254        }
5255
5256        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5257        aout.setAutoPadding(true);
5258        reduce(mExportReduceIdx_my_half2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
5259        return new result_int(aout);
5260    }
5261
5262    private final static int mExportReduceIdx_my_half2_ushort4_1 = 77;
5263    // in1 = "a", flattened 2-vectors
5264    // in2 = "b", flattened 4-vectors
5265    public result_int reduce_my_half2_ushort4_1(short[] in1, short[] in2) {
5266        // Verify that "in1" is non-null.
5267        if (in1 == null) {
5268            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5269        }
5270        // Verify that the array length is a multiple of the vector size.
5271        if (in1.length % 2 != 0) {
5272            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
5273        }
5274        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
5275        ain1.setAutoPadding(true);
5276        ain1.copyFrom(in1);
5277        // Verify that "in2" is non-null.
5278        if (in2 == null) {
5279            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5280        }
5281        // Verify that the array length is a multiple of the vector size.
5282        if (in2.length % 4 != 0) {
5283            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
5284        }
5285        // Verify that input array lengths are the same.
5286        if (in1.length / 2 != in2.length / 4) {
5287            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5288        }
5289        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
5290        ain2.setAutoPadding(true);
5291        ain2.copyFrom(in2);
5292
5293        result_int result = reduce_my_half2_ushort4_1(ain1, ain2, null);
5294        result.mTempIns = new Allocation[]{ain1, ain2};
5295        return result;
5296    }
5297
5298    // ain1 = "half2 a"
5299    // ain2 = "ushort4 b"
5300    public result_int reduce_my_half2_ushort4_1(Allocation ain1, Allocation ain2) {
5301        return reduce_my_half2_ushort4_1(ain1, ain2, null);
5302    }
5303
5304    // ain1 = "half2 a"
5305    // ain2 = "ushort4 b"
5306    public result_int reduce_my_half2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5307        Type t0, t1;
5308        // check ain1
5309        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5310            throw new RSRuntimeException("Type mismatch with F16_2!");
5311        }
5312        // check ain2
5313        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
5314            throw new RSRuntimeException("Type mismatch with U16_4!");
5315        }
5316        // Verify dimensions
5317        t0 = ain1.getType();
5318        t1 = ain2.getType();
5319        if ((t0.getCount() != t1.getCount()) ||
5320            (t0.getX() != t1.getX()) ||
5321            (t0.getY() != t1.getY()) ||
5322            (t0.getZ() != t1.getZ()) ||
5323            (t0.hasFaces()   != t1.hasFaces()) ||
5324            (t0.hasMipmaps() != t1.hasMipmaps())) {
5325            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5326        }
5327
5328        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5329        aout.setAutoPadding(true);
5330        reduce(mExportReduceIdx_my_half2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
5331        return new result_int(aout);
5332    }
5333
5334    private final static int mExportReduceIdx_my_half2_bool_0 = 78;
5335    // in1 = "a", flattened 2-vectors
5336    // in2 = "b"
5337    public result_int reduce_my_half2_bool_0(short[] in1, byte[] in2) {
5338        // Verify that "in1" is non-null.
5339        if (in1 == null) {
5340            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5341        }
5342        // Verify that the array length is a multiple of the vector size.
5343        if (in1.length % 2 != 0) {
5344            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
5345        }
5346        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
5347        ain1.setAutoPadding(true);
5348        ain1.copyFrom(in1);
5349        // Verify that "in2" is non-null.
5350        if (in2 == null) {
5351            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5352        }
5353        // Verify that input array lengths are the same.
5354        if (in1.length / 2 != in2.length) {
5355            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5356        }
5357        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
5358        ain2.setAutoPadding(true);
5359        ain2.copyFrom(in2);
5360
5361        result_int result = reduce_my_half2_bool_0(ain1, ain2, null);
5362        result.mTempIns = new Allocation[]{ain1, ain2};
5363        return result;
5364    }
5365
5366    // ain1 = "half2 a"
5367    // ain2 = "bool b"
5368    public result_int reduce_my_half2_bool_0(Allocation ain1, Allocation ain2) {
5369        return reduce_my_half2_bool_0(ain1, ain2, null);
5370    }
5371
5372    // ain1 = "half2 a"
5373    // ain2 = "bool b"
5374    public result_int reduce_my_half2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5375        Type t0, t1;
5376        // check ain1
5377        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5378            throw new RSRuntimeException("Type mismatch with F16_2!");
5379        }
5380        // check ain2
5381        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
5382            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
5383        }
5384        // Verify dimensions
5385        t0 = ain1.getType();
5386        t1 = ain2.getType();
5387        if ((t0.getCount() != t1.getCount()) ||
5388            (t0.getX() != t1.getX()) ||
5389            (t0.getY() != t1.getY()) ||
5390            (t0.getZ() != t1.getZ()) ||
5391            (t0.hasFaces()   != t1.hasFaces()) ||
5392            (t0.hasMipmaps() != t1.hasMipmaps())) {
5393            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5394        }
5395
5396        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5397        aout.setAutoPadding(true);
5398        reduce(mExportReduceIdx_my_half2_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
5399        return new result_int(aout);
5400    }
5401
5402    private final static int mExportReduceIdx_my_half2_bool_1 = 79;
5403    // in1 = "a", flattened 2-vectors
5404    // in2 = "b"
5405    public result_int reduce_my_half2_bool_1(short[] in1, byte[] in2) {
5406        // Verify that "in1" is non-null.
5407        if (in1 == null) {
5408            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5409        }
5410        // Verify that the array length is a multiple of the vector size.
5411        if (in1.length % 2 != 0) {
5412            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
5413        }
5414        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2);
5415        ain1.setAutoPadding(true);
5416        ain1.copyFrom(in1);
5417        // Verify that "in2" is non-null.
5418        if (in2 == null) {
5419            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5420        }
5421        // Verify that input array lengths are the same.
5422        if (in1.length / 2 != in2.length) {
5423            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5424        }
5425        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
5426        ain2.setAutoPadding(true);
5427        ain2.copyFrom(in2);
5428
5429        result_int result = reduce_my_half2_bool_1(ain1, ain2, null);
5430        result.mTempIns = new Allocation[]{ain1, ain2};
5431        return result;
5432    }
5433
5434    // ain1 = "half2 a"
5435    // ain2 = "bool b"
5436    public result_int reduce_my_half2_bool_1(Allocation ain1, Allocation ain2) {
5437        return reduce_my_half2_bool_1(ain1, ain2, null);
5438    }
5439
5440    // ain1 = "half2 a"
5441    // ain2 = "bool b"
5442    public result_int reduce_my_half2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5443        Type t0, t1;
5444        // check ain1
5445        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5446            throw new RSRuntimeException("Type mismatch with F16_2!");
5447        }
5448        // check ain2
5449        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
5450            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
5451        }
5452        // Verify dimensions
5453        t0 = ain1.getType();
5454        t1 = ain2.getType();
5455        if ((t0.getCount() != t1.getCount()) ||
5456            (t0.getX() != t1.getX()) ||
5457            (t0.getY() != t1.getY()) ||
5458            (t0.getZ() != t1.getZ()) ||
5459            (t0.hasFaces()   != t1.hasFaces()) ||
5460            (t0.hasMipmaps() != t1.hasMipmaps())) {
5461            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5462        }
5463
5464        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5465        aout.setAutoPadding(true);
5466        reduce(mExportReduceIdx_my_half2_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
5467        return new result_int(aout);
5468    }
5469
5470    private final static int mExportReduceIdx_my_half2_rs_matrix2x2_0 = 80;
5471    // ain1 = "half2 a"
5472    // ain2 = "rs_matrix2x2 b"
5473    public result_int reduce_my_half2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
5474        return reduce_my_half2_rs_matrix2x2_0(ain1, ain2, null);
5475    }
5476
5477    // ain1 = "half2 a"
5478    // ain2 = "rs_matrix2x2 b"
5479    public result_int reduce_my_half2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5480        Type t0, t1;
5481        // check ain1
5482        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5483            throw new RSRuntimeException("Type mismatch with F16_2!");
5484        }
5485        // check ain2
5486        // Verify dimensions
5487        t0 = ain1.getType();
5488        t1 = ain2.getType();
5489        if ((t0.getCount() != t1.getCount()) ||
5490            (t0.getX() != t1.getX()) ||
5491            (t0.getY() != t1.getY()) ||
5492            (t0.getZ() != t1.getZ()) ||
5493            (t0.hasFaces()   != t1.hasFaces()) ||
5494            (t0.hasMipmaps() != t1.hasMipmaps())) {
5495            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5496        }
5497
5498        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5499        aout.setAutoPadding(true);
5500        reduce(mExportReduceIdx_my_half2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
5501        return new result_int(aout);
5502    }
5503
5504    private final static int mExportReduceIdx_my_half2_rs_matrix2x2_1 = 81;
5505    // ain1 = "half2 a"
5506    // ain2 = "rs_matrix2x2 b"
5507    public result_int reduce_my_half2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
5508        return reduce_my_half2_rs_matrix2x2_1(ain1, ain2, null);
5509    }
5510
5511    // ain1 = "half2 a"
5512    // ain2 = "rs_matrix2x2 b"
5513    public result_int reduce_my_half2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5514        Type t0, t1;
5515        // check ain1
5516        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5517            throw new RSRuntimeException("Type mismatch with F16_2!");
5518        }
5519        // check ain2
5520        // Verify dimensions
5521        t0 = ain1.getType();
5522        t1 = ain2.getType();
5523        if ((t0.getCount() != t1.getCount()) ||
5524            (t0.getX() != t1.getX()) ||
5525            (t0.getY() != t1.getY()) ||
5526            (t0.getZ() != t1.getZ()) ||
5527            (t0.hasFaces()   != t1.hasFaces()) ||
5528            (t0.hasMipmaps() != t1.hasMipmaps())) {
5529            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5530        }
5531
5532        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5533        aout.setAutoPadding(true);
5534        reduce(mExportReduceIdx_my_half2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
5535        return new result_int(aout);
5536    }
5537
5538    private final static int mExportReduceIdx_my_half2_MyStruct_0 = 82;
5539    // ain1 = "half2 a"
5540    // ain2 = "/* struct <> */ b"
5541    public result_int reduce_my_half2_MyStruct_0(Allocation ain1, Allocation ain2) {
5542        return reduce_my_half2_MyStruct_0(ain1, ain2, null);
5543    }
5544
5545    // ain1 = "half2 a"
5546    // ain2 = "/* struct <> */ b"
5547    public result_int reduce_my_half2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5548        Type t0, t1;
5549        // check ain1
5550        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5551            throw new RSRuntimeException("Type mismatch with F16_2!");
5552        }
5553        // check ain2
5554        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
5555            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
5556        }
5557        // Verify dimensions
5558        t0 = ain1.getType();
5559        t1 = ain2.getType();
5560        if ((t0.getCount() != t1.getCount()) ||
5561            (t0.getX() != t1.getX()) ||
5562            (t0.getY() != t1.getY()) ||
5563            (t0.getZ() != t1.getZ()) ||
5564            (t0.hasFaces()   != t1.hasFaces()) ||
5565            (t0.hasMipmaps() != t1.hasMipmaps())) {
5566            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5567        }
5568
5569        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5570        aout.setAutoPadding(true);
5571        reduce(mExportReduceIdx_my_half2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
5572        return new result_int(aout);
5573    }
5574
5575    private final static int mExportReduceIdx_my_half2_MyStruct_1 = 83;
5576    // ain1 = "half2 a"
5577    // ain2 = "/* struct <> */ b"
5578    public result_int reduce_my_half2_MyStruct_1(Allocation ain1, Allocation ain2) {
5579        return reduce_my_half2_MyStruct_1(ain1, ain2, null);
5580    }
5581
5582    // ain1 = "half2 a"
5583    // ain2 = "/* struct <> */ b"
5584    public result_int reduce_my_half2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5585        Type t0, t1;
5586        // check ain1
5587        if (!ain1.getType().getElement().isCompatible(__F16_2)) {
5588            throw new RSRuntimeException("Type mismatch with F16_2!");
5589        }
5590        // check ain2
5591        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
5592            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
5593        }
5594        // Verify dimensions
5595        t0 = ain1.getType();
5596        t1 = ain2.getType();
5597        if ((t0.getCount() != t1.getCount()) ||
5598            (t0.getX() != t1.getX()) ||
5599            (t0.getY() != t1.getY()) ||
5600            (t0.getZ() != t1.getZ()) ||
5601            (t0.hasFaces()   != t1.hasFaces()) ||
5602            (t0.hasMipmaps() != t1.hasMipmaps())) {
5603            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5604        }
5605
5606        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5607        aout.setAutoPadding(true);
5608        reduce(mExportReduceIdx_my_half2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
5609        return new result_int(aout);
5610    }
5611
5612    private final static int mExportReduceIdx_my_half4_half_0 = 84;
5613    // in1 = "a", flattened 4-vectors
5614    // in2 = "b"
5615    public result_int reduce_my_half4_half_0(short[] in1, short[] in2) {
5616        // Verify that "in1" is non-null.
5617        if (in1 == null) {
5618            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5619        }
5620        // Verify that the array length is a multiple of the vector size.
5621        if (in1.length % 4 != 0) {
5622            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
5623        }
5624        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
5625        ain1.setAutoPadding(true);
5626        ain1.copyFrom(in1);
5627        // Verify that "in2" is non-null.
5628        if (in2 == null) {
5629            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5630        }
5631        // Verify that input array lengths are the same.
5632        if (in1.length / 4 != in2.length) {
5633            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5634        }
5635        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
5636        ain2.setAutoPadding(true);
5637        ain2.copyFrom(in2);
5638
5639        result_int result = reduce_my_half4_half_0(ain1, ain2, null);
5640        result.mTempIns = new Allocation[]{ain1, ain2};
5641        return result;
5642    }
5643
5644    // ain1 = "half4 a"
5645    // ain2 = "half b"
5646    public result_int reduce_my_half4_half_0(Allocation ain1, Allocation ain2) {
5647        return reduce_my_half4_half_0(ain1, ain2, null);
5648    }
5649
5650    // ain1 = "half4 a"
5651    // ain2 = "half b"
5652    public result_int reduce_my_half4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5653        Type t0, t1;
5654        // check ain1
5655        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
5656            throw new RSRuntimeException("Type mismatch with F16_4!");
5657        }
5658        // check ain2
5659        if (!ain2.getType().getElement().isCompatible(__F16)) {
5660            throw new RSRuntimeException("Type mismatch with F16!");
5661        }
5662        // Verify dimensions
5663        t0 = ain1.getType();
5664        t1 = ain2.getType();
5665        if ((t0.getCount() != t1.getCount()) ||
5666            (t0.getX() != t1.getX()) ||
5667            (t0.getY() != t1.getY()) ||
5668            (t0.getZ() != t1.getZ()) ||
5669            (t0.hasFaces()   != t1.hasFaces()) ||
5670            (t0.hasMipmaps() != t1.hasMipmaps())) {
5671            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5672        }
5673
5674        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5675        aout.setAutoPadding(true);
5676        reduce(mExportReduceIdx_my_half4_half_0, new Allocation[]{ain1, ain2}, aout, sc);
5677        return new result_int(aout);
5678    }
5679
5680    private final static int mExportReduceIdx_my_half4_half_1 = 85;
5681    // in1 = "a", flattened 4-vectors
5682    // in2 = "b"
5683    public result_int reduce_my_half4_half_1(short[] in1, short[] in2) {
5684        // Verify that "in1" is non-null.
5685        if (in1 == null) {
5686            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5687        }
5688        // Verify that the array length is a multiple of the vector size.
5689        if (in1.length % 4 != 0) {
5690            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
5691        }
5692        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
5693        ain1.setAutoPadding(true);
5694        ain1.copyFrom(in1);
5695        // Verify that "in2" is non-null.
5696        if (in2 == null) {
5697            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5698        }
5699        // Verify that input array lengths are the same.
5700        if (in1.length / 4 != in2.length) {
5701            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5702        }
5703        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
5704        ain2.setAutoPadding(true);
5705        ain2.copyFrom(in2);
5706
5707        result_int result = reduce_my_half4_half_1(ain1, ain2, null);
5708        result.mTempIns = new Allocation[]{ain1, ain2};
5709        return result;
5710    }
5711
5712    // ain1 = "half4 a"
5713    // ain2 = "half b"
5714    public result_int reduce_my_half4_half_1(Allocation ain1, Allocation ain2) {
5715        return reduce_my_half4_half_1(ain1, ain2, null);
5716    }
5717
5718    // ain1 = "half4 a"
5719    // ain2 = "half b"
5720    public result_int reduce_my_half4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5721        Type t0, t1;
5722        // check ain1
5723        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
5724            throw new RSRuntimeException("Type mismatch with F16_4!");
5725        }
5726        // check ain2
5727        if (!ain2.getType().getElement().isCompatible(__F16)) {
5728            throw new RSRuntimeException("Type mismatch with F16!");
5729        }
5730        // Verify dimensions
5731        t0 = ain1.getType();
5732        t1 = ain2.getType();
5733        if ((t0.getCount() != t1.getCount()) ||
5734            (t0.getX() != t1.getX()) ||
5735            (t0.getY() != t1.getY()) ||
5736            (t0.getZ() != t1.getZ()) ||
5737            (t0.hasFaces()   != t1.hasFaces()) ||
5738            (t0.hasMipmaps() != t1.hasMipmaps())) {
5739            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5740        }
5741
5742        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5743        aout.setAutoPadding(true);
5744        reduce(mExportReduceIdx_my_half4_half_1, new Allocation[]{ain1, ain2}, aout, sc);
5745        return new result_int(aout);
5746    }
5747
5748    private final static int mExportReduceIdx_my_half4_half2_0 = 86;
5749    // in1 = "a", flattened 4-vectors
5750    // in2 = "b", flattened 2-vectors
5751    public result_int reduce_my_half4_half2_0(short[] in1, short[] in2) {
5752        // Verify that "in1" is non-null.
5753        if (in1 == null) {
5754            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5755        }
5756        // Verify that the array length is a multiple of the vector size.
5757        if (in1.length % 4 != 0) {
5758            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
5759        }
5760        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
5761        ain1.setAutoPadding(true);
5762        ain1.copyFrom(in1);
5763        // Verify that "in2" is non-null.
5764        if (in2 == null) {
5765            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5766        }
5767        // Verify that the array length is a multiple of the vector size.
5768        if (in2.length % 2 != 0) {
5769            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
5770        }
5771        // Verify that input array lengths are the same.
5772        if (in1.length / 4 != in2.length / 2) {
5773            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5774        }
5775        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
5776        ain2.setAutoPadding(true);
5777        ain2.copyFrom(in2);
5778
5779        result_int result = reduce_my_half4_half2_0(ain1, ain2, null);
5780        result.mTempIns = new Allocation[]{ain1, ain2};
5781        return result;
5782    }
5783
5784    // ain1 = "half4 a"
5785    // ain2 = "half2 b"
5786    public result_int reduce_my_half4_half2_0(Allocation ain1, Allocation ain2) {
5787        return reduce_my_half4_half2_0(ain1, ain2, null);
5788    }
5789
5790    // ain1 = "half4 a"
5791    // ain2 = "half2 b"
5792    public result_int reduce_my_half4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5793        Type t0, t1;
5794        // check ain1
5795        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
5796            throw new RSRuntimeException("Type mismatch with F16_4!");
5797        }
5798        // check ain2
5799        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
5800            throw new RSRuntimeException("Type mismatch with F16_2!");
5801        }
5802        // Verify dimensions
5803        t0 = ain1.getType();
5804        t1 = ain2.getType();
5805        if ((t0.getCount() != t1.getCount()) ||
5806            (t0.getX() != t1.getX()) ||
5807            (t0.getY() != t1.getY()) ||
5808            (t0.getZ() != t1.getZ()) ||
5809            (t0.hasFaces()   != t1.hasFaces()) ||
5810            (t0.hasMipmaps() != t1.hasMipmaps())) {
5811            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5812        }
5813
5814        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5815        aout.setAutoPadding(true);
5816        reduce(mExportReduceIdx_my_half4_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
5817        return new result_int(aout);
5818    }
5819
5820    private final static int mExportReduceIdx_my_half4_half2_1 = 87;
5821    // in1 = "a", flattened 4-vectors
5822    // in2 = "b", flattened 2-vectors
5823    public result_int reduce_my_half4_half2_1(short[] in1, short[] in2) {
5824        // Verify that "in1" is non-null.
5825        if (in1 == null) {
5826            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5827        }
5828        // Verify that the array length is a multiple of the vector size.
5829        if (in1.length % 4 != 0) {
5830            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
5831        }
5832        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
5833        ain1.setAutoPadding(true);
5834        ain1.copyFrom(in1);
5835        // Verify that "in2" is non-null.
5836        if (in2 == null) {
5837            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5838        }
5839        // Verify that the array length is a multiple of the vector size.
5840        if (in2.length % 2 != 0) {
5841            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
5842        }
5843        // Verify that input array lengths are the same.
5844        if (in1.length / 4 != in2.length / 2) {
5845            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5846        }
5847        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
5848        ain2.setAutoPadding(true);
5849        ain2.copyFrom(in2);
5850
5851        result_int result = reduce_my_half4_half2_1(ain1, ain2, null);
5852        result.mTempIns = new Allocation[]{ain1, ain2};
5853        return result;
5854    }
5855
5856    // ain1 = "half4 a"
5857    // ain2 = "half2 b"
5858    public result_int reduce_my_half4_half2_1(Allocation ain1, Allocation ain2) {
5859        return reduce_my_half4_half2_1(ain1, ain2, null);
5860    }
5861
5862    // ain1 = "half4 a"
5863    // ain2 = "half2 b"
5864    public result_int reduce_my_half4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5865        Type t0, t1;
5866        // check ain1
5867        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
5868            throw new RSRuntimeException("Type mismatch with F16_4!");
5869        }
5870        // check ain2
5871        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
5872            throw new RSRuntimeException("Type mismatch with F16_2!");
5873        }
5874        // Verify dimensions
5875        t0 = ain1.getType();
5876        t1 = ain2.getType();
5877        if ((t0.getCount() != t1.getCount()) ||
5878            (t0.getX() != t1.getX()) ||
5879            (t0.getY() != t1.getY()) ||
5880            (t0.getZ() != t1.getZ()) ||
5881            (t0.hasFaces()   != t1.hasFaces()) ||
5882            (t0.hasMipmaps() != t1.hasMipmaps())) {
5883            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5884        }
5885
5886        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5887        aout.setAutoPadding(true);
5888        reduce(mExportReduceIdx_my_half4_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
5889        return new result_int(aout);
5890    }
5891
5892    private final static int mExportReduceIdx_my_half4_half4_0 = 88;
5893    // in1 = "a", flattened 4-vectors
5894    // in2 = "b", flattened 4-vectors
5895    public result_int reduce_my_half4_half4_0(short[] in1, short[] in2) {
5896        // Verify that "in1" is non-null.
5897        if (in1 == null) {
5898            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5899        }
5900        // Verify that the array length is a multiple of the vector size.
5901        if (in1.length % 4 != 0) {
5902            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
5903        }
5904        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
5905        ain1.setAutoPadding(true);
5906        ain1.copyFrom(in1);
5907        // Verify that "in2" is non-null.
5908        if (in2 == null) {
5909            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5910        }
5911        // Verify that the array length is a multiple of the vector size.
5912        if (in2.length % 4 != 0) {
5913            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
5914        }
5915        // Verify that input array lengths are the same.
5916        if (in1.length / 4 != in2.length / 4) {
5917            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5918        }
5919        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
5920        ain2.setAutoPadding(true);
5921        ain2.copyFrom(in2);
5922
5923        result_int result = reduce_my_half4_half4_0(ain1, ain2, null);
5924        result.mTempIns = new Allocation[]{ain1, ain2};
5925        return result;
5926    }
5927
5928    // ain1 = "half4 a"
5929    // ain2 = "half4 b"
5930    public result_int reduce_my_half4_half4_0(Allocation ain1, Allocation ain2) {
5931        return reduce_my_half4_half4_0(ain1, ain2, null);
5932    }
5933
5934    // ain1 = "half4 a"
5935    // ain2 = "half4 b"
5936    public result_int reduce_my_half4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
5937        Type t0, t1;
5938        // check ain1
5939        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
5940            throw new RSRuntimeException("Type mismatch with F16_4!");
5941        }
5942        // check ain2
5943        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
5944            throw new RSRuntimeException("Type mismatch with F16_4!");
5945        }
5946        // Verify dimensions
5947        t0 = ain1.getType();
5948        t1 = ain2.getType();
5949        if ((t0.getCount() != t1.getCount()) ||
5950            (t0.getX() != t1.getX()) ||
5951            (t0.getY() != t1.getY()) ||
5952            (t0.getZ() != t1.getZ()) ||
5953            (t0.hasFaces()   != t1.hasFaces()) ||
5954            (t0.hasMipmaps() != t1.hasMipmaps())) {
5955            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
5956        }
5957
5958        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
5959        aout.setAutoPadding(true);
5960        reduce(mExportReduceIdx_my_half4_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
5961        return new result_int(aout);
5962    }
5963
5964    private final static int mExportReduceIdx_my_half4_half4_1 = 89;
5965    // in1 = "a", flattened 4-vectors
5966    // in2 = "b", flattened 4-vectors
5967    public result_int reduce_my_half4_half4_1(short[] in1, short[] in2) {
5968        // Verify that "in1" is non-null.
5969        if (in1 == null) {
5970            throw new RSIllegalArgumentException("Array \"in1\" is null!");
5971        }
5972        // Verify that the array length is a multiple of the vector size.
5973        if (in1.length % 4 != 0) {
5974            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
5975        }
5976        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
5977        ain1.setAutoPadding(true);
5978        ain1.copyFrom(in1);
5979        // Verify that "in2" is non-null.
5980        if (in2 == null) {
5981            throw new RSIllegalArgumentException("Array \"in2\" is null!");
5982        }
5983        // Verify that the array length is a multiple of the vector size.
5984        if (in2.length % 4 != 0) {
5985            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
5986        }
5987        // Verify that input array lengths are the same.
5988        if (in1.length / 4 != in2.length / 4) {
5989            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
5990        }
5991        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
5992        ain2.setAutoPadding(true);
5993        ain2.copyFrom(in2);
5994
5995        result_int result = reduce_my_half4_half4_1(ain1, ain2, null);
5996        result.mTempIns = new Allocation[]{ain1, ain2};
5997        return result;
5998    }
5999
6000    // ain1 = "half4 a"
6001    // ain2 = "half4 b"
6002    public result_int reduce_my_half4_half4_1(Allocation ain1, Allocation ain2) {
6003        return reduce_my_half4_half4_1(ain1, ain2, null);
6004    }
6005
6006    // ain1 = "half4 a"
6007    // ain2 = "half4 b"
6008    public result_int reduce_my_half4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6009        Type t0, t1;
6010        // check ain1
6011        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6012            throw new RSRuntimeException("Type mismatch with F16_4!");
6013        }
6014        // check ain2
6015        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
6016            throw new RSRuntimeException("Type mismatch with F16_4!");
6017        }
6018        // Verify dimensions
6019        t0 = ain1.getType();
6020        t1 = ain2.getType();
6021        if ((t0.getCount() != t1.getCount()) ||
6022            (t0.getX() != t1.getX()) ||
6023            (t0.getY() != t1.getY()) ||
6024            (t0.getZ() != t1.getZ()) ||
6025            (t0.hasFaces()   != t1.hasFaces()) ||
6026            (t0.hasMipmaps() != t1.hasMipmaps())) {
6027            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6028        }
6029
6030        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6031        aout.setAutoPadding(true);
6032        reduce(mExportReduceIdx_my_half4_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
6033        return new result_int(aout);
6034    }
6035
6036    private final static int mExportReduceIdx_my_half4_float_0 = 90;
6037    // in1 = "a", flattened 4-vectors
6038    // in2 = "b"
6039    public result_int reduce_my_half4_float_0(short[] in1, float[] in2) {
6040        // Verify that "in1" is non-null.
6041        if (in1 == null) {
6042            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6043        }
6044        // Verify that the array length is a multiple of the vector size.
6045        if (in1.length % 4 != 0) {
6046            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6047        }
6048        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6049        ain1.setAutoPadding(true);
6050        ain1.copyFrom(in1);
6051        // Verify that "in2" is non-null.
6052        if (in2 == null) {
6053            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6054        }
6055        // Verify that input array lengths are the same.
6056        if (in1.length / 4 != in2.length) {
6057            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6058        }
6059        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
6060        ain2.setAutoPadding(true);
6061        ain2.copyFrom(in2);
6062
6063        result_int result = reduce_my_half4_float_0(ain1, ain2, null);
6064        result.mTempIns = new Allocation[]{ain1, ain2};
6065        return result;
6066    }
6067
6068    // ain1 = "half4 a"
6069    // ain2 = "float b"
6070    public result_int reduce_my_half4_float_0(Allocation ain1, Allocation ain2) {
6071        return reduce_my_half4_float_0(ain1, ain2, null);
6072    }
6073
6074    // ain1 = "half4 a"
6075    // ain2 = "float b"
6076    public result_int reduce_my_half4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6077        Type t0, t1;
6078        // check ain1
6079        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6080            throw new RSRuntimeException("Type mismatch with F16_4!");
6081        }
6082        // check ain2
6083        if (!ain2.getType().getElement().isCompatible(__F32)) {
6084            throw new RSRuntimeException("Type mismatch with F32!");
6085        }
6086        // Verify dimensions
6087        t0 = ain1.getType();
6088        t1 = ain2.getType();
6089        if ((t0.getCount() != t1.getCount()) ||
6090            (t0.getX() != t1.getX()) ||
6091            (t0.getY() != t1.getY()) ||
6092            (t0.getZ() != t1.getZ()) ||
6093            (t0.hasFaces()   != t1.hasFaces()) ||
6094            (t0.hasMipmaps() != t1.hasMipmaps())) {
6095            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6096        }
6097
6098        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6099        aout.setAutoPadding(true);
6100        reduce(mExportReduceIdx_my_half4_float_0, new Allocation[]{ain1, ain2}, aout, sc);
6101        return new result_int(aout);
6102    }
6103
6104    private final static int mExportReduceIdx_my_half4_float_1 = 91;
6105    // in1 = "a", flattened 4-vectors
6106    // in2 = "b"
6107    public result_int reduce_my_half4_float_1(short[] in1, float[] in2) {
6108        // Verify that "in1" is non-null.
6109        if (in1 == null) {
6110            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6111        }
6112        // Verify that the array length is a multiple of the vector size.
6113        if (in1.length % 4 != 0) {
6114            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6115        }
6116        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6117        ain1.setAutoPadding(true);
6118        ain1.copyFrom(in1);
6119        // Verify that "in2" is non-null.
6120        if (in2 == null) {
6121            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6122        }
6123        // Verify that input array lengths are the same.
6124        if (in1.length / 4 != in2.length) {
6125            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6126        }
6127        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
6128        ain2.setAutoPadding(true);
6129        ain2.copyFrom(in2);
6130
6131        result_int result = reduce_my_half4_float_1(ain1, ain2, null);
6132        result.mTempIns = new Allocation[]{ain1, ain2};
6133        return result;
6134    }
6135
6136    // ain1 = "half4 a"
6137    // ain2 = "float b"
6138    public result_int reduce_my_half4_float_1(Allocation ain1, Allocation ain2) {
6139        return reduce_my_half4_float_1(ain1, ain2, null);
6140    }
6141
6142    // ain1 = "half4 a"
6143    // ain2 = "float b"
6144    public result_int reduce_my_half4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6145        Type t0, t1;
6146        // check ain1
6147        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6148            throw new RSRuntimeException("Type mismatch with F16_4!");
6149        }
6150        // check ain2
6151        if (!ain2.getType().getElement().isCompatible(__F32)) {
6152            throw new RSRuntimeException("Type mismatch with F32!");
6153        }
6154        // Verify dimensions
6155        t0 = ain1.getType();
6156        t1 = ain2.getType();
6157        if ((t0.getCount() != t1.getCount()) ||
6158            (t0.getX() != t1.getX()) ||
6159            (t0.getY() != t1.getY()) ||
6160            (t0.getZ() != t1.getZ()) ||
6161            (t0.hasFaces()   != t1.hasFaces()) ||
6162            (t0.hasMipmaps() != t1.hasMipmaps())) {
6163            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6164        }
6165
6166        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6167        aout.setAutoPadding(true);
6168        reduce(mExportReduceIdx_my_half4_float_1, new Allocation[]{ain1, ain2}, aout, sc);
6169        return new result_int(aout);
6170    }
6171
6172    private final static int mExportReduceIdx_my_half4_float2_0 = 92;
6173    // in1 = "a", flattened 4-vectors
6174    // in2 = "b", flattened 2-vectors
6175    public result_int reduce_my_half4_float2_0(short[] in1, float[] in2) {
6176        // Verify that "in1" is non-null.
6177        if (in1 == null) {
6178            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6179        }
6180        // Verify that the array length is a multiple of the vector size.
6181        if (in1.length % 4 != 0) {
6182            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6183        }
6184        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6185        ain1.setAutoPadding(true);
6186        ain1.copyFrom(in1);
6187        // Verify that "in2" is non-null.
6188        if (in2 == null) {
6189            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6190        }
6191        // Verify that the array length is a multiple of the vector size.
6192        if (in2.length % 2 != 0) {
6193            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
6194        }
6195        // Verify that input array lengths are the same.
6196        if (in1.length / 4 != in2.length / 2) {
6197            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6198        }
6199        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
6200        ain2.setAutoPadding(true);
6201        ain2.copyFrom(in2);
6202
6203        result_int result = reduce_my_half4_float2_0(ain1, ain2, null);
6204        result.mTempIns = new Allocation[]{ain1, ain2};
6205        return result;
6206    }
6207
6208    // ain1 = "half4 a"
6209    // ain2 = "float2 b"
6210    public result_int reduce_my_half4_float2_0(Allocation ain1, Allocation ain2) {
6211        return reduce_my_half4_float2_0(ain1, ain2, null);
6212    }
6213
6214    // ain1 = "half4 a"
6215    // ain2 = "float2 b"
6216    public result_int reduce_my_half4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6217        Type t0, t1;
6218        // check ain1
6219        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6220            throw new RSRuntimeException("Type mismatch with F16_4!");
6221        }
6222        // check ain2
6223        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
6224            throw new RSRuntimeException("Type mismatch with F32_2!");
6225        }
6226        // Verify dimensions
6227        t0 = ain1.getType();
6228        t1 = ain2.getType();
6229        if ((t0.getCount() != t1.getCount()) ||
6230            (t0.getX() != t1.getX()) ||
6231            (t0.getY() != t1.getY()) ||
6232            (t0.getZ() != t1.getZ()) ||
6233            (t0.hasFaces()   != t1.hasFaces()) ||
6234            (t0.hasMipmaps() != t1.hasMipmaps())) {
6235            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6236        }
6237
6238        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6239        aout.setAutoPadding(true);
6240        reduce(mExportReduceIdx_my_half4_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
6241        return new result_int(aout);
6242    }
6243
6244    private final static int mExportReduceIdx_my_half4_float2_1 = 93;
6245    // in1 = "a", flattened 4-vectors
6246    // in2 = "b", flattened 2-vectors
6247    public result_int reduce_my_half4_float2_1(short[] in1, float[] in2) {
6248        // Verify that "in1" is non-null.
6249        if (in1 == null) {
6250            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6251        }
6252        // Verify that the array length is a multiple of the vector size.
6253        if (in1.length % 4 != 0) {
6254            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6255        }
6256        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6257        ain1.setAutoPadding(true);
6258        ain1.copyFrom(in1);
6259        // Verify that "in2" is non-null.
6260        if (in2 == null) {
6261            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6262        }
6263        // Verify that the array length is a multiple of the vector size.
6264        if (in2.length % 2 != 0) {
6265            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
6266        }
6267        // Verify that input array lengths are the same.
6268        if (in1.length / 4 != in2.length / 2) {
6269            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6270        }
6271        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
6272        ain2.setAutoPadding(true);
6273        ain2.copyFrom(in2);
6274
6275        result_int result = reduce_my_half4_float2_1(ain1, ain2, null);
6276        result.mTempIns = new Allocation[]{ain1, ain2};
6277        return result;
6278    }
6279
6280    // ain1 = "half4 a"
6281    // ain2 = "float2 b"
6282    public result_int reduce_my_half4_float2_1(Allocation ain1, Allocation ain2) {
6283        return reduce_my_half4_float2_1(ain1, ain2, null);
6284    }
6285
6286    // ain1 = "half4 a"
6287    // ain2 = "float2 b"
6288    public result_int reduce_my_half4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6289        Type t0, t1;
6290        // check ain1
6291        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6292            throw new RSRuntimeException("Type mismatch with F16_4!");
6293        }
6294        // check ain2
6295        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
6296            throw new RSRuntimeException("Type mismatch with F32_2!");
6297        }
6298        // Verify dimensions
6299        t0 = ain1.getType();
6300        t1 = ain2.getType();
6301        if ((t0.getCount() != t1.getCount()) ||
6302            (t0.getX() != t1.getX()) ||
6303            (t0.getY() != t1.getY()) ||
6304            (t0.getZ() != t1.getZ()) ||
6305            (t0.hasFaces()   != t1.hasFaces()) ||
6306            (t0.hasMipmaps() != t1.hasMipmaps())) {
6307            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6308        }
6309
6310        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6311        aout.setAutoPadding(true);
6312        reduce(mExportReduceIdx_my_half4_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
6313        return new result_int(aout);
6314    }
6315
6316    private final static int mExportReduceIdx_my_half4_float4_0 = 94;
6317    // in1 = "a", flattened 4-vectors
6318    // in2 = "b", flattened 4-vectors
6319    public result_int reduce_my_half4_float4_0(short[] in1, float[] in2) {
6320        // Verify that "in1" is non-null.
6321        if (in1 == null) {
6322            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6323        }
6324        // Verify that the array length is a multiple of the vector size.
6325        if (in1.length % 4 != 0) {
6326            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6327        }
6328        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6329        ain1.setAutoPadding(true);
6330        ain1.copyFrom(in1);
6331        // Verify that "in2" is non-null.
6332        if (in2 == null) {
6333            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6334        }
6335        // Verify that the array length is a multiple of the vector size.
6336        if (in2.length % 4 != 0) {
6337            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
6338        }
6339        // Verify that input array lengths are the same.
6340        if (in1.length / 4 != in2.length / 4) {
6341            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6342        }
6343        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
6344        ain2.setAutoPadding(true);
6345        ain2.copyFrom(in2);
6346
6347        result_int result = reduce_my_half4_float4_0(ain1, ain2, null);
6348        result.mTempIns = new Allocation[]{ain1, ain2};
6349        return result;
6350    }
6351
6352    // ain1 = "half4 a"
6353    // ain2 = "float4 b"
6354    public result_int reduce_my_half4_float4_0(Allocation ain1, Allocation ain2) {
6355        return reduce_my_half4_float4_0(ain1, ain2, null);
6356    }
6357
6358    // ain1 = "half4 a"
6359    // ain2 = "float4 b"
6360    public result_int reduce_my_half4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6361        Type t0, t1;
6362        // check ain1
6363        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6364            throw new RSRuntimeException("Type mismatch with F16_4!");
6365        }
6366        // check ain2
6367        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
6368            throw new RSRuntimeException("Type mismatch with F32_4!");
6369        }
6370        // Verify dimensions
6371        t0 = ain1.getType();
6372        t1 = ain2.getType();
6373        if ((t0.getCount() != t1.getCount()) ||
6374            (t0.getX() != t1.getX()) ||
6375            (t0.getY() != t1.getY()) ||
6376            (t0.getZ() != t1.getZ()) ||
6377            (t0.hasFaces()   != t1.hasFaces()) ||
6378            (t0.hasMipmaps() != t1.hasMipmaps())) {
6379            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6380        }
6381
6382        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6383        aout.setAutoPadding(true);
6384        reduce(mExportReduceIdx_my_half4_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
6385        return new result_int(aout);
6386    }
6387
6388    private final static int mExportReduceIdx_my_half4_float4_1 = 95;
6389    // in1 = "a", flattened 4-vectors
6390    // in2 = "b", flattened 4-vectors
6391    public result_int reduce_my_half4_float4_1(short[] in1, float[] in2) {
6392        // Verify that "in1" is non-null.
6393        if (in1 == null) {
6394            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6395        }
6396        // Verify that the array length is a multiple of the vector size.
6397        if (in1.length % 4 != 0) {
6398            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6399        }
6400        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6401        ain1.setAutoPadding(true);
6402        ain1.copyFrom(in1);
6403        // Verify that "in2" is non-null.
6404        if (in2 == null) {
6405            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6406        }
6407        // Verify that the array length is a multiple of the vector size.
6408        if (in2.length % 4 != 0) {
6409            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
6410        }
6411        // Verify that input array lengths are the same.
6412        if (in1.length / 4 != in2.length / 4) {
6413            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6414        }
6415        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
6416        ain2.setAutoPadding(true);
6417        ain2.copyFrom(in2);
6418
6419        result_int result = reduce_my_half4_float4_1(ain1, ain2, null);
6420        result.mTempIns = new Allocation[]{ain1, ain2};
6421        return result;
6422    }
6423
6424    // ain1 = "half4 a"
6425    // ain2 = "float4 b"
6426    public result_int reduce_my_half4_float4_1(Allocation ain1, Allocation ain2) {
6427        return reduce_my_half4_float4_1(ain1, ain2, null);
6428    }
6429
6430    // ain1 = "half4 a"
6431    // ain2 = "float4 b"
6432    public result_int reduce_my_half4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6433        Type t0, t1;
6434        // check ain1
6435        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6436            throw new RSRuntimeException("Type mismatch with F16_4!");
6437        }
6438        // check ain2
6439        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
6440            throw new RSRuntimeException("Type mismatch with F32_4!");
6441        }
6442        // Verify dimensions
6443        t0 = ain1.getType();
6444        t1 = ain2.getType();
6445        if ((t0.getCount() != t1.getCount()) ||
6446            (t0.getX() != t1.getX()) ||
6447            (t0.getY() != t1.getY()) ||
6448            (t0.getZ() != t1.getZ()) ||
6449            (t0.hasFaces()   != t1.hasFaces()) ||
6450            (t0.hasMipmaps() != t1.hasMipmaps())) {
6451            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6452        }
6453
6454        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6455        aout.setAutoPadding(true);
6456        reduce(mExportReduceIdx_my_half4_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
6457        return new result_int(aout);
6458    }
6459
6460    private final static int mExportReduceIdx_my_half4_char_0 = 96;
6461    // in1 = "a", flattened 4-vectors
6462    // in2 = "b"
6463    public result_int reduce_my_half4_char_0(short[] in1, byte[] in2) {
6464        // Verify that "in1" is non-null.
6465        if (in1 == null) {
6466            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6467        }
6468        // Verify that the array length is a multiple of the vector size.
6469        if (in1.length % 4 != 0) {
6470            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6471        }
6472        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6473        ain1.setAutoPadding(true);
6474        ain1.copyFrom(in1);
6475        // Verify that "in2" is non-null.
6476        if (in2 == null) {
6477            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6478        }
6479        // Verify that input array lengths are the same.
6480        if (in1.length / 4 != in2.length) {
6481            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6482        }
6483        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
6484        ain2.setAutoPadding(true);
6485        ain2.copyFrom(in2);
6486
6487        result_int result = reduce_my_half4_char_0(ain1, ain2, null);
6488        result.mTempIns = new Allocation[]{ain1, ain2};
6489        return result;
6490    }
6491
6492    // ain1 = "half4 a"
6493    // ain2 = "char b"
6494    public result_int reduce_my_half4_char_0(Allocation ain1, Allocation ain2) {
6495        return reduce_my_half4_char_0(ain1, ain2, null);
6496    }
6497
6498    // ain1 = "half4 a"
6499    // ain2 = "char b"
6500    public result_int reduce_my_half4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6501        Type t0, t1;
6502        // check ain1
6503        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6504            throw new RSRuntimeException("Type mismatch with F16_4!");
6505        }
6506        // check ain2
6507        if (!ain2.getType().getElement().isCompatible(__I8)) {
6508            throw new RSRuntimeException("Type mismatch with I8!");
6509        }
6510        // Verify dimensions
6511        t0 = ain1.getType();
6512        t1 = ain2.getType();
6513        if ((t0.getCount() != t1.getCount()) ||
6514            (t0.getX() != t1.getX()) ||
6515            (t0.getY() != t1.getY()) ||
6516            (t0.getZ() != t1.getZ()) ||
6517            (t0.hasFaces()   != t1.hasFaces()) ||
6518            (t0.hasMipmaps() != t1.hasMipmaps())) {
6519            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6520        }
6521
6522        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6523        aout.setAutoPadding(true);
6524        reduce(mExportReduceIdx_my_half4_char_0, new Allocation[]{ain1, ain2}, aout, sc);
6525        return new result_int(aout);
6526    }
6527
6528    private final static int mExportReduceIdx_my_half4_char_1 = 97;
6529    // in1 = "a", flattened 4-vectors
6530    // in2 = "b"
6531    public result_int reduce_my_half4_char_1(short[] in1, byte[] in2) {
6532        // Verify that "in1" is non-null.
6533        if (in1 == null) {
6534            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6535        }
6536        // Verify that the array length is a multiple of the vector size.
6537        if (in1.length % 4 != 0) {
6538            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6539        }
6540        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6541        ain1.setAutoPadding(true);
6542        ain1.copyFrom(in1);
6543        // Verify that "in2" is non-null.
6544        if (in2 == null) {
6545            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6546        }
6547        // Verify that input array lengths are the same.
6548        if (in1.length / 4 != in2.length) {
6549            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6550        }
6551        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
6552        ain2.setAutoPadding(true);
6553        ain2.copyFrom(in2);
6554
6555        result_int result = reduce_my_half4_char_1(ain1, ain2, null);
6556        result.mTempIns = new Allocation[]{ain1, ain2};
6557        return result;
6558    }
6559
6560    // ain1 = "half4 a"
6561    // ain2 = "char b"
6562    public result_int reduce_my_half4_char_1(Allocation ain1, Allocation ain2) {
6563        return reduce_my_half4_char_1(ain1, ain2, null);
6564    }
6565
6566    // ain1 = "half4 a"
6567    // ain2 = "char b"
6568    public result_int reduce_my_half4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6569        Type t0, t1;
6570        // check ain1
6571        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6572            throw new RSRuntimeException("Type mismatch with F16_4!");
6573        }
6574        // check ain2
6575        if (!ain2.getType().getElement().isCompatible(__I8)) {
6576            throw new RSRuntimeException("Type mismatch with I8!");
6577        }
6578        // Verify dimensions
6579        t0 = ain1.getType();
6580        t1 = ain2.getType();
6581        if ((t0.getCount() != t1.getCount()) ||
6582            (t0.getX() != t1.getX()) ||
6583            (t0.getY() != t1.getY()) ||
6584            (t0.getZ() != t1.getZ()) ||
6585            (t0.hasFaces()   != t1.hasFaces()) ||
6586            (t0.hasMipmaps() != t1.hasMipmaps())) {
6587            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6588        }
6589
6590        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6591        aout.setAutoPadding(true);
6592        reduce(mExportReduceIdx_my_half4_char_1, new Allocation[]{ain1, ain2}, aout, sc);
6593        return new result_int(aout);
6594    }
6595
6596    private final static int mExportReduceIdx_my_half4_char2_0 = 98;
6597    // in1 = "a", flattened 4-vectors
6598    // in2 = "b", flattened 2-vectors
6599    public result_int reduce_my_half4_char2_0(short[] in1, byte[] in2) {
6600        // Verify that "in1" is non-null.
6601        if (in1 == null) {
6602            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6603        }
6604        // Verify that the array length is a multiple of the vector size.
6605        if (in1.length % 4 != 0) {
6606            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6607        }
6608        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6609        ain1.setAutoPadding(true);
6610        ain1.copyFrom(in1);
6611        // Verify that "in2" is non-null.
6612        if (in2 == null) {
6613            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6614        }
6615        // Verify that the array length is a multiple of the vector size.
6616        if (in2.length % 2 != 0) {
6617            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
6618        }
6619        // Verify that input array lengths are the same.
6620        if (in1.length / 4 != in2.length / 2) {
6621            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6622        }
6623        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
6624        ain2.setAutoPadding(true);
6625        ain2.copyFrom(in2);
6626
6627        result_int result = reduce_my_half4_char2_0(ain1, ain2, null);
6628        result.mTempIns = new Allocation[]{ain1, ain2};
6629        return result;
6630    }
6631
6632    // ain1 = "half4 a"
6633    // ain2 = "char2 b"
6634    public result_int reduce_my_half4_char2_0(Allocation ain1, Allocation ain2) {
6635        return reduce_my_half4_char2_0(ain1, ain2, null);
6636    }
6637
6638    // ain1 = "half4 a"
6639    // ain2 = "char2 b"
6640    public result_int reduce_my_half4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6641        Type t0, t1;
6642        // check ain1
6643        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6644            throw new RSRuntimeException("Type mismatch with F16_4!");
6645        }
6646        // check ain2
6647        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
6648            throw new RSRuntimeException("Type mismatch with I8_2!");
6649        }
6650        // Verify dimensions
6651        t0 = ain1.getType();
6652        t1 = ain2.getType();
6653        if ((t0.getCount() != t1.getCount()) ||
6654            (t0.getX() != t1.getX()) ||
6655            (t0.getY() != t1.getY()) ||
6656            (t0.getZ() != t1.getZ()) ||
6657            (t0.hasFaces()   != t1.hasFaces()) ||
6658            (t0.hasMipmaps() != t1.hasMipmaps())) {
6659            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6660        }
6661
6662        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6663        aout.setAutoPadding(true);
6664        reduce(mExportReduceIdx_my_half4_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
6665        return new result_int(aout);
6666    }
6667
6668    private final static int mExportReduceIdx_my_half4_char2_1 = 99;
6669    // in1 = "a", flattened 4-vectors
6670    // in2 = "b", flattened 2-vectors
6671    public result_int reduce_my_half4_char2_1(short[] in1, byte[] in2) {
6672        // Verify that "in1" is non-null.
6673        if (in1 == null) {
6674            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6675        }
6676        // Verify that the array length is a multiple of the vector size.
6677        if (in1.length % 4 != 0) {
6678            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6679        }
6680        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6681        ain1.setAutoPadding(true);
6682        ain1.copyFrom(in1);
6683        // Verify that "in2" is non-null.
6684        if (in2 == null) {
6685            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6686        }
6687        // Verify that the array length is a multiple of the vector size.
6688        if (in2.length % 2 != 0) {
6689            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
6690        }
6691        // Verify that input array lengths are the same.
6692        if (in1.length / 4 != in2.length / 2) {
6693            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6694        }
6695        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
6696        ain2.setAutoPadding(true);
6697        ain2.copyFrom(in2);
6698
6699        result_int result = reduce_my_half4_char2_1(ain1, ain2, null);
6700        result.mTempIns = new Allocation[]{ain1, ain2};
6701        return result;
6702    }
6703
6704    // ain1 = "half4 a"
6705    // ain2 = "char2 b"
6706    public result_int reduce_my_half4_char2_1(Allocation ain1, Allocation ain2) {
6707        return reduce_my_half4_char2_1(ain1, ain2, null);
6708    }
6709
6710    // ain1 = "half4 a"
6711    // ain2 = "char2 b"
6712    public result_int reduce_my_half4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6713        Type t0, t1;
6714        // check ain1
6715        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6716            throw new RSRuntimeException("Type mismatch with F16_4!");
6717        }
6718        // check ain2
6719        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
6720            throw new RSRuntimeException("Type mismatch with I8_2!");
6721        }
6722        // Verify dimensions
6723        t0 = ain1.getType();
6724        t1 = ain2.getType();
6725        if ((t0.getCount() != t1.getCount()) ||
6726            (t0.getX() != t1.getX()) ||
6727            (t0.getY() != t1.getY()) ||
6728            (t0.getZ() != t1.getZ()) ||
6729            (t0.hasFaces()   != t1.hasFaces()) ||
6730            (t0.hasMipmaps() != t1.hasMipmaps())) {
6731            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6732        }
6733
6734        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6735        aout.setAutoPadding(true);
6736        reduce(mExportReduceIdx_my_half4_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
6737        return new result_int(aout);
6738    }
6739
6740    private final static int mExportReduceIdx_my_half4_char4_0 = 100;
6741    // in1 = "a", flattened 4-vectors
6742    // in2 = "b", flattened 4-vectors
6743    public result_int reduce_my_half4_char4_0(short[] in1, byte[] in2) {
6744        // Verify that "in1" is non-null.
6745        if (in1 == null) {
6746            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6747        }
6748        // Verify that the array length is a multiple of the vector size.
6749        if (in1.length % 4 != 0) {
6750            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6751        }
6752        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6753        ain1.setAutoPadding(true);
6754        ain1.copyFrom(in1);
6755        // Verify that "in2" is non-null.
6756        if (in2 == null) {
6757            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6758        }
6759        // Verify that the array length is a multiple of the vector size.
6760        if (in2.length % 4 != 0) {
6761            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
6762        }
6763        // Verify that input array lengths are the same.
6764        if (in1.length / 4 != in2.length / 4) {
6765            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6766        }
6767        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
6768        ain2.setAutoPadding(true);
6769        ain2.copyFrom(in2);
6770
6771        result_int result = reduce_my_half4_char4_0(ain1, ain2, null);
6772        result.mTempIns = new Allocation[]{ain1, ain2};
6773        return result;
6774    }
6775
6776    // ain1 = "half4 a"
6777    // ain2 = "char4 b"
6778    public result_int reduce_my_half4_char4_0(Allocation ain1, Allocation ain2) {
6779        return reduce_my_half4_char4_0(ain1, ain2, null);
6780    }
6781
6782    // ain1 = "half4 a"
6783    // ain2 = "char4 b"
6784    public result_int reduce_my_half4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6785        Type t0, t1;
6786        // check ain1
6787        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6788            throw new RSRuntimeException("Type mismatch with F16_4!");
6789        }
6790        // check ain2
6791        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
6792            throw new RSRuntimeException("Type mismatch with I8_4!");
6793        }
6794        // Verify dimensions
6795        t0 = ain1.getType();
6796        t1 = ain2.getType();
6797        if ((t0.getCount() != t1.getCount()) ||
6798            (t0.getX() != t1.getX()) ||
6799            (t0.getY() != t1.getY()) ||
6800            (t0.getZ() != t1.getZ()) ||
6801            (t0.hasFaces()   != t1.hasFaces()) ||
6802            (t0.hasMipmaps() != t1.hasMipmaps())) {
6803            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6804        }
6805
6806        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6807        aout.setAutoPadding(true);
6808        reduce(mExportReduceIdx_my_half4_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
6809        return new result_int(aout);
6810    }
6811
6812    private final static int mExportReduceIdx_my_half4_char4_1 = 101;
6813    // in1 = "a", flattened 4-vectors
6814    // in2 = "b", flattened 4-vectors
6815    public result_int reduce_my_half4_char4_1(short[] in1, byte[] in2) {
6816        // Verify that "in1" is non-null.
6817        if (in1 == null) {
6818            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6819        }
6820        // Verify that the array length is a multiple of the vector size.
6821        if (in1.length % 4 != 0) {
6822            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6823        }
6824        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6825        ain1.setAutoPadding(true);
6826        ain1.copyFrom(in1);
6827        // Verify that "in2" is non-null.
6828        if (in2 == null) {
6829            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6830        }
6831        // Verify that the array length is a multiple of the vector size.
6832        if (in2.length % 4 != 0) {
6833            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
6834        }
6835        // Verify that input array lengths are the same.
6836        if (in1.length / 4 != in2.length / 4) {
6837            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6838        }
6839        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
6840        ain2.setAutoPadding(true);
6841        ain2.copyFrom(in2);
6842
6843        result_int result = reduce_my_half4_char4_1(ain1, ain2, null);
6844        result.mTempIns = new Allocation[]{ain1, ain2};
6845        return result;
6846    }
6847
6848    // ain1 = "half4 a"
6849    // ain2 = "char4 b"
6850    public result_int reduce_my_half4_char4_1(Allocation ain1, Allocation ain2) {
6851        return reduce_my_half4_char4_1(ain1, ain2, null);
6852    }
6853
6854    // ain1 = "half4 a"
6855    // ain2 = "char4 b"
6856    public result_int reduce_my_half4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6857        Type t0, t1;
6858        // check ain1
6859        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6860            throw new RSRuntimeException("Type mismatch with F16_4!");
6861        }
6862        // check ain2
6863        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
6864            throw new RSRuntimeException("Type mismatch with I8_4!");
6865        }
6866        // Verify dimensions
6867        t0 = ain1.getType();
6868        t1 = ain2.getType();
6869        if ((t0.getCount() != t1.getCount()) ||
6870            (t0.getX() != t1.getX()) ||
6871            (t0.getY() != t1.getY()) ||
6872            (t0.getZ() != t1.getZ()) ||
6873            (t0.hasFaces()   != t1.hasFaces()) ||
6874            (t0.hasMipmaps() != t1.hasMipmaps())) {
6875            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6876        }
6877
6878        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6879        aout.setAutoPadding(true);
6880        reduce(mExportReduceIdx_my_half4_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
6881        return new result_int(aout);
6882    }
6883
6884    private final static int mExportReduceIdx_my_half4_short_0 = 102;
6885    // in1 = "a", flattened 4-vectors
6886    // in2 = "b"
6887    public result_int reduce_my_half4_short_0(short[] in1, short[] in2) {
6888        // Verify that "in1" is non-null.
6889        if (in1 == null) {
6890            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6891        }
6892        // Verify that the array length is a multiple of the vector size.
6893        if (in1.length % 4 != 0) {
6894            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6895        }
6896        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6897        ain1.setAutoPadding(true);
6898        ain1.copyFrom(in1);
6899        // Verify that "in2" is non-null.
6900        if (in2 == null) {
6901            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6902        }
6903        // Verify that input array lengths are the same.
6904        if (in1.length / 4 != in2.length) {
6905            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6906        }
6907        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
6908        ain2.setAutoPadding(true);
6909        ain2.copyFrom(in2);
6910
6911        result_int result = reduce_my_half4_short_0(ain1, ain2, null);
6912        result.mTempIns = new Allocation[]{ain1, ain2};
6913        return result;
6914    }
6915
6916    // ain1 = "half4 a"
6917    // ain2 = "short b"
6918    public result_int reduce_my_half4_short_0(Allocation ain1, Allocation ain2) {
6919        return reduce_my_half4_short_0(ain1, ain2, null);
6920    }
6921
6922    // ain1 = "half4 a"
6923    // ain2 = "short b"
6924    public result_int reduce_my_half4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6925        Type t0, t1;
6926        // check ain1
6927        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6928            throw new RSRuntimeException("Type mismatch with F16_4!");
6929        }
6930        // check ain2
6931        if (!ain2.getType().getElement().isCompatible(__I16)) {
6932            throw new RSRuntimeException("Type mismatch with I16!");
6933        }
6934        // Verify dimensions
6935        t0 = ain1.getType();
6936        t1 = ain2.getType();
6937        if ((t0.getCount() != t1.getCount()) ||
6938            (t0.getX() != t1.getX()) ||
6939            (t0.getY() != t1.getY()) ||
6940            (t0.getZ() != t1.getZ()) ||
6941            (t0.hasFaces()   != t1.hasFaces()) ||
6942            (t0.hasMipmaps() != t1.hasMipmaps())) {
6943            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
6944        }
6945
6946        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
6947        aout.setAutoPadding(true);
6948        reduce(mExportReduceIdx_my_half4_short_0, new Allocation[]{ain1, ain2}, aout, sc);
6949        return new result_int(aout);
6950    }
6951
6952    private final static int mExportReduceIdx_my_half4_short_1 = 103;
6953    // in1 = "a", flattened 4-vectors
6954    // in2 = "b"
6955    public result_int reduce_my_half4_short_1(short[] in1, short[] in2) {
6956        // Verify that "in1" is non-null.
6957        if (in1 == null) {
6958            throw new RSIllegalArgumentException("Array \"in1\" is null!");
6959        }
6960        // Verify that the array length is a multiple of the vector size.
6961        if (in1.length % 4 != 0) {
6962            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
6963        }
6964        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
6965        ain1.setAutoPadding(true);
6966        ain1.copyFrom(in1);
6967        // Verify that "in2" is non-null.
6968        if (in2 == null) {
6969            throw new RSIllegalArgumentException("Array \"in2\" is null!");
6970        }
6971        // Verify that input array lengths are the same.
6972        if (in1.length / 4 != in2.length) {
6973            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
6974        }
6975        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
6976        ain2.setAutoPadding(true);
6977        ain2.copyFrom(in2);
6978
6979        result_int result = reduce_my_half4_short_1(ain1, ain2, null);
6980        result.mTempIns = new Allocation[]{ain1, ain2};
6981        return result;
6982    }
6983
6984    // ain1 = "half4 a"
6985    // ain2 = "short b"
6986    public result_int reduce_my_half4_short_1(Allocation ain1, Allocation ain2) {
6987        return reduce_my_half4_short_1(ain1, ain2, null);
6988    }
6989
6990    // ain1 = "half4 a"
6991    // ain2 = "short b"
6992    public result_int reduce_my_half4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
6993        Type t0, t1;
6994        // check ain1
6995        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
6996            throw new RSRuntimeException("Type mismatch with F16_4!");
6997        }
6998        // check ain2
6999        if (!ain2.getType().getElement().isCompatible(__I16)) {
7000            throw new RSRuntimeException("Type mismatch with I16!");
7001        }
7002        // Verify dimensions
7003        t0 = ain1.getType();
7004        t1 = ain2.getType();
7005        if ((t0.getCount() != t1.getCount()) ||
7006            (t0.getX() != t1.getX()) ||
7007            (t0.getY() != t1.getY()) ||
7008            (t0.getZ() != t1.getZ()) ||
7009            (t0.hasFaces()   != t1.hasFaces()) ||
7010            (t0.hasMipmaps() != t1.hasMipmaps())) {
7011            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7012        }
7013
7014        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7015        aout.setAutoPadding(true);
7016        reduce(mExportReduceIdx_my_half4_short_1, new Allocation[]{ain1, ain2}, aout, sc);
7017        return new result_int(aout);
7018    }
7019
7020    private final static int mExportReduceIdx_my_half4_short2_0 = 104;
7021    // in1 = "a", flattened 4-vectors
7022    // in2 = "b", flattened 2-vectors
7023    public result_int reduce_my_half4_short2_0(short[] in1, short[] in2) {
7024        // Verify that "in1" is non-null.
7025        if (in1 == null) {
7026            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7027        }
7028        // Verify that the array length is a multiple of the vector size.
7029        if (in1.length % 4 != 0) {
7030            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7031        }
7032        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7033        ain1.setAutoPadding(true);
7034        ain1.copyFrom(in1);
7035        // Verify that "in2" is non-null.
7036        if (in2 == null) {
7037            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7038        }
7039        // Verify that the array length is a multiple of the vector size.
7040        if (in2.length % 2 != 0) {
7041            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
7042        }
7043        // Verify that input array lengths are the same.
7044        if (in1.length / 4 != in2.length / 2) {
7045            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7046        }
7047        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
7048        ain2.setAutoPadding(true);
7049        ain2.copyFrom(in2);
7050
7051        result_int result = reduce_my_half4_short2_0(ain1, ain2, null);
7052        result.mTempIns = new Allocation[]{ain1, ain2};
7053        return result;
7054    }
7055
7056    // ain1 = "half4 a"
7057    // ain2 = "short2 b"
7058    public result_int reduce_my_half4_short2_0(Allocation ain1, Allocation ain2) {
7059        return reduce_my_half4_short2_0(ain1, ain2, null);
7060    }
7061
7062    // ain1 = "half4 a"
7063    // ain2 = "short2 b"
7064    public result_int reduce_my_half4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7065        Type t0, t1;
7066        // check ain1
7067        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7068            throw new RSRuntimeException("Type mismatch with F16_4!");
7069        }
7070        // check ain2
7071        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
7072            throw new RSRuntimeException("Type mismatch with I16_2!");
7073        }
7074        // Verify dimensions
7075        t0 = ain1.getType();
7076        t1 = ain2.getType();
7077        if ((t0.getCount() != t1.getCount()) ||
7078            (t0.getX() != t1.getX()) ||
7079            (t0.getY() != t1.getY()) ||
7080            (t0.getZ() != t1.getZ()) ||
7081            (t0.hasFaces()   != t1.hasFaces()) ||
7082            (t0.hasMipmaps() != t1.hasMipmaps())) {
7083            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7084        }
7085
7086        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7087        aout.setAutoPadding(true);
7088        reduce(mExportReduceIdx_my_half4_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
7089        return new result_int(aout);
7090    }
7091
7092    private final static int mExportReduceIdx_my_half4_short2_1 = 105;
7093    // in1 = "a", flattened 4-vectors
7094    // in2 = "b", flattened 2-vectors
7095    public result_int reduce_my_half4_short2_1(short[] in1, short[] in2) {
7096        // Verify that "in1" is non-null.
7097        if (in1 == null) {
7098            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7099        }
7100        // Verify that the array length is a multiple of the vector size.
7101        if (in1.length % 4 != 0) {
7102            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7103        }
7104        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7105        ain1.setAutoPadding(true);
7106        ain1.copyFrom(in1);
7107        // Verify that "in2" is non-null.
7108        if (in2 == null) {
7109            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7110        }
7111        // Verify that the array length is a multiple of the vector size.
7112        if (in2.length % 2 != 0) {
7113            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
7114        }
7115        // Verify that input array lengths are the same.
7116        if (in1.length / 4 != in2.length / 2) {
7117            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7118        }
7119        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
7120        ain2.setAutoPadding(true);
7121        ain2.copyFrom(in2);
7122
7123        result_int result = reduce_my_half4_short2_1(ain1, ain2, null);
7124        result.mTempIns = new Allocation[]{ain1, ain2};
7125        return result;
7126    }
7127
7128    // ain1 = "half4 a"
7129    // ain2 = "short2 b"
7130    public result_int reduce_my_half4_short2_1(Allocation ain1, Allocation ain2) {
7131        return reduce_my_half4_short2_1(ain1, ain2, null);
7132    }
7133
7134    // ain1 = "half4 a"
7135    // ain2 = "short2 b"
7136    public result_int reduce_my_half4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7137        Type t0, t1;
7138        // check ain1
7139        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7140            throw new RSRuntimeException("Type mismatch with F16_4!");
7141        }
7142        // check ain2
7143        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
7144            throw new RSRuntimeException("Type mismatch with I16_2!");
7145        }
7146        // Verify dimensions
7147        t0 = ain1.getType();
7148        t1 = ain2.getType();
7149        if ((t0.getCount() != t1.getCount()) ||
7150            (t0.getX() != t1.getX()) ||
7151            (t0.getY() != t1.getY()) ||
7152            (t0.getZ() != t1.getZ()) ||
7153            (t0.hasFaces()   != t1.hasFaces()) ||
7154            (t0.hasMipmaps() != t1.hasMipmaps())) {
7155            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7156        }
7157
7158        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7159        aout.setAutoPadding(true);
7160        reduce(mExportReduceIdx_my_half4_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
7161        return new result_int(aout);
7162    }
7163
7164    private final static int mExportReduceIdx_my_half4_short4_0 = 106;
7165    // in1 = "a", flattened 4-vectors
7166    // in2 = "b", flattened 4-vectors
7167    public result_int reduce_my_half4_short4_0(short[] in1, short[] in2) {
7168        // Verify that "in1" is non-null.
7169        if (in1 == null) {
7170            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7171        }
7172        // Verify that the array length is a multiple of the vector size.
7173        if (in1.length % 4 != 0) {
7174            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7175        }
7176        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7177        ain1.setAutoPadding(true);
7178        ain1.copyFrom(in1);
7179        // Verify that "in2" is non-null.
7180        if (in2 == null) {
7181            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7182        }
7183        // Verify that the array length is a multiple of the vector size.
7184        if (in2.length % 4 != 0) {
7185            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
7186        }
7187        // Verify that input array lengths are the same.
7188        if (in1.length / 4 != in2.length / 4) {
7189            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7190        }
7191        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
7192        ain2.setAutoPadding(true);
7193        ain2.copyFrom(in2);
7194
7195        result_int result = reduce_my_half4_short4_0(ain1, ain2, null);
7196        result.mTempIns = new Allocation[]{ain1, ain2};
7197        return result;
7198    }
7199
7200    // ain1 = "half4 a"
7201    // ain2 = "short4 b"
7202    public result_int reduce_my_half4_short4_0(Allocation ain1, Allocation ain2) {
7203        return reduce_my_half4_short4_0(ain1, ain2, null);
7204    }
7205
7206    // ain1 = "half4 a"
7207    // ain2 = "short4 b"
7208    public result_int reduce_my_half4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7209        Type t0, t1;
7210        // check ain1
7211        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7212            throw new RSRuntimeException("Type mismatch with F16_4!");
7213        }
7214        // check ain2
7215        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
7216            throw new RSRuntimeException("Type mismatch with I16_4!");
7217        }
7218        // Verify dimensions
7219        t0 = ain1.getType();
7220        t1 = ain2.getType();
7221        if ((t0.getCount() != t1.getCount()) ||
7222            (t0.getX() != t1.getX()) ||
7223            (t0.getY() != t1.getY()) ||
7224            (t0.getZ() != t1.getZ()) ||
7225            (t0.hasFaces()   != t1.hasFaces()) ||
7226            (t0.hasMipmaps() != t1.hasMipmaps())) {
7227            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7228        }
7229
7230        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7231        aout.setAutoPadding(true);
7232        reduce(mExportReduceIdx_my_half4_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
7233        return new result_int(aout);
7234    }
7235
7236    private final static int mExportReduceIdx_my_half4_short4_1 = 107;
7237    // in1 = "a", flattened 4-vectors
7238    // in2 = "b", flattened 4-vectors
7239    public result_int reduce_my_half4_short4_1(short[] in1, short[] in2) {
7240        // Verify that "in1" is non-null.
7241        if (in1 == null) {
7242            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7243        }
7244        // Verify that the array length is a multiple of the vector size.
7245        if (in1.length % 4 != 0) {
7246            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7247        }
7248        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7249        ain1.setAutoPadding(true);
7250        ain1.copyFrom(in1);
7251        // Verify that "in2" is non-null.
7252        if (in2 == null) {
7253            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7254        }
7255        // Verify that the array length is a multiple of the vector size.
7256        if (in2.length % 4 != 0) {
7257            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
7258        }
7259        // Verify that input array lengths are the same.
7260        if (in1.length / 4 != in2.length / 4) {
7261            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7262        }
7263        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
7264        ain2.setAutoPadding(true);
7265        ain2.copyFrom(in2);
7266
7267        result_int result = reduce_my_half4_short4_1(ain1, ain2, null);
7268        result.mTempIns = new Allocation[]{ain1, ain2};
7269        return result;
7270    }
7271
7272    // ain1 = "half4 a"
7273    // ain2 = "short4 b"
7274    public result_int reduce_my_half4_short4_1(Allocation ain1, Allocation ain2) {
7275        return reduce_my_half4_short4_1(ain1, ain2, null);
7276    }
7277
7278    // ain1 = "half4 a"
7279    // ain2 = "short4 b"
7280    public result_int reduce_my_half4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7281        Type t0, t1;
7282        // check ain1
7283        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7284            throw new RSRuntimeException("Type mismatch with F16_4!");
7285        }
7286        // check ain2
7287        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
7288            throw new RSRuntimeException("Type mismatch with I16_4!");
7289        }
7290        // Verify dimensions
7291        t0 = ain1.getType();
7292        t1 = ain2.getType();
7293        if ((t0.getCount() != t1.getCount()) ||
7294            (t0.getX() != t1.getX()) ||
7295            (t0.getY() != t1.getY()) ||
7296            (t0.getZ() != t1.getZ()) ||
7297            (t0.hasFaces()   != t1.hasFaces()) ||
7298            (t0.hasMipmaps() != t1.hasMipmaps())) {
7299            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7300        }
7301
7302        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7303        aout.setAutoPadding(true);
7304        reduce(mExportReduceIdx_my_half4_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
7305        return new result_int(aout);
7306    }
7307
7308    private final static int mExportReduceIdx_my_half4_uchar_0 = 108;
7309    // in1 = "a", flattened 4-vectors
7310    // in2 = "b"
7311    public result_int reduce_my_half4_uchar_0(short[] in1, byte[] in2) {
7312        // Verify that "in1" is non-null.
7313        if (in1 == null) {
7314            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7315        }
7316        // Verify that the array length is a multiple of the vector size.
7317        if (in1.length % 4 != 0) {
7318            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7319        }
7320        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7321        ain1.setAutoPadding(true);
7322        ain1.copyFrom(in1);
7323        // Verify that "in2" is non-null.
7324        if (in2 == null) {
7325            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7326        }
7327        // Verify that input array lengths are the same.
7328        if (in1.length / 4 != in2.length) {
7329            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7330        }
7331        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
7332        ain2.setAutoPadding(true);
7333        ain2.copyFrom(in2);
7334
7335        result_int result = reduce_my_half4_uchar_0(ain1, ain2, null);
7336        result.mTempIns = new Allocation[]{ain1, ain2};
7337        return result;
7338    }
7339
7340    // ain1 = "half4 a"
7341    // ain2 = "uchar b"
7342    public result_int reduce_my_half4_uchar_0(Allocation ain1, Allocation ain2) {
7343        return reduce_my_half4_uchar_0(ain1, ain2, null);
7344    }
7345
7346    // ain1 = "half4 a"
7347    // ain2 = "uchar b"
7348    public result_int reduce_my_half4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7349        Type t0, t1;
7350        // check ain1
7351        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7352            throw new RSRuntimeException("Type mismatch with F16_4!");
7353        }
7354        // check ain2
7355        if (!ain2.getType().getElement().isCompatible(__U8)) {
7356            throw new RSRuntimeException("Type mismatch with U8!");
7357        }
7358        // Verify dimensions
7359        t0 = ain1.getType();
7360        t1 = ain2.getType();
7361        if ((t0.getCount() != t1.getCount()) ||
7362            (t0.getX() != t1.getX()) ||
7363            (t0.getY() != t1.getY()) ||
7364            (t0.getZ() != t1.getZ()) ||
7365            (t0.hasFaces()   != t1.hasFaces()) ||
7366            (t0.hasMipmaps() != t1.hasMipmaps())) {
7367            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7368        }
7369
7370        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7371        aout.setAutoPadding(true);
7372        reduce(mExportReduceIdx_my_half4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
7373        return new result_int(aout);
7374    }
7375
7376    private final static int mExportReduceIdx_my_half4_uchar_1 = 109;
7377    // in1 = "a", flattened 4-vectors
7378    // in2 = "b"
7379    public result_int reduce_my_half4_uchar_1(short[] in1, byte[] in2) {
7380        // Verify that "in1" is non-null.
7381        if (in1 == null) {
7382            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7383        }
7384        // Verify that the array length is a multiple of the vector size.
7385        if (in1.length % 4 != 0) {
7386            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7387        }
7388        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7389        ain1.setAutoPadding(true);
7390        ain1.copyFrom(in1);
7391        // Verify that "in2" is non-null.
7392        if (in2 == null) {
7393            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7394        }
7395        // Verify that input array lengths are the same.
7396        if (in1.length / 4 != in2.length) {
7397            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7398        }
7399        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
7400        ain2.setAutoPadding(true);
7401        ain2.copyFrom(in2);
7402
7403        result_int result = reduce_my_half4_uchar_1(ain1, ain2, null);
7404        result.mTempIns = new Allocation[]{ain1, ain2};
7405        return result;
7406    }
7407
7408    // ain1 = "half4 a"
7409    // ain2 = "uchar b"
7410    public result_int reduce_my_half4_uchar_1(Allocation ain1, Allocation ain2) {
7411        return reduce_my_half4_uchar_1(ain1, ain2, null);
7412    }
7413
7414    // ain1 = "half4 a"
7415    // ain2 = "uchar b"
7416    public result_int reduce_my_half4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7417        Type t0, t1;
7418        // check ain1
7419        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7420            throw new RSRuntimeException("Type mismatch with F16_4!");
7421        }
7422        // check ain2
7423        if (!ain2.getType().getElement().isCompatible(__U8)) {
7424            throw new RSRuntimeException("Type mismatch with U8!");
7425        }
7426        // Verify dimensions
7427        t0 = ain1.getType();
7428        t1 = ain2.getType();
7429        if ((t0.getCount() != t1.getCount()) ||
7430            (t0.getX() != t1.getX()) ||
7431            (t0.getY() != t1.getY()) ||
7432            (t0.getZ() != t1.getZ()) ||
7433            (t0.hasFaces()   != t1.hasFaces()) ||
7434            (t0.hasMipmaps() != t1.hasMipmaps())) {
7435            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7436        }
7437
7438        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7439        aout.setAutoPadding(true);
7440        reduce(mExportReduceIdx_my_half4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
7441        return new result_int(aout);
7442    }
7443
7444    private final static int mExportReduceIdx_my_half4_uchar2_0 = 110;
7445    // in1 = "a", flattened 4-vectors
7446    // in2 = "b", flattened 2-vectors
7447    public result_int reduce_my_half4_uchar2_0(short[] in1, byte[] in2) {
7448        // Verify that "in1" is non-null.
7449        if (in1 == null) {
7450            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7451        }
7452        // Verify that the array length is a multiple of the vector size.
7453        if (in1.length % 4 != 0) {
7454            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7455        }
7456        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7457        ain1.setAutoPadding(true);
7458        ain1.copyFrom(in1);
7459        // Verify that "in2" is non-null.
7460        if (in2 == null) {
7461            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7462        }
7463        // Verify that the array length is a multiple of the vector size.
7464        if (in2.length % 2 != 0) {
7465            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
7466        }
7467        // Verify that input array lengths are the same.
7468        if (in1.length / 4 != in2.length / 2) {
7469            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7470        }
7471        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
7472        ain2.setAutoPadding(true);
7473        ain2.copyFrom(in2);
7474
7475        result_int result = reduce_my_half4_uchar2_0(ain1, ain2, null);
7476        result.mTempIns = new Allocation[]{ain1, ain2};
7477        return result;
7478    }
7479
7480    // ain1 = "half4 a"
7481    // ain2 = "uchar2 b"
7482    public result_int reduce_my_half4_uchar2_0(Allocation ain1, Allocation ain2) {
7483        return reduce_my_half4_uchar2_0(ain1, ain2, null);
7484    }
7485
7486    // ain1 = "half4 a"
7487    // ain2 = "uchar2 b"
7488    public result_int reduce_my_half4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7489        Type t0, t1;
7490        // check ain1
7491        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7492            throw new RSRuntimeException("Type mismatch with F16_4!");
7493        }
7494        // check ain2
7495        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
7496            throw new RSRuntimeException("Type mismatch with U8_2!");
7497        }
7498        // Verify dimensions
7499        t0 = ain1.getType();
7500        t1 = ain2.getType();
7501        if ((t0.getCount() != t1.getCount()) ||
7502            (t0.getX() != t1.getX()) ||
7503            (t0.getY() != t1.getY()) ||
7504            (t0.getZ() != t1.getZ()) ||
7505            (t0.hasFaces()   != t1.hasFaces()) ||
7506            (t0.hasMipmaps() != t1.hasMipmaps())) {
7507            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7508        }
7509
7510        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7511        aout.setAutoPadding(true);
7512        reduce(mExportReduceIdx_my_half4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
7513        return new result_int(aout);
7514    }
7515
7516    private final static int mExportReduceIdx_my_half4_uchar2_1 = 111;
7517    // in1 = "a", flattened 4-vectors
7518    // in2 = "b", flattened 2-vectors
7519    public result_int reduce_my_half4_uchar2_1(short[] in1, byte[] in2) {
7520        // Verify that "in1" is non-null.
7521        if (in1 == null) {
7522            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7523        }
7524        // Verify that the array length is a multiple of the vector size.
7525        if (in1.length % 4 != 0) {
7526            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7527        }
7528        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7529        ain1.setAutoPadding(true);
7530        ain1.copyFrom(in1);
7531        // Verify that "in2" is non-null.
7532        if (in2 == null) {
7533            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7534        }
7535        // Verify that the array length is a multiple of the vector size.
7536        if (in2.length % 2 != 0) {
7537            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
7538        }
7539        // Verify that input array lengths are the same.
7540        if (in1.length / 4 != in2.length / 2) {
7541            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7542        }
7543        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
7544        ain2.setAutoPadding(true);
7545        ain2.copyFrom(in2);
7546
7547        result_int result = reduce_my_half4_uchar2_1(ain1, ain2, null);
7548        result.mTempIns = new Allocation[]{ain1, ain2};
7549        return result;
7550    }
7551
7552    // ain1 = "half4 a"
7553    // ain2 = "uchar2 b"
7554    public result_int reduce_my_half4_uchar2_1(Allocation ain1, Allocation ain2) {
7555        return reduce_my_half4_uchar2_1(ain1, ain2, null);
7556    }
7557
7558    // ain1 = "half4 a"
7559    // ain2 = "uchar2 b"
7560    public result_int reduce_my_half4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7561        Type t0, t1;
7562        // check ain1
7563        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7564            throw new RSRuntimeException("Type mismatch with F16_4!");
7565        }
7566        // check ain2
7567        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
7568            throw new RSRuntimeException("Type mismatch with U8_2!");
7569        }
7570        // Verify dimensions
7571        t0 = ain1.getType();
7572        t1 = ain2.getType();
7573        if ((t0.getCount() != t1.getCount()) ||
7574            (t0.getX() != t1.getX()) ||
7575            (t0.getY() != t1.getY()) ||
7576            (t0.getZ() != t1.getZ()) ||
7577            (t0.hasFaces()   != t1.hasFaces()) ||
7578            (t0.hasMipmaps() != t1.hasMipmaps())) {
7579            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7580        }
7581
7582        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7583        aout.setAutoPadding(true);
7584        reduce(mExportReduceIdx_my_half4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
7585        return new result_int(aout);
7586    }
7587
7588    private final static int mExportReduceIdx_my_half4_uchar4_0 = 112;
7589    // in1 = "a", flattened 4-vectors
7590    // in2 = "b", flattened 4-vectors
7591    public result_int reduce_my_half4_uchar4_0(short[] in1, byte[] in2) {
7592        // Verify that "in1" is non-null.
7593        if (in1 == null) {
7594            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7595        }
7596        // Verify that the array length is a multiple of the vector size.
7597        if (in1.length % 4 != 0) {
7598            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7599        }
7600        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7601        ain1.setAutoPadding(true);
7602        ain1.copyFrom(in1);
7603        // Verify that "in2" is non-null.
7604        if (in2 == null) {
7605            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7606        }
7607        // Verify that the array length is a multiple of the vector size.
7608        if (in2.length % 4 != 0) {
7609            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
7610        }
7611        // Verify that input array lengths are the same.
7612        if (in1.length / 4 != in2.length / 4) {
7613            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7614        }
7615        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
7616        ain2.setAutoPadding(true);
7617        ain2.copyFrom(in2);
7618
7619        result_int result = reduce_my_half4_uchar4_0(ain1, ain2, null);
7620        result.mTempIns = new Allocation[]{ain1, ain2};
7621        return result;
7622    }
7623
7624    // ain1 = "half4 a"
7625    // ain2 = "uchar4 b"
7626    public result_int reduce_my_half4_uchar4_0(Allocation ain1, Allocation ain2) {
7627        return reduce_my_half4_uchar4_0(ain1, ain2, null);
7628    }
7629
7630    // ain1 = "half4 a"
7631    // ain2 = "uchar4 b"
7632    public result_int reduce_my_half4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7633        Type t0, t1;
7634        // check ain1
7635        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7636            throw new RSRuntimeException("Type mismatch with F16_4!");
7637        }
7638        // check ain2
7639        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
7640            throw new RSRuntimeException("Type mismatch with U8_4!");
7641        }
7642        // Verify dimensions
7643        t0 = ain1.getType();
7644        t1 = ain2.getType();
7645        if ((t0.getCount() != t1.getCount()) ||
7646            (t0.getX() != t1.getX()) ||
7647            (t0.getY() != t1.getY()) ||
7648            (t0.getZ() != t1.getZ()) ||
7649            (t0.hasFaces()   != t1.hasFaces()) ||
7650            (t0.hasMipmaps() != t1.hasMipmaps())) {
7651            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7652        }
7653
7654        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7655        aout.setAutoPadding(true);
7656        reduce(mExportReduceIdx_my_half4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
7657        return new result_int(aout);
7658    }
7659
7660    private final static int mExportReduceIdx_my_half4_uchar4_1 = 113;
7661    // in1 = "a", flattened 4-vectors
7662    // in2 = "b", flattened 4-vectors
7663    public result_int reduce_my_half4_uchar4_1(short[] in1, byte[] in2) {
7664        // Verify that "in1" is non-null.
7665        if (in1 == null) {
7666            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7667        }
7668        // Verify that the array length is a multiple of the vector size.
7669        if (in1.length % 4 != 0) {
7670            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7671        }
7672        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7673        ain1.setAutoPadding(true);
7674        ain1.copyFrom(in1);
7675        // Verify that "in2" is non-null.
7676        if (in2 == null) {
7677            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7678        }
7679        // Verify that the array length is a multiple of the vector size.
7680        if (in2.length % 4 != 0) {
7681            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
7682        }
7683        // Verify that input array lengths are the same.
7684        if (in1.length / 4 != in2.length / 4) {
7685            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7686        }
7687        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
7688        ain2.setAutoPadding(true);
7689        ain2.copyFrom(in2);
7690
7691        result_int result = reduce_my_half4_uchar4_1(ain1, ain2, null);
7692        result.mTempIns = new Allocation[]{ain1, ain2};
7693        return result;
7694    }
7695
7696    // ain1 = "half4 a"
7697    // ain2 = "uchar4 b"
7698    public result_int reduce_my_half4_uchar4_1(Allocation ain1, Allocation ain2) {
7699        return reduce_my_half4_uchar4_1(ain1, ain2, null);
7700    }
7701
7702    // ain1 = "half4 a"
7703    // ain2 = "uchar4 b"
7704    public result_int reduce_my_half4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7705        Type t0, t1;
7706        // check ain1
7707        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7708            throw new RSRuntimeException("Type mismatch with F16_4!");
7709        }
7710        // check ain2
7711        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
7712            throw new RSRuntimeException("Type mismatch with U8_4!");
7713        }
7714        // Verify dimensions
7715        t0 = ain1.getType();
7716        t1 = ain2.getType();
7717        if ((t0.getCount() != t1.getCount()) ||
7718            (t0.getX() != t1.getX()) ||
7719            (t0.getY() != t1.getY()) ||
7720            (t0.getZ() != t1.getZ()) ||
7721            (t0.hasFaces()   != t1.hasFaces()) ||
7722            (t0.hasMipmaps() != t1.hasMipmaps())) {
7723            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7724        }
7725
7726        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7727        aout.setAutoPadding(true);
7728        reduce(mExportReduceIdx_my_half4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
7729        return new result_int(aout);
7730    }
7731
7732    private final static int mExportReduceIdx_my_half4_ushort_0 = 114;
7733    // in1 = "a", flattened 4-vectors
7734    // in2 = "b"
7735    public result_int reduce_my_half4_ushort_0(short[] in1, short[] in2) {
7736        // Verify that "in1" is non-null.
7737        if (in1 == null) {
7738            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7739        }
7740        // Verify that the array length is a multiple of the vector size.
7741        if (in1.length % 4 != 0) {
7742            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7743        }
7744        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7745        ain1.setAutoPadding(true);
7746        ain1.copyFrom(in1);
7747        // Verify that "in2" is non-null.
7748        if (in2 == null) {
7749            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7750        }
7751        // Verify that input array lengths are the same.
7752        if (in1.length / 4 != in2.length) {
7753            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7754        }
7755        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
7756        ain2.setAutoPadding(true);
7757        ain2.copyFrom(in2);
7758
7759        result_int result = reduce_my_half4_ushort_0(ain1, ain2, null);
7760        result.mTempIns = new Allocation[]{ain1, ain2};
7761        return result;
7762    }
7763
7764    // ain1 = "half4 a"
7765    // ain2 = "ushort b"
7766    public result_int reduce_my_half4_ushort_0(Allocation ain1, Allocation ain2) {
7767        return reduce_my_half4_ushort_0(ain1, ain2, null);
7768    }
7769
7770    // ain1 = "half4 a"
7771    // ain2 = "ushort b"
7772    public result_int reduce_my_half4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7773        Type t0, t1;
7774        // check ain1
7775        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7776            throw new RSRuntimeException("Type mismatch with F16_4!");
7777        }
7778        // check ain2
7779        if (!ain2.getType().getElement().isCompatible(__U16)) {
7780            throw new RSRuntimeException("Type mismatch with U16!");
7781        }
7782        // Verify dimensions
7783        t0 = ain1.getType();
7784        t1 = ain2.getType();
7785        if ((t0.getCount() != t1.getCount()) ||
7786            (t0.getX() != t1.getX()) ||
7787            (t0.getY() != t1.getY()) ||
7788            (t0.getZ() != t1.getZ()) ||
7789            (t0.hasFaces()   != t1.hasFaces()) ||
7790            (t0.hasMipmaps() != t1.hasMipmaps())) {
7791            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7792        }
7793
7794        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7795        aout.setAutoPadding(true);
7796        reduce(mExportReduceIdx_my_half4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
7797        return new result_int(aout);
7798    }
7799
7800    private final static int mExportReduceIdx_my_half4_ushort_1 = 115;
7801    // in1 = "a", flattened 4-vectors
7802    // in2 = "b"
7803    public result_int reduce_my_half4_ushort_1(short[] in1, short[] in2) {
7804        // Verify that "in1" is non-null.
7805        if (in1 == null) {
7806            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7807        }
7808        // Verify that the array length is a multiple of the vector size.
7809        if (in1.length % 4 != 0) {
7810            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7811        }
7812        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7813        ain1.setAutoPadding(true);
7814        ain1.copyFrom(in1);
7815        // Verify that "in2" is non-null.
7816        if (in2 == null) {
7817            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7818        }
7819        // Verify that input array lengths are the same.
7820        if (in1.length / 4 != in2.length) {
7821            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7822        }
7823        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
7824        ain2.setAutoPadding(true);
7825        ain2.copyFrom(in2);
7826
7827        result_int result = reduce_my_half4_ushort_1(ain1, ain2, null);
7828        result.mTempIns = new Allocation[]{ain1, ain2};
7829        return result;
7830    }
7831
7832    // ain1 = "half4 a"
7833    // ain2 = "ushort b"
7834    public result_int reduce_my_half4_ushort_1(Allocation ain1, Allocation ain2) {
7835        return reduce_my_half4_ushort_1(ain1, ain2, null);
7836    }
7837
7838    // ain1 = "half4 a"
7839    // ain2 = "ushort b"
7840    public result_int reduce_my_half4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7841        Type t0, t1;
7842        // check ain1
7843        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7844            throw new RSRuntimeException("Type mismatch with F16_4!");
7845        }
7846        // check ain2
7847        if (!ain2.getType().getElement().isCompatible(__U16)) {
7848            throw new RSRuntimeException("Type mismatch with U16!");
7849        }
7850        // Verify dimensions
7851        t0 = ain1.getType();
7852        t1 = ain2.getType();
7853        if ((t0.getCount() != t1.getCount()) ||
7854            (t0.getX() != t1.getX()) ||
7855            (t0.getY() != t1.getY()) ||
7856            (t0.getZ() != t1.getZ()) ||
7857            (t0.hasFaces()   != t1.hasFaces()) ||
7858            (t0.hasMipmaps() != t1.hasMipmaps())) {
7859            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7860        }
7861
7862        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7863        aout.setAutoPadding(true);
7864        reduce(mExportReduceIdx_my_half4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
7865        return new result_int(aout);
7866    }
7867
7868    private final static int mExportReduceIdx_my_half4_ushort2_0 = 116;
7869    // in1 = "a", flattened 4-vectors
7870    // in2 = "b", flattened 2-vectors
7871    public result_int reduce_my_half4_ushort2_0(short[] in1, short[] in2) {
7872        // Verify that "in1" is non-null.
7873        if (in1 == null) {
7874            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7875        }
7876        // Verify that the array length is a multiple of the vector size.
7877        if (in1.length % 4 != 0) {
7878            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7879        }
7880        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7881        ain1.setAutoPadding(true);
7882        ain1.copyFrom(in1);
7883        // Verify that "in2" is non-null.
7884        if (in2 == null) {
7885            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7886        }
7887        // Verify that the array length is a multiple of the vector size.
7888        if (in2.length % 2 != 0) {
7889            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
7890        }
7891        // Verify that input array lengths are the same.
7892        if (in1.length / 4 != in2.length / 2) {
7893            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7894        }
7895        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
7896        ain2.setAutoPadding(true);
7897        ain2.copyFrom(in2);
7898
7899        result_int result = reduce_my_half4_ushort2_0(ain1, ain2, null);
7900        result.mTempIns = new Allocation[]{ain1, ain2};
7901        return result;
7902    }
7903
7904    // ain1 = "half4 a"
7905    // ain2 = "ushort2 b"
7906    public result_int reduce_my_half4_ushort2_0(Allocation ain1, Allocation ain2) {
7907        return reduce_my_half4_ushort2_0(ain1, ain2, null);
7908    }
7909
7910    // ain1 = "half4 a"
7911    // ain2 = "ushort2 b"
7912    public result_int reduce_my_half4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7913        Type t0, t1;
7914        // check ain1
7915        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7916            throw new RSRuntimeException("Type mismatch with F16_4!");
7917        }
7918        // check ain2
7919        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
7920            throw new RSRuntimeException("Type mismatch with U16_2!");
7921        }
7922        // Verify dimensions
7923        t0 = ain1.getType();
7924        t1 = ain2.getType();
7925        if ((t0.getCount() != t1.getCount()) ||
7926            (t0.getX() != t1.getX()) ||
7927            (t0.getY() != t1.getY()) ||
7928            (t0.getZ() != t1.getZ()) ||
7929            (t0.hasFaces()   != t1.hasFaces()) ||
7930            (t0.hasMipmaps() != t1.hasMipmaps())) {
7931            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
7932        }
7933
7934        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
7935        aout.setAutoPadding(true);
7936        reduce(mExportReduceIdx_my_half4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
7937        return new result_int(aout);
7938    }
7939
7940    private final static int mExportReduceIdx_my_half4_ushort2_1 = 117;
7941    // in1 = "a", flattened 4-vectors
7942    // in2 = "b", flattened 2-vectors
7943    public result_int reduce_my_half4_ushort2_1(short[] in1, short[] in2) {
7944        // Verify that "in1" is non-null.
7945        if (in1 == null) {
7946            throw new RSIllegalArgumentException("Array \"in1\" is null!");
7947        }
7948        // Verify that the array length is a multiple of the vector size.
7949        if (in1.length % 4 != 0) {
7950            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
7951        }
7952        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
7953        ain1.setAutoPadding(true);
7954        ain1.copyFrom(in1);
7955        // Verify that "in2" is non-null.
7956        if (in2 == null) {
7957            throw new RSIllegalArgumentException("Array \"in2\" is null!");
7958        }
7959        // Verify that the array length is a multiple of the vector size.
7960        if (in2.length % 2 != 0) {
7961            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
7962        }
7963        // Verify that input array lengths are the same.
7964        if (in1.length / 4 != in2.length / 2) {
7965            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
7966        }
7967        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
7968        ain2.setAutoPadding(true);
7969        ain2.copyFrom(in2);
7970
7971        result_int result = reduce_my_half4_ushort2_1(ain1, ain2, null);
7972        result.mTempIns = new Allocation[]{ain1, ain2};
7973        return result;
7974    }
7975
7976    // ain1 = "half4 a"
7977    // ain2 = "ushort2 b"
7978    public result_int reduce_my_half4_ushort2_1(Allocation ain1, Allocation ain2) {
7979        return reduce_my_half4_ushort2_1(ain1, ain2, null);
7980    }
7981
7982    // ain1 = "half4 a"
7983    // ain2 = "ushort2 b"
7984    public result_int reduce_my_half4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
7985        Type t0, t1;
7986        // check ain1
7987        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
7988            throw new RSRuntimeException("Type mismatch with F16_4!");
7989        }
7990        // check ain2
7991        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
7992            throw new RSRuntimeException("Type mismatch with U16_2!");
7993        }
7994        // Verify dimensions
7995        t0 = ain1.getType();
7996        t1 = ain2.getType();
7997        if ((t0.getCount() != t1.getCount()) ||
7998            (t0.getX() != t1.getX()) ||
7999            (t0.getY() != t1.getY()) ||
8000            (t0.getZ() != t1.getZ()) ||
8001            (t0.hasFaces()   != t1.hasFaces()) ||
8002            (t0.hasMipmaps() != t1.hasMipmaps())) {
8003            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8004        }
8005
8006        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8007        aout.setAutoPadding(true);
8008        reduce(mExportReduceIdx_my_half4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
8009        return new result_int(aout);
8010    }
8011
8012    private final static int mExportReduceIdx_my_half4_ushort4_0 = 118;
8013    // in1 = "a", flattened 4-vectors
8014    // in2 = "b", flattened 4-vectors
8015    public result_int reduce_my_half4_ushort4_0(short[] in1, short[] in2) {
8016        // Verify that "in1" is non-null.
8017        if (in1 == null) {
8018            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8019        }
8020        // Verify that the array length is a multiple of the vector size.
8021        if (in1.length % 4 != 0) {
8022            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
8023        }
8024        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
8025        ain1.setAutoPadding(true);
8026        ain1.copyFrom(in1);
8027        // Verify that "in2" is non-null.
8028        if (in2 == null) {
8029            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8030        }
8031        // Verify that the array length is a multiple of the vector size.
8032        if (in2.length % 4 != 0) {
8033            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
8034        }
8035        // Verify that input array lengths are the same.
8036        if (in1.length / 4 != in2.length / 4) {
8037            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8038        }
8039        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
8040        ain2.setAutoPadding(true);
8041        ain2.copyFrom(in2);
8042
8043        result_int result = reduce_my_half4_ushort4_0(ain1, ain2, null);
8044        result.mTempIns = new Allocation[]{ain1, ain2};
8045        return result;
8046    }
8047
8048    // ain1 = "half4 a"
8049    // ain2 = "ushort4 b"
8050    public result_int reduce_my_half4_ushort4_0(Allocation ain1, Allocation ain2) {
8051        return reduce_my_half4_ushort4_0(ain1, ain2, null);
8052    }
8053
8054    // ain1 = "half4 a"
8055    // ain2 = "ushort4 b"
8056    public result_int reduce_my_half4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8057        Type t0, t1;
8058        // check ain1
8059        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
8060            throw new RSRuntimeException("Type mismatch with F16_4!");
8061        }
8062        // check ain2
8063        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
8064            throw new RSRuntimeException("Type mismatch with U16_4!");
8065        }
8066        // Verify dimensions
8067        t0 = ain1.getType();
8068        t1 = ain2.getType();
8069        if ((t0.getCount() != t1.getCount()) ||
8070            (t0.getX() != t1.getX()) ||
8071            (t0.getY() != t1.getY()) ||
8072            (t0.getZ() != t1.getZ()) ||
8073            (t0.hasFaces()   != t1.hasFaces()) ||
8074            (t0.hasMipmaps() != t1.hasMipmaps())) {
8075            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8076        }
8077
8078        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8079        aout.setAutoPadding(true);
8080        reduce(mExportReduceIdx_my_half4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
8081        return new result_int(aout);
8082    }
8083
8084    private final static int mExportReduceIdx_my_half4_ushort4_1 = 119;
8085    // in1 = "a", flattened 4-vectors
8086    // in2 = "b", flattened 4-vectors
8087    public result_int reduce_my_half4_ushort4_1(short[] in1, short[] in2) {
8088        // Verify that "in1" is non-null.
8089        if (in1 == null) {
8090            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8091        }
8092        // Verify that the array length is a multiple of the vector size.
8093        if (in1.length % 4 != 0) {
8094            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
8095        }
8096        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
8097        ain1.setAutoPadding(true);
8098        ain1.copyFrom(in1);
8099        // Verify that "in2" is non-null.
8100        if (in2 == null) {
8101            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8102        }
8103        // Verify that the array length is a multiple of the vector size.
8104        if (in2.length % 4 != 0) {
8105            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
8106        }
8107        // Verify that input array lengths are the same.
8108        if (in1.length / 4 != in2.length / 4) {
8109            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8110        }
8111        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
8112        ain2.setAutoPadding(true);
8113        ain2.copyFrom(in2);
8114
8115        result_int result = reduce_my_half4_ushort4_1(ain1, ain2, null);
8116        result.mTempIns = new Allocation[]{ain1, ain2};
8117        return result;
8118    }
8119
8120    // ain1 = "half4 a"
8121    // ain2 = "ushort4 b"
8122    public result_int reduce_my_half4_ushort4_1(Allocation ain1, Allocation ain2) {
8123        return reduce_my_half4_ushort4_1(ain1, ain2, null);
8124    }
8125
8126    // ain1 = "half4 a"
8127    // ain2 = "ushort4 b"
8128    public result_int reduce_my_half4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8129        Type t0, t1;
8130        // check ain1
8131        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
8132            throw new RSRuntimeException("Type mismatch with F16_4!");
8133        }
8134        // check ain2
8135        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
8136            throw new RSRuntimeException("Type mismatch with U16_4!");
8137        }
8138        // Verify dimensions
8139        t0 = ain1.getType();
8140        t1 = ain2.getType();
8141        if ((t0.getCount() != t1.getCount()) ||
8142            (t0.getX() != t1.getX()) ||
8143            (t0.getY() != t1.getY()) ||
8144            (t0.getZ() != t1.getZ()) ||
8145            (t0.hasFaces()   != t1.hasFaces()) ||
8146            (t0.hasMipmaps() != t1.hasMipmaps())) {
8147            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8148        }
8149
8150        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8151        aout.setAutoPadding(true);
8152        reduce(mExportReduceIdx_my_half4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
8153        return new result_int(aout);
8154    }
8155
8156    private final static int mExportReduceIdx_my_half4_bool_0 = 120;
8157    // in1 = "a", flattened 4-vectors
8158    // in2 = "b"
8159    public result_int reduce_my_half4_bool_0(short[] in1, byte[] in2) {
8160        // Verify that "in1" is non-null.
8161        if (in1 == null) {
8162            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8163        }
8164        // Verify that the array length is a multiple of the vector size.
8165        if (in1.length % 4 != 0) {
8166            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
8167        }
8168        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
8169        ain1.setAutoPadding(true);
8170        ain1.copyFrom(in1);
8171        // Verify that "in2" is non-null.
8172        if (in2 == null) {
8173            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8174        }
8175        // Verify that input array lengths are the same.
8176        if (in1.length / 4 != in2.length) {
8177            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8178        }
8179        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
8180        ain2.setAutoPadding(true);
8181        ain2.copyFrom(in2);
8182
8183        result_int result = reduce_my_half4_bool_0(ain1, ain2, null);
8184        result.mTempIns = new Allocation[]{ain1, ain2};
8185        return result;
8186    }
8187
8188    // ain1 = "half4 a"
8189    // ain2 = "bool b"
8190    public result_int reduce_my_half4_bool_0(Allocation ain1, Allocation ain2) {
8191        return reduce_my_half4_bool_0(ain1, ain2, null);
8192    }
8193
8194    // ain1 = "half4 a"
8195    // ain2 = "bool b"
8196    public result_int reduce_my_half4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8197        Type t0, t1;
8198        // check ain1
8199        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
8200            throw new RSRuntimeException("Type mismatch with F16_4!");
8201        }
8202        // check ain2
8203        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
8204            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
8205        }
8206        // Verify dimensions
8207        t0 = ain1.getType();
8208        t1 = ain2.getType();
8209        if ((t0.getCount() != t1.getCount()) ||
8210            (t0.getX() != t1.getX()) ||
8211            (t0.getY() != t1.getY()) ||
8212            (t0.getZ() != t1.getZ()) ||
8213            (t0.hasFaces()   != t1.hasFaces()) ||
8214            (t0.hasMipmaps() != t1.hasMipmaps())) {
8215            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8216        }
8217
8218        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8219        aout.setAutoPadding(true);
8220        reduce(mExportReduceIdx_my_half4_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
8221        return new result_int(aout);
8222    }
8223
8224    private final static int mExportReduceIdx_my_half4_bool_1 = 121;
8225    // in1 = "a", flattened 4-vectors
8226    // in2 = "b"
8227    public result_int reduce_my_half4_bool_1(short[] in1, byte[] in2) {
8228        // Verify that "in1" is non-null.
8229        if (in1 == null) {
8230            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8231        }
8232        // Verify that the array length is a multiple of the vector size.
8233        if (in1.length % 4 != 0) {
8234            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
8235        }
8236        Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4);
8237        ain1.setAutoPadding(true);
8238        ain1.copyFrom(in1);
8239        // Verify that "in2" is non-null.
8240        if (in2 == null) {
8241            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8242        }
8243        // Verify that input array lengths are the same.
8244        if (in1.length / 4 != in2.length) {
8245            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8246        }
8247        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
8248        ain2.setAutoPadding(true);
8249        ain2.copyFrom(in2);
8250
8251        result_int result = reduce_my_half4_bool_1(ain1, ain2, null);
8252        result.mTempIns = new Allocation[]{ain1, ain2};
8253        return result;
8254    }
8255
8256    // ain1 = "half4 a"
8257    // ain2 = "bool b"
8258    public result_int reduce_my_half4_bool_1(Allocation ain1, Allocation ain2) {
8259        return reduce_my_half4_bool_1(ain1, ain2, null);
8260    }
8261
8262    // ain1 = "half4 a"
8263    // ain2 = "bool b"
8264    public result_int reduce_my_half4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8265        Type t0, t1;
8266        // check ain1
8267        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
8268            throw new RSRuntimeException("Type mismatch with F16_4!");
8269        }
8270        // check ain2
8271        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
8272            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
8273        }
8274        // Verify dimensions
8275        t0 = ain1.getType();
8276        t1 = ain2.getType();
8277        if ((t0.getCount() != t1.getCount()) ||
8278            (t0.getX() != t1.getX()) ||
8279            (t0.getY() != t1.getY()) ||
8280            (t0.getZ() != t1.getZ()) ||
8281            (t0.hasFaces()   != t1.hasFaces()) ||
8282            (t0.hasMipmaps() != t1.hasMipmaps())) {
8283            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8284        }
8285
8286        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8287        aout.setAutoPadding(true);
8288        reduce(mExportReduceIdx_my_half4_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
8289        return new result_int(aout);
8290    }
8291
8292    private final static int mExportReduceIdx_my_half4_rs_matrix2x2_0 = 122;
8293    // ain1 = "half4 a"
8294    // ain2 = "rs_matrix2x2 b"
8295    public result_int reduce_my_half4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
8296        return reduce_my_half4_rs_matrix2x2_0(ain1, ain2, null);
8297    }
8298
8299    // ain1 = "half4 a"
8300    // ain2 = "rs_matrix2x2 b"
8301    public result_int reduce_my_half4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8302        Type t0, t1;
8303        // check ain1
8304        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
8305            throw new RSRuntimeException("Type mismatch with F16_4!");
8306        }
8307        // check ain2
8308        // Verify dimensions
8309        t0 = ain1.getType();
8310        t1 = ain2.getType();
8311        if ((t0.getCount() != t1.getCount()) ||
8312            (t0.getX() != t1.getX()) ||
8313            (t0.getY() != t1.getY()) ||
8314            (t0.getZ() != t1.getZ()) ||
8315            (t0.hasFaces()   != t1.hasFaces()) ||
8316            (t0.hasMipmaps() != t1.hasMipmaps())) {
8317            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8318        }
8319
8320        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8321        aout.setAutoPadding(true);
8322        reduce(mExportReduceIdx_my_half4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
8323        return new result_int(aout);
8324    }
8325
8326    private final static int mExportReduceIdx_my_half4_rs_matrix2x2_1 = 123;
8327    // ain1 = "half4 a"
8328    // ain2 = "rs_matrix2x2 b"
8329    public result_int reduce_my_half4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
8330        return reduce_my_half4_rs_matrix2x2_1(ain1, ain2, null);
8331    }
8332
8333    // ain1 = "half4 a"
8334    // ain2 = "rs_matrix2x2 b"
8335    public result_int reduce_my_half4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8336        Type t0, t1;
8337        // check ain1
8338        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
8339            throw new RSRuntimeException("Type mismatch with F16_4!");
8340        }
8341        // check ain2
8342        // Verify dimensions
8343        t0 = ain1.getType();
8344        t1 = ain2.getType();
8345        if ((t0.getCount() != t1.getCount()) ||
8346            (t0.getX() != t1.getX()) ||
8347            (t0.getY() != t1.getY()) ||
8348            (t0.getZ() != t1.getZ()) ||
8349            (t0.hasFaces()   != t1.hasFaces()) ||
8350            (t0.hasMipmaps() != t1.hasMipmaps())) {
8351            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8352        }
8353
8354        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8355        aout.setAutoPadding(true);
8356        reduce(mExportReduceIdx_my_half4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
8357        return new result_int(aout);
8358    }
8359
8360    private final static int mExportReduceIdx_my_half4_MyStruct_0 = 124;
8361    // ain1 = "half4 a"
8362    // ain2 = "/* struct <> */ b"
8363    public result_int reduce_my_half4_MyStruct_0(Allocation ain1, Allocation ain2) {
8364        return reduce_my_half4_MyStruct_0(ain1, ain2, null);
8365    }
8366
8367    // ain1 = "half4 a"
8368    // ain2 = "/* struct <> */ b"
8369    public result_int reduce_my_half4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8370        Type t0, t1;
8371        // check ain1
8372        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
8373            throw new RSRuntimeException("Type mismatch with F16_4!");
8374        }
8375        // check ain2
8376        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
8377            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
8378        }
8379        // Verify dimensions
8380        t0 = ain1.getType();
8381        t1 = ain2.getType();
8382        if ((t0.getCount() != t1.getCount()) ||
8383            (t0.getX() != t1.getX()) ||
8384            (t0.getY() != t1.getY()) ||
8385            (t0.getZ() != t1.getZ()) ||
8386            (t0.hasFaces()   != t1.hasFaces()) ||
8387            (t0.hasMipmaps() != t1.hasMipmaps())) {
8388            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8389        }
8390
8391        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8392        aout.setAutoPadding(true);
8393        reduce(mExportReduceIdx_my_half4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
8394        return new result_int(aout);
8395    }
8396
8397    private final static int mExportReduceIdx_my_half4_MyStruct_1 = 125;
8398    // ain1 = "half4 a"
8399    // ain2 = "/* struct <> */ b"
8400    public result_int reduce_my_half4_MyStruct_1(Allocation ain1, Allocation ain2) {
8401        return reduce_my_half4_MyStruct_1(ain1, ain2, null);
8402    }
8403
8404    // ain1 = "half4 a"
8405    // ain2 = "/* struct <> */ b"
8406    public result_int reduce_my_half4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8407        Type t0, t1;
8408        // check ain1
8409        if (!ain1.getType().getElement().isCompatible(__F16_4)) {
8410            throw new RSRuntimeException("Type mismatch with F16_4!");
8411        }
8412        // check ain2
8413        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
8414            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
8415        }
8416        // Verify dimensions
8417        t0 = ain1.getType();
8418        t1 = ain2.getType();
8419        if ((t0.getCount() != t1.getCount()) ||
8420            (t0.getX() != t1.getX()) ||
8421            (t0.getY() != t1.getY()) ||
8422            (t0.getZ() != t1.getZ()) ||
8423            (t0.hasFaces()   != t1.hasFaces()) ||
8424            (t0.hasMipmaps() != t1.hasMipmaps())) {
8425            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8426        }
8427
8428        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8429        aout.setAutoPadding(true);
8430        reduce(mExportReduceIdx_my_half4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
8431        return new result_int(aout);
8432    }
8433
8434    private final static int mExportReduceIdx_my_float_half_0 = 126;
8435    // in1 = "a"
8436    // in2 = "b"
8437    public result_int reduce_my_float_half_0(float[] in1, short[] in2) {
8438        // Verify that "in1" is non-null.
8439        if (in1 == null) {
8440            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8441        }
8442        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8443        ain1.setAutoPadding(true);
8444        ain1.copyFrom(in1);
8445        // Verify that "in2" is non-null.
8446        if (in2 == null) {
8447            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8448        }
8449        // Verify that input array lengths are the same.
8450        if (in1.length != in2.length) {
8451            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8452        }
8453        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
8454        ain2.setAutoPadding(true);
8455        ain2.copyFrom(in2);
8456
8457        result_int result = reduce_my_float_half_0(ain1, ain2, null);
8458        result.mTempIns = new Allocation[]{ain1, ain2};
8459        return result;
8460    }
8461
8462    // ain1 = "float a"
8463    // ain2 = "half b"
8464    public result_int reduce_my_float_half_0(Allocation ain1, Allocation ain2) {
8465        return reduce_my_float_half_0(ain1, ain2, null);
8466    }
8467
8468    // ain1 = "float a"
8469    // ain2 = "half b"
8470    public result_int reduce_my_float_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8471        Type t0, t1;
8472        // check ain1
8473        if (!ain1.getType().getElement().isCompatible(__F32)) {
8474            throw new RSRuntimeException("Type mismatch with F32!");
8475        }
8476        // check ain2
8477        if (!ain2.getType().getElement().isCompatible(__F16)) {
8478            throw new RSRuntimeException("Type mismatch with F16!");
8479        }
8480        // Verify dimensions
8481        t0 = ain1.getType();
8482        t1 = ain2.getType();
8483        if ((t0.getCount() != t1.getCount()) ||
8484            (t0.getX() != t1.getX()) ||
8485            (t0.getY() != t1.getY()) ||
8486            (t0.getZ() != t1.getZ()) ||
8487            (t0.hasFaces()   != t1.hasFaces()) ||
8488            (t0.hasMipmaps() != t1.hasMipmaps())) {
8489            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8490        }
8491
8492        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8493        aout.setAutoPadding(true);
8494        reduce(mExportReduceIdx_my_float_half_0, new Allocation[]{ain1, ain2}, aout, sc);
8495        return new result_int(aout);
8496    }
8497
8498    private final static int mExportReduceIdx_my_float_half_1 = 127;
8499    // in1 = "a"
8500    // in2 = "b"
8501    public result_int reduce_my_float_half_1(float[] in1, short[] in2) {
8502        // Verify that "in1" is non-null.
8503        if (in1 == null) {
8504            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8505        }
8506        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8507        ain1.setAutoPadding(true);
8508        ain1.copyFrom(in1);
8509        // Verify that "in2" is non-null.
8510        if (in2 == null) {
8511            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8512        }
8513        // Verify that input array lengths are the same.
8514        if (in1.length != in2.length) {
8515            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8516        }
8517        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
8518        ain2.setAutoPadding(true);
8519        ain2.copyFrom(in2);
8520
8521        result_int result = reduce_my_float_half_1(ain1, ain2, null);
8522        result.mTempIns = new Allocation[]{ain1, ain2};
8523        return result;
8524    }
8525
8526    // ain1 = "float a"
8527    // ain2 = "half b"
8528    public result_int reduce_my_float_half_1(Allocation ain1, Allocation ain2) {
8529        return reduce_my_float_half_1(ain1, ain2, null);
8530    }
8531
8532    // ain1 = "float a"
8533    // ain2 = "half b"
8534    public result_int reduce_my_float_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8535        Type t0, t1;
8536        // check ain1
8537        if (!ain1.getType().getElement().isCompatible(__F32)) {
8538            throw new RSRuntimeException("Type mismatch with F32!");
8539        }
8540        // check ain2
8541        if (!ain2.getType().getElement().isCompatible(__F16)) {
8542            throw new RSRuntimeException("Type mismatch with F16!");
8543        }
8544        // Verify dimensions
8545        t0 = ain1.getType();
8546        t1 = ain2.getType();
8547        if ((t0.getCount() != t1.getCount()) ||
8548            (t0.getX() != t1.getX()) ||
8549            (t0.getY() != t1.getY()) ||
8550            (t0.getZ() != t1.getZ()) ||
8551            (t0.hasFaces()   != t1.hasFaces()) ||
8552            (t0.hasMipmaps() != t1.hasMipmaps())) {
8553            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8554        }
8555
8556        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8557        aout.setAutoPadding(true);
8558        reduce(mExportReduceIdx_my_float_half_1, new Allocation[]{ain1, ain2}, aout, sc);
8559        return new result_int(aout);
8560    }
8561
8562    private final static int mExportReduceIdx_my_float_half2_0 = 128;
8563    // in1 = "a"
8564    // in2 = "b", flattened 2-vectors
8565    public result_int reduce_my_float_half2_0(float[] in1, short[] in2) {
8566        // Verify that "in1" is non-null.
8567        if (in1 == null) {
8568            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8569        }
8570        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8571        ain1.setAutoPadding(true);
8572        ain1.copyFrom(in1);
8573        // Verify that "in2" is non-null.
8574        if (in2 == null) {
8575            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8576        }
8577        // Verify that the array length is a multiple of the vector size.
8578        if (in2.length % 2 != 0) {
8579            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
8580        }
8581        // Verify that input array lengths are the same.
8582        if (in1.length != in2.length / 2) {
8583            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8584        }
8585        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
8586        ain2.setAutoPadding(true);
8587        ain2.copyFrom(in2);
8588
8589        result_int result = reduce_my_float_half2_0(ain1, ain2, null);
8590        result.mTempIns = new Allocation[]{ain1, ain2};
8591        return result;
8592    }
8593
8594    // ain1 = "float a"
8595    // ain2 = "half2 b"
8596    public result_int reduce_my_float_half2_0(Allocation ain1, Allocation ain2) {
8597        return reduce_my_float_half2_0(ain1, ain2, null);
8598    }
8599
8600    // ain1 = "float a"
8601    // ain2 = "half2 b"
8602    public result_int reduce_my_float_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8603        Type t0, t1;
8604        // check ain1
8605        if (!ain1.getType().getElement().isCompatible(__F32)) {
8606            throw new RSRuntimeException("Type mismatch with F32!");
8607        }
8608        // check ain2
8609        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
8610            throw new RSRuntimeException("Type mismatch with F16_2!");
8611        }
8612        // Verify dimensions
8613        t0 = ain1.getType();
8614        t1 = ain2.getType();
8615        if ((t0.getCount() != t1.getCount()) ||
8616            (t0.getX() != t1.getX()) ||
8617            (t0.getY() != t1.getY()) ||
8618            (t0.getZ() != t1.getZ()) ||
8619            (t0.hasFaces()   != t1.hasFaces()) ||
8620            (t0.hasMipmaps() != t1.hasMipmaps())) {
8621            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8622        }
8623
8624        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8625        aout.setAutoPadding(true);
8626        reduce(mExportReduceIdx_my_float_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
8627        return new result_int(aout);
8628    }
8629
8630    private final static int mExportReduceIdx_my_float_half2_1 = 129;
8631    // in1 = "a"
8632    // in2 = "b", flattened 2-vectors
8633    public result_int reduce_my_float_half2_1(float[] in1, short[] in2) {
8634        // Verify that "in1" is non-null.
8635        if (in1 == null) {
8636            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8637        }
8638        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8639        ain1.setAutoPadding(true);
8640        ain1.copyFrom(in1);
8641        // Verify that "in2" is non-null.
8642        if (in2 == null) {
8643            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8644        }
8645        // Verify that the array length is a multiple of the vector size.
8646        if (in2.length % 2 != 0) {
8647            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
8648        }
8649        // Verify that input array lengths are the same.
8650        if (in1.length != in2.length / 2) {
8651            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8652        }
8653        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
8654        ain2.setAutoPadding(true);
8655        ain2.copyFrom(in2);
8656
8657        result_int result = reduce_my_float_half2_1(ain1, ain2, null);
8658        result.mTempIns = new Allocation[]{ain1, ain2};
8659        return result;
8660    }
8661
8662    // ain1 = "float a"
8663    // ain2 = "half2 b"
8664    public result_int reduce_my_float_half2_1(Allocation ain1, Allocation ain2) {
8665        return reduce_my_float_half2_1(ain1, ain2, null);
8666    }
8667
8668    // ain1 = "float a"
8669    // ain2 = "half2 b"
8670    public result_int reduce_my_float_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8671        Type t0, t1;
8672        // check ain1
8673        if (!ain1.getType().getElement().isCompatible(__F32)) {
8674            throw new RSRuntimeException("Type mismatch with F32!");
8675        }
8676        // check ain2
8677        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
8678            throw new RSRuntimeException("Type mismatch with F16_2!");
8679        }
8680        // Verify dimensions
8681        t0 = ain1.getType();
8682        t1 = ain2.getType();
8683        if ((t0.getCount() != t1.getCount()) ||
8684            (t0.getX() != t1.getX()) ||
8685            (t0.getY() != t1.getY()) ||
8686            (t0.getZ() != t1.getZ()) ||
8687            (t0.hasFaces()   != t1.hasFaces()) ||
8688            (t0.hasMipmaps() != t1.hasMipmaps())) {
8689            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8690        }
8691
8692        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8693        aout.setAutoPadding(true);
8694        reduce(mExportReduceIdx_my_float_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
8695        return new result_int(aout);
8696    }
8697
8698    private final static int mExportReduceIdx_my_float_half4_0 = 130;
8699    // in1 = "a"
8700    // in2 = "b", flattened 4-vectors
8701    public result_int reduce_my_float_half4_0(float[] in1, short[] in2) {
8702        // Verify that "in1" is non-null.
8703        if (in1 == null) {
8704            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8705        }
8706        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8707        ain1.setAutoPadding(true);
8708        ain1.copyFrom(in1);
8709        // Verify that "in2" is non-null.
8710        if (in2 == null) {
8711            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8712        }
8713        // Verify that the array length is a multiple of the vector size.
8714        if (in2.length % 4 != 0) {
8715            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
8716        }
8717        // Verify that input array lengths are the same.
8718        if (in1.length != in2.length / 4) {
8719            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8720        }
8721        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
8722        ain2.setAutoPadding(true);
8723        ain2.copyFrom(in2);
8724
8725        result_int result = reduce_my_float_half4_0(ain1, ain2, null);
8726        result.mTempIns = new Allocation[]{ain1, ain2};
8727        return result;
8728    }
8729
8730    // ain1 = "float a"
8731    // ain2 = "half4 b"
8732    public result_int reduce_my_float_half4_0(Allocation ain1, Allocation ain2) {
8733        return reduce_my_float_half4_0(ain1, ain2, null);
8734    }
8735
8736    // ain1 = "float a"
8737    // ain2 = "half4 b"
8738    public result_int reduce_my_float_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8739        Type t0, t1;
8740        // check ain1
8741        if (!ain1.getType().getElement().isCompatible(__F32)) {
8742            throw new RSRuntimeException("Type mismatch with F32!");
8743        }
8744        // check ain2
8745        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
8746            throw new RSRuntimeException("Type mismatch with F16_4!");
8747        }
8748        // Verify dimensions
8749        t0 = ain1.getType();
8750        t1 = ain2.getType();
8751        if ((t0.getCount() != t1.getCount()) ||
8752            (t0.getX() != t1.getX()) ||
8753            (t0.getY() != t1.getY()) ||
8754            (t0.getZ() != t1.getZ()) ||
8755            (t0.hasFaces()   != t1.hasFaces()) ||
8756            (t0.hasMipmaps() != t1.hasMipmaps())) {
8757            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8758        }
8759
8760        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8761        aout.setAutoPadding(true);
8762        reduce(mExportReduceIdx_my_float_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
8763        return new result_int(aout);
8764    }
8765
8766    private final static int mExportReduceIdx_my_float_half4_1 = 131;
8767    // in1 = "a"
8768    // in2 = "b", flattened 4-vectors
8769    public result_int reduce_my_float_half4_1(float[] in1, short[] in2) {
8770        // Verify that "in1" is non-null.
8771        if (in1 == null) {
8772            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8773        }
8774        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8775        ain1.setAutoPadding(true);
8776        ain1.copyFrom(in1);
8777        // Verify that "in2" is non-null.
8778        if (in2 == null) {
8779            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8780        }
8781        // Verify that the array length is a multiple of the vector size.
8782        if (in2.length % 4 != 0) {
8783            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
8784        }
8785        // Verify that input array lengths are the same.
8786        if (in1.length != in2.length / 4) {
8787            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8788        }
8789        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
8790        ain2.setAutoPadding(true);
8791        ain2.copyFrom(in2);
8792
8793        result_int result = reduce_my_float_half4_1(ain1, ain2, null);
8794        result.mTempIns = new Allocation[]{ain1, ain2};
8795        return result;
8796    }
8797
8798    // ain1 = "float a"
8799    // ain2 = "half4 b"
8800    public result_int reduce_my_float_half4_1(Allocation ain1, Allocation ain2) {
8801        return reduce_my_float_half4_1(ain1, ain2, null);
8802    }
8803
8804    // ain1 = "float a"
8805    // ain2 = "half4 b"
8806    public result_int reduce_my_float_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8807        Type t0, t1;
8808        // check ain1
8809        if (!ain1.getType().getElement().isCompatible(__F32)) {
8810            throw new RSRuntimeException("Type mismatch with F32!");
8811        }
8812        // check ain2
8813        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
8814            throw new RSRuntimeException("Type mismatch with F16_4!");
8815        }
8816        // Verify dimensions
8817        t0 = ain1.getType();
8818        t1 = ain2.getType();
8819        if ((t0.getCount() != t1.getCount()) ||
8820            (t0.getX() != t1.getX()) ||
8821            (t0.getY() != t1.getY()) ||
8822            (t0.getZ() != t1.getZ()) ||
8823            (t0.hasFaces()   != t1.hasFaces()) ||
8824            (t0.hasMipmaps() != t1.hasMipmaps())) {
8825            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8826        }
8827
8828        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8829        aout.setAutoPadding(true);
8830        reduce(mExportReduceIdx_my_float_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
8831        return new result_int(aout);
8832    }
8833
8834    private final static int mExportReduceIdx_my_float_float_0 = 132;
8835    // in1 = "a"
8836    // in2 = "b"
8837    public result_int reduce_my_float_float_0(float[] in1, float[] in2) {
8838        // Verify that "in1" is non-null.
8839        if (in1 == null) {
8840            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8841        }
8842        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8843        ain1.setAutoPadding(true);
8844        ain1.copyFrom(in1);
8845        // Verify that "in2" is non-null.
8846        if (in2 == null) {
8847            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8848        }
8849        // Verify that input array lengths are the same.
8850        if (in1.length != in2.length) {
8851            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8852        }
8853        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
8854        ain2.setAutoPadding(true);
8855        ain2.copyFrom(in2);
8856
8857        result_int result = reduce_my_float_float_0(ain1, ain2, null);
8858        result.mTempIns = new Allocation[]{ain1, ain2};
8859        return result;
8860    }
8861
8862    // ain1 = "float a"
8863    // ain2 = "float b"
8864    public result_int reduce_my_float_float_0(Allocation ain1, Allocation ain2) {
8865        return reduce_my_float_float_0(ain1, ain2, null);
8866    }
8867
8868    // ain1 = "float a"
8869    // ain2 = "float b"
8870    public result_int reduce_my_float_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8871        Type t0, t1;
8872        // check ain1
8873        if (!ain1.getType().getElement().isCompatible(__F32)) {
8874            throw new RSRuntimeException("Type mismatch with F32!");
8875        }
8876        // check ain2
8877        if (!ain2.getType().getElement().isCompatible(__F32)) {
8878            throw new RSRuntimeException("Type mismatch with F32!");
8879        }
8880        // Verify dimensions
8881        t0 = ain1.getType();
8882        t1 = ain2.getType();
8883        if ((t0.getCount() != t1.getCount()) ||
8884            (t0.getX() != t1.getX()) ||
8885            (t0.getY() != t1.getY()) ||
8886            (t0.getZ() != t1.getZ()) ||
8887            (t0.hasFaces()   != t1.hasFaces()) ||
8888            (t0.hasMipmaps() != t1.hasMipmaps())) {
8889            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8890        }
8891
8892        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8893        aout.setAutoPadding(true);
8894        reduce(mExportReduceIdx_my_float_float_0, new Allocation[]{ain1, ain2}, aout, sc);
8895        return new result_int(aout);
8896    }
8897
8898    private final static int mExportReduceIdx_my_float_float_1 = 133;
8899    // in1 = "a"
8900    // in2 = "b"
8901    public result_int reduce_my_float_float_1(float[] in1, float[] in2) {
8902        // Verify that "in1" is non-null.
8903        if (in1 == null) {
8904            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8905        }
8906        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8907        ain1.setAutoPadding(true);
8908        ain1.copyFrom(in1);
8909        // Verify that "in2" is non-null.
8910        if (in2 == null) {
8911            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8912        }
8913        // Verify that input array lengths are the same.
8914        if (in1.length != in2.length) {
8915            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8916        }
8917        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
8918        ain2.setAutoPadding(true);
8919        ain2.copyFrom(in2);
8920
8921        result_int result = reduce_my_float_float_1(ain1, ain2, null);
8922        result.mTempIns = new Allocation[]{ain1, ain2};
8923        return result;
8924    }
8925
8926    // ain1 = "float a"
8927    // ain2 = "float b"
8928    public result_int reduce_my_float_float_1(Allocation ain1, Allocation ain2) {
8929        return reduce_my_float_float_1(ain1, ain2, null);
8930    }
8931
8932    // ain1 = "float a"
8933    // ain2 = "float b"
8934    public result_int reduce_my_float_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
8935        Type t0, t1;
8936        // check ain1
8937        if (!ain1.getType().getElement().isCompatible(__F32)) {
8938            throw new RSRuntimeException("Type mismatch with F32!");
8939        }
8940        // check ain2
8941        if (!ain2.getType().getElement().isCompatible(__F32)) {
8942            throw new RSRuntimeException("Type mismatch with F32!");
8943        }
8944        // Verify dimensions
8945        t0 = ain1.getType();
8946        t1 = ain2.getType();
8947        if ((t0.getCount() != t1.getCount()) ||
8948            (t0.getX() != t1.getX()) ||
8949            (t0.getY() != t1.getY()) ||
8950            (t0.getZ() != t1.getZ()) ||
8951            (t0.hasFaces()   != t1.hasFaces()) ||
8952            (t0.hasMipmaps() != t1.hasMipmaps())) {
8953            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
8954        }
8955
8956        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
8957        aout.setAutoPadding(true);
8958        reduce(mExportReduceIdx_my_float_float_1, new Allocation[]{ain1, ain2}, aout, sc);
8959        return new result_int(aout);
8960    }
8961
8962    private final static int mExportReduceIdx_my_float_float2_0 = 134;
8963    // in1 = "a"
8964    // in2 = "b", flattened 2-vectors
8965    public result_int reduce_my_float_float2_0(float[] in1, float[] in2) {
8966        // Verify that "in1" is non-null.
8967        if (in1 == null) {
8968            throw new RSIllegalArgumentException("Array \"in1\" is null!");
8969        }
8970        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
8971        ain1.setAutoPadding(true);
8972        ain1.copyFrom(in1);
8973        // Verify that "in2" is non-null.
8974        if (in2 == null) {
8975            throw new RSIllegalArgumentException("Array \"in2\" is null!");
8976        }
8977        // Verify that the array length is a multiple of the vector size.
8978        if (in2.length % 2 != 0) {
8979            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
8980        }
8981        // Verify that input array lengths are the same.
8982        if (in1.length != in2.length / 2) {
8983            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
8984        }
8985        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
8986        ain2.setAutoPadding(true);
8987        ain2.copyFrom(in2);
8988
8989        result_int result = reduce_my_float_float2_0(ain1, ain2, null);
8990        result.mTempIns = new Allocation[]{ain1, ain2};
8991        return result;
8992    }
8993
8994    // ain1 = "float a"
8995    // ain2 = "float2 b"
8996    public result_int reduce_my_float_float2_0(Allocation ain1, Allocation ain2) {
8997        return reduce_my_float_float2_0(ain1, ain2, null);
8998    }
8999
9000    // ain1 = "float a"
9001    // ain2 = "float2 b"
9002    public result_int reduce_my_float_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9003        Type t0, t1;
9004        // check ain1
9005        if (!ain1.getType().getElement().isCompatible(__F32)) {
9006            throw new RSRuntimeException("Type mismatch with F32!");
9007        }
9008        // check ain2
9009        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
9010            throw new RSRuntimeException("Type mismatch with F32_2!");
9011        }
9012        // Verify dimensions
9013        t0 = ain1.getType();
9014        t1 = ain2.getType();
9015        if ((t0.getCount() != t1.getCount()) ||
9016            (t0.getX() != t1.getX()) ||
9017            (t0.getY() != t1.getY()) ||
9018            (t0.getZ() != t1.getZ()) ||
9019            (t0.hasFaces()   != t1.hasFaces()) ||
9020            (t0.hasMipmaps() != t1.hasMipmaps())) {
9021            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9022        }
9023
9024        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9025        aout.setAutoPadding(true);
9026        reduce(mExportReduceIdx_my_float_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
9027        return new result_int(aout);
9028    }
9029
9030    private final static int mExportReduceIdx_my_float_float2_1 = 135;
9031    // in1 = "a"
9032    // in2 = "b", flattened 2-vectors
9033    public result_int reduce_my_float_float2_1(float[] in1, float[] in2) {
9034        // Verify that "in1" is non-null.
9035        if (in1 == null) {
9036            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9037        }
9038        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9039        ain1.setAutoPadding(true);
9040        ain1.copyFrom(in1);
9041        // Verify that "in2" is non-null.
9042        if (in2 == null) {
9043            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9044        }
9045        // Verify that the array length is a multiple of the vector size.
9046        if (in2.length % 2 != 0) {
9047            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
9048        }
9049        // Verify that input array lengths are the same.
9050        if (in1.length != in2.length / 2) {
9051            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9052        }
9053        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
9054        ain2.setAutoPadding(true);
9055        ain2.copyFrom(in2);
9056
9057        result_int result = reduce_my_float_float2_1(ain1, ain2, null);
9058        result.mTempIns = new Allocation[]{ain1, ain2};
9059        return result;
9060    }
9061
9062    // ain1 = "float a"
9063    // ain2 = "float2 b"
9064    public result_int reduce_my_float_float2_1(Allocation ain1, Allocation ain2) {
9065        return reduce_my_float_float2_1(ain1, ain2, null);
9066    }
9067
9068    // ain1 = "float a"
9069    // ain2 = "float2 b"
9070    public result_int reduce_my_float_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9071        Type t0, t1;
9072        // check ain1
9073        if (!ain1.getType().getElement().isCompatible(__F32)) {
9074            throw new RSRuntimeException("Type mismatch with F32!");
9075        }
9076        // check ain2
9077        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
9078            throw new RSRuntimeException("Type mismatch with F32_2!");
9079        }
9080        // Verify dimensions
9081        t0 = ain1.getType();
9082        t1 = ain2.getType();
9083        if ((t0.getCount() != t1.getCount()) ||
9084            (t0.getX() != t1.getX()) ||
9085            (t0.getY() != t1.getY()) ||
9086            (t0.getZ() != t1.getZ()) ||
9087            (t0.hasFaces()   != t1.hasFaces()) ||
9088            (t0.hasMipmaps() != t1.hasMipmaps())) {
9089            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9090        }
9091
9092        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9093        aout.setAutoPadding(true);
9094        reduce(mExportReduceIdx_my_float_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
9095        return new result_int(aout);
9096    }
9097
9098    private final static int mExportReduceIdx_my_float_float4_0 = 136;
9099    // in1 = "a"
9100    // in2 = "b", flattened 4-vectors
9101    public result_int reduce_my_float_float4_0(float[] in1, float[] in2) {
9102        // Verify that "in1" is non-null.
9103        if (in1 == null) {
9104            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9105        }
9106        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9107        ain1.setAutoPadding(true);
9108        ain1.copyFrom(in1);
9109        // Verify that "in2" is non-null.
9110        if (in2 == null) {
9111            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9112        }
9113        // Verify that the array length is a multiple of the vector size.
9114        if (in2.length % 4 != 0) {
9115            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
9116        }
9117        // Verify that input array lengths are the same.
9118        if (in1.length != in2.length / 4) {
9119            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9120        }
9121        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
9122        ain2.setAutoPadding(true);
9123        ain2.copyFrom(in2);
9124
9125        result_int result = reduce_my_float_float4_0(ain1, ain2, null);
9126        result.mTempIns = new Allocation[]{ain1, ain2};
9127        return result;
9128    }
9129
9130    // ain1 = "float a"
9131    // ain2 = "float4 b"
9132    public result_int reduce_my_float_float4_0(Allocation ain1, Allocation ain2) {
9133        return reduce_my_float_float4_0(ain1, ain2, null);
9134    }
9135
9136    // ain1 = "float a"
9137    // ain2 = "float4 b"
9138    public result_int reduce_my_float_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9139        Type t0, t1;
9140        // check ain1
9141        if (!ain1.getType().getElement().isCompatible(__F32)) {
9142            throw new RSRuntimeException("Type mismatch with F32!");
9143        }
9144        // check ain2
9145        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
9146            throw new RSRuntimeException("Type mismatch with F32_4!");
9147        }
9148        // Verify dimensions
9149        t0 = ain1.getType();
9150        t1 = ain2.getType();
9151        if ((t0.getCount() != t1.getCount()) ||
9152            (t0.getX() != t1.getX()) ||
9153            (t0.getY() != t1.getY()) ||
9154            (t0.getZ() != t1.getZ()) ||
9155            (t0.hasFaces()   != t1.hasFaces()) ||
9156            (t0.hasMipmaps() != t1.hasMipmaps())) {
9157            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9158        }
9159
9160        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9161        aout.setAutoPadding(true);
9162        reduce(mExportReduceIdx_my_float_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
9163        return new result_int(aout);
9164    }
9165
9166    private final static int mExportReduceIdx_my_float_float4_1 = 137;
9167    // in1 = "a"
9168    // in2 = "b", flattened 4-vectors
9169    public result_int reduce_my_float_float4_1(float[] in1, float[] in2) {
9170        // Verify that "in1" is non-null.
9171        if (in1 == null) {
9172            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9173        }
9174        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9175        ain1.setAutoPadding(true);
9176        ain1.copyFrom(in1);
9177        // Verify that "in2" is non-null.
9178        if (in2 == null) {
9179            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9180        }
9181        // Verify that the array length is a multiple of the vector size.
9182        if (in2.length % 4 != 0) {
9183            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
9184        }
9185        // Verify that input array lengths are the same.
9186        if (in1.length != in2.length / 4) {
9187            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9188        }
9189        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
9190        ain2.setAutoPadding(true);
9191        ain2.copyFrom(in2);
9192
9193        result_int result = reduce_my_float_float4_1(ain1, ain2, null);
9194        result.mTempIns = new Allocation[]{ain1, ain2};
9195        return result;
9196    }
9197
9198    // ain1 = "float a"
9199    // ain2 = "float4 b"
9200    public result_int reduce_my_float_float4_1(Allocation ain1, Allocation ain2) {
9201        return reduce_my_float_float4_1(ain1, ain2, null);
9202    }
9203
9204    // ain1 = "float a"
9205    // ain2 = "float4 b"
9206    public result_int reduce_my_float_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9207        Type t0, t1;
9208        // check ain1
9209        if (!ain1.getType().getElement().isCompatible(__F32)) {
9210            throw new RSRuntimeException("Type mismatch with F32!");
9211        }
9212        // check ain2
9213        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
9214            throw new RSRuntimeException("Type mismatch with F32_4!");
9215        }
9216        // Verify dimensions
9217        t0 = ain1.getType();
9218        t1 = ain2.getType();
9219        if ((t0.getCount() != t1.getCount()) ||
9220            (t0.getX() != t1.getX()) ||
9221            (t0.getY() != t1.getY()) ||
9222            (t0.getZ() != t1.getZ()) ||
9223            (t0.hasFaces()   != t1.hasFaces()) ||
9224            (t0.hasMipmaps() != t1.hasMipmaps())) {
9225            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9226        }
9227
9228        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9229        aout.setAutoPadding(true);
9230        reduce(mExportReduceIdx_my_float_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
9231        return new result_int(aout);
9232    }
9233
9234    private final static int mExportReduceIdx_my_float_char_0 = 138;
9235    // in1 = "a"
9236    // in2 = "b"
9237    public result_int reduce_my_float_char_0(float[] in1, byte[] in2) {
9238        // Verify that "in1" is non-null.
9239        if (in1 == null) {
9240            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9241        }
9242        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9243        ain1.setAutoPadding(true);
9244        ain1.copyFrom(in1);
9245        // Verify that "in2" is non-null.
9246        if (in2 == null) {
9247            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9248        }
9249        // Verify that input array lengths are the same.
9250        if (in1.length != in2.length) {
9251            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9252        }
9253        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
9254        ain2.setAutoPadding(true);
9255        ain2.copyFrom(in2);
9256
9257        result_int result = reduce_my_float_char_0(ain1, ain2, null);
9258        result.mTempIns = new Allocation[]{ain1, ain2};
9259        return result;
9260    }
9261
9262    // ain1 = "float a"
9263    // ain2 = "char b"
9264    public result_int reduce_my_float_char_0(Allocation ain1, Allocation ain2) {
9265        return reduce_my_float_char_0(ain1, ain2, null);
9266    }
9267
9268    // ain1 = "float a"
9269    // ain2 = "char b"
9270    public result_int reduce_my_float_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9271        Type t0, t1;
9272        // check ain1
9273        if (!ain1.getType().getElement().isCompatible(__F32)) {
9274            throw new RSRuntimeException("Type mismatch with F32!");
9275        }
9276        // check ain2
9277        if (!ain2.getType().getElement().isCompatible(__I8)) {
9278            throw new RSRuntimeException("Type mismatch with I8!");
9279        }
9280        // Verify dimensions
9281        t0 = ain1.getType();
9282        t1 = ain2.getType();
9283        if ((t0.getCount() != t1.getCount()) ||
9284            (t0.getX() != t1.getX()) ||
9285            (t0.getY() != t1.getY()) ||
9286            (t0.getZ() != t1.getZ()) ||
9287            (t0.hasFaces()   != t1.hasFaces()) ||
9288            (t0.hasMipmaps() != t1.hasMipmaps())) {
9289            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9290        }
9291
9292        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9293        aout.setAutoPadding(true);
9294        reduce(mExportReduceIdx_my_float_char_0, new Allocation[]{ain1, ain2}, aout, sc);
9295        return new result_int(aout);
9296    }
9297
9298    private final static int mExportReduceIdx_my_float_char_1 = 139;
9299    // in1 = "a"
9300    // in2 = "b"
9301    public result_int reduce_my_float_char_1(float[] in1, byte[] in2) {
9302        // Verify that "in1" is non-null.
9303        if (in1 == null) {
9304            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9305        }
9306        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9307        ain1.setAutoPadding(true);
9308        ain1.copyFrom(in1);
9309        // Verify that "in2" is non-null.
9310        if (in2 == null) {
9311            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9312        }
9313        // Verify that input array lengths are the same.
9314        if (in1.length != in2.length) {
9315            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9316        }
9317        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
9318        ain2.setAutoPadding(true);
9319        ain2.copyFrom(in2);
9320
9321        result_int result = reduce_my_float_char_1(ain1, ain2, null);
9322        result.mTempIns = new Allocation[]{ain1, ain2};
9323        return result;
9324    }
9325
9326    // ain1 = "float a"
9327    // ain2 = "char b"
9328    public result_int reduce_my_float_char_1(Allocation ain1, Allocation ain2) {
9329        return reduce_my_float_char_1(ain1, ain2, null);
9330    }
9331
9332    // ain1 = "float a"
9333    // ain2 = "char b"
9334    public result_int reduce_my_float_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9335        Type t0, t1;
9336        // check ain1
9337        if (!ain1.getType().getElement().isCompatible(__F32)) {
9338            throw new RSRuntimeException("Type mismatch with F32!");
9339        }
9340        // check ain2
9341        if (!ain2.getType().getElement().isCompatible(__I8)) {
9342            throw new RSRuntimeException("Type mismatch with I8!");
9343        }
9344        // Verify dimensions
9345        t0 = ain1.getType();
9346        t1 = ain2.getType();
9347        if ((t0.getCount() != t1.getCount()) ||
9348            (t0.getX() != t1.getX()) ||
9349            (t0.getY() != t1.getY()) ||
9350            (t0.getZ() != t1.getZ()) ||
9351            (t0.hasFaces()   != t1.hasFaces()) ||
9352            (t0.hasMipmaps() != t1.hasMipmaps())) {
9353            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9354        }
9355
9356        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9357        aout.setAutoPadding(true);
9358        reduce(mExportReduceIdx_my_float_char_1, new Allocation[]{ain1, ain2}, aout, sc);
9359        return new result_int(aout);
9360    }
9361
9362    private final static int mExportReduceIdx_my_float_char2_0 = 140;
9363    // in1 = "a"
9364    // in2 = "b", flattened 2-vectors
9365    public result_int reduce_my_float_char2_0(float[] in1, byte[] in2) {
9366        // Verify that "in1" is non-null.
9367        if (in1 == null) {
9368            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9369        }
9370        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9371        ain1.setAutoPadding(true);
9372        ain1.copyFrom(in1);
9373        // Verify that "in2" is non-null.
9374        if (in2 == null) {
9375            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9376        }
9377        // Verify that the array length is a multiple of the vector size.
9378        if (in2.length % 2 != 0) {
9379            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
9380        }
9381        // Verify that input array lengths are the same.
9382        if (in1.length != in2.length / 2) {
9383            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9384        }
9385        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
9386        ain2.setAutoPadding(true);
9387        ain2.copyFrom(in2);
9388
9389        result_int result = reduce_my_float_char2_0(ain1, ain2, null);
9390        result.mTempIns = new Allocation[]{ain1, ain2};
9391        return result;
9392    }
9393
9394    // ain1 = "float a"
9395    // ain2 = "char2 b"
9396    public result_int reduce_my_float_char2_0(Allocation ain1, Allocation ain2) {
9397        return reduce_my_float_char2_0(ain1, ain2, null);
9398    }
9399
9400    // ain1 = "float a"
9401    // ain2 = "char2 b"
9402    public result_int reduce_my_float_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9403        Type t0, t1;
9404        // check ain1
9405        if (!ain1.getType().getElement().isCompatible(__F32)) {
9406            throw new RSRuntimeException("Type mismatch with F32!");
9407        }
9408        // check ain2
9409        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
9410            throw new RSRuntimeException("Type mismatch with I8_2!");
9411        }
9412        // Verify dimensions
9413        t0 = ain1.getType();
9414        t1 = ain2.getType();
9415        if ((t0.getCount() != t1.getCount()) ||
9416            (t0.getX() != t1.getX()) ||
9417            (t0.getY() != t1.getY()) ||
9418            (t0.getZ() != t1.getZ()) ||
9419            (t0.hasFaces()   != t1.hasFaces()) ||
9420            (t0.hasMipmaps() != t1.hasMipmaps())) {
9421            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9422        }
9423
9424        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9425        aout.setAutoPadding(true);
9426        reduce(mExportReduceIdx_my_float_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
9427        return new result_int(aout);
9428    }
9429
9430    private final static int mExportReduceIdx_my_float_char2_1 = 141;
9431    // in1 = "a"
9432    // in2 = "b", flattened 2-vectors
9433    public result_int reduce_my_float_char2_1(float[] in1, byte[] in2) {
9434        // Verify that "in1" is non-null.
9435        if (in1 == null) {
9436            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9437        }
9438        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9439        ain1.setAutoPadding(true);
9440        ain1.copyFrom(in1);
9441        // Verify that "in2" is non-null.
9442        if (in2 == null) {
9443            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9444        }
9445        // Verify that the array length is a multiple of the vector size.
9446        if (in2.length % 2 != 0) {
9447            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
9448        }
9449        // Verify that input array lengths are the same.
9450        if (in1.length != in2.length / 2) {
9451            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9452        }
9453        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
9454        ain2.setAutoPadding(true);
9455        ain2.copyFrom(in2);
9456
9457        result_int result = reduce_my_float_char2_1(ain1, ain2, null);
9458        result.mTempIns = new Allocation[]{ain1, ain2};
9459        return result;
9460    }
9461
9462    // ain1 = "float a"
9463    // ain2 = "char2 b"
9464    public result_int reduce_my_float_char2_1(Allocation ain1, Allocation ain2) {
9465        return reduce_my_float_char2_1(ain1, ain2, null);
9466    }
9467
9468    // ain1 = "float a"
9469    // ain2 = "char2 b"
9470    public result_int reduce_my_float_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9471        Type t0, t1;
9472        // check ain1
9473        if (!ain1.getType().getElement().isCompatible(__F32)) {
9474            throw new RSRuntimeException("Type mismatch with F32!");
9475        }
9476        // check ain2
9477        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
9478            throw new RSRuntimeException("Type mismatch with I8_2!");
9479        }
9480        // Verify dimensions
9481        t0 = ain1.getType();
9482        t1 = ain2.getType();
9483        if ((t0.getCount() != t1.getCount()) ||
9484            (t0.getX() != t1.getX()) ||
9485            (t0.getY() != t1.getY()) ||
9486            (t0.getZ() != t1.getZ()) ||
9487            (t0.hasFaces()   != t1.hasFaces()) ||
9488            (t0.hasMipmaps() != t1.hasMipmaps())) {
9489            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9490        }
9491
9492        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9493        aout.setAutoPadding(true);
9494        reduce(mExportReduceIdx_my_float_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
9495        return new result_int(aout);
9496    }
9497
9498    private final static int mExportReduceIdx_my_float_char4_0 = 142;
9499    // in1 = "a"
9500    // in2 = "b", flattened 4-vectors
9501    public result_int reduce_my_float_char4_0(float[] in1, byte[] in2) {
9502        // Verify that "in1" is non-null.
9503        if (in1 == null) {
9504            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9505        }
9506        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9507        ain1.setAutoPadding(true);
9508        ain1.copyFrom(in1);
9509        // Verify that "in2" is non-null.
9510        if (in2 == null) {
9511            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9512        }
9513        // Verify that the array length is a multiple of the vector size.
9514        if (in2.length % 4 != 0) {
9515            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
9516        }
9517        // Verify that input array lengths are the same.
9518        if (in1.length != in2.length / 4) {
9519            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9520        }
9521        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
9522        ain2.setAutoPadding(true);
9523        ain2.copyFrom(in2);
9524
9525        result_int result = reduce_my_float_char4_0(ain1, ain2, null);
9526        result.mTempIns = new Allocation[]{ain1, ain2};
9527        return result;
9528    }
9529
9530    // ain1 = "float a"
9531    // ain2 = "char4 b"
9532    public result_int reduce_my_float_char4_0(Allocation ain1, Allocation ain2) {
9533        return reduce_my_float_char4_0(ain1, ain2, null);
9534    }
9535
9536    // ain1 = "float a"
9537    // ain2 = "char4 b"
9538    public result_int reduce_my_float_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9539        Type t0, t1;
9540        // check ain1
9541        if (!ain1.getType().getElement().isCompatible(__F32)) {
9542            throw new RSRuntimeException("Type mismatch with F32!");
9543        }
9544        // check ain2
9545        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
9546            throw new RSRuntimeException("Type mismatch with I8_4!");
9547        }
9548        // Verify dimensions
9549        t0 = ain1.getType();
9550        t1 = ain2.getType();
9551        if ((t0.getCount() != t1.getCount()) ||
9552            (t0.getX() != t1.getX()) ||
9553            (t0.getY() != t1.getY()) ||
9554            (t0.getZ() != t1.getZ()) ||
9555            (t0.hasFaces()   != t1.hasFaces()) ||
9556            (t0.hasMipmaps() != t1.hasMipmaps())) {
9557            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9558        }
9559
9560        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9561        aout.setAutoPadding(true);
9562        reduce(mExportReduceIdx_my_float_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
9563        return new result_int(aout);
9564    }
9565
9566    private final static int mExportReduceIdx_my_float_char4_1 = 143;
9567    // in1 = "a"
9568    // in2 = "b", flattened 4-vectors
9569    public result_int reduce_my_float_char4_1(float[] in1, byte[] in2) {
9570        // Verify that "in1" is non-null.
9571        if (in1 == null) {
9572            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9573        }
9574        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9575        ain1.setAutoPadding(true);
9576        ain1.copyFrom(in1);
9577        // Verify that "in2" is non-null.
9578        if (in2 == null) {
9579            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9580        }
9581        // Verify that the array length is a multiple of the vector size.
9582        if (in2.length % 4 != 0) {
9583            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
9584        }
9585        // Verify that input array lengths are the same.
9586        if (in1.length != in2.length / 4) {
9587            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9588        }
9589        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
9590        ain2.setAutoPadding(true);
9591        ain2.copyFrom(in2);
9592
9593        result_int result = reduce_my_float_char4_1(ain1, ain2, null);
9594        result.mTempIns = new Allocation[]{ain1, ain2};
9595        return result;
9596    }
9597
9598    // ain1 = "float a"
9599    // ain2 = "char4 b"
9600    public result_int reduce_my_float_char4_1(Allocation ain1, Allocation ain2) {
9601        return reduce_my_float_char4_1(ain1, ain2, null);
9602    }
9603
9604    // ain1 = "float a"
9605    // ain2 = "char4 b"
9606    public result_int reduce_my_float_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9607        Type t0, t1;
9608        // check ain1
9609        if (!ain1.getType().getElement().isCompatible(__F32)) {
9610            throw new RSRuntimeException("Type mismatch with F32!");
9611        }
9612        // check ain2
9613        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
9614            throw new RSRuntimeException("Type mismatch with I8_4!");
9615        }
9616        // Verify dimensions
9617        t0 = ain1.getType();
9618        t1 = ain2.getType();
9619        if ((t0.getCount() != t1.getCount()) ||
9620            (t0.getX() != t1.getX()) ||
9621            (t0.getY() != t1.getY()) ||
9622            (t0.getZ() != t1.getZ()) ||
9623            (t0.hasFaces()   != t1.hasFaces()) ||
9624            (t0.hasMipmaps() != t1.hasMipmaps())) {
9625            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9626        }
9627
9628        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9629        aout.setAutoPadding(true);
9630        reduce(mExportReduceIdx_my_float_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
9631        return new result_int(aout);
9632    }
9633
9634    private final static int mExportReduceIdx_my_float_short_0 = 144;
9635    // in1 = "a"
9636    // in2 = "b"
9637    public result_int reduce_my_float_short_0(float[] in1, short[] in2) {
9638        // Verify that "in1" is non-null.
9639        if (in1 == null) {
9640            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9641        }
9642        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9643        ain1.setAutoPadding(true);
9644        ain1.copyFrom(in1);
9645        // Verify that "in2" is non-null.
9646        if (in2 == null) {
9647            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9648        }
9649        // Verify that input array lengths are the same.
9650        if (in1.length != in2.length) {
9651            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9652        }
9653        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
9654        ain2.setAutoPadding(true);
9655        ain2.copyFrom(in2);
9656
9657        result_int result = reduce_my_float_short_0(ain1, ain2, null);
9658        result.mTempIns = new Allocation[]{ain1, ain2};
9659        return result;
9660    }
9661
9662    // ain1 = "float a"
9663    // ain2 = "short b"
9664    public result_int reduce_my_float_short_0(Allocation ain1, Allocation ain2) {
9665        return reduce_my_float_short_0(ain1, ain2, null);
9666    }
9667
9668    // ain1 = "float a"
9669    // ain2 = "short b"
9670    public result_int reduce_my_float_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9671        Type t0, t1;
9672        // check ain1
9673        if (!ain1.getType().getElement().isCompatible(__F32)) {
9674            throw new RSRuntimeException("Type mismatch with F32!");
9675        }
9676        // check ain2
9677        if (!ain2.getType().getElement().isCompatible(__I16)) {
9678            throw new RSRuntimeException("Type mismatch with I16!");
9679        }
9680        // Verify dimensions
9681        t0 = ain1.getType();
9682        t1 = ain2.getType();
9683        if ((t0.getCount() != t1.getCount()) ||
9684            (t0.getX() != t1.getX()) ||
9685            (t0.getY() != t1.getY()) ||
9686            (t0.getZ() != t1.getZ()) ||
9687            (t0.hasFaces()   != t1.hasFaces()) ||
9688            (t0.hasMipmaps() != t1.hasMipmaps())) {
9689            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9690        }
9691
9692        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9693        aout.setAutoPadding(true);
9694        reduce(mExportReduceIdx_my_float_short_0, new Allocation[]{ain1, ain2}, aout, sc);
9695        return new result_int(aout);
9696    }
9697
9698    private final static int mExportReduceIdx_my_float_short_1 = 145;
9699    // in1 = "a"
9700    // in2 = "b"
9701    public result_int reduce_my_float_short_1(float[] in1, short[] in2) {
9702        // Verify that "in1" is non-null.
9703        if (in1 == null) {
9704            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9705        }
9706        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9707        ain1.setAutoPadding(true);
9708        ain1.copyFrom(in1);
9709        // Verify that "in2" is non-null.
9710        if (in2 == null) {
9711            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9712        }
9713        // Verify that input array lengths are the same.
9714        if (in1.length != in2.length) {
9715            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9716        }
9717        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
9718        ain2.setAutoPadding(true);
9719        ain2.copyFrom(in2);
9720
9721        result_int result = reduce_my_float_short_1(ain1, ain2, null);
9722        result.mTempIns = new Allocation[]{ain1, ain2};
9723        return result;
9724    }
9725
9726    // ain1 = "float a"
9727    // ain2 = "short b"
9728    public result_int reduce_my_float_short_1(Allocation ain1, Allocation ain2) {
9729        return reduce_my_float_short_1(ain1, ain2, null);
9730    }
9731
9732    // ain1 = "float a"
9733    // ain2 = "short b"
9734    public result_int reduce_my_float_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9735        Type t0, t1;
9736        // check ain1
9737        if (!ain1.getType().getElement().isCompatible(__F32)) {
9738            throw new RSRuntimeException("Type mismatch with F32!");
9739        }
9740        // check ain2
9741        if (!ain2.getType().getElement().isCompatible(__I16)) {
9742            throw new RSRuntimeException("Type mismatch with I16!");
9743        }
9744        // Verify dimensions
9745        t0 = ain1.getType();
9746        t1 = ain2.getType();
9747        if ((t0.getCount() != t1.getCount()) ||
9748            (t0.getX() != t1.getX()) ||
9749            (t0.getY() != t1.getY()) ||
9750            (t0.getZ() != t1.getZ()) ||
9751            (t0.hasFaces()   != t1.hasFaces()) ||
9752            (t0.hasMipmaps() != t1.hasMipmaps())) {
9753            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9754        }
9755
9756        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9757        aout.setAutoPadding(true);
9758        reduce(mExportReduceIdx_my_float_short_1, new Allocation[]{ain1, ain2}, aout, sc);
9759        return new result_int(aout);
9760    }
9761
9762    private final static int mExportReduceIdx_my_float_short2_0 = 146;
9763    // in1 = "a"
9764    // in2 = "b", flattened 2-vectors
9765    public result_int reduce_my_float_short2_0(float[] in1, short[] in2) {
9766        // Verify that "in1" is non-null.
9767        if (in1 == null) {
9768            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9769        }
9770        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9771        ain1.setAutoPadding(true);
9772        ain1.copyFrom(in1);
9773        // Verify that "in2" is non-null.
9774        if (in2 == null) {
9775            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9776        }
9777        // Verify that the array length is a multiple of the vector size.
9778        if (in2.length % 2 != 0) {
9779            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
9780        }
9781        // Verify that input array lengths are the same.
9782        if (in1.length != in2.length / 2) {
9783            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9784        }
9785        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
9786        ain2.setAutoPadding(true);
9787        ain2.copyFrom(in2);
9788
9789        result_int result = reduce_my_float_short2_0(ain1, ain2, null);
9790        result.mTempIns = new Allocation[]{ain1, ain2};
9791        return result;
9792    }
9793
9794    // ain1 = "float a"
9795    // ain2 = "short2 b"
9796    public result_int reduce_my_float_short2_0(Allocation ain1, Allocation ain2) {
9797        return reduce_my_float_short2_0(ain1, ain2, null);
9798    }
9799
9800    // ain1 = "float a"
9801    // ain2 = "short2 b"
9802    public result_int reduce_my_float_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9803        Type t0, t1;
9804        // check ain1
9805        if (!ain1.getType().getElement().isCompatible(__F32)) {
9806            throw new RSRuntimeException("Type mismatch with F32!");
9807        }
9808        // check ain2
9809        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
9810            throw new RSRuntimeException("Type mismatch with I16_2!");
9811        }
9812        // Verify dimensions
9813        t0 = ain1.getType();
9814        t1 = ain2.getType();
9815        if ((t0.getCount() != t1.getCount()) ||
9816            (t0.getX() != t1.getX()) ||
9817            (t0.getY() != t1.getY()) ||
9818            (t0.getZ() != t1.getZ()) ||
9819            (t0.hasFaces()   != t1.hasFaces()) ||
9820            (t0.hasMipmaps() != t1.hasMipmaps())) {
9821            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9822        }
9823
9824        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9825        aout.setAutoPadding(true);
9826        reduce(mExportReduceIdx_my_float_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
9827        return new result_int(aout);
9828    }
9829
9830    private final static int mExportReduceIdx_my_float_short2_1 = 147;
9831    // in1 = "a"
9832    // in2 = "b", flattened 2-vectors
9833    public result_int reduce_my_float_short2_1(float[] in1, short[] in2) {
9834        // Verify that "in1" is non-null.
9835        if (in1 == null) {
9836            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9837        }
9838        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9839        ain1.setAutoPadding(true);
9840        ain1.copyFrom(in1);
9841        // Verify that "in2" is non-null.
9842        if (in2 == null) {
9843            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9844        }
9845        // Verify that the array length is a multiple of the vector size.
9846        if (in2.length % 2 != 0) {
9847            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
9848        }
9849        // Verify that input array lengths are the same.
9850        if (in1.length != in2.length / 2) {
9851            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9852        }
9853        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
9854        ain2.setAutoPadding(true);
9855        ain2.copyFrom(in2);
9856
9857        result_int result = reduce_my_float_short2_1(ain1, ain2, null);
9858        result.mTempIns = new Allocation[]{ain1, ain2};
9859        return result;
9860    }
9861
9862    // ain1 = "float a"
9863    // ain2 = "short2 b"
9864    public result_int reduce_my_float_short2_1(Allocation ain1, Allocation ain2) {
9865        return reduce_my_float_short2_1(ain1, ain2, null);
9866    }
9867
9868    // ain1 = "float a"
9869    // ain2 = "short2 b"
9870    public result_int reduce_my_float_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9871        Type t0, t1;
9872        // check ain1
9873        if (!ain1.getType().getElement().isCompatible(__F32)) {
9874            throw new RSRuntimeException("Type mismatch with F32!");
9875        }
9876        // check ain2
9877        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
9878            throw new RSRuntimeException("Type mismatch with I16_2!");
9879        }
9880        // Verify dimensions
9881        t0 = ain1.getType();
9882        t1 = ain2.getType();
9883        if ((t0.getCount() != t1.getCount()) ||
9884            (t0.getX() != t1.getX()) ||
9885            (t0.getY() != t1.getY()) ||
9886            (t0.getZ() != t1.getZ()) ||
9887            (t0.hasFaces()   != t1.hasFaces()) ||
9888            (t0.hasMipmaps() != t1.hasMipmaps())) {
9889            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9890        }
9891
9892        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9893        aout.setAutoPadding(true);
9894        reduce(mExportReduceIdx_my_float_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
9895        return new result_int(aout);
9896    }
9897
9898    private final static int mExportReduceIdx_my_float_short4_0 = 148;
9899    // in1 = "a"
9900    // in2 = "b", flattened 4-vectors
9901    public result_int reduce_my_float_short4_0(float[] in1, short[] in2) {
9902        // Verify that "in1" is non-null.
9903        if (in1 == null) {
9904            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9905        }
9906        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9907        ain1.setAutoPadding(true);
9908        ain1.copyFrom(in1);
9909        // Verify that "in2" is non-null.
9910        if (in2 == null) {
9911            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9912        }
9913        // Verify that the array length is a multiple of the vector size.
9914        if (in2.length % 4 != 0) {
9915            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
9916        }
9917        // Verify that input array lengths are the same.
9918        if (in1.length != in2.length / 4) {
9919            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9920        }
9921        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
9922        ain2.setAutoPadding(true);
9923        ain2.copyFrom(in2);
9924
9925        result_int result = reduce_my_float_short4_0(ain1, ain2, null);
9926        result.mTempIns = new Allocation[]{ain1, ain2};
9927        return result;
9928    }
9929
9930    // ain1 = "float a"
9931    // ain2 = "short4 b"
9932    public result_int reduce_my_float_short4_0(Allocation ain1, Allocation ain2) {
9933        return reduce_my_float_short4_0(ain1, ain2, null);
9934    }
9935
9936    // ain1 = "float a"
9937    // ain2 = "short4 b"
9938    public result_int reduce_my_float_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
9939        Type t0, t1;
9940        // check ain1
9941        if (!ain1.getType().getElement().isCompatible(__F32)) {
9942            throw new RSRuntimeException("Type mismatch with F32!");
9943        }
9944        // check ain2
9945        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
9946            throw new RSRuntimeException("Type mismatch with I16_4!");
9947        }
9948        // Verify dimensions
9949        t0 = ain1.getType();
9950        t1 = ain2.getType();
9951        if ((t0.getCount() != t1.getCount()) ||
9952            (t0.getX() != t1.getX()) ||
9953            (t0.getY() != t1.getY()) ||
9954            (t0.getZ() != t1.getZ()) ||
9955            (t0.hasFaces()   != t1.hasFaces()) ||
9956            (t0.hasMipmaps() != t1.hasMipmaps())) {
9957            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
9958        }
9959
9960        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
9961        aout.setAutoPadding(true);
9962        reduce(mExportReduceIdx_my_float_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
9963        return new result_int(aout);
9964    }
9965
9966    private final static int mExportReduceIdx_my_float_short4_1 = 149;
9967    // in1 = "a"
9968    // in2 = "b", flattened 4-vectors
9969    public result_int reduce_my_float_short4_1(float[] in1, short[] in2) {
9970        // Verify that "in1" is non-null.
9971        if (in1 == null) {
9972            throw new RSIllegalArgumentException("Array \"in1\" is null!");
9973        }
9974        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
9975        ain1.setAutoPadding(true);
9976        ain1.copyFrom(in1);
9977        // Verify that "in2" is non-null.
9978        if (in2 == null) {
9979            throw new RSIllegalArgumentException("Array \"in2\" is null!");
9980        }
9981        // Verify that the array length is a multiple of the vector size.
9982        if (in2.length % 4 != 0) {
9983            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
9984        }
9985        // Verify that input array lengths are the same.
9986        if (in1.length != in2.length / 4) {
9987            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
9988        }
9989        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
9990        ain2.setAutoPadding(true);
9991        ain2.copyFrom(in2);
9992
9993        result_int result = reduce_my_float_short4_1(ain1, ain2, null);
9994        result.mTempIns = new Allocation[]{ain1, ain2};
9995        return result;
9996    }
9997
9998    // ain1 = "float a"
9999    // ain2 = "short4 b"
10000    public result_int reduce_my_float_short4_1(Allocation ain1, Allocation ain2) {
10001        return reduce_my_float_short4_1(ain1, ain2, null);
10002    }
10003
10004    // ain1 = "float a"
10005    // ain2 = "short4 b"
10006    public result_int reduce_my_float_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10007        Type t0, t1;
10008        // check ain1
10009        if (!ain1.getType().getElement().isCompatible(__F32)) {
10010            throw new RSRuntimeException("Type mismatch with F32!");
10011        }
10012        // check ain2
10013        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
10014            throw new RSRuntimeException("Type mismatch with I16_4!");
10015        }
10016        // Verify dimensions
10017        t0 = ain1.getType();
10018        t1 = ain2.getType();
10019        if ((t0.getCount() != t1.getCount()) ||
10020            (t0.getX() != t1.getX()) ||
10021            (t0.getY() != t1.getY()) ||
10022            (t0.getZ() != t1.getZ()) ||
10023            (t0.hasFaces()   != t1.hasFaces()) ||
10024            (t0.hasMipmaps() != t1.hasMipmaps())) {
10025            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10026        }
10027
10028        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10029        aout.setAutoPadding(true);
10030        reduce(mExportReduceIdx_my_float_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
10031        return new result_int(aout);
10032    }
10033
10034    private final static int mExportReduceIdx_my_float_uchar_0 = 150;
10035    // in1 = "a"
10036    // in2 = "b"
10037    public result_int reduce_my_float_uchar_0(float[] in1, byte[] in2) {
10038        // Verify that "in1" is non-null.
10039        if (in1 == null) {
10040            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10041        }
10042        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10043        ain1.setAutoPadding(true);
10044        ain1.copyFrom(in1);
10045        // Verify that "in2" is non-null.
10046        if (in2 == null) {
10047            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10048        }
10049        // Verify that input array lengths are the same.
10050        if (in1.length != in2.length) {
10051            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10052        }
10053        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
10054        ain2.setAutoPadding(true);
10055        ain2.copyFrom(in2);
10056
10057        result_int result = reduce_my_float_uchar_0(ain1, ain2, null);
10058        result.mTempIns = new Allocation[]{ain1, ain2};
10059        return result;
10060    }
10061
10062    // ain1 = "float a"
10063    // ain2 = "uchar b"
10064    public result_int reduce_my_float_uchar_0(Allocation ain1, Allocation ain2) {
10065        return reduce_my_float_uchar_0(ain1, ain2, null);
10066    }
10067
10068    // ain1 = "float a"
10069    // ain2 = "uchar b"
10070    public result_int reduce_my_float_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10071        Type t0, t1;
10072        // check ain1
10073        if (!ain1.getType().getElement().isCompatible(__F32)) {
10074            throw new RSRuntimeException("Type mismatch with F32!");
10075        }
10076        // check ain2
10077        if (!ain2.getType().getElement().isCompatible(__U8)) {
10078            throw new RSRuntimeException("Type mismatch with U8!");
10079        }
10080        // Verify dimensions
10081        t0 = ain1.getType();
10082        t1 = ain2.getType();
10083        if ((t0.getCount() != t1.getCount()) ||
10084            (t0.getX() != t1.getX()) ||
10085            (t0.getY() != t1.getY()) ||
10086            (t0.getZ() != t1.getZ()) ||
10087            (t0.hasFaces()   != t1.hasFaces()) ||
10088            (t0.hasMipmaps() != t1.hasMipmaps())) {
10089            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10090        }
10091
10092        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10093        aout.setAutoPadding(true);
10094        reduce(mExportReduceIdx_my_float_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
10095        return new result_int(aout);
10096    }
10097
10098    private final static int mExportReduceIdx_my_float_uchar_1 = 151;
10099    // in1 = "a"
10100    // in2 = "b"
10101    public result_int reduce_my_float_uchar_1(float[] in1, byte[] in2) {
10102        // Verify that "in1" is non-null.
10103        if (in1 == null) {
10104            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10105        }
10106        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10107        ain1.setAutoPadding(true);
10108        ain1.copyFrom(in1);
10109        // Verify that "in2" is non-null.
10110        if (in2 == null) {
10111            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10112        }
10113        // Verify that input array lengths are the same.
10114        if (in1.length != in2.length) {
10115            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10116        }
10117        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
10118        ain2.setAutoPadding(true);
10119        ain2.copyFrom(in2);
10120
10121        result_int result = reduce_my_float_uchar_1(ain1, ain2, null);
10122        result.mTempIns = new Allocation[]{ain1, ain2};
10123        return result;
10124    }
10125
10126    // ain1 = "float a"
10127    // ain2 = "uchar b"
10128    public result_int reduce_my_float_uchar_1(Allocation ain1, Allocation ain2) {
10129        return reduce_my_float_uchar_1(ain1, ain2, null);
10130    }
10131
10132    // ain1 = "float a"
10133    // ain2 = "uchar b"
10134    public result_int reduce_my_float_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10135        Type t0, t1;
10136        // check ain1
10137        if (!ain1.getType().getElement().isCompatible(__F32)) {
10138            throw new RSRuntimeException("Type mismatch with F32!");
10139        }
10140        // check ain2
10141        if (!ain2.getType().getElement().isCompatible(__U8)) {
10142            throw new RSRuntimeException("Type mismatch with U8!");
10143        }
10144        // Verify dimensions
10145        t0 = ain1.getType();
10146        t1 = ain2.getType();
10147        if ((t0.getCount() != t1.getCount()) ||
10148            (t0.getX() != t1.getX()) ||
10149            (t0.getY() != t1.getY()) ||
10150            (t0.getZ() != t1.getZ()) ||
10151            (t0.hasFaces()   != t1.hasFaces()) ||
10152            (t0.hasMipmaps() != t1.hasMipmaps())) {
10153            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10154        }
10155
10156        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10157        aout.setAutoPadding(true);
10158        reduce(mExportReduceIdx_my_float_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
10159        return new result_int(aout);
10160    }
10161
10162    private final static int mExportReduceIdx_my_float_uchar2_0 = 152;
10163    // in1 = "a"
10164    // in2 = "b", flattened 2-vectors
10165    public result_int reduce_my_float_uchar2_0(float[] in1, byte[] in2) {
10166        // Verify that "in1" is non-null.
10167        if (in1 == null) {
10168            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10169        }
10170        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10171        ain1.setAutoPadding(true);
10172        ain1.copyFrom(in1);
10173        // Verify that "in2" is non-null.
10174        if (in2 == null) {
10175            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10176        }
10177        // Verify that the array length is a multiple of the vector size.
10178        if (in2.length % 2 != 0) {
10179            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
10180        }
10181        // Verify that input array lengths are the same.
10182        if (in1.length != in2.length / 2) {
10183            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10184        }
10185        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
10186        ain2.setAutoPadding(true);
10187        ain2.copyFrom(in2);
10188
10189        result_int result = reduce_my_float_uchar2_0(ain1, ain2, null);
10190        result.mTempIns = new Allocation[]{ain1, ain2};
10191        return result;
10192    }
10193
10194    // ain1 = "float a"
10195    // ain2 = "uchar2 b"
10196    public result_int reduce_my_float_uchar2_0(Allocation ain1, Allocation ain2) {
10197        return reduce_my_float_uchar2_0(ain1, ain2, null);
10198    }
10199
10200    // ain1 = "float a"
10201    // ain2 = "uchar2 b"
10202    public result_int reduce_my_float_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10203        Type t0, t1;
10204        // check ain1
10205        if (!ain1.getType().getElement().isCompatible(__F32)) {
10206            throw new RSRuntimeException("Type mismatch with F32!");
10207        }
10208        // check ain2
10209        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
10210            throw new RSRuntimeException("Type mismatch with U8_2!");
10211        }
10212        // Verify dimensions
10213        t0 = ain1.getType();
10214        t1 = ain2.getType();
10215        if ((t0.getCount() != t1.getCount()) ||
10216            (t0.getX() != t1.getX()) ||
10217            (t0.getY() != t1.getY()) ||
10218            (t0.getZ() != t1.getZ()) ||
10219            (t0.hasFaces()   != t1.hasFaces()) ||
10220            (t0.hasMipmaps() != t1.hasMipmaps())) {
10221            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10222        }
10223
10224        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10225        aout.setAutoPadding(true);
10226        reduce(mExportReduceIdx_my_float_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
10227        return new result_int(aout);
10228    }
10229
10230    private final static int mExportReduceIdx_my_float_uchar2_1 = 153;
10231    // in1 = "a"
10232    // in2 = "b", flattened 2-vectors
10233    public result_int reduce_my_float_uchar2_1(float[] in1, byte[] in2) {
10234        // Verify that "in1" is non-null.
10235        if (in1 == null) {
10236            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10237        }
10238        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10239        ain1.setAutoPadding(true);
10240        ain1.copyFrom(in1);
10241        // Verify that "in2" is non-null.
10242        if (in2 == null) {
10243            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10244        }
10245        // Verify that the array length is a multiple of the vector size.
10246        if (in2.length % 2 != 0) {
10247            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
10248        }
10249        // Verify that input array lengths are the same.
10250        if (in1.length != in2.length / 2) {
10251            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10252        }
10253        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
10254        ain2.setAutoPadding(true);
10255        ain2.copyFrom(in2);
10256
10257        result_int result = reduce_my_float_uchar2_1(ain1, ain2, null);
10258        result.mTempIns = new Allocation[]{ain1, ain2};
10259        return result;
10260    }
10261
10262    // ain1 = "float a"
10263    // ain2 = "uchar2 b"
10264    public result_int reduce_my_float_uchar2_1(Allocation ain1, Allocation ain2) {
10265        return reduce_my_float_uchar2_1(ain1, ain2, null);
10266    }
10267
10268    // ain1 = "float a"
10269    // ain2 = "uchar2 b"
10270    public result_int reduce_my_float_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10271        Type t0, t1;
10272        // check ain1
10273        if (!ain1.getType().getElement().isCompatible(__F32)) {
10274            throw new RSRuntimeException("Type mismatch with F32!");
10275        }
10276        // check ain2
10277        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
10278            throw new RSRuntimeException("Type mismatch with U8_2!");
10279        }
10280        // Verify dimensions
10281        t0 = ain1.getType();
10282        t1 = ain2.getType();
10283        if ((t0.getCount() != t1.getCount()) ||
10284            (t0.getX() != t1.getX()) ||
10285            (t0.getY() != t1.getY()) ||
10286            (t0.getZ() != t1.getZ()) ||
10287            (t0.hasFaces()   != t1.hasFaces()) ||
10288            (t0.hasMipmaps() != t1.hasMipmaps())) {
10289            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10290        }
10291
10292        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10293        aout.setAutoPadding(true);
10294        reduce(mExportReduceIdx_my_float_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
10295        return new result_int(aout);
10296    }
10297
10298    private final static int mExportReduceIdx_my_float_uchar4_0 = 154;
10299    // in1 = "a"
10300    // in2 = "b", flattened 4-vectors
10301    public result_int reduce_my_float_uchar4_0(float[] in1, byte[] in2) {
10302        // Verify that "in1" is non-null.
10303        if (in1 == null) {
10304            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10305        }
10306        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10307        ain1.setAutoPadding(true);
10308        ain1.copyFrom(in1);
10309        // Verify that "in2" is non-null.
10310        if (in2 == null) {
10311            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10312        }
10313        // Verify that the array length is a multiple of the vector size.
10314        if (in2.length % 4 != 0) {
10315            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
10316        }
10317        // Verify that input array lengths are the same.
10318        if (in1.length != in2.length / 4) {
10319            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10320        }
10321        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
10322        ain2.setAutoPadding(true);
10323        ain2.copyFrom(in2);
10324
10325        result_int result = reduce_my_float_uchar4_0(ain1, ain2, null);
10326        result.mTempIns = new Allocation[]{ain1, ain2};
10327        return result;
10328    }
10329
10330    // ain1 = "float a"
10331    // ain2 = "uchar4 b"
10332    public result_int reduce_my_float_uchar4_0(Allocation ain1, Allocation ain2) {
10333        return reduce_my_float_uchar4_0(ain1, ain2, null);
10334    }
10335
10336    // ain1 = "float a"
10337    // ain2 = "uchar4 b"
10338    public result_int reduce_my_float_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10339        Type t0, t1;
10340        // check ain1
10341        if (!ain1.getType().getElement().isCompatible(__F32)) {
10342            throw new RSRuntimeException("Type mismatch with F32!");
10343        }
10344        // check ain2
10345        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
10346            throw new RSRuntimeException("Type mismatch with U8_4!");
10347        }
10348        // Verify dimensions
10349        t0 = ain1.getType();
10350        t1 = ain2.getType();
10351        if ((t0.getCount() != t1.getCount()) ||
10352            (t0.getX() != t1.getX()) ||
10353            (t0.getY() != t1.getY()) ||
10354            (t0.getZ() != t1.getZ()) ||
10355            (t0.hasFaces()   != t1.hasFaces()) ||
10356            (t0.hasMipmaps() != t1.hasMipmaps())) {
10357            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10358        }
10359
10360        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10361        aout.setAutoPadding(true);
10362        reduce(mExportReduceIdx_my_float_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
10363        return new result_int(aout);
10364    }
10365
10366    private final static int mExportReduceIdx_my_float_uchar4_1 = 155;
10367    // in1 = "a"
10368    // in2 = "b", flattened 4-vectors
10369    public result_int reduce_my_float_uchar4_1(float[] in1, byte[] in2) {
10370        // Verify that "in1" is non-null.
10371        if (in1 == null) {
10372            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10373        }
10374        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10375        ain1.setAutoPadding(true);
10376        ain1.copyFrom(in1);
10377        // Verify that "in2" is non-null.
10378        if (in2 == null) {
10379            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10380        }
10381        // Verify that the array length is a multiple of the vector size.
10382        if (in2.length % 4 != 0) {
10383            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
10384        }
10385        // Verify that input array lengths are the same.
10386        if (in1.length != in2.length / 4) {
10387            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10388        }
10389        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
10390        ain2.setAutoPadding(true);
10391        ain2.copyFrom(in2);
10392
10393        result_int result = reduce_my_float_uchar4_1(ain1, ain2, null);
10394        result.mTempIns = new Allocation[]{ain1, ain2};
10395        return result;
10396    }
10397
10398    // ain1 = "float a"
10399    // ain2 = "uchar4 b"
10400    public result_int reduce_my_float_uchar4_1(Allocation ain1, Allocation ain2) {
10401        return reduce_my_float_uchar4_1(ain1, ain2, null);
10402    }
10403
10404    // ain1 = "float a"
10405    // ain2 = "uchar4 b"
10406    public result_int reduce_my_float_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10407        Type t0, t1;
10408        // check ain1
10409        if (!ain1.getType().getElement().isCompatible(__F32)) {
10410            throw new RSRuntimeException("Type mismatch with F32!");
10411        }
10412        // check ain2
10413        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
10414            throw new RSRuntimeException("Type mismatch with U8_4!");
10415        }
10416        // Verify dimensions
10417        t0 = ain1.getType();
10418        t1 = ain2.getType();
10419        if ((t0.getCount() != t1.getCount()) ||
10420            (t0.getX() != t1.getX()) ||
10421            (t0.getY() != t1.getY()) ||
10422            (t0.getZ() != t1.getZ()) ||
10423            (t0.hasFaces()   != t1.hasFaces()) ||
10424            (t0.hasMipmaps() != t1.hasMipmaps())) {
10425            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10426        }
10427
10428        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10429        aout.setAutoPadding(true);
10430        reduce(mExportReduceIdx_my_float_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
10431        return new result_int(aout);
10432    }
10433
10434    private final static int mExportReduceIdx_my_float_ushort_0 = 156;
10435    // in1 = "a"
10436    // in2 = "b"
10437    public result_int reduce_my_float_ushort_0(float[] in1, short[] in2) {
10438        // Verify that "in1" is non-null.
10439        if (in1 == null) {
10440            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10441        }
10442        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10443        ain1.setAutoPadding(true);
10444        ain1.copyFrom(in1);
10445        // Verify that "in2" is non-null.
10446        if (in2 == null) {
10447            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10448        }
10449        // Verify that input array lengths are the same.
10450        if (in1.length != in2.length) {
10451            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10452        }
10453        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
10454        ain2.setAutoPadding(true);
10455        ain2.copyFrom(in2);
10456
10457        result_int result = reduce_my_float_ushort_0(ain1, ain2, null);
10458        result.mTempIns = new Allocation[]{ain1, ain2};
10459        return result;
10460    }
10461
10462    // ain1 = "float a"
10463    // ain2 = "ushort b"
10464    public result_int reduce_my_float_ushort_0(Allocation ain1, Allocation ain2) {
10465        return reduce_my_float_ushort_0(ain1, ain2, null);
10466    }
10467
10468    // ain1 = "float a"
10469    // ain2 = "ushort b"
10470    public result_int reduce_my_float_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10471        Type t0, t1;
10472        // check ain1
10473        if (!ain1.getType().getElement().isCompatible(__F32)) {
10474            throw new RSRuntimeException("Type mismatch with F32!");
10475        }
10476        // check ain2
10477        if (!ain2.getType().getElement().isCompatible(__U16)) {
10478            throw new RSRuntimeException("Type mismatch with U16!");
10479        }
10480        // Verify dimensions
10481        t0 = ain1.getType();
10482        t1 = ain2.getType();
10483        if ((t0.getCount() != t1.getCount()) ||
10484            (t0.getX() != t1.getX()) ||
10485            (t0.getY() != t1.getY()) ||
10486            (t0.getZ() != t1.getZ()) ||
10487            (t0.hasFaces()   != t1.hasFaces()) ||
10488            (t0.hasMipmaps() != t1.hasMipmaps())) {
10489            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10490        }
10491
10492        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10493        aout.setAutoPadding(true);
10494        reduce(mExportReduceIdx_my_float_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
10495        return new result_int(aout);
10496    }
10497
10498    private final static int mExportReduceIdx_my_float_ushort_1 = 157;
10499    // in1 = "a"
10500    // in2 = "b"
10501    public result_int reduce_my_float_ushort_1(float[] in1, short[] in2) {
10502        // Verify that "in1" is non-null.
10503        if (in1 == null) {
10504            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10505        }
10506        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10507        ain1.setAutoPadding(true);
10508        ain1.copyFrom(in1);
10509        // Verify that "in2" is non-null.
10510        if (in2 == null) {
10511            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10512        }
10513        // Verify that input array lengths are the same.
10514        if (in1.length != in2.length) {
10515            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10516        }
10517        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
10518        ain2.setAutoPadding(true);
10519        ain2.copyFrom(in2);
10520
10521        result_int result = reduce_my_float_ushort_1(ain1, ain2, null);
10522        result.mTempIns = new Allocation[]{ain1, ain2};
10523        return result;
10524    }
10525
10526    // ain1 = "float a"
10527    // ain2 = "ushort b"
10528    public result_int reduce_my_float_ushort_1(Allocation ain1, Allocation ain2) {
10529        return reduce_my_float_ushort_1(ain1, ain2, null);
10530    }
10531
10532    // ain1 = "float a"
10533    // ain2 = "ushort b"
10534    public result_int reduce_my_float_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10535        Type t0, t1;
10536        // check ain1
10537        if (!ain1.getType().getElement().isCompatible(__F32)) {
10538            throw new RSRuntimeException("Type mismatch with F32!");
10539        }
10540        // check ain2
10541        if (!ain2.getType().getElement().isCompatible(__U16)) {
10542            throw new RSRuntimeException("Type mismatch with U16!");
10543        }
10544        // Verify dimensions
10545        t0 = ain1.getType();
10546        t1 = ain2.getType();
10547        if ((t0.getCount() != t1.getCount()) ||
10548            (t0.getX() != t1.getX()) ||
10549            (t0.getY() != t1.getY()) ||
10550            (t0.getZ() != t1.getZ()) ||
10551            (t0.hasFaces()   != t1.hasFaces()) ||
10552            (t0.hasMipmaps() != t1.hasMipmaps())) {
10553            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10554        }
10555
10556        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10557        aout.setAutoPadding(true);
10558        reduce(mExportReduceIdx_my_float_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
10559        return new result_int(aout);
10560    }
10561
10562    private final static int mExportReduceIdx_my_float_ushort2_0 = 158;
10563    // in1 = "a"
10564    // in2 = "b", flattened 2-vectors
10565    public result_int reduce_my_float_ushort2_0(float[] in1, short[] in2) {
10566        // Verify that "in1" is non-null.
10567        if (in1 == null) {
10568            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10569        }
10570        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10571        ain1.setAutoPadding(true);
10572        ain1.copyFrom(in1);
10573        // Verify that "in2" is non-null.
10574        if (in2 == null) {
10575            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10576        }
10577        // Verify that the array length is a multiple of the vector size.
10578        if (in2.length % 2 != 0) {
10579            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
10580        }
10581        // Verify that input array lengths are the same.
10582        if (in1.length != in2.length / 2) {
10583            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10584        }
10585        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
10586        ain2.setAutoPadding(true);
10587        ain2.copyFrom(in2);
10588
10589        result_int result = reduce_my_float_ushort2_0(ain1, ain2, null);
10590        result.mTempIns = new Allocation[]{ain1, ain2};
10591        return result;
10592    }
10593
10594    // ain1 = "float a"
10595    // ain2 = "ushort2 b"
10596    public result_int reduce_my_float_ushort2_0(Allocation ain1, Allocation ain2) {
10597        return reduce_my_float_ushort2_0(ain1, ain2, null);
10598    }
10599
10600    // ain1 = "float a"
10601    // ain2 = "ushort2 b"
10602    public result_int reduce_my_float_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10603        Type t0, t1;
10604        // check ain1
10605        if (!ain1.getType().getElement().isCompatible(__F32)) {
10606            throw new RSRuntimeException("Type mismatch with F32!");
10607        }
10608        // check ain2
10609        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
10610            throw new RSRuntimeException("Type mismatch with U16_2!");
10611        }
10612        // Verify dimensions
10613        t0 = ain1.getType();
10614        t1 = ain2.getType();
10615        if ((t0.getCount() != t1.getCount()) ||
10616            (t0.getX() != t1.getX()) ||
10617            (t0.getY() != t1.getY()) ||
10618            (t0.getZ() != t1.getZ()) ||
10619            (t0.hasFaces()   != t1.hasFaces()) ||
10620            (t0.hasMipmaps() != t1.hasMipmaps())) {
10621            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10622        }
10623
10624        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10625        aout.setAutoPadding(true);
10626        reduce(mExportReduceIdx_my_float_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
10627        return new result_int(aout);
10628    }
10629
10630    private final static int mExportReduceIdx_my_float_ushort2_1 = 159;
10631    // in1 = "a"
10632    // in2 = "b", flattened 2-vectors
10633    public result_int reduce_my_float_ushort2_1(float[] in1, short[] in2) {
10634        // Verify that "in1" is non-null.
10635        if (in1 == null) {
10636            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10637        }
10638        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10639        ain1.setAutoPadding(true);
10640        ain1.copyFrom(in1);
10641        // Verify that "in2" is non-null.
10642        if (in2 == null) {
10643            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10644        }
10645        // Verify that the array length is a multiple of the vector size.
10646        if (in2.length % 2 != 0) {
10647            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
10648        }
10649        // Verify that input array lengths are the same.
10650        if (in1.length != in2.length / 2) {
10651            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10652        }
10653        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
10654        ain2.setAutoPadding(true);
10655        ain2.copyFrom(in2);
10656
10657        result_int result = reduce_my_float_ushort2_1(ain1, ain2, null);
10658        result.mTempIns = new Allocation[]{ain1, ain2};
10659        return result;
10660    }
10661
10662    // ain1 = "float a"
10663    // ain2 = "ushort2 b"
10664    public result_int reduce_my_float_ushort2_1(Allocation ain1, Allocation ain2) {
10665        return reduce_my_float_ushort2_1(ain1, ain2, null);
10666    }
10667
10668    // ain1 = "float a"
10669    // ain2 = "ushort2 b"
10670    public result_int reduce_my_float_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10671        Type t0, t1;
10672        // check ain1
10673        if (!ain1.getType().getElement().isCompatible(__F32)) {
10674            throw new RSRuntimeException("Type mismatch with F32!");
10675        }
10676        // check ain2
10677        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
10678            throw new RSRuntimeException("Type mismatch with U16_2!");
10679        }
10680        // Verify dimensions
10681        t0 = ain1.getType();
10682        t1 = ain2.getType();
10683        if ((t0.getCount() != t1.getCount()) ||
10684            (t0.getX() != t1.getX()) ||
10685            (t0.getY() != t1.getY()) ||
10686            (t0.getZ() != t1.getZ()) ||
10687            (t0.hasFaces()   != t1.hasFaces()) ||
10688            (t0.hasMipmaps() != t1.hasMipmaps())) {
10689            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10690        }
10691
10692        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10693        aout.setAutoPadding(true);
10694        reduce(mExportReduceIdx_my_float_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
10695        return new result_int(aout);
10696    }
10697
10698    private final static int mExportReduceIdx_my_float_ushort4_0 = 160;
10699    // in1 = "a"
10700    // in2 = "b", flattened 4-vectors
10701    public result_int reduce_my_float_ushort4_0(float[] in1, short[] in2) {
10702        // Verify that "in1" is non-null.
10703        if (in1 == null) {
10704            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10705        }
10706        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10707        ain1.setAutoPadding(true);
10708        ain1.copyFrom(in1);
10709        // Verify that "in2" is non-null.
10710        if (in2 == null) {
10711            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10712        }
10713        // Verify that the array length is a multiple of the vector size.
10714        if (in2.length % 4 != 0) {
10715            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
10716        }
10717        // Verify that input array lengths are the same.
10718        if (in1.length != in2.length / 4) {
10719            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10720        }
10721        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
10722        ain2.setAutoPadding(true);
10723        ain2.copyFrom(in2);
10724
10725        result_int result = reduce_my_float_ushort4_0(ain1, ain2, null);
10726        result.mTempIns = new Allocation[]{ain1, ain2};
10727        return result;
10728    }
10729
10730    // ain1 = "float a"
10731    // ain2 = "ushort4 b"
10732    public result_int reduce_my_float_ushort4_0(Allocation ain1, Allocation ain2) {
10733        return reduce_my_float_ushort4_0(ain1, ain2, null);
10734    }
10735
10736    // ain1 = "float a"
10737    // ain2 = "ushort4 b"
10738    public result_int reduce_my_float_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10739        Type t0, t1;
10740        // check ain1
10741        if (!ain1.getType().getElement().isCompatible(__F32)) {
10742            throw new RSRuntimeException("Type mismatch with F32!");
10743        }
10744        // check ain2
10745        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
10746            throw new RSRuntimeException("Type mismatch with U16_4!");
10747        }
10748        // Verify dimensions
10749        t0 = ain1.getType();
10750        t1 = ain2.getType();
10751        if ((t0.getCount() != t1.getCount()) ||
10752            (t0.getX() != t1.getX()) ||
10753            (t0.getY() != t1.getY()) ||
10754            (t0.getZ() != t1.getZ()) ||
10755            (t0.hasFaces()   != t1.hasFaces()) ||
10756            (t0.hasMipmaps() != t1.hasMipmaps())) {
10757            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10758        }
10759
10760        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10761        aout.setAutoPadding(true);
10762        reduce(mExportReduceIdx_my_float_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
10763        return new result_int(aout);
10764    }
10765
10766    private final static int mExportReduceIdx_my_float_ushort4_1 = 161;
10767    // in1 = "a"
10768    // in2 = "b", flattened 4-vectors
10769    public result_int reduce_my_float_ushort4_1(float[] in1, short[] in2) {
10770        // Verify that "in1" is non-null.
10771        if (in1 == null) {
10772            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10773        }
10774        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10775        ain1.setAutoPadding(true);
10776        ain1.copyFrom(in1);
10777        // Verify that "in2" is non-null.
10778        if (in2 == null) {
10779            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10780        }
10781        // Verify that the array length is a multiple of the vector size.
10782        if (in2.length % 4 != 0) {
10783            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
10784        }
10785        // Verify that input array lengths are the same.
10786        if (in1.length != in2.length / 4) {
10787            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10788        }
10789        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
10790        ain2.setAutoPadding(true);
10791        ain2.copyFrom(in2);
10792
10793        result_int result = reduce_my_float_ushort4_1(ain1, ain2, null);
10794        result.mTempIns = new Allocation[]{ain1, ain2};
10795        return result;
10796    }
10797
10798    // ain1 = "float a"
10799    // ain2 = "ushort4 b"
10800    public result_int reduce_my_float_ushort4_1(Allocation ain1, Allocation ain2) {
10801        return reduce_my_float_ushort4_1(ain1, ain2, null);
10802    }
10803
10804    // ain1 = "float a"
10805    // ain2 = "ushort4 b"
10806    public result_int reduce_my_float_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10807        Type t0, t1;
10808        // check ain1
10809        if (!ain1.getType().getElement().isCompatible(__F32)) {
10810            throw new RSRuntimeException("Type mismatch with F32!");
10811        }
10812        // check ain2
10813        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
10814            throw new RSRuntimeException("Type mismatch with U16_4!");
10815        }
10816        // Verify dimensions
10817        t0 = ain1.getType();
10818        t1 = ain2.getType();
10819        if ((t0.getCount() != t1.getCount()) ||
10820            (t0.getX() != t1.getX()) ||
10821            (t0.getY() != t1.getY()) ||
10822            (t0.getZ() != t1.getZ()) ||
10823            (t0.hasFaces()   != t1.hasFaces()) ||
10824            (t0.hasMipmaps() != t1.hasMipmaps())) {
10825            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10826        }
10827
10828        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10829        aout.setAutoPadding(true);
10830        reduce(mExportReduceIdx_my_float_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
10831        return new result_int(aout);
10832    }
10833
10834    private final static int mExportReduceIdx_my_float_bool_0 = 162;
10835    // in1 = "a"
10836    // in2 = "b"
10837    public result_int reduce_my_float_bool_0(float[] in1, byte[] in2) {
10838        // Verify that "in1" is non-null.
10839        if (in1 == null) {
10840            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10841        }
10842        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10843        ain1.setAutoPadding(true);
10844        ain1.copyFrom(in1);
10845        // Verify that "in2" is non-null.
10846        if (in2 == null) {
10847            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10848        }
10849        // Verify that input array lengths are the same.
10850        if (in1.length != in2.length) {
10851            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10852        }
10853        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
10854        ain2.setAutoPadding(true);
10855        ain2.copyFrom(in2);
10856
10857        result_int result = reduce_my_float_bool_0(ain1, ain2, null);
10858        result.mTempIns = new Allocation[]{ain1, ain2};
10859        return result;
10860    }
10861
10862    // ain1 = "float a"
10863    // ain2 = "bool b"
10864    public result_int reduce_my_float_bool_0(Allocation ain1, Allocation ain2) {
10865        return reduce_my_float_bool_0(ain1, ain2, null);
10866    }
10867
10868    // ain1 = "float a"
10869    // ain2 = "bool b"
10870    public result_int reduce_my_float_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10871        Type t0, t1;
10872        // check ain1
10873        if (!ain1.getType().getElement().isCompatible(__F32)) {
10874            throw new RSRuntimeException("Type mismatch with F32!");
10875        }
10876        // check ain2
10877        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
10878            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
10879        }
10880        // Verify dimensions
10881        t0 = ain1.getType();
10882        t1 = ain2.getType();
10883        if ((t0.getCount() != t1.getCount()) ||
10884            (t0.getX() != t1.getX()) ||
10885            (t0.getY() != t1.getY()) ||
10886            (t0.getZ() != t1.getZ()) ||
10887            (t0.hasFaces()   != t1.hasFaces()) ||
10888            (t0.hasMipmaps() != t1.hasMipmaps())) {
10889            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10890        }
10891
10892        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10893        aout.setAutoPadding(true);
10894        reduce(mExportReduceIdx_my_float_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
10895        return new result_int(aout);
10896    }
10897
10898    private final static int mExportReduceIdx_my_float_bool_1 = 163;
10899    // in1 = "a"
10900    // in2 = "b"
10901    public result_int reduce_my_float_bool_1(float[] in1, byte[] in2) {
10902        // Verify that "in1" is non-null.
10903        if (in1 == null) {
10904            throw new RSIllegalArgumentException("Array \"in1\" is null!");
10905        }
10906        Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length);
10907        ain1.setAutoPadding(true);
10908        ain1.copyFrom(in1);
10909        // Verify that "in2" is non-null.
10910        if (in2 == null) {
10911            throw new RSIllegalArgumentException("Array \"in2\" is null!");
10912        }
10913        // Verify that input array lengths are the same.
10914        if (in1.length != in2.length) {
10915            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
10916        }
10917        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
10918        ain2.setAutoPadding(true);
10919        ain2.copyFrom(in2);
10920
10921        result_int result = reduce_my_float_bool_1(ain1, ain2, null);
10922        result.mTempIns = new Allocation[]{ain1, ain2};
10923        return result;
10924    }
10925
10926    // ain1 = "float a"
10927    // ain2 = "bool b"
10928    public result_int reduce_my_float_bool_1(Allocation ain1, Allocation ain2) {
10929        return reduce_my_float_bool_1(ain1, ain2, null);
10930    }
10931
10932    // ain1 = "float a"
10933    // ain2 = "bool b"
10934    public result_int reduce_my_float_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10935        Type t0, t1;
10936        // check ain1
10937        if (!ain1.getType().getElement().isCompatible(__F32)) {
10938            throw new RSRuntimeException("Type mismatch with F32!");
10939        }
10940        // check ain2
10941        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
10942            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
10943        }
10944        // Verify dimensions
10945        t0 = ain1.getType();
10946        t1 = ain2.getType();
10947        if ((t0.getCount() != t1.getCount()) ||
10948            (t0.getX() != t1.getX()) ||
10949            (t0.getY() != t1.getY()) ||
10950            (t0.getZ() != t1.getZ()) ||
10951            (t0.hasFaces()   != t1.hasFaces()) ||
10952            (t0.hasMipmaps() != t1.hasMipmaps())) {
10953            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10954        }
10955
10956        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10957        aout.setAutoPadding(true);
10958        reduce(mExportReduceIdx_my_float_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
10959        return new result_int(aout);
10960    }
10961
10962    private final static int mExportReduceIdx_my_float_rs_matrix2x2_0 = 164;
10963    // ain1 = "float a"
10964    // ain2 = "rs_matrix2x2 b"
10965    public result_int reduce_my_float_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
10966        return reduce_my_float_rs_matrix2x2_0(ain1, ain2, null);
10967    }
10968
10969    // ain1 = "float a"
10970    // ain2 = "rs_matrix2x2 b"
10971    public result_int reduce_my_float_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
10972        Type t0, t1;
10973        // check ain1
10974        if (!ain1.getType().getElement().isCompatible(__F32)) {
10975            throw new RSRuntimeException("Type mismatch with F32!");
10976        }
10977        // check ain2
10978        // Verify dimensions
10979        t0 = ain1.getType();
10980        t1 = ain2.getType();
10981        if ((t0.getCount() != t1.getCount()) ||
10982            (t0.getX() != t1.getX()) ||
10983            (t0.getY() != t1.getY()) ||
10984            (t0.getZ() != t1.getZ()) ||
10985            (t0.hasFaces()   != t1.hasFaces()) ||
10986            (t0.hasMipmaps() != t1.hasMipmaps())) {
10987            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
10988        }
10989
10990        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
10991        aout.setAutoPadding(true);
10992        reduce(mExportReduceIdx_my_float_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
10993        return new result_int(aout);
10994    }
10995
10996    private final static int mExportReduceIdx_my_float_rs_matrix2x2_1 = 165;
10997    // ain1 = "float a"
10998    // ain2 = "rs_matrix2x2 b"
10999    public result_int reduce_my_float_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
11000        return reduce_my_float_rs_matrix2x2_1(ain1, ain2, null);
11001    }
11002
11003    // ain1 = "float a"
11004    // ain2 = "rs_matrix2x2 b"
11005    public result_int reduce_my_float_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11006        Type t0, t1;
11007        // check ain1
11008        if (!ain1.getType().getElement().isCompatible(__F32)) {
11009            throw new RSRuntimeException("Type mismatch with F32!");
11010        }
11011        // check ain2
11012        // Verify dimensions
11013        t0 = ain1.getType();
11014        t1 = ain2.getType();
11015        if ((t0.getCount() != t1.getCount()) ||
11016            (t0.getX() != t1.getX()) ||
11017            (t0.getY() != t1.getY()) ||
11018            (t0.getZ() != t1.getZ()) ||
11019            (t0.hasFaces()   != t1.hasFaces()) ||
11020            (t0.hasMipmaps() != t1.hasMipmaps())) {
11021            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11022        }
11023
11024        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11025        aout.setAutoPadding(true);
11026        reduce(mExportReduceIdx_my_float_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
11027        return new result_int(aout);
11028    }
11029
11030    private final static int mExportReduceIdx_my_float_MyStruct_0 = 166;
11031    // ain1 = "float a"
11032    // ain2 = "/* struct <> */ b"
11033    public result_int reduce_my_float_MyStruct_0(Allocation ain1, Allocation ain2) {
11034        return reduce_my_float_MyStruct_0(ain1, ain2, null);
11035    }
11036
11037    // ain1 = "float a"
11038    // ain2 = "/* struct <> */ b"
11039    public result_int reduce_my_float_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11040        Type t0, t1;
11041        // check ain1
11042        if (!ain1.getType().getElement().isCompatible(__F32)) {
11043            throw new RSRuntimeException("Type mismatch with F32!");
11044        }
11045        // check ain2
11046        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
11047            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
11048        }
11049        // Verify dimensions
11050        t0 = ain1.getType();
11051        t1 = ain2.getType();
11052        if ((t0.getCount() != t1.getCount()) ||
11053            (t0.getX() != t1.getX()) ||
11054            (t0.getY() != t1.getY()) ||
11055            (t0.getZ() != t1.getZ()) ||
11056            (t0.hasFaces()   != t1.hasFaces()) ||
11057            (t0.hasMipmaps() != t1.hasMipmaps())) {
11058            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11059        }
11060
11061        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11062        aout.setAutoPadding(true);
11063        reduce(mExportReduceIdx_my_float_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
11064        return new result_int(aout);
11065    }
11066
11067    private final static int mExportReduceIdx_my_float_MyStruct_1 = 167;
11068    // ain1 = "float a"
11069    // ain2 = "/* struct <> */ b"
11070    public result_int reduce_my_float_MyStruct_1(Allocation ain1, Allocation ain2) {
11071        return reduce_my_float_MyStruct_1(ain1, ain2, null);
11072    }
11073
11074    // ain1 = "float a"
11075    // ain2 = "/* struct <> */ b"
11076    public result_int reduce_my_float_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11077        Type t0, t1;
11078        // check ain1
11079        if (!ain1.getType().getElement().isCompatible(__F32)) {
11080            throw new RSRuntimeException("Type mismatch with F32!");
11081        }
11082        // check ain2
11083        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
11084            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
11085        }
11086        // Verify dimensions
11087        t0 = ain1.getType();
11088        t1 = ain2.getType();
11089        if ((t0.getCount() != t1.getCount()) ||
11090            (t0.getX() != t1.getX()) ||
11091            (t0.getY() != t1.getY()) ||
11092            (t0.getZ() != t1.getZ()) ||
11093            (t0.hasFaces()   != t1.hasFaces()) ||
11094            (t0.hasMipmaps() != t1.hasMipmaps())) {
11095            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11096        }
11097
11098        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11099        aout.setAutoPadding(true);
11100        reduce(mExportReduceIdx_my_float_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
11101        return new result_int(aout);
11102    }
11103
11104    private final static int mExportReduceIdx_my_float2_half_0 = 168;
11105    // in1 = "a", flattened 2-vectors
11106    // in2 = "b"
11107    public result_int reduce_my_float2_half_0(float[] in1, short[] in2) {
11108        // Verify that "in1" is non-null.
11109        if (in1 == null) {
11110            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11111        }
11112        // Verify that the array length is a multiple of the vector size.
11113        if (in1.length % 2 != 0) {
11114            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11115        }
11116        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11117        ain1.setAutoPadding(true);
11118        ain1.copyFrom(in1);
11119        // Verify that "in2" is non-null.
11120        if (in2 == null) {
11121            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11122        }
11123        // Verify that input array lengths are the same.
11124        if (in1.length / 2 != in2.length) {
11125            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11126        }
11127        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
11128        ain2.setAutoPadding(true);
11129        ain2.copyFrom(in2);
11130
11131        result_int result = reduce_my_float2_half_0(ain1, ain2, null);
11132        result.mTempIns = new Allocation[]{ain1, ain2};
11133        return result;
11134    }
11135
11136    // ain1 = "float2 a"
11137    // ain2 = "half b"
11138    public result_int reduce_my_float2_half_0(Allocation ain1, Allocation ain2) {
11139        return reduce_my_float2_half_0(ain1, ain2, null);
11140    }
11141
11142    // ain1 = "float2 a"
11143    // ain2 = "half b"
11144    public result_int reduce_my_float2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11145        Type t0, t1;
11146        // check ain1
11147        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11148            throw new RSRuntimeException("Type mismatch with F32_2!");
11149        }
11150        // check ain2
11151        if (!ain2.getType().getElement().isCompatible(__F16)) {
11152            throw new RSRuntimeException("Type mismatch with F16!");
11153        }
11154        // Verify dimensions
11155        t0 = ain1.getType();
11156        t1 = ain2.getType();
11157        if ((t0.getCount() != t1.getCount()) ||
11158            (t0.getX() != t1.getX()) ||
11159            (t0.getY() != t1.getY()) ||
11160            (t0.getZ() != t1.getZ()) ||
11161            (t0.hasFaces()   != t1.hasFaces()) ||
11162            (t0.hasMipmaps() != t1.hasMipmaps())) {
11163            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11164        }
11165
11166        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11167        aout.setAutoPadding(true);
11168        reduce(mExportReduceIdx_my_float2_half_0, new Allocation[]{ain1, ain2}, aout, sc);
11169        return new result_int(aout);
11170    }
11171
11172    private final static int mExportReduceIdx_my_float2_half_1 = 169;
11173    // in1 = "a", flattened 2-vectors
11174    // in2 = "b"
11175    public result_int reduce_my_float2_half_1(float[] in1, short[] in2) {
11176        // Verify that "in1" is non-null.
11177        if (in1 == null) {
11178            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11179        }
11180        // Verify that the array length is a multiple of the vector size.
11181        if (in1.length % 2 != 0) {
11182            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11183        }
11184        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11185        ain1.setAutoPadding(true);
11186        ain1.copyFrom(in1);
11187        // Verify that "in2" is non-null.
11188        if (in2 == null) {
11189            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11190        }
11191        // Verify that input array lengths are the same.
11192        if (in1.length / 2 != in2.length) {
11193            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11194        }
11195        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
11196        ain2.setAutoPadding(true);
11197        ain2.copyFrom(in2);
11198
11199        result_int result = reduce_my_float2_half_1(ain1, ain2, null);
11200        result.mTempIns = new Allocation[]{ain1, ain2};
11201        return result;
11202    }
11203
11204    // ain1 = "float2 a"
11205    // ain2 = "half b"
11206    public result_int reduce_my_float2_half_1(Allocation ain1, Allocation ain2) {
11207        return reduce_my_float2_half_1(ain1, ain2, null);
11208    }
11209
11210    // ain1 = "float2 a"
11211    // ain2 = "half b"
11212    public result_int reduce_my_float2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11213        Type t0, t1;
11214        // check ain1
11215        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11216            throw new RSRuntimeException("Type mismatch with F32_2!");
11217        }
11218        // check ain2
11219        if (!ain2.getType().getElement().isCompatible(__F16)) {
11220            throw new RSRuntimeException("Type mismatch with F16!");
11221        }
11222        // Verify dimensions
11223        t0 = ain1.getType();
11224        t1 = ain2.getType();
11225        if ((t0.getCount() != t1.getCount()) ||
11226            (t0.getX() != t1.getX()) ||
11227            (t0.getY() != t1.getY()) ||
11228            (t0.getZ() != t1.getZ()) ||
11229            (t0.hasFaces()   != t1.hasFaces()) ||
11230            (t0.hasMipmaps() != t1.hasMipmaps())) {
11231            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11232        }
11233
11234        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11235        aout.setAutoPadding(true);
11236        reduce(mExportReduceIdx_my_float2_half_1, new Allocation[]{ain1, ain2}, aout, sc);
11237        return new result_int(aout);
11238    }
11239
11240    private final static int mExportReduceIdx_my_float2_half2_0 = 170;
11241    // in1 = "a", flattened 2-vectors
11242    // in2 = "b", flattened 2-vectors
11243    public result_int reduce_my_float2_half2_0(float[] in1, short[] in2) {
11244        // Verify that "in1" is non-null.
11245        if (in1 == null) {
11246            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11247        }
11248        // Verify that the array length is a multiple of the vector size.
11249        if (in1.length % 2 != 0) {
11250            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11251        }
11252        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11253        ain1.setAutoPadding(true);
11254        ain1.copyFrom(in1);
11255        // Verify that "in2" is non-null.
11256        if (in2 == null) {
11257            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11258        }
11259        // Verify that the array length is a multiple of the vector size.
11260        if (in2.length % 2 != 0) {
11261            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
11262        }
11263        // Verify that input array lengths are the same.
11264        if (in1.length / 2 != in2.length / 2) {
11265            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11266        }
11267        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
11268        ain2.setAutoPadding(true);
11269        ain2.copyFrom(in2);
11270
11271        result_int result = reduce_my_float2_half2_0(ain1, ain2, null);
11272        result.mTempIns = new Allocation[]{ain1, ain2};
11273        return result;
11274    }
11275
11276    // ain1 = "float2 a"
11277    // ain2 = "half2 b"
11278    public result_int reduce_my_float2_half2_0(Allocation ain1, Allocation ain2) {
11279        return reduce_my_float2_half2_0(ain1, ain2, null);
11280    }
11281
11282    // ain1 = "float2 a"
11283    // ain2 = "half2 b"
11284    public result_int reduce_my_float2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11285        Type t0, t1;
11286        // check ain1
11287        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11288            throw new RSRuntimeException("Type mismatch with F32_2!");
11289        }
11290        // check ain2
11291        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
11292            throw new RSRuntimeException("Type mismatch with F16_2!");
11293        }
11294        // Verify dimensions
11295        t0 = ain1.getType();
11296        t1 = ain2.getType();
11297        if ((t0.getCount() != t1.getCount()) ||
11298            (t0.getX() != t1.getX()) ||
11299            (t0.getY() != t1.getY()) ||
11300            (t0.getZ() != t1.getZ()) ||
11301            (t0.hasFaces()   != t1.hasFaces()) ||
11302            (t0.hasMipmaps() != t1.hasMipmaps())) {
11303            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11304        }
11305
11306        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11307        aout.setAutoPadding(true);
11308        reduce(mExportReduceIdx_my_float2_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
11309        return new result_int(aout);
11310    }
11311
11312    private final static int mExportReduceIdx_my_float2_half2_1 = 171;
11313    // in1 = "a", flattened 2-vectors
11314    // in2 = "b", flattened 2-vectors
11315    public result_int reduce_my_float2_half2_1(float[] in1, short[] in2) {
11316        // Verify that "in1" is non-null.
11317        if (in1 == null) {
11318            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11319        }
11320        // Verify that the array length is a multiple of the vector size.
11321        if (in1.length % 2 != 0) {
11322            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11323        }
11324        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11325        ain1.setAutoPadding(true);
11326        ain1.copyFrom(in1);
11327        // Verify that "in2" is non-null.
11328        if (in2 == null) {
11329            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11330        }
11331        // Verify that the array length is a multiple of the vector size.
11332        if (in2.length % 2 != 0) {
11333            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
11334        }
11335        // Verify that input array lengths are the same.
11336        if (in1.length / 2 != in2.length / 2) {
11337            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11338        }
11339        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
11340        ain2.setAutoPadding(true);
11341        ain2.copyFrom(in2);
11342
11343        result_int result = reduce_my_float2_half2_1(ain1, ain2, null);
11344        result.mTempIns = new Allocation[]{ain1, ain2};
11345        return result;
11346    }
11347
11348    // ain1 = "float2 a"
11349    // ain2 = "half2 b"
11350    public result_int reduce_my_float2_half2_1(Allocation ain1, Allocation ain2) {
11351        return reduce_my_float2_half2_1(ain1, ain2, null);
11352    }
11353
11354    // ain1 = "float2 a"
11355    // ain2 = "half2 b"
11356    public result_int reduce_my_float2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11357        Type t0, t1;
11358        // check ain1
11359        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11360            throw new RSRuntimeException("Type mismatch with F32_2!");
11361        }
11362        // check ain2
11363        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
11364            throw new RSRuntimeException("Type mismatch with F16_2!");
11365        }
11366        // Verify dimensions
11367        t0 = ain1.getType();
11368        t1 = ain2.getType();
11369        if ((t0.getCount() != t1.getCount()) ||
11370            (t0.getX() != t1.getX()) ||
11371            (t0.getY() != t1.getY()) ||
11372            (t0.getZ() != t1.getZ()) ||
11373            (t0.hasFaces()   != t1.hasFaces()) ||
11374            (t0.hasMipmaps() != t1.hasMipmaps())) {
11375            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11376        }
11377
11378        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11379        aout.setAutoPadding(true);
11380        reduce(mExportReduceIdx_my_float2_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
11381        return new result_int(aout);
11382    }
11383
11384    private final static int mExportReduceIdx_my_float2_half4_0 = 172;
11385    // in1 = "a", flattened 2-vectors
11386    // in2 = "b", flattened 4-vectors
11387    public result_int reduce_my_float2_half4_0(float[] in1, short[] in2) {
11388        // Verify that "in1" is non-null.
11389        if (in1 == null) {
11390            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11391        }
11392        // Verify that the array length is a multiple of the vector size.
11393        if (in1.length % 2 != 0) {
11394            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11395        }
11396        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11397        ain1.setAutoPadding(true);
11398        ain1.copyFrom(in1);
11399        // Verify that "in2" is non-null.
11400        if (in2 == null) {
11401            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11402        }
11403        // Verify that the array length is a multiple of the vector size.
11404        if (in2.length % 4 != 0) {
11405            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
11406        }
11407        // Verify that input array lengths are the same.
11408        if (in1.length / 2 != in2.length / 4) {
11409            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11410        }
11411        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
11412        ain2.setAutoPadding(true);
11413        ain2.copyFrom(in2);
11414
11415        result_int result = reduce_my_float2_half4_0(ain1, ain2, null);
11416        result.mTempIns = new Allocation[]{ain1, ain2};
11417        return result;
11418    }
11419
11420    // ain1 = "float2 a"
11421    // ain2 = "half4 b"
11422    public result_int reduce_my_float2_half4_0(Allocation ain1, Allocation ain2) {
11423        return reduce_my_float2_half4_0(ain1, ain2, null);
11424    }
11425
11426    // ain1 = "float2 a"
11427    // ain2 = "half4 b"
11428    public result_int reduce_my_float2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11429        Type t0, t1;
11430        // check ain1
11431        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11432            throw new RSRuntimeException("Type mismatch with F32_2!");
11433        }
11434        // check ain2
11435        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
11436            throw new RSRuntimeException("Type mismatch with F16_4!");
11437        }
11438        // Verify dimensions
11439        t0 = ain1.getType();
11440        t1 = ain2.getType();
11441        if ((t0.getCount() != t1.getCount()) ||
11442            (t0.getX() != t1.getX()) ||
11443            (t0.getY() != t1.getY()) ||
11444            (t0.getZ() != t1.getZ()) ||
11445            (t0.hasFaces()   != t1.hasFaces()) ||
11446            (t0.hasMipmaps() != t1.hasMipmaps())) {
11447            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11448        }
11449
11450        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11451        aout.setAutoPadding(true);
11452        reduce(mExportReduceIdx_my_float2_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
11453        return new result_int(aout);
11454    }
11455
11456    private final static int mExportReduceIdx_my_float2_half4_1 = 173;
11457    // in1 = "a", flattened 2-vectors
11458    // in2 = "b", flattened 4-vectors
11459    public result_int reduce_my_float2_half4_1(float[] in1, short[] in2) {
11460        // Verify that "in1" is non-null.
11461        if (in1 == null) {
11462            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11463        }
11464        // Verify that the array length is a multiple of the vector size.
11465        if (in1.length % 2 != 0) {
11466            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11467        }
11468        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11469        ain1.setAutoPadding(true);
11470        ain1.copyFrom(in1);
11471        // Verify that "in2" is non-null.
11472        if (in2 == null) {
11473            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11474        }
11475        // Verify that the array length is a multiple of the vector size.
11476        if (in2.length % 4 != 0) {
11477            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
11478        }
11479        // Verify that input array lengths are the same.
11480        if (in1.length / 2 != in2.length / 4) {
11481            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11482        }
11483        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
11484        ain2.setAutoPadding(true);
11485        ain2.copyFrom(in2);
11486
11487        result_int result = reduce_my_float2_half4_1(ain1, ain2, null);
11488        result.mTempIns = new Allocation[]{ain1, ain2};
11489        return result;
11490    }
11491
11492    // ain1 = "float2 a"
11493    // ain2 = "half4 b"
11494    public result_int reduce_my_float2_half4_1(Allocation ain1, Allocation ain2) {
11495        return reduce_my_float2_half4_1(ain1, ain2, null);
11496    }
11497
11498    // ain1 = "float2 a"
11499    // ain2 = "half4 b"
11500    public result_int reduce_my_float2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11501        Type t0, t1;
11502        // check ain1
11503        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11504            throw new RSRuntimeException("Type mismatch with F32_2!");
11505        }
11506        // check ain2
11507        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
11508            throw new RSRuntimeException("Type mismatch with F16_4!");
11509        }
11510        // Verify dimensions
11511        t0 = ain1.getType();
11512        t1 = ain2.getType();
11513        if ((t0.getCount() != t1.getCount()) ||
11514            (t0.getX() != t1.getX()) ||
11515            (t0.getY() != t1.getY()) ||
11516            (t0.getZ() != t1.getZ()) ||
11517            (t0.hasFaces()   != t1.hasFaces()) ||
11518            (t0.hasMipmaps() != t1.hasMipmaps())) {
11519            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11520        }
11521
11522        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11523        aout.setAutoPadding(true);
11524        reduce(mExportReduceIdx_my_float2_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
11525        return new result_int(aout);
11526    }
11527
11528    private final static int mExportReduceIdx_my_float2_float_0 = 174;
11529    // in1 = "a", flattened 2-vectors
11530    // in2 = "b"
11531    public result_int reduce_my_float2_float_0(float[] in1, float[] in2) {
11532        // Verify that "in1" is non-null.
11533        if (in1 == null) {
11534            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11535        }
11536        // Verify that the array length is a multiple of the vector size.
11537        if (in1.length % 2 != 0) {
11538            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11539        }
11540        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11541        ain1.setAutoPadding(true);
11542        ain1.copyFrom(in1);
11543        // Verify that "in2" is non-null.
11544        if (in2 == null) {
11545            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11546        }
11547        // Verify that input array lengths are the same.
11548        if (in1.length / 2 != in2.length) {
11549            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11550        }
11551        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
11552        ain2.setAutoPadding(true);
11553        ain2.copyFrom(in2);
11554
11555        result_int result = reduce_my_float2_float_0(ain1, ain2, null);
11556        result.mTempIns = new Allocation[]{ain1, ain2};
11557        return result;
11558    }
11559
11560    // ain1 = "float2 a"
11561    // ain2 = "float b"
11562    public result_int reduce_my_float2_float_0(Allocation ain1, Allocation ain2) {
11563        return reduce_my_float2_float_0(ain1, ain2, null);
11564    }
11565
11566    // ain1 = "float2 a"
11567    // ain2 = "float b"
11568    public result_int reduce_my_float2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11569        Type t0, t1;
11570        // check ain1
11571        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11572            throw new RSRuntimeException("Type mismatch with F32_2!");
11573        }
11574        // check ain2
11575        if (!ain2.getType().getElement().isCompatible(__F32)) {
11576            throw new RSRuntimeException("Type mismatch with F32!");
11577        }
11578        // Verify dimensions
11579        t0 = ain1.getType();
11580        t1 = ain2.getType();
11581        if ((t0.getCount() != t1.getCount()) ||
11582            (t0.getX() != t1.getX()) ||
11583            (t0.getY() != t1.getY()) ||
11584            (t0.getZ() != t1.getZ()) ||
11585            (t0.hasFaces()   != t1.hasFaces()) ||
11586            (t0.hasMipmaps() != t1.hasMipmaps())) {
11587            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11588        }
11589
11590        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11591        aout.setAutoPadding(true);
11592        reduce(mExportReduceIdx_my_float2_float_0, new Allocation[]{ain1, ain2}, aout, sc);
11593        return new result_int(aout);
11594    }
11595
11596    private final static int mExportReduceIdx_my_float2_float_1 = 175;
11597    // in1 = "a", flattened 2-vectors
11598    // in2 = "b"
11599    public result_int reduce_my_float2_float_1(float[] in1, float[] in2) {
11600        // Verify that "in1" is non-null.
11601        if (in1 == null) {
11602            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11603        }
11604        // Verify that the array length is a multiple of the vector size.
11605        if (in1.length % 2 != 0) {
11606            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11607        }
11608        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11609        ain1.setAutoPadding(true);
11610        ain1.copyFrom(in1);
11611        // Verify that "in2" is non-null.
11612        if (in2 == null) {
11613            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11614        }
11615        // Verify that input array lengths are the same.
11616        if (in1.length / 2 != in2.length) {
11617            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11618        }
11619        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
11620        ain2.setAutoPadding(true);
11621        ain2.copyFrom(in2);
11622
11623        result_int result = reduce_my_float2_float_1(ain1, ain2, null);
11624        result.mTempIns = new Allocation[]{ain1, ain2};
11625        return result;
11626    }
11627
11628    // ain1 = "float2 a"
11629    // ain2 = "float b"
11630    public result_int reduce_my_float2_float_1(Allocation ain1, Allocation ain2) {
11631        return reduce_my_float2_float_1(ain1, ain2, null);
11632    }
11633
11634    // ain1 = "float2 a"
11635    // ain2 = "float b"
11636    public result_int reduce_my_float2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11637        Type t0, t1;
11638        // check ain1
11639        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11640            throw new RSRuntimeException("Type mismatch with F32_2!");
11641        }
11642        // check ain2
11643        if (!ain2.getType().getElement().isCompatible(__F32)) {
11644            throw new RSRuntimeException("Type mismatch with F32!");
11645        }
11646        // Verify dimensions
11647        t0 = ain1.getType();
11648        t1 = ain2.getType();
11649        if ((t0.getCount() != t1.getCount()) ||
11650            (t0.getX() != t1.getX()) ||
11651            (t0.getY() != t1.getY()) ||
11652            (t0.getZ() != t1.getZ()) ||
11653            (t0.hasFaces()   != t1.hasFaces()) ||
11654            (t0.hasMipmaps() != t1.hasMipmaps())) {
11655            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11656        }
11657
11658        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11659        aout.setAutoPadding(true);
11660        reduce(mExportReduceIdx_my_float2_float_1, new Allocation[]{ain1, ain2}, aout, sc);
11661        return new result_int(aout);
11662    }
11663
11664    private final static int mExportReduceIdx_my_float2_float2_0 = 176;
11665    // in1 = "a", flattened 2-vectors
11666    // in2 = "b", flattened 2-vectors
11667    public result_int reduce_my_float2_float2_0(float[] in1, float[] in2) {
11668        // Verify that "in1" is non-null.
11669        if (in1 == null) {
11670            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11671        }
11672        // Verify that the array length is a multiple of the vector size.
11673        if (in1.length % 2 != 0) {
11674            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11675        }
11676        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11677        ain1.setAutoPadding(true);
11678        ain1.copyFrom(in1);
11679        // Verify that "in2" is non-null.
11680        if (in2 == null) {
11681            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11682        }
11683        // Verify that the array length is a multiple of the vector size.
11684        if (in2.length % 2 != 0) {
11685            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
11686        }
11687        // Verify that input array lengths are the same.
11688        if (in1.length / 2 != in2.length / 2) {
11689            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11690        }
11691        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
11692        ain2.setAutoPadding(true);
11693        ain2.copyFrom(in2);
11694
11695        result_int result = reduce_my_float2_float2_0(ain1, ain2, null);
11696        result.mTempIns = new Allocation[]{ain1, ain2};
11697        return result;
11698    }
11699
11700    // ain1 = "float2 a"
11701    // ain2 = "float2 b"
11702    public result_int reduce_my_float2_float2_0(Allocation ain1, Allocation ain2) {
11703        return reduce_my_float2_float2_0(ain1, ain2, null);
11704    }
11705
11706    // ain1 = "float2 a"
11707    // ain2 = "float2 b"
11708    public result_int reduce_my_float2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11709        Type t0, t1;
11710        // check ain1
11711        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11712            throw new RSRuntimeException("Type mismatch with F32_2!");
11713        }
11714        // check ain2
11715        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
11716            throw new RSRuntimeException("Type mismatch with F32_2!");
11717        }
11718        // Verify dimensions
11719        t0 = ain1.getType();
11720        t1 = ain2.getType();
11721        if ((t0.getCount() != t1.getCount()) ||
11722            (t0.getX() != t1.getX()) ||
11723            (t0.getY() != t1.getY()) ||
11724            (t0.getZ() != t1.getZ()) ||
11725            (t0.hasFaces()   != t1.hasFaces()) ||
11726            (t0.hasMipmaps() != t1.hasMipmaps())) {
11727            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11728        }
11729
11730        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11731        aout.setAutoPadding(true);
11732        reduce(mExportReduceIdx_my_float2_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
11733        return new result_int(aout);
11734    }
11735
11736    private final static int mExportReduceIdx_my_float2_float2_1 = 177;
11737    // in1 = "a", flattened 2-vectors
11738    // in2 = "b", flattened 2-vectors
11739    public result_int reduce_my_float2_float2_1(float[] in1, float[] in2) {
11740        // Verify that "in1" is non-null.
11741        if (in1 == null) {
11742            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11743        }
11744        // Verify that the array length is a multiple of the vector size.
11745        if (in1.length % 2 != 0) {
11746            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11747        }
11748        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11749        ain1.setAutoPadding(true);
11750        ain1.copyFrom(in1);
11751        // Verify that "in2" is non-null.
11752        if (in2 == null) {
11753            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11754        }
11755        // Verify that the array length is a multiple of the vector size.
11756        if (in2.length % 2 != 0) {
11757            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
11758        }
11759        // Verify that input array lengths are the same.
11760        if (in1.length / 2 != in2.length / 2) {
11761            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11762        }
11763        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
11764        ain2.setAutoPadding(true);
11765        ain2.copyFrom(in2);
11766
11767        result_int result = reduce_my_float2_float2_1(ain1, ain2, null);
11768        result.mTempIns = new Allocation[]{ain1, ain2};
11769        return result;
11770    }
11771
11772    // ain1 = "float2 a"
11773    // ain2 = "float2 b"
11774    public result_int reduce_my_float2_float2_1(Allocation ain1, Allocation ain2) {
11775        return reduce_my_float2_float2_1(ain1, ain2, null);
11776    }
11777
11778    // ain1 = "float2 a"
11779    // ain2 = "float2 b"
11780    public result_int reduce_my_float2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11781        Type t0, t1;
11782        // check ain1
11783        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11784            throw new RSRuntimeException("Type mismatch with F32_2!");
11785        }
11786        // check ain2
11787        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
11788            throw new RSRuntimeException("Type mismatch with F32_2!");
11789        }
11790        // Verify dimensions
11791        t0 = ain1.getType();
11792        t1 = ain2.getType();
11793        if ((t0.getCount() != t1.getCount()) ||
11794            (t0.getX() != t1.getX()) ||
11795            (t0.getY() != t1.getY()) ||
11796            (t0.getZ() != t1.getZ()) ||
11797            (t0.hasFaces()   != t1.hasFaces()) ||
11798            (t0.hasMipmaps() != t1.hasMipmaps())) {
11799            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11800        }
11801
11802        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11803        aout.setAutoPadding(true);
11804        reduce(mExportReduceIdx_my_float2_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
11805        return new result_int(aout);
11806    }
11807
11808    private final static int mExportReduceIdx_my_float2_float4_0 = 178;
11809    // in1 = "a", flattened 2-vectors
11810    // in2 = "b", flattened 4-vectors
11811    public result_int reduce_my_float2_float4_0(float[] in1, float[] in2) {
11812        // Verify that "in1" is non-null.
11813        if (in1 == null) {
11814            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11815        }
11816        // Verify that the array length is a multiple of the vector size.
11817        if (in1.length % 2 != 0) {
11818            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11819        }
11820        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11821        ain1.setAutoPadding(true);
11822        ain1.copyFrom(in1);
11823        // Verify that "in2" is non-null.
11824        if (in2 == null) {
11825            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11826        }
11827        // Verify that the array length is a multiple of the vector size.
11828        if (in2.length % 4 != 0) {
11829            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
11830        }
11831        // Verify that input array lengths are the same.
11832        if (in1.length / 2 != in2.length / 4) {
11833            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11834        }
11835        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
11836        ain2.setAutoPadding(true);
11837        ain2.copyFrom(in2);
11838
11839        result_int result = reduce_my_float2_float4_0(ain1, ain2, null);
11840        result.mTempIns = new Allocation[]{ain1, ain2};
11841        return result;
11842    }
11843
11844    // ain1 = "float2 a"
11845    // ain2 = "float4 b"
11846    public result_int reduce_my_float2_float4_0(Allocation ain1, Allocation ain2) {
11847        return reduce_my_float2_float4_0(ain1, ain2, null);
11848    }
11849
11850    // ain1 = "float2 a"
11851    // ain2 = "float4 b"
11852    public result_int reduce_my_float2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11853        Type t0, t1;
11854        // check ain1
11855        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11856            throw new RSRuntimeException("Type mismatch with F32_2!");
11857        }
11858        // check ain2
11859        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
11860            throw new RSRuntimeException("Type mismatch with F32_4!");
11861        }
11862        // Verify dimensions
11863        t0 = ain1.getType();
11864        t1 = ain2.getType();
11865        if ((t0.getCount() != t1.getCount()) ||
11866            (t0.getX() != t1.getX()) ||
11867            (t0.getY() != t1.getY()) ||
11868            (t0.getZ() != t1.getZ()) ||
11869            (t0.hasFaces()   != t1.hasFaces()) ||
11870            (t0.hasMipmaps() != t1.hasMipmaps())) {
11871            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11872        }
11873
11874        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11875        aout.setAutoPadding(true);
11876        reduce(mExportReduceIdx_my_float2_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
11877        return new result_int(aout);
11878    }
11879
11880    private final static int mExportReduceIdx_my_float2_float4_1 = 179;
11881    // in1 = "a", flattened 2-vectors
11882    // in2 = "b", flattened 4-vectors
11883    public result_int reduce_my_float2_float4_1(float[] in1, float[] in2) {
11884        // Verify that "in1" is non-null.
11885        if (in1 == null) {
11886            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11887        }
11888        // Verify that the array length is a multiple of the vector size.
11889        if (in1.length % 2 != 0) {
11890            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11891        }
11892        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11893        ain1.setAutoPadding(true);
11894        ain1.copyFrom(in1);
11895        // Verify that "in2" is non-null.
11896        if (in2 == null) {
11897            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11898        }
11899        // Verify that the array length is a multiple of the vector size.
11900        if (in2.length % 4 != 0) {
11901            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
11902        }
11903        // Verify that input array lengths are the same.
11904        if (in1.length / 2 != in2.length / 4) {
11905            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11906        }
11907        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
11908        ain2.setAutoPadding(true);
11909        ain2.copyFrom(in2);
11910
11911        result_int result = reduce_my_float2_float4_1(ain1, ain2, null);
11912        result.mTempIns = new Allocation[]{ain1, ain2};
11913        return result;
11914    }
11915
11916    // ain1 = "float2 a"
11917    // ain2 = "float4 b"
11918    public result_int reduce_my_float2_float4_1(Allocation ain1, Allocation ain2) {
11919        return reduce_my_float2_float4_1(ain1, ain2, null);
11920    }
11921
11922    // ain1 = "float2 a"
11923    // ain2 = "float4 b"
11924    public result_int reduce_my_float2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11925        Type t0, t1;
11926        // check ain1
11927        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11928            throw new RSRuntimeException("Type mismatch with F32_2!");
11929        }
11930        // check ain2
11931        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
11932            throw new RSRuntimeException("Type mismatch with F32_4!");
11933        }
11934        // Verify dimensions
11935        t0 = ain1.getType();
11936        t1 = ain2.getType();
11937        if ((t0.getCount() != t1.getCount()) ||
11938            (t0.getX() != t1.getX()) ||
11939            (t0.getY() != t1.getY()) ||
11940            (t0.getZ() != t1.getZ()) ||
11941            (t0.hasFaces()   != t1.hasFaces()) ||
11942            (t0.hasMipmaps() != t1.hasMipmaps())) {
11943            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
11944        }
11945
11946        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
11947        aout.setAutoPadding(true);
11948        reduce(mExportReduceIdx_my_float2_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
11949        return new result_int(aout);
11950    }
11951
11952    private final static int mExportReduceIdx_my_float2_char_0 = 180;
11953    // in1 = "a", flattened 2-vectors
11954    // in2 = "b"
11955    public result_int reduce_my_float2_char_0(float[] in1, byte[] in2) {
11956        // Verify that "in1" is non-null.
11957        if (in1 == null) {
11958            throw new RSIllegalArgumentException("Array \"in1\" is null!");
11959        }
11960        // Verify that the array length is a multiple of the vector size.
11961        if (in1.length % 2 != 0) {
11962            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
11963        }
11964        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
11965        ain1.setAutoPadding(true);
11966        ain1.copyFrom(in1);
11967        // Verify that "in2" is non-null.
11968        if (in2 == null) {
11969            throw new RSIllegalArgumentException("Array \"in2\" is null!");
11970        }
11971        // Verify that input array lengths are the same.
11972        if (in1.length / 2 != in2.length) {
11973            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
11974        }
11975        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
11976        ain2.setAutoPadding(true);
11977        ain2.copyFrom(in2);
11978
11979        result_int result = reduce_my_float2_char_0(ain1, ain2, null);
11980        result.mTempIns = new Allocation[]{ain1, ain2};
11981        return result;
11982    }
11983
11984    // ain1 = "float2 a"
11985    // ain2 = "char b"
11986    public result_int reduce_my_float2_char_0(Allocation ain1, Allocation ain2) {
11987        return reduce_my_float2_char_0(ain1, ain2, null);
11988    }
11989
11990    // ain1 = "float2 a"
11991    // ain2 = "char b"
11992    public result_int reduce_my_float2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
11993        Type t0, t1;
11994        // check ain1
11995        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
11996            throw new RSRuntimeException("Type mismatch with F32_2!");
11997        }
11998        // check ain2
11999        if (!ain2.getType().getElement().isCompatible(__I8)) {
12000            throw new RSRuntimeException("Type mismatch with I8!");
12001        }
12002        // Verify dimensions
12003        t0 = ain1.getType();
12004        t1 = ain2.getType();
12005        if ((t0.getCount() != t1.getCount()) ||
12006            (t0.getX() != t1.getX()) ||
12007            (t0.getY() != t1.getY()) ||
12008            (t0.getZ() != t1.getZ()) ||
12009            (t0.hasFaces()   != t1.hasFaces()) ||
12010            (t0.hasMipmaps() != t1.hasMipmaps())) {
12011            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12012        }
12013
12014        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12015        aout.setAutoPadding(true);
12016        reduce(mExportReduceIdx_my_float2_char_0, new Allocation[]{ain1, ain2}, aout, sc);
12017        return new result_int(aout);
12018    }
12019
12020    private final static int mExportReduceIdx_my_float2_char_1 = 181;
12021    // in1 = "a", flattened 2-vectors
12022    // in2 = "b"
12023    public result_int reduce_my_float2_char_1(float[] in1, byte[] in2) {
12024        // Verify that "in1" is non-null.
12025        if (in1 == null) {
12026            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12027        }
12028        // Verify that the array length is a multiple of the vector size.
12029        if (in1.length % 2 != 0) {
12030            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12031        }
12032        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12033        ain1.setAutoPadding(true);
12034        ain1.copyFrom(in1);
12035        // Verify that "in2" is non-null.
12036        if (in2 == null) {
12037            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12038        }
12039        // Verify that input array lengths are the same.
12040        if (in1.length / 2 != in2.length) {
12041            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12042        }
12043        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
12044        ain2.setAutoPadding(true);
12045        ain2.copyFrom(in2);
12046
12047        result_int result = reduce_my_float2_char_1(ain1, ain2, null);
12048        result.mTempIns = new Allocation[]{ain1, ain2};
12049        return result;
12050    }
12051
12052    // ain1 = "float2 a"
12053    // ain2 = "char b"
12054    public result_int reduce_my_float2_char_1(Allocation ain1, Allocation ain2) {
12055        return reduce_my_float2_char_1(ain1, ain2, null);
12056    }
12057
12058    // ain1 = "float2 a"
12059    // ain2 = "char b"
12060    public result_int reduce_my_float2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12061        Type t0, t1;
12062        // check ain1
12063        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12064            throw new RSRuntimeException("Type mismatch with F32_2!");
12065        }
12066        // check ain2
12067        if (!ain2.getType().getElement().isCompatible(__I8)) {
12068            throw new RSRuntimeException("Type mismatch with I8!");
12069        }
12070        // Verify dimensions
12071        t0 = ain1.getType();
12072        t1 = ain2.getType();
12073        if ((t0.getCount() != t1.getCount()) ||
12074            (t0.getX() != t1.getX()) ||
12075            (t0.getY() != t1.getY()) ||
12076            (t0.getZ() != t1.getZ()) ||
12077            (t0.hasFaces()   != t1.hasFaces()) ||
12078            (t0.hasMipmaps() != t1.hasMipmaps())) {
12079            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12080        }
12081
12082        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12083        aout.setAutoPadding(true);
12084        reduce(mExportReduceIdx_my_float2_char_1, new Allocation[]{ain1, ain2}, aout, sc);
12085        return new result_int(aout);
12086    }
12087
12088    private final static int mExportReduceIdx_my_float2_char2_0 = 182;
12089    // in1 = "a", flattened 2-vectors
12090    // in2 = "b", flattened 2-vectors
12091    public result_int reduce_my_float2_char2_0(float[] in1, byte[] in2) {
12092        // Verify that "in1" is non-null.
12093        if (in1 == null) {
12094            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12095        }
12096        // Verify that the array length is a multiple of the vector size.
12097        if (in1.length % 2 != 0) {
12098            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12099        }
12100        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12101        ain1.setAutoPadding(true);
12102        ain1.copyFrom(in1);
12103        // Verify that "in2" is non-null.
12104        if (in2 == null) {
12105            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12106        }
12107        // Verify that the array length is a multiple of the vector size.
12108        if (in2.length % 2 != 0) {
12109            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
12110        }
12111        // Verify that input array lengths are the same.
12112        if (in1.length / 2 != in2.length / 2) {
12113            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12114        }
12115        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
12116        ain2.setAutoPadding(true);
12117        ain2.copyFrom(in2);
12118
12119        result_int result = reduce_my_float2_char2_0(ain1, ain2, null);
12120        result.mTempIns = new Allocation[]{ain1, ain2};
12121        return result;
12122    }
12123
12124    // ain1 = "float2 a"
12125    // ain2 = "char2 b"
12126    public result_int reduce_my_float2_char2_0(Allocation ain1, Allocation ain2) {
12127        return reduce_my_float2_char2_0(ain1, ain2, null);
12128    }
12129
12130    // ain1 = "float2 a"
12131    // ain2 = "char2 b"
12132    public result_int reduce_my_float2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12133        Type t0, t1;
12134        // check ain1
12135        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12136            throw new RSRuntimeException("Type mismatch with F32_2!");
12137        }
12138        // check ain2
12139        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
12140            throw new RSRuntimeException("Type mismatch with I8_2!");
12141        }
12142        // Verify dimensions
12143        t0 = ain1.getType();
12144        t1 = ain2.getType();
12145        if ((t0.getCount() != t1.getCount()) ||
12146            (t0.getX() != t1.getX()) ||
12147            (t0.getY() != t1.getY()) ||
12148            (t0.getZ() != t1.getZ()) ||
12149            (t0.hasFaces()   != t1.hasFaces()) ||
12150            (t0.hasMipmaps() != t1.hasMipmaps())) {
12151            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12152        }
12153
12154        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12155        aout.setAutoPadding(true);
12156        reduce(mExportReduceIdx_my_float2_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
12157        return new result_int(aout);
12158    }
12159
12160    private final static int mExportReduceIdx_my_float2_char2_1 = 183;
12161    // in1 = "a", flattened 2-vectors
12162    // in2 = "b", flattened 2-vectors
12163    public result_int reduce_my_float2_char2_1(float[] in1, byte[] in2) {
12164        // Verify that "in1" is non-null.
12165        if (in1 == null) {
12166            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12167        }
12168        // Verify that the array length is a multiple of the vector size.
12169        if (in1.length % 2 != 0) {
12170            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12171        }
12172        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12173        ain1.setAutoPadding(true);
12174        ain1.copyFrom(in1);
12175        // Verify that "in2" is non-null.
12176        if (in2 == null) {
12177            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12178        }
12179        // Verify that the array length is a multiple of the vector size.
12180        if (in2.length % 2 != 0) {
12181            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
12182        }
12183        // Verify that input array lengths are the same.
12184        if (in1.length / 2 != in2.length / 2) {
12185            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12186        }
12187        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
12188        ain2.setAutoPadding(true);
12189        ain2.copyFrom(in2);
12190
12191        result_int result = reduce_my_float2_char2_1(ain1, ain2, null);
12192        result.mTempIns = new Allocation[]{ain1, ain2};
12193        return result;
12194    }
12195
12196    // ain1 = "float2 a"
12197    // ain2 = "char2 b"
12198    public result_int reduce_my_float2_char2_1(Allocation ain1, Allocation ain2) {
12199        return reduce_my_float2_char2_1(ain1, ain2, null);
12200    }
12201
12202    // ain1 = "float2 a"
12203    // ain2 = "char2 b"
12204    public result_int reduce_my_float2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12205        Type t0, t1;
12206        // check ain1
12207        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12208            throw new RSRuntimeException("Type mismatch with F32_2!");
12209        }
12210        // check ain2
12211        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
12212            throw new RSRuntimeException("Type mismatch with I8_2!");
12213        }
12214        // Verify dimensions
12215        t0 = ain1.getType();
12216        t1 = ain2.getType();
12217        if ((t0.getCount() != t1.getCount()) ||
12218            (t0.getX() != t1.getX()) ||
12219            (t0.getY() != t1.getY()) ||
12220            (t0.getZ() != t1.getZ()) ||
12221            (t0.hasFaces()   != t1.hasFaces()) ||
12222            (t0.hasMipmaps() != t1.hasMipmaps())) {
12223            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12224        }
12225
12226        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12227        aout.setAutoPadding(true);
12228        reduce(mExportReduceIdx_my_float2_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
12229        return new result_int(aout);
12230    }
12231
12232    private final static int mExportReduceIdx_my_float2_char4_0 = 184;
12233    // in1 = "a", flattened 2-vectors
12234    // in2 = "b", flattened 4-vectors
12235    public result_int reduce_my_float2_char4_0(float[] in1, byte[] in2) {
12236        // Verify that "in1" is non-null.
12237        if (in1 == null) {
12238            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12239        }
12240        // Verify that the array length is a multiple of the vector size.
12241        if (in1.length % 2 != 0) {
12242            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12243        }
12244        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12245        ain1.setAutoPadding(true);
12246        ain1.copyFrom(in1);
12247        // Verify that "in2" is non-null.
12248        if (in2 == null) {
12249            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12250        }
12251        // Verify that the array length is a multiple of the vector size.
12252        if (in2.length % 4 != 0) {
12253            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
12254        }
12255        // Verify that input array lengths are the same.
12256        if (in1.length / 2 != in2.length / 4) {
12257            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12258        }
12259        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
12260        ain2.setAutoPadding(true);
12261        ain2.copyFrom(in2);
12262
12263        result_int result = reduce_my_float2_char4_0(ain1, ain2, null);
12264        result.mTempIns = new Allocation[]{ain1, ain2};
12265        return result;
12266    }
12267
12268    // ain1 = "float2 a"
12269    // ain2 = "char4 b"
12270    public result_int reduce_my_float2_char4_0(Allocation ain1, Allocation ain2) {
12271        return reduce_my_float2_char4_0(ain1, ain2, null);
12272    }
12273
12274    // ain1 = "float2 a"
12275    // ain2 = "char4 b"
12276    public result_int reduce_my_float2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12277        Type t0, t1;
12278        // check ain1
12279        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12280            throw new RSRuntimeException("Type mismatch with F32_2!");
12281        }
12282        // check ain2
12283        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
12284            throw new RSRuntimeException("Type mismatch with I8_4!");
12285        }
12286        // Verify dimensions
12287        t0 = ain1.getType();
12288        t1 = ain2.getType();
12289        if ((t0.getCount() != t1.getCount()) ||
12290            (t0.getX() != t1.getX()) ||
12291            (t0.getY() != t1.getY()) ||
12292            (t0.getZ() != t1.getZ()) ||
12293            (t0.hasFaces()   != t1.hasFaces()) ||
12294            (t0.hasMipmaps() != t1.hasMipmaps())) {
12295            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12296        }
12297
12298        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12299        aout.setAutoPadding(true);
12300        reduce(mExportReduceIdx_my_float2_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
12301        return new result_int(aout);
12302    }
12303
12304    private final static int mExportReduceIdx_my_float2_char4_1 = 185;
12305    // in1 = "a", flattened 2-vectors
12306    // in2 = "b", flattened 4-vectors
12307    public result_int reduce_my_float2_char4_1(float[] in1, byte[] in2) {
12308        // Verify that "in1" is non-null.
12309        if (in1 == null) {
12310            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12311        }
12312        // Verify that the array length is a multiple of the vector size.
12313        if (in1.length % 2 != 0) {
12314            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12315        }
12316        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12317        ain1.setAutoPadding(true);
12318        ain1.copyFrom(in1);
12319        // Verify that "in2" is non-null.
12320        if (in2 == null) {
12321            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12322        }
12323        // Verify that the array length is a multiple of the vector size.
12324        if (in2.length % 4 != 0) {
12325            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
12326        }
12327        // Verify that input array lengths are the same.
12328        if (in1.length / 2 != in2.length / 4) {
12329            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12330        }
12331        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
12332        ain2.setAutoPadding(true);
12333        ain2.copyFrom(in2);
12334
12335        result_int result = reduce_my_float2_char4_1(ain1, ain2, null);
12336        result.mTempIns = new Allocation[]{ain1, ain2};
12337        return result;
12338    }
12339
12340    // ain1 = "float2 a"
12341    // ain2 = "char4 b"
12342    public result_int reduce_my_float2_char4_1(Allocation ain1, Allocation ain2) {
12343        return reduce_my_float2_char4_1(ain1, ain2, null);
12344    }
12345
12346    // ain1 = "float2 a"
12347    // ain2 = "char4 b"
12348    public result_int reduce_my_float2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12349        Type t0, t1;
12350        // check ain1
12351        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12352            throw new RSRuntimeException("Type mismatch with F32_2!");
12353        }
12354        // check ain2
12355        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
12356            throw new RSRuntimeException("Type mismatch with I8_4!");
12357        }
12358        // Verify dimensions
12359        t0 = ain1.getType();
12360        t1 = ain2.getType();
12361        if ((t0.getCount() != t1.getCount()) ||
12362            (t0.getX() != t1.getX()) ||
12363            (t0.getY() != t1.getY()) ||
12364            (t0.getZ() != t1.getZ()) ||
12365            (t0.hasFaces()   != t1.hasFaces()) ||
12366            (t0.hasMipmaps() != t1.hasMipmaps())) {
12367            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12368        }
12369
12370        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12371        aout.setAutoPadding(true);
12372        reduce(mExportReduceIdx_my_float2_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
12373        return new result_int(aout);
12374    }
12375
12376    private final static int mExportReduceIdx_my_float2_short_0 = 186;
12377    // in1 = "a", flattened 2-vectors
12378    // in2 = "b"
12379    public result_int reduce_my_float2_short_0(float[] in1, short[] in2) {
12380        // Verify that "in1" is non-null.
12381        if (in1 == null) {
12382            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12383        }
12384        // Verify that the array length is a multiple of the vector size.
12385        if (in1.length % 2 != 0) {
12386            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12387        }
12388        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12389        ain1.setAutoPadding(true);
12390        ain1.copyFrom(in1);
12391        // Verify that "in2" is non-null.
12392        if (in2 == null) {
12393            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12394        }
12395        // Verify that input array lengths are the same.
12396        if (in1.length / 2 != in2.length) {
12397            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12398        }
12399        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
12400        ain2.setAutoPadding(true);
12401        ain2.copyFrom(in2);
12402
12403        result_int result = reduce_my_float2_short_0(ain1, ain2, null);
12404        result.mTempIns = new Allocation[]{ain1, ain2};
12405        return result;
12406    }
12407
12408    // ain1 = "float2 a"
12409    // ain2 = "short b"
12410    public result_int reduce_my_float2_short_0(Allocation ain1, Allocation ain2) {
12411        return reduce_my_float2_short_0(ain1, ain2, null);
12412    }
12413
12414    // ain1 = "float2 a"
12415    // ain2 = "short b"
12416    public result_int reduce_my_float2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12417        Type t0, t1;
12418        // check ain1
12419        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12420            throw new RSRuntimeException("Type mismatch with F32_2!");
12421        }
12422        // check ain2
12423        if (!ain2.getType().getElement().isCompatible(__I16)) {
12424            throw new RSRuntimeException("Type mismatch with I16!");
12425        }
12426        // Verify dimensions
12427        t0 = ain1.getType();
12428        t1 = ain2.getType();
12429        if ((t0.getCount() != t1.getCount()) ||
12430            (t0.getX() != t1.getX()) ||
12431            (t0.getY() != t1.getY()) ||
12432            (t0.getZ() != t1.getZ()) ||
12433            (t0.hasFaces()   != t1.hasFaces()) ||
12434            (t0.hasMipmaps() != t1.hasMipmaps())) {
12435            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12436        }
12437
12438        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12439        aout.setAutoPadding(true);
12440        reduce(mExportReduceIdx_my_float2_short_0, new Allocation[]{ain1, ain2}, aout, sc);
12441        return new result_int(aout);
12442    }
12443
12444    private final static int mExportReduceIdx_my_float2_short_1 = 187;
12445    // in1 = "a", flattened 2-vectors
12446    // in2 = "b"
12447    public result_int reduce_my_float2_short_1(float[] in1, short[] in2) {
12448        // Verify that "in1" is non-null.
12449        if (in1 == null) {
12450            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12451        }
12452        // Verify that the array length is a multiple of the vector size.
12453        if (in1.length % 2 != 0) {
12454            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12455        }
12456        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12457        ain1.setAutoPadding(true);
12458        ain1.copyFrom(in1);
12459        // Verify that "in2" is non-null.
12460        if (in2 == null) {
12461            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12462        }
12463        // Verify that input array lengths are the same.
12464        if (in1.length / 2 != in2.length) {
12465            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12466        }
12467        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
12468        ain2.setAutoPadding(true);
12469        ain2.copyFrom(in2);
12470
12471        result_int result = reduce_my_float2_short_1(ain1, ain2, null);
12472        result.mTempIns = new Allocation[]{ain1, ain2};
12473        return result;
12474    }
12475
12476    // ain1 = "float2 a"
12477    // ain2 = "short b"
12478    public result_int reduce_my_float2_short_1(Allocation ain1, Allocation ain2) {
12479        return reduce_my_float2_short_1(ain1, ain2, null);
12480    }
12481
12482    // ain1 = "float2 a"
12483    // ain2 = "short b"
12484    public result_int reduce_my_float2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12485        Type t0, t1;
12486        // check ain1
12487        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12488            throw new RSRuntimeException("Type mismatch with F32_2!");
12489        }
12490        // check ain2
12491        if (!ain2.getType().getElement().isCompatible(__I16)) {
12492            throw new RSRuntimeException("Type mismatch with I16!");
12493        }
12494        // Verify dimensions
12495        t0 = ain1.getType();
12496        t1 = ain2.getType();
12497        if ((t0.getCount() != t1.getCount()) ||
12498            (t0.getX() != t1.getX()) ||
12499            (t0.getY() != t1.getY()) ||
12500            (t0.getZ() != t1.getZ()) ||
12501            (t0.hasFaces()   != t1.hasFaces()) ||
12502            (t0.hasMipmaps() != t1.hasMipmaps())) {
12503            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12504        }
12505
12506        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12507        aout.setAutoPadding(true);
12508        reduce(mExportReduceIdx_my_float2_short_1, new Allocation[]{ain1, ain2}, aout, sc);
12509        return new result_int(aout);
12510    }
12511
12512    private final static int mExportReduceIdx_my_float2_short2_0 = 188;
12513    // in1 = "a", flattened 2-vectors
12514    // in2 = "b", flattened 2-vectors
12515    public result_int reduce_my_float2_short2_0(float[] in1, short[] in2) {
12516        // Verify that "in1" is non-null.
12517        if (in1 == null) {
12518            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12519        }
12520        // Verify that the array length is a multiple of the vector size.
12521        if (in1.length % 2 != 0) {
12522            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12523        }
12524        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12525        ain1.setAutoPadding(true);
12526        ain1.copyFrom(in1);
12527        // Verify that "in2" is non-null.
12528        if (in2 == null) {
12529            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12530        }
12531        // Verify that the array length is a multiple of the vector size.
12532        if (in2.length % 2 != 0) {
12533            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
12534        }
12535        // Verify that input array lengths are the same.
12536        if (in1.length / 2 != in2.length / 2) {
12537            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12538        }
12539        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
12540        ain2.setAutoPadding(true);
12541        ain2.copyFrom(in2);
12542
12543        result_int result = reduce_my_float2_short2_0(ain1, ain2, null);
12544        result.mTempIns = new Allocation[]{ain1, ain2};
12545        return result;
12546    }
12547
12548    // ain1 = "float2 a"
12549    // ain2 = "short2 b"
12550    public result_int reduce_my_float2_short2_0(Allocation ain1, Allocation ain2) {
12551        return reduce_my_float2_short2_0(ain1, ain2, null);
12552    }
12553
12554    // ain1 = "float2 a"
12555    // ain2 = "short2 b"
12556    public result_int reduce_my_float2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12557        Type t0, t1;
12558        // check ain1
12559        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12560            throw new RSRuntimeException("Type mismatch with F32_2!");
12561        }
12562        // check ain2
12563        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
12564            throw new RSRuntimeException("Type mismatch with I16_2!");
12565        }
12566        // Verify dimensions
12567        t0 = ain1.getType();
12568        t1 = ain2.getType();
12569        if ((t0.getCount() != t1.getCount()) ||
12570            (t0.getX() != t1.getX()) ||
12571            (t0.getY() != t1.getY()) ||
12572            (t0.getZ() != t1.getZ()) ||
12573            (t0.hasFaces()   != t1.hasFaces()) ||
12574            (t0.hasMipmaps() != t1.hasMipmaps())) {
12575            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12576        }
12577
12578        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12579        aout.setAutoPadding(true);
12580        reduce(mExportReduceIdx_my_float2_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
12581        return new result_int(aout);
12582    }
12583
12584    private final static int mExportReduceIdx_my_float2_short2_1 = 189;
12585    // in1 = "a", flattened 2-vectors
12586    // in2 = "b", flattened 2-vectors
12587    public result_int reduce_my_float2_short2_1(float[] in1, short[] in2) {
12588        // Verify that "in1" is non-null.
12589        if (in1 == null) {
12590            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12591        }
12592        // Verify that the array length is a multiple of the vector size.
12593        if (in1.length % 2 != 0) {
12594            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12595        }
12596        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12597        ain1.setAutoPadding(true);
12598        ain1.copyFrom(in1);
12599        // Verify that "in2" is non-null.
12600        if (in2 == null) {
12601            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12602        }
12603        // Verify that the array length is a multiple of the vector size.
12604        if (in2.length % 2 != 0) {
12605            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
12606        }
12607        // Verify that input array lengths are the same.
12608        if (in1.length / 2 != in2.length / 2) {
12609            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12610        }
12611        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
12612        ain2.setAutoPadding(true);
12613        ain2.copyFrom(in2);
12614
12615        result_int result = reduce_my_float2_short2_1(ain1, ain2, null);
12616        result.mTempIns = new Allocation[]{ain1, ain2};
12617        return result;
12618    }
12619
12620    // ain1 = "float2 a"
12621    // ain2 = "short2 b"
12622    public result_int reduce_my_float2_short2_1(Allocation ain1, Allocation ain2) {
12623        return reduce_my_float2_short2_1(ain1, ain2, null);
12624    }
12625
12626    // ain1 = "float2 a"
12627    // ain2 = "short2 b"
12628    public result_int reduce_my_float2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12629        Type t0, t1;
12630        // check ain1
12631        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12632            throw new RSRuntimeException("Type mismatch with F32_2!");
12633        }
12634        // check ain2
12635        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
12636            throw new RSRuntimeException("Type mismatch with I16_2!");
12637        }
12638        // Verify dimensions
12639        t0 = ain1.getType();
12640        t1 = ain2.getType();
12641        if ((t0.getCount() != t1.getCount()) ||
12642            (t0.getX() != t1.getX()) ||
12643            (t0.getY() != t1.getY()) ||
12644            (t0.getZ() != t1.getZ()) ||
12645            (t0.hasFaces()   != t1.hasFaces()) ||
12646            (t0.hasMipmaps() != t1.hasMipmaps())) {
12647            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12648        }
12649
12650        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12651        aout.setAutoPadding(true);
12652        reduce(mExportReduceIdx_my_float2_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
12653        return new result_int(aout);
12654    }
12655
12656    private final static int mExportReduceIdx_my_float2_short4_0 = 190;
12657    // in1 = "a", flattened 2-vectors
12658    // in2 = "b", flattened 4-vectors
12659    public result_int reduce_my_float2_short4_0(float[] in1, short[] in2) {
12660        // Verify that "in1" is non-null.
12661        if (in1 == null) {
12662            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12663        }
12664        // Verify that the array length is a multiple of the vector size.
12665        if (in1.length % 2 != 0) {
12666            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12667        }
12668        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12669        ain1.setAutoPadding(true);
12670        ain1.copyFrom(in1);
12671        // Verify that "in2" is non-null.
12672        if (in2 == null) {
12673            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12674        }
12675        // Verify that the array length is a multiple of the vector size.
12676        if (in2.length % 4 != 0) {
12677            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
12678        }
12679        // Verify that input array lengths are the same.
12680        if (in1.length / 2 != in2.length / 4) {
12681            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12682        }
12683        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
12684        ain2.setAutoPadding(true);
12685        ain2.copyFrom(in2);
12686
12687        result_int result = reduce_my_float2_short4_0(ain1, ain2, null);
12688        result.mTempIns = new Allocation[]{ain1, ain2};
12689        return result;
12690    }
12691
12692    // ain1 = "float2 a"
12693    // ain2 = "short4 b"
12694    public result_int reduce_my_float2_short4_0(Allocation ain1, Allocation ain2) {
12695        return reduce_my_float2_short4_0(ain1, ain2, null);
12696    }
12697
12698    // ain1 = "float2 a"
12699    // ain2 = "short4 b"
12700    public result_int reduce_my_float2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12701        Type t0, t1;
12702        // check ain1
12703        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12704            throw new RSRuntimeException("Type mismatch with F32_2!");
12705        }
12706        // check ain2
12707        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
12708            throw new RSRuntimeException("Type mismatch with I16_4!");
12709        }
12710        // Verify dimensions
12711        t0 = ain1.getType();
12712        t1 = ain2.getType();
12713        if ((t0.getCount() != t1.getCount()) ||
12714            (t0.getX() != t1.getX()) ||
12715            (t0.getY() != t1.getY()) ||
12716            (t0.getZ() != t1.getZ()) ||
12717            (t0.hasFaces()   != t1.hasFaces()) ||
12718            (t0.hasMipmaps() != t1.hasMipmaps())) {
12719            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12720        }
12721
12722        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12723        aout.setAutoPadding(true);
12724        reduce(mExportReduceIdx_my_float2_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
12725        return new result_int(aout);
12726    }
12727
12728    private final static int mExportReduceIdx_my_float2_short4_1 = 191;
12729    // in1 = "a", flattened 2-vectors
12730    // in2 = "b", flattened 4-vectors
12731    public result_int reduce_my_float2_short4_1(float[] in1, short[] in2) {
12732        // Verify that "in1" is non-null.
12733        if (in1 == null) {
12734            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12735        }
12736        // Verify that the array length is a multiple of the vector size.
12737        if (in1.length % 2 != 0) {
12738            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12739        }
12740        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12741        ain1.setAutoPadding(true);
12742        ain1.copyFrom(in1);
12743        // Verify that "in2" is non-null.
12744        if (in2 == null) {
12745            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12746        }
12747        // Verify that the array length is a multiple of the vector size.
12748        if (in2.length % 4 != 0) {
12749            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
12750        }
12751        // Verify that input array lengths are the same.
12752        if (in1.length / 2 != in2.length / 4) {
12753            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12754        }
12755        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
12756        ain2.setAutoPadding(true);
12757        ain2.copyFrom(in2);
12758
12759        result_int result = reduce_my_float2_short4_1(ain1, ain2, null);
12760        result.mTempIns = new Allocation[]{ain1, ain2};
12761        return result;
12762    }
12763
12764    // ain1 = "float2 a"
12765    // ain2 = "short4 b"
12766    public result_int reduce_my_float2_short4_1(Allocation ain1, Allocation ain2) {
12767        return reduce_my_float2_short4_1(ain1, ain2, null);
12768    }
12769
12770    // ain1 = "float2 a"
12771    // ain2 = "short4 b"
12772    public result_int reduce_my_float2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12773        Type t0, t1;
12774        // check ain1
12775        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12776            throw new RSRuntimeException("Type mismatch with F32_2!");
12777        }
12778        // check ain2
12779        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
12780            throw new RSRuntimeException("Type mismatch with I16_4!");
12781        }
12782        // Verify dimensions
12783        t0 = ain1.getType();
12784        t1 = ain2.getType();
12785        if ((t0.getCount() != t1.getCount()) ||
12786            (t0.getX() != t1.getX()) ||
12787            (t0.getY() != t1.getY()) ||
12788            (t0.getZ() != t1.getZ()) ||
12789            (t0.hasFaces()   != t1.hasFaces()) ||
12790            (t0.hasMipmaps() != t1.hasMipmaps())) {
12791            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12792        }
12793
12794        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12795        aout.setAutoPadding(true);
12796        reduce(mExportReduceIdx_my_float2_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
12797        return new result_int(aout);
12798    }
12799
12800    private final static int mExportReduceIdx_my_float2_uchar_0 = 192;
12801    // in1 = "a", flattened 2-vectors
12802    // in2 = "b"
12803    public result_int reduce_my_float2_uchar_0(float[] in1, byte[] in2) {
12804        // Verify that "in1" is non-null.
12805        if (in1 == null) {
12806            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12807        }
12808        // Verify that the array length is a multiple of the vector size.
12809        if (in1.length % 2 != 0) {
12810            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12811        }
12812        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12813        ain1.setAutoPadding(true);
12814        ain1.copyFrom(in1);
12815        // Verify that "in2" is non-null.
12816        if (in2 == null) {
12817            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12818        }
12819        // Verify that input array lengths are the same.
12820        if (in1.length / 2 != in2.length) {
12821            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12822        }
12823        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
12824        ain2.setAutoPadding(true);
12825        ain2.copyFrom(in2);
12826
12827        result_int result = reduce_my_float2_uchar_0(ain1, ain2, null);
12828        result.mTempIns = new Allocation[]{ain1, ain2};
12829        return result;
12830    }
12831
12832    // ain1 = "float2 a"
12833    // ain2 = "uchar b"
12834    public result_int reduce_my_float2_uchar_0(Allocation ain1, Allocation ain2) {
12835        return reduce_my_float2_uchar_0(ain1, ain2, null);
12836    }
12837
12838    // ain1 = "float2 a"
12839    // ain2 = "uchar b"
12840    public result_int reduce_my_float2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12841        Type t0, t1;
12842        // check ain1
12843        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12844            throw new RSRuntimeException("Type mismatch with F32_2!");
12845        }
12846        // check ain2
12847        if (!ain2.getType().getElement().isCompatible(__U8)) {
12848            throw new RSRuntimeException("Type mismatch with U8!");
12849        }
12850        // Verify dimensions
12851        t0 = ain1.getType();
12852        t1 = ain2.getType();
12853        if ((t0.getCount() != t1.getCount()) ||
12854            (t0.getX() != t1.getX()) ||
12855            (t0.getY() != t1.getY()) ||
12856            (t0.getZ() != t1.getZ()) ||
12857            (t0.hasFaces()   != t1.hasFaces()) ||
12858            (t0.hasMipmaps() != t1.hasMipmaps())) {
12859            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12860        }
12861
12862        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12863        aout.setAutoPadding(true);
12864        reduce(mExportReduceIdx_my_float2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
12865        return new result_int(aout);
12866    }
12867
12868    private final static int mExportReduceIdx_my_float2_uchar_1 = 193;
12869    // in1 = "a", flattened 2-vectors
12870    // in2 = "b"
12871    public result_int reduce_my_float2_uchar_1(float[] in1, byte[] in2) {
12872        // Verify that "in1" is non-null.
12873        if (in1 == null) {
12874            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12875        }
12876        // Verify that the array length is a multiple of the vector size.
12877        if (in1.length % 2 != 0) {
12878            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12879        }
12880        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12881        ain1.setAutoPadding(true);
12882        ain1.copyFrom(in1);
12883        // Verify that "in2" is non-null.
12884        if (in2 == null) {
12885            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12886        }
12887        // Verify that input array lengths are the same.
12888        if (in1.length / 2 != in2.length) {
12889            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12890        }
12891        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
12892        ain2.setAutoPadding(true);
12893        ain2.copyFrom(in2);
12894
12895        result_int result = reduce_my_float2_uchar_1(ain1, ain2, null);
12896        result.mTempIns = new Allocation[]{ain1, ain2};
12897        return result;
12898    }
12899
12900    // ain1 = "float2 a"
12901    // ain2 = "uchar b"
12902    public result_int reduce_my_float2_uchar_1(Allocation ain1, Allocation ain2) {
12903        return reduce_my_float2_uchar_1(ain1, ain2, null);
12904    }
12905
12906    // ain1 = "float2 a"
12907    // ain2 = "uchar b"
12908    public result_int reduce_my_float2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12909        Type t0, t1;
12910        // check ain1
12911        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12912            throw new RSRuntimeException("Type mismatch with F32_2!");
12913        }
12914        // check ain2
12915        if (!ain2.getType().getElement().isCompatible(__U8)) {
12916            throw new RSRuntimeException("Type mismatch with U8!");
12917        }
12918        // Verify dimensions
12919        t0 = ain1.getType();
12920        t1 = ain2.getType();
12921        if ((t0.getCount() != t1.getCount()) ||
12922            (t0.getX() != t1.getX()) ||
12923            (t0.getY() != t1.getY()) ||
12924            (t0.getZ() != t1.getZ()) ||
12925            (t0.hasFaces()   != t1.hasFaces()) ||
12926            (t0.hasMipmaps() != t1.hasMipmaps())) {
12927            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
12928        }
12929
12930        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
12931        aout.setAutoPadding(true);
12932        reduce(mExportReduceIdx_my_float2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
12933        return new result_int(aout);
12934    }
12935
12936    private final static int mExportReduceIdx_my_float2_uchar2_0 = 194;
12937    // in1 = "a", flattened 2-vectors
12938    // in2 = "b", flattened 2-vectors
12939    public result_int reduce_my_float2_uchar2_0(float[] in1, byte[] in2) {
12940        // Verify that "in1" is non-null.
12941        if (in1 == null) {
12942            throw new RSIllegalArgumentException("Array \"in1\" is null!");
12943        }
12944        // Verify that the array length is a multiple of the vector size.
12945        if (in1.length % 2 != 0) {
12946            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
12947        }
12948        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
12949        ain1.setAutoPadding(true);
12950        ain1.copyFrom(in1);
12951        // Verify that "in2" is non-null.
12952        if (in2 == null) {
12953            throw new RSIllegalArgumentException("Array \"in2\" is null!");
12954        }
12955        // Verify that the array length is a multiple of the vector size.
12956        if (in2.length % 2 != 0) {
12957            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
12958        }
12959        // Verify that input array lengths are the same.
12960        if (in1.length / 2 != in2.length / 2) {
12961            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
12962        }
12963        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
12964        ain2.setAutoPadding(true);
12965        ain2.copyFrom(in2);
12966
12967        result_int result = reduce_my_float2_uchar2_0(ain1, ain2, null);
12968        result.mTempIns = new Allocation[]{ain1, ain2};
12969        return result;
12970    }
12971
12972    // ain1 = "float2 a"
12973    // ain2 = "uchar2 b"
12974    public result_int reduce_my_float2_uchar2_0(Allocation ain1, Allocation ain2) {
12975        return reduce_my_float2_uchar2_0(ain1, ain2, null);
12976    }
12977
12978    // ain1 = "float2 a"
12979    // ain2 = "uchar2 b"
12980    public result_int reduce_my_float2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
12981        Type t0, t1;
12982        // check ain1
12983        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
12984            throw new RSRuntimeException("Type mismatch with F32_2!");
12985        }
12986        // check ain2
12987        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
12988            throw new RSRuntimeException("Type mismatch with U8_2!");
12989        }
12990        // Verify dimensions
12991        t0 = ain1.getType();
12992        t1 = ain2.getType();
12993        if ((t0.getCount() != t1.getCount()) ||
12994            (t0.getX() != t1.getX()) ||
12995            (t0.getY() != t1.getY()) ||
12996            (t0.getZ() != t1.getZ()) ||
12997            (t0.hasFaces()   != t1.hasFaces()) ||
12998            (t0.hasMipmaps() != t1.hasMipmaps())) {
12999            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13000        }
13001
13002        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13003        aout.setAutoPadding(true);
13004        reduce(mExportReduceIdx_my_float2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
13005        return new result_int(aout);
13006    }
13007
13008    private final static int mExportReduceIdx_my_float2_uchar2_1 = 195;
13009    // in1 = "a", flattened 2-vectors
13010    // in2 = "b", flattened 2-vectors
13011    public result_int reduce_my_float2_uchar2_1(float[] in1, byte[] in2) {
13012        // Verify that "in1" is non-null.
13013        if (in1 == null) {
13014            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13015        }
13016        // Verify that the array length is a multiple of the vector size.
13017        if (in1.length % 2 != 0) {
13018            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13019        }
13020        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13021        ain1.setAutoPadding(true);
13022        ain1.copyFrom(in1);
13023        // Verify that "in2" is non-null.
13024        if (in2 == null) {
13025            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13026        }
13027        // Verify that the array length is a multiple of the vector size.
13028        if (in2.length % 2 != 0) {
13029            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
13030        }
13031        // Verify that input array lengths are the same.
13032        if (in1.length / 2 != in2.length / 2) {
13033            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13034        }
13035        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
13036        ain2.setAutoPadding(true);
13037        ain2.copyFrom(in2);
13038
13039        result_int result = reduce_my_float2_uchar2_1(ain1, ain2, null);
13040        result.mTempIns = new Allocation[]{ain1, ain2};
13041        return result;
13042    }
13043
13044    // ain1 = "float2 a"
13045    // ain2 = "uchar2 b"
13046    public result_int reduce_my_float2_uchar2_1(Allocation ain1, Allocation ain2) {
13047        return reduce_my_float2_uchar2_1(ain1, ain2, null);
13048    }
13049
13050    // ain1 = "float2 a"
13051    // ain2 = "uchar2 b"
13052    public result_int reduce_my_float2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13053        Type t0, t1;
13054        // check ain1
13055        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13056            throw new RSRuntimeException("Type mismatch with F32_2!");
13057        }
13058        // check ain2
13059        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
13060            throw new RSRuntimeException("Type mismatch with U8_2!");
13061        }
13062        // Verify dimensions
13063        t0 = ain1.getType();
13064        t1 = ain2.getType();
13065        if ((t0.getCount() != t1.getCount()) ||
13066            (t0.getX() != t1.getX()) ||
13067            (t0.getY() != t1.getY()) ||
13068            (t0.getZ() != t1.getZ()) ||
13069            (t0.hasFaces()   != t1.hasFaces()) ||
13070            (t0.hasMipmaps() != t1.hasMipmaps())) {
13071            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13072        }
13073
13074        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13075        aout.setAutoPadding(true);
13076        reduce(mExportReduceIdx_my_float2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
13077        return new result_int(aout);
13078    }
13079
13080    private final static int mExportReduceIdx_my_float2_uchar4_0 = 196;
13081    // in1 = "a", flattened 2-vectors
13082    // in2 = "b", flattened 4-vectors
13083    public result_int reduce_my_float2_uchar4_0(float[] in1, byte[] in2) {
13084        // Verify that "in1" is non-null.
13085        if (in1 == null) {
13086            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13087        }
13088        // Verify that the array length is a multiple of the vector size.
13089        if (in1.length % 2 != 0) {
13090            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13091        }
13092        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13093        ain1.setAutoPadding(true);
13094        ain1.copyFrom(in1);
13095        // Verify that "in2" is non-null.
13096        if (in2 == null) {
13097            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13098        }
13099        // Verify that the array length is a multiple of the vector size.
13100        if (in2.length % 4 != 0) {
13101            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
13102        }
13103        // Verify that input array lengths are the same.
13104        if (in1.length / 2 != in2.length / 4) {
13105            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13106        }
13107        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
13108        ain2.setAutoPadding(true);
13109        ain2.copyFrom(in2);
13110
13111        result_int result = reduce_my_float2_uchar4_0(ain1, ain2, null);
13112        result.mTempIns = new Allocation[]{ain1, ain2};
13113        return result;
13114    }
13115
13116    // ain1 = "float2 a"
13117    // ain2 = "uchar4 b"
13118    public result_int reduce_my_float2_uchar4_0(Allocation ain1, Allocation ain2) {
13119        return reduce_my_float2_uchar4_0(ain1, ain2, null);
13120    }
13121
13122    // ain1 = "float2 a"
13123    // ain2 = "uchar4 b"
13124    public result_int reduce_my_float2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13125        Type t0, t1;
13126        // check ain1
13127        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13128            throw new RSRuntimeException("Type mismatch with F32_2!");
13129        }
13130        // check ain2
13131        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
13132            throw new RSRuntimeException("Type mismatch with U8_4!");
13133        }
13134        // Verify dimensions
13135        t0 = ain1.getType();
13136        t1 = ain2.getType();
13137        if ((t0.getCount() != t1.getCount()) ||
13138            (t0.getX() != t1.getX()) ||
13139            (t0.getY() != t1.getY()) ||
13140            (t0.getZ() != t1.getZ()) ||
13141            (t0.hasFaces()   != t1.hasFaces()) ||
13142            (t0.hasMipmaps() != t1.hasMipmaps())) {
13143            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13144        }
13145
13146        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13147        aout.setAutoPadding(true);
13148        reduce(mExportReduceIdx_my_float2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
13149        return new result_int(aout);
13150    }
13151
13152    private final static int mExportReduceIdx_my_float2_uchar4_1 = 197;
13153    // in1 = "a", flattened 2-vectors
13154    // in2 = "b", flattened 4-vectors
13155    public result_int reduce_my_float2_uchar4_1(float[] in1, byte[] in2) {
13156        // Verify that "in1" is non-null.
13157        if (in1 == null) {
13158            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13159        }
13160        // Verify that the array length is a multiple of the vector size.
13161        if (in1.length % 2 != 0) {
13162            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13163        }
13164        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13165        ain1.setAutoPadding(true);
13166        ain1.copyFrom(in1);
13167        // Verify that "in2" is non-null.
13168        if (in2 == null) {
13169            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13170        }
13171        // Verify that the array length is a multiple of the vector size.
13172        if (in2.length % 4 != 0) {
13173            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
13174        }
13175        // Verify that input array lengths are the same.
13176        if (in1.length / 2 != in2.length / 4) {
13177            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13178        }
13179        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
13180        ain2.setAutoPadding(true);
13181        ain2.copyFrom(in2);
13182
13183        result_int result = reduce_my_float2_uchar4_1(ain1, ain2, null);
13184        result.mTempIns = new Allocation[]{ain1, ain2};
13185        return result;
13186    }
13187
13188    // ain1 = "float2 a"
13189    // ain2 = "uchar4 b"
13190    public result_int reduce_my_float2_uchar4_1(Allocation ain1, Allocation ain2) {
13191        return reduce_my_float2_uchar4_1(ain1, ain2, null);
13192    }
13193
13194    // ain1 = "float2 a"
13195    // ain2 = "uchar4 b"
13196    public result_int reduce_my_float2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13197        Type t0, t1;
13198        // check ain1
13199        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13200            throw new RSRuntimeException("Type mismatch with F32_2!");
13201        }
13202        // check ain2
13203        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
13204            throw new RSRuntimeException("Type mismatch with U8_4!");
13205        }
13206        // Verify dimensions
13207        t0 = ain1.getType();
13208        t1 = ain2.getType();
13209        if ((t0.getCount() != t1.getCount()) ||
13210            (t0.getX() != t1.getX()) ||
13211            (t0.getY() != t1.getY()) ||
13212            (t0.getZ() != t1.getZ()) ||
13213            (t0.hasFaces()   != t1.hasFaces()) ||
13214            (t0.hasMipmaps() != t1.hasMipmaps())) {
13215            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13216        }
13217
13218        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13219        aout.setAutoPadding(true);
13220        reduce(mExportReduceIdx_my_float2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
13221        return new result_int(aout);
13222    }
13223
13224    private final static int mExportReduceIdx_my_float2_ushort_0 = 198;
13225    // in1 = "a", flattened 2-vectors
13226    // in2 = "b"
13227    public result_int reduce_my_float2_ushort_0(float[] in1, short[] in2) {
13228        // Verify that "in1" is non-null.
13229        if (in1 == null) {
13230            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13231        }
13232        // Verify that the array length is a multiple of the vector size.
13233        if (in1.length % 2 != 0) {
13234            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13235        }
13236        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13237        ain1.setAutoPadding(true);
13238        ain1.copyFrom(in1);
13239        // Verify that "in2" is non-null.
13240        if (in2 == null) {
13241            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13242        }
13243        // Verify that input array lengths are the same.
13244        if (in1.length / 2 != in2.length) {
13245            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13246        }
13247        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
13248        ain2.setAutoPadding(true);
13249        ain2.copyFrom(in2);
13250
13251        result_int result = reduce_my_float2_ushort_0(ain1, ain2, null);
13252        result.mTempIns = new Allocation[]{ain1, ain2};
13253        return result;
13254    }
13255
13256    // ain1 = "float2 a"
13257    // ain2 = "ushort b"
13258    public result_int reduce_my_float2_ushort_0(Allocation ain1, Allocation ain2) {
13259        return reduce_my_float2_ushort_0(ain1, ain2, null);
13260    }
13261
13262    // ain1 = "float2 a"
13263    // ain2 = "ushort b"
13264    public result_int reduce_my_float2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13265        Type t0, t1;
13266        // check ain1
13267        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13268            throw new RSRuntimeException("Type mismatch with F32_2!");
13269        }
13270        // check ain2
13271        if (!ain2.getType().getElement().isCompatible(__U16)) {
13272            throw new RSRuntimeException("Type mismatch with U16!");
13273        }
13274        // Verify dimensions
13275        t0 = ain1.getType();
13276        t1 = ain2.getType();
13277        if ((t0.getCount() != t1.getCount()) ||
13278            (t0.getX() != t1.getX()) ||
13279            (t0.getY() != t1.getY()) ||
13280            (t0.getZ() != t1.getZ()) ||
13281            (t0.hasFaces()   != t1.hasFaces()) ||
13282            (t0.hasMipmaps() != t1.hasMipmaps())) {
13283            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13284        }
13285
13286        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13287        aout.setAutoPadding(true);
13288        reduce(mExportReduceIdx_my_float2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
13289        return new result_int(aout);
13290    }
13291
13292    private final static int mExportReduceIdx_my_float2_ushort_1 = 199;
13293    // in1 = "a", flattened 2-vectors
13294    // in2 = "b"
13295    public result_int reduce_my_float2_ushort_1(float[] in1, short[] in2) {
13296        // Verify that "in1" is non-null.
13297        if (in1 == null) {
13298            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13299        }
13300        // Verify that the array length is a multiple of the vector size.
13301        if (in1.length % 2 != 0) {
13302            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13303        }
13304        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13305        ain1.setAutoPadding(true);
13306        ain1.copyFrom(in1);
13307        // Verify that "in2" is non-null.
13308        if (in2 == null) {
13309            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13310        }
13311        // Verify that input array lengths are the same.
13312        if (in1.length / 2 != in2.length) {
13313            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13314        }
13315        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
13316        ain2.setAutoPadding(true);
13317        ain2.copyFrom(in2);
13318
13319        result_int result = reduce_my_float2_ushort_1(ain1, ain2, null);
13320        result.mTempIns = new Allocation[]{ain1, ain2};
13321        return result;
13322    }
13323
13324    // ain1 = "float2 a"
13325    // ain2 = "ushort b"
13326    public result_int reduce_my_float2_ushort_1(Allocation ain1, Allocation ain2) {
13327        return reduce_my_float2_ushort_1(ain1, ain2, null);
13328    }
13329
13330    // ain1 = "float2 a"
13331    // ain2 = "ushort b"
13332    public result_int reduce_my_float2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13333        Type t0, t1;
13334        // check ain1
13335        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13336            throw new RSRuntimeException("Type mismatch with F32_2!");
13337        }
13338        // check ain2
13339        if (!ain2.getType().getElement().isCompatible(__U16)) {
13340            throw new RSRuntimeException("Type mismatch with U16!");
13341        }
13342        // Verify dimensions
13343        t0 = ain1.getType();
13344        t1 = ain2.getType();
13345        if ((t0.getCount() != t1.getCount()) ||
13346            (t0.getX() != t1.getX()) ||
13347            (t0.getY() != t1.getY()) ||
13348            (t0.getZ() != t1.getZ()) ||
13349            (t0.hasFaces()   != t1.hasFaces()) ||
13350            (t0.hasMipmaps() != t1.hasMipmaps())) {
13351            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13352        }
13353
13354        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13355        aout.setAutoPadding(true);
13356        reduce(mExportReduceIdx_my_float2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
13357        return new result_int(aout);
13358    }
13359
13360    private final static int mExportReduceIdx_my_float2_ushort2_0 = 200;
13361    // in1 = "a", flattened 2-vectors
13362    // in2 = "b", flattened 2-vectors
13363    public result_int reduce_my_float2_ushort2_0(float[] in1, short[] in2) {
13364        // Verify that "in1" is non-null.
13365        if (in1 == null) {
13366            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13367        }
13368        // Verify that the array length is a multiple of the vector size.
13369        if (in1.length % 2 != 0) {
13370            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13371        }
13372        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13373        ain1.setAutoPadding(true);
13374        ain1.copyFrom(in1);
13375        // Verify that "in2" is non-null.
13376        if (in2 == null) {
13377            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13378        }
13379        // Verify that the array length is a multiple of the vector size.
13380        if (in2.length % 2 != 0) {
13381            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
13382        }
13383        // Verify that input array lengths are the same.
13384        if (in1.length / 2 != in2.length / 2) {
13385            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13386        }
13387        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
13388        ain2.setAutoPadding(true);
13389        ain2.copyFrom(in2);
13390
13391        result_int result = reduce_my_float2_ushort2_0(ain1, ain2, null);
13392        result.mTempIns = new Allocation[]{ain1, ain2};
13393        return result;
13394    }
13395
13396    // ain1 = "float2 a"
13397    // ain2 = "ushort2 b"
13398    public result_int reduce_my_float2_ushort2_0(Allocation ain1, Allocation ain2) {
13399        return reduce_my_float2_ushort2_0(ain1, ain2, null);
13400    }
13401
13402    // ain1 = "float2 a"
13403    // ain2 = "ushort2 b"
13404    public result_int reduce_my_float2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13405        Type t0, t1;
13406        // check ain1
13407        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13408            throw new RSRuntimeException("Type mismatch with F32_2!");
13409        }
13410        // check ain2
13411        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
13412            throw new RSRuntimeException("Type mismatch with U16_2!");
13413        }
13414        // Verify dimensions
13415        t0 = ain1.getType();
13416        t1 = ain2.getType();
13417        if ((t0.getCount() != t1.getCount()) ||
13418            (t0.getX() != t1.getX()) ||
13419            (t0.getY() != t1.getY()) ||
13420            (t0.getZ() != t1.getZ()) ||
13421            (t0.hasFaces()   != t1.hasFaces()) ||
13422            (t0.hasMipmaps() != t1.hasMipmaps())) {
13423            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13424        }
13425
13426        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13427        aout.setAutoPadding(true);
13428        reduce(mExportReduceIdx_my_float2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
13429        return new result_int(aout);
13430    }
13431
13432    private final static int mExportReduceIdx_my_float2_ushort2_1 = 201;
13433    // in1 = "a", flattened 2-vectors
13434    // in2 = "b", flattened 2-vectors
13435    public result_int reduce_my_float2_ushort2_1(float[] in1, short[] in2) {
13436        // Verify that "in1" is non-null.
13437        if (in1 == null) {
13438            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13439        }
13440        // Verify that the array length is a multiple of the vector size.
13441        if (in1.length % 2 != 0) {
13442            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13443        }
13444        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13445        ain1.setAutoPadding(true);
13446        ain1.copyFrom(in1);
13447        // Verify that "in2" is non-null.
13448        if (in2 == null) {
13449            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13450        }
13451        // Verify that the array length is a multiple of the vector size.
13452        if (in2.length % 2 != 0) {
13453            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
13454        }
13455        // Verify that input array lengths are the same.
13456        if (in1.length / 2 != in2.length / 2) {
13457            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13458        }
13459        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
13460        ain2.setAutoPadding(true);
13461        ain2.copyFrom(in2);
13462
13463        result_int result = reduce_my_float2_ushort2_1(ain1, ain2, null);
13464        result.mTempIns = new Allocation[]{ain1, ain2};
13465        return result;
13466    }
13467
13468    // ain1 = "float2 a"
13469    // ain2 = "ushort2 b"
13470    public result_int reduce_my_float2_ushort2_1(Allocation ain1, Allocation ain2) {
13471        return reduce_my_float2_ushort2_1(ain1, ain2, null);
13472    }
13473
13474    // ain1 = "float2 a"
13475    // ain2 = "ushort2 b"
13476    public result_int reduce_my_float2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13477        Type t0, t1;
13478        // check ain1
13479        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13480            throw new RSRuntimeException("Type mismatch with F32_2!");
13481        }
13482        // check ain2
13483        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
13484            throw new RSRuntimeException("Type mismatch with U16_2!");
13485        }
13486        // Verify dimensions
13487        t0 = ain1.getType();
13488        t1 = ain2.getType();
13489        if ((t0.getCount() != t1.getCount()) ||
13490            (t0.getX() != t1.getX()) ||
13491            (t0.getY() != t1.getY()) ||
13492            (t0.getZ() != t1.getZ()) ||
13493            (t0.hasFaces()   != t1.hasFaces()) ||
13494            (t0.hasMipmaps() != t1.hasMipmaps())) {
13495            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13496        }
13497
13498        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13499        aout.setAutoPadding(true);
13500        reduce(mExportReduceIdx_my_float2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
13501        return new result_int(aout);
13502    }
13503
13504    private final static int mExportReduceIdx_my_float2_ushort4_0 = 202;
13505    // in1 = "a", flattened 2-vectors
13506    // in2 = "b", flattened 4-vectors
13507    public result_int reduce_my_float2_ushort4_0(float[] in1, short[] in2) {
13508        // Verify that "in1" is non-null.
13509        if (in1 == null) {
13510            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13511        }
13512        // Verify that the array length is a multiple of the vector size.
13513        if (in1.length % 2 != 0) {
13514            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13515        }
13516        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13517        ain1.setAutoPadding(true);
13518        ain1.copyFrom(in1);
13519        // Verify that "in2" is non-null.
13520        if (in2 == null) {
13521            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13522        }
13523        // Verify that the array length is a multiple of the vector size.
13524        if (in2.length % 4 != 0) {
13525            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
13526        }
13527        // Verify that input array lengths are the same.
13528        if (in1.length / 2 != in2.length / 4) {
13529            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13530        }
13531        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
13532        ain2.setAutoPadding(true);
13533        ain2.copyFrom(in2);
13534
13535        result_int result = reduce_my_float2_ushort4_0(ain1, ain2, null);
13536        result.mTempIns = new Allocation[]{ain1, ain2};
13537        return result;
13538    }
13539
13540    // ain1 = "float2 a"
13541    // ain2 = "ushort4 b"
13542    public result_int reduce_my_float2_ushort4_0(Allocation ain1, Allocation ain2) {
13543        return reduce_my_float2_ushort4_0(ain1, ain2, null);
13544    }
13545
13546    // ain1 = "float2 a"
13547    // ain2 = "ushort4 b"
13548    public result_int reduce_my_float2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13549        Type t0, t1;
13550        // check ain1
13551        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13552            throw new RSRuntimeException("Type mismatch with F32_2!");
13553        }
13554        // check ain2
13555        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
13556            throw new RSRuntimeException("Type mismatch with U16_4!");
13557        }
13558        // Verify dimensions
13559        t0 = ain1.getType();
13560        t1 = ain2.getType();
13561        if ((t0.getCount() != t1.getCount()) ||
13562            (t0.getX() != t1.getX()) ||
13563            (t0.getY() != t1.getY()) ||
13564            (t0.getZ() != t1.getZ()) ||
13565            (t0.hasFaces()   != t1.hasFaces()) ||
13566            (t0.hasMipmaps() != t1.hasMipmaps())) {
13567            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13568        }
13569
13570        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13571        aout.setAutoPadding(true);
13572        reduce(mExportReduceIdx_my_float2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
13573        return new result_int(aout);
13574    }
13575
13576    private final static int mExportReduceIdx_my_float2_ushort4_1 = 203;
13577    // in1 = "a", flattened 2-vectors
13578    // in2 = "b", flattened 4-vectors
13579    public result_int reduce_my_float2_ushort4_1(float[] in1, short[] in2) {
13580        // Verify that "in1" is non-null.
13581        if (in1 == null) {
13582            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13583        }
13584        // Verify that the array length is a multiple of the vector size.
13585        if (in1.length % 2 != 0) {
13586            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13587        }
13588        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13589        ain1.setAutoPadding(true);
13590        ain1.copyFrom(in1);
13591        // Verify that "in2" is non-null.
13592        if (in2 == null) {
13593            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13594        }
13595        // Verify that the array length is a multiple of the vector size.
13596        if (in2.length % 4 != 0) {
13597            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
13598        }
13599        // Verify that input array lengths are the same.
13600        if (in1.length / 2 != in2.length / 4) {
13601            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13602        }
13603        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
13604        ain2.setAutoPadding(true);
13605        ain2.copyFrom(in2);
13606
13607        result_int result = reduce_my_float2_ushort4_1(ain1, ain2, null);
13608        result.mTempIns = new Allocation[]{ain1, ain2};
13609        return result;
13610    }
13611
13612    // ain1 = "float2 a"
13613    // ain2 = "ushort4 b"
13614    public result_int reduce_my_float2_ushort4_1(Allocation ain1, Allocation ain2) {
13615        return reduce_my_float2_ushort4_1(ain1, ain2, null);
13616    }
13617
13618    // ain1 = "float2 a"
13619    // ain2 = "ushort4 b"
13620    public result_int reduce_my_float2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13621        Type t0, t1;
13622        // check ain1
13623        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13624            throw new RSRuntimeException("Type mismatch with F32_2!");
13625        }
13626        // check ain2
13627        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
13628            throw new RSRuntimeException("Type mismatch with U16_4!");
13629        }
13630        // Verify dimensions
13631        t0 = ain1.getType();
13632        t1 = ain2.getType();
13633        if ((t0.getCount() != t1.getCount()) ||
13634            (t0.getX() != t1.getX()) ||
13635            (t0.getY() != t1.getY()) ||
13636            (t0.getZ() != t1.getZ()) ||
13637            (t0.hasFaces()   != t1.hasFaces()) ||
13638            (t0.hasMipmaps() != t1.hasMipmaps())) {
13639            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13640        }
13641
13642        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13643        aout.setAutoPadding(true);
13644        reduce(mExportReduceIdx_my_float2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
13645        return new result_int(aout);
13646    }
13647
13648    private final static int mExportReduceIdx_my_float2_bool_0 = 204;
13649    // in1 = "a", flattened 2-vectors
13650    // in2 = "b"
13651    public result_int reduce_my_float2_bool_0(float[] in1, byte[] in2) {
13652        // Verify that "in1" is non-null.
13653        if (in1 == null) {
13654            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13655        }
13656        // Verify that the array length is a multiple of the vector size.
13657        if (in1.length % 2 != 0) {
13658            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13659        }
13660        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13661        ain1.setAutoPadding(true);
13662        ain1.copyFrom(in1);
13663        // Verify that "in2" is non-null.
13664        if (in2 == null) {
13665            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13666        }
13667        // Verify that input array lengths are the same.
13668        if (in1.length / 2 != in2.length) {
13669            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13670        }
13671        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
13672        ain2.setAutoPadding(true);
13673        ain2.copyFrom(in2);
13674
13675        result_int result = reduce_my_float2_bool_0(ain1, ain2, null);
13676        result.mTempIns = new Allocation[]{ain1, ain2};
13677        return result;
13678    }
13679
13680    // ain1 = "float2 a"
13681    // ain2 = "bool b"
13682    public result_int reduce_my_float2_bool_0(Allocation ain1, Allocation ain2) {
13683        return reduce_my_float2_bool_0(ain1, ain2, null);
13684    }
13685
13686    // ain1 = "float2 a"
13687    // ain2 = "bool b"
13688    public result_int reduce_my_float2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13689        Type t0, t1;
13690        // check ain1
13691        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13692            throw new RSRuntimeException("Type mismatch with F32_2!");
13693        }
13694        // check ain2
13695        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
13696            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
13697        }
13698        // Verify dimensions
13699        t0 = ain1.getType();
13700        t1 = ain2.getType();
13701        if ((t0.getCount() != t1.getCount()) ||
13702            (t0.getX() != t1.getX()) ||
13703            (t0.getY() != t1.getY()) ||
13704            (t0.getZ() != t1.getZ()) ||
13705            (t0.hasFaces()   != t1.hasFaces()) ||
13706            (t0.hasMipmaps() != t1.hasMipmaps())) {
13707            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13708        }
13709
13710        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13711        aout.setAutoPadding(true);
13712        reduce(mExportReduceIdx_my_float2_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
13713        return new result_int(aout);
13714    }
13715
13716    private final static int mExportReduceIdx_my_float2_bool_1 = 205;
13717    // in1 = "a", flattened 2-vectors
13718    // in2 = "b"
13719    public result_int reduce_my_float2_bool_1(float[] in1, byte[] in2) {
13720        // Verify that "in1" is non-null.
13721        if (in1 == null) {
13722            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13723        }
13724        // Verify that the array length is a multiple of the vector size.
13725        if (in1.length % 2 != 0) {
13726            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
13727        }
13728        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2);
13729        ain1.setAutoPadding(true);
13730        ain1.copyFrom(in1);
13731        // Verify that "in2" is non-null.
13732        if (in2 == null) {
13733            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13734        }
13735        // Verify that input array lengths are the same.
13736        if (in1.length / 2 != in2.length) {
13737            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13738        }
13739        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
13740        ain2.setAutoPadding(true);
13741        ain2.copyFrom(in2);
13742
13743        result_int result = reduce_my_float2_bool_1(ain1, ain2, null);
13744        result.mTempIns = new Allocation[]{ain1, ain2};
13745        return result;
13746    }
13747
13748    // ain1 = "float2 a"
13749    // ain2 = "bool b"
13750    public result_int reduce_my_float2_bool_1(Allocation ain1, Allocation ain2) {
13751        return reduce_my_float2_bool_1(ain1, ain2, null);
13752    }
13753
13754    // ain1 = "float2 a"
13755    // ain2 = "bool b"
13756    public result_int reduce_my_float2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13757        Type t0, t1;
13758        // check ain1
13759        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13760            throw new RSRuntimeException("Type mismatch with F32_2!");
13761        }
13762        // check ain2
13763        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
13764            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
13765        }
13766        // Verify dimensions
13767        t0 = ain1.getType();
13768        t1 = ain2.getType();
13769        if ((t0.getCount() != t1.getCount()) ||
13770            (t0.getX() != t1.getX()) ||
13771            (t0.getY() != t1.getY()) ||
13772            (t0.getZ() != t1.getZ()) ||
13773            (t0.hasFaces()   != t1.hasFaces()) ||
13774            (t0.hasMipmaps() != t1.hasMipmaps())) {
13775            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13776        }
13777
13778        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13779        aout.setAutoPadding(true);
13780        reduce(mExportReduceIdx_my_float2_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
13781        return new result_int(aout);
13782    }
13783
13784    private final static int mExportReduceIdx_my_float2_rs_matrix2x2_0 = 206;
13785    // ain1 = "float2 a"
13786    // ain2 = "rs_matrix2x2 b"
13787    public result_int reduce_my_float2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
13788        return reduce_my_float2_rs_matrix2x2_0(ain1, ain2, null);
13789    }
13790
13791    // ain1 = "float2 a"
13792    // ain2 = "rs_matrix2x2 b"
13793    public result_int reduce_my_float2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13794        Type t0, t1;
13795        // check ain1
13796        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13797            throw new RSRuntimeException("Type mismatch with F32_2!");
13798        }
13799        // check ain2
13800        // Verify dimensions
13801        t0 = ain1.getType();
13802        t1 = ain2.getType();
13803        if ((t0.getCount() != t1.getCount()) ||
13804            (t0.getX() != t1.getX()) ||
13805            (t0.getY() != t1.getY()) ||
13806            (t0.getZ() != t1.getZ()) ||
13807            (t0.hasFaces()   != t1.hasFaces()) ||
13808            (t0.hasMipmaps() != t1.hasMipmaps())) {
13809            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13810        }
13811
13812        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13813        aout.setAutoPadding(true);
13814        reduce(mExportReduceIdx_my_float2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
13815        return new result_int(aout);
13816    }
13817
13818    private final static int mExportReduceIdx_my_float2_rs_matrix2x2_1 = 207;
13819    // ain1 = "float2 a"
13820    // ain2 = "rs_matrix2x2 b"
13821    public result_int reduce_my_float2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
13822        return reduce_my_float2_rs_matrix2x2_1(ain1, ain2, null);
13823    }
13824
13825    // ain1 = "float2 a"
13826    // ain2 = "rs_matrix2x2 b"
13827    public result_int reduce_my_float2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13828        Type t0, t1;
13829        // check ain1
13830        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13831            throw new RSRuntimeException("Type mismatch with F32_2!");
13832        }
13833        // check ain2
13834        // Verify dimensions
13835        t0 = ain1.getType();
13836        t1 = ain2.getType();
13837        if ((t0.getCount() != t1.getCount()) ||
13838            (t0.getX() != t1.getX()) ||
13839            (t0.getY() != t1.getY()) ||
13840            (t0.getZ() != t1.getZ()) ||
13841            (t0.hasFaces()   != t1.hasFaces()) ||
13842            (t0.hasMipmaps() != t1.hasMipmaps())) {
13843            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13844        }
13845
13846        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13847        aout.setAutoPadding(true);
13848        reduce(mExportReduceIdx_my_float2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
13849        return new result_int(aout);
13850    }
13851
13852    private final static int mExportReduceIdx_my_float2_MyStruct_0 = 208;
13853    // ain1 = "float2 a"
13854    // ain2 = "/* struct <> */ b"
13855    public result_int reduce_my_float2_MyStruct_0(Allocation ain1, Allocation ain2) {
13856        return reduce_my_float2_MyStruct_0(ain1, ain2, null);
13857    }
13858
13859    // ain1 = "float2 a"
13860    // ain2 = "/* struct <> */ b"
13861    public result_int reduce_my_float2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13862        Type t0, t1;
13863        // check ain1
13864        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13865            throw new RSRuntimeException("Type mismatch with F32_2!");
13866        }
13867        // check ain2
13868        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
13869            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
13870        }
13871        // Verify dimensions
13872        t0 = ain1.getType();
13873        t1 = ain2.getType();
13874        if ((t0.getCount() != t1.getCount()) ||
13875            (t0.getX() != t1.getX()) ||
13876            (t0.getY() != t1.getY()) ||
13877            (t0.getZ() != t1.getZ()) ||
13878            (t0.hasFaces()   != t1.hasFaces()) ||
13879            (t0.hasMipmaps() != t1.hasMipmaps())) {
13880            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13881        }
13882
13883        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13884        aout.setAutoPadding(true);
13885        reduce(mExportReduceIdx_my_float2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
13886        return new result_int(aout);
13887    }
13888
13889    private final static int mExportReduceIdx_my_float2_MyStruct_1 = 209;
13890    // ain1 = "float2 a"
13891    // ain2 = "/* struct <> */ b"
13892    public result_int reduce_my_float2_MyStruct_1(Allocation ain1, Allocation ain2) {
13893        return reduce_my_float2_MyStruct_1(ain1, ain2, null);
13894    }
13895
13896    // ain1 = "float2 a"
13897    // ain2 = "/* struct <> */ b"
13898    public result_int reduce_my_float2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13899        Type t0, t1;
13900        // check ain1
13901        if (!ain1.getType().getElement().isCompatible(__F32_2)) {
13902            throw new RSRuntimeException("Type mismatch with F32_2!");
13903        }
13904        // check ain2
13905        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
13906            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
13907        }
13908        // Verify dimensions
13909        t0 = ain1.getType();
13910        t1 = ain2.getType();
13911        if ((t0.getCount() != t1.getCount()) ||
13912            (t0.getX() != t1.getX()) ||
13913            (t0.getY() != t1.getY()) ||
13914            (t0.getZ() != t1.getZ()) ||
13915            (t0.hasFaces()   != t1.hasFaces()) ||
13916            (t0.hasMipmaps() != t1.hasMipmaps())) {
13917            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13918        }
13919
13920        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13921        aout.setAutoPadding(true);
13922        reduce(mExportReduceIdx_my_float2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
13923        return new result_int(aout);
13924    }
13925
13926    private final static int mExportReduceIdx_my_float4_half_0 = 210;
13927    // in1 = "a", flattened 4-vectors
13928    // in2 = "b"
13929    public result_int reduce_my_float4_half_0(float[] in1, short[] in2) {
13930        // Verify that "in1" is non-null.
13931        if (in1 == null) {
13932            throw new RSIllegalArgumentException("Array \"in1\" is null!");
13933        }
13934        // Verify that the array length is a multiple of the vector size.
13935        if (in1.length % 4 != 0) {
13936            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
13937        }
13938        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
13939        ain1.setAutoPadding(true);
13940        ain1.copyFrom(in1);
13941        // Verify that "in2" is non-null.
13942        if (in2 == null) {
13943            throw new RSIllegalArgumentException("Array \"in2\" is null!");
13944        }
13945        // Verify that input array lengths are the same.
13946        if (in1.length / 4 != in2.length) {
13947            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
13948        }
13949        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
13950        ain2.setAutoPadding(true);
13951        ain2.copyFrom(in2);
13952
13953        result_int result = reduce_my_float4_half_0(ain1, ain2, null);
13954        result.mTempIns = new Allocation[]{ain1, ain2};
13955        return result;
13956    }
13957
13958    // ain1 = "float4 a"
13959    // ain2 = "half b"
13960    public result_int reduce_my_float4_half_0(Allocation ain1, Allocation ain2) {
13961        return reduce_my_float4_half_0(ain1, ain2, null);
13962    }
13963
13964    // ain1 = "float4 a"
13965    // ain2 = "half b"
13966    public result_int reduce_my_float4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
13967        Type t0, t1;
13968        // check ain1
13969        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
13970            throw new RSRuntimeException("Type mismatch with F32_4!");
13971        }
13972        // check ain2
13973        if (!ain2.getType().getElement().isCompatible(__F16)) {
13974            throw new RSRuntimeException("Type mismatch with F16!");
13975        }
13976        // Verify dimensions
13977        t0 = ain1.getType();
13978        t1 = ain2.getType();
13979        if ((t0.getCount() != t1.getCount()) ||
13980            (t0.getX() != t1.getX()) ||
13981            (t0.getY() != t1.getY()) ||
13982            (t0.getZ() != t1.getZ()) ||
13983            (t0.hasFaces()   != t1.hasFaces()) ||
13984            (t0.hasMipmaps() != t1.hasMipmaps())) {
13985            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
13986        }
13987
13988        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
13989        aout.setAutoPadding(true);
13990        reduce(mExportReduceIdx_my_float4_half_0, new Allocation[]{ain1, ain2}, aout, sc);
13991        return new result_int(aout);
13992    }
13993
13994    private final static int mExportReduceIdx_my_float4_half_1 = 211;
13995    // in1 = "a", flattened 4-vectors
13996    // in2 = "b"
13997    public result_int reduce_my_float4_half_1(float[] in1, short[] in2) {
13998        // Verify that "in1" is non-null.
13999        if (in1 == null) {
14000            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14001        }
14002        // Verify that the array length is a multiple of the vector size.
14003        if (in1.length % 4 != 0) {
14004            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14005        }
14006        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14007        ain1.setAutoPadding(true);
14008        ain1.copyFrom(in1);
14009        // Verify that "in2" is non-null.
14010        if (in2 == null) {
14011            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14012        }
14013        // Verify that input array lengths are the same.
14014        if (in1.length / 4 != in2.length) {
14015            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14016        }
14017        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
14018        ain2.setAutoPadding(true);
14019        ain2.copyFrom(in2);
14020
14021        result_int result = reduce_my_float4_half_1(ain1, ain2, null);
14022        result.mTempIns = new Allocation[]{ain1, ain2};
14023        return result;
14024    }
14025
14026    // ain1 = "float4 a"
14027    // ain2 = "half b"
14028    public result_int reduce_my_float4_half_1(Allocation ain1, Allocation ain2) {
14029        return reduce_my_float4_half_1(ain1, ain2, null);
14030    }
14031
14032    // ain1 = "float4 a"
14033    // ain2 = "half b"
14034    public result_int reduce_my_float4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14035        Type t0, t1;
14036        // check ain1
14037        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14038            throw new RSRuntimeException("Type mismatch with F32_4!");
14039        }
14040        // check ain2
14041        if (!ain2.getType().getElement().isCompatible(__F16)) {
14042            throw new RSRuntimeException("Type mismatch with F16!");
14043        }
14044        // Verify dimensions
14045        t0 = ain1.getType();
14046        t1 = ain2.getType();
14047        if ((t0.getCount() != t1.getCount()) ||
14048            (t0.getX() != t1.getX()) ||
14049            (t0.getY() != t1.getY()) ||
14050            (t0.getZ() != t1.getZ()) ||
14051            (t0.hasFaces()   != t1.hasFaces()) ||
14052            (t0.hasMipmaps() != t1.hasMipmaps())) {
14053            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14054        }
14055
14056        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14057        aout.setAutoPadding(true);
14058        reduce(mExportReduceIdx_my_float4_half_1, new Allocation[]{ain1, ain2}, aout, sc);
14059        return new result_int(aout);
14060    }
14061
14062    private final static int mExportReduceIdx_my_float4_half2_0 = 212;
14063    // in1 = "a", flattened 4-vectors
14064    // in2 = "b", flattened 2-vectors
14065    public result_int reduce_my_float4_half2_0(float[] in1, short[] in2) {
14066        // Verify that "in1" is non-null.
14067        if (in1 == null) {
14068            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14069        }
14070        // Verify that the array length is a multiple of the vector size.
14071        if (in1.length % 4 != 0) {
14072            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14073        }
14074        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14075        ain1.setAutoPadding(true);
14076        ain1.copyFrom(in1);
14077        // Verify that "in2" is non-null.
14078        if (in2 == null) {
14079            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14080        }
14081        // Verify that the array length is a multiple of the vector size.
14082        if (in2.length % 2 != 0) {
14083            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
14084        }
14085        // Verify that input array lengths are the same.
14086        if (in1.length / 4 != in2.length / 2) {
14087            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14088        }
14089        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
14090        ain2.setAutoPadding(true);
14091        ain2.copyFrom(in2);
14092
14093        result_int result = reduce_my_float4_half2_0(ain1, ain2, null);
14094        result.mTempIns = new Allocation[]{ain1, ain2};
14095        return result;
14096    }
14097
14098    // ain1 = "float4 a"
14099    // ain2 = "half2 b"
14100    public result_int reduce_my_float4_half2_0(Allocation ain1, Allocation ain2) {
14101        return reduce_my_float4_half2_0(ain1, ain2, null);
14102    }
14103
14104    // ain1 = "float4 a"
14105    // ain2 = "half2 b"
14106    public result_int reduce_my_float4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14107        Type t0, t1;
14108        // check ain1
14109        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14110            throw new RSRuntimeException("Type mismatch with F32_4!");
14111        }
14112        // check ain2
14113        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
14114            throw new RSRuntimeException("Type mismatch with F16_2!");
14115        }
14116        // Verify dimensions
14117        t0 = ain1.getType();
14118        t1 = ain2.getType();
14119        if ((t0.getCount() != t1.getCount()) ||
14120            (t0.getX() != t1.getX()) ||
14121            (t0.getY() != t1.getY()) ||
14122            (t0.getZ() != t1.getZ()) ||
14123            (t0.hasFaces()   != t1.hasFaces()) ||
14124            (t0.hasMipmaps() != t1.hasMipmaps())) {
14125            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14126        }
14127
14128        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14129        aout.setAutoPadding(true);
14130        reduce(mExportReduceIdx_my_float4_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
14131        return new result_int(aout);
14132    }
14133
14134    private final static int mExportReduceIdx_my_float4_half2_1 = 213;
14135    // in1 = "a", flattened 4-vectors
14136    // in2 = "b", flattened 2-vectors
14137    public result_int reduce_my_float4_half2_1(float[] in1, short[] in2) {
14138        // Verify that "in1" is non-null.
14139        if (in1 == null) {
14140            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14141        }
14142        // Verify that the array length is a multiple of the vector size.
14143        if (in1.length % 4 != 0) {
14144            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14145        }
14146        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14147        ain1.setAutoPadding(true);
14148        ain1.copyFrom(in1);
14149        // Verify that "in2" is non-null.
14150        if (in2 == null) {
14151            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14152        }
14153        // Verify that the array length is a multiple of the vector size.
14154        if (in2.length % 2 != 0) {
14155            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
14156        }
14157        // Verify that input array lengths are the same.
14158        if (in1.length / 4 != in2.length / 2) {
14159            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14160        }
14161        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
14162        ain2.setAutoPadding(true);
14163        ain2.copyFrom(in2);
14164
14165        result_int result = reduce_my_float4_half2_1(ain1, ain2, null);
14166        result.mTempIns = new Allocation[]{ain1, ain2};
14167        return result;
14168    }
14169
14170    // ain1 = "float4 a"
14171    // ain2 = "half2 b"
14172    public result_int reduce_my_float4_half2_1(Allocation ain1, Allocation ain2) {
14173        return reduce_my_float4_half2_1(ain1, ain2, null);
14174    }
14175
14176    // ain1 = "float4 a"
14177    // ain2 = "half2 b"
14178    public result_int reduce_my_float4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14179        Type t0, t1;
14180        // check ain1
14181        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14182            throw new RSRuntimeException("Type mismatch with F32_4!");
14183        }
14184        // check ain2
14185        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
14186            throw new RSRuntimeException("Type mismatch with F16_2!");
14187        }
14188        // Verify dimensions
14189        t0 = ain1.getType();
14190        t1 = ain2.getType();
14191        if ((t0.getCount() != t1.getCount()) ||
14192            (t0.getX() != t1.getX()) ||
14193            (t0.getY() != t1.getY()) ||
14194            (t0.getZ() != t1.getZ()) ||
14195            (t0.hasFaces()   != t1.hasFaces()) ||
14196            (t0.hasMipmaps() != t1.hasMipmaps())) {
14197            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14198        }
14199
14200        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14201        aout.setAutoPadding(true);
14202        reduce(mExportReduceIdx_my_float4_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
14203        return new result_int(aout);
14204    }
14205
14206    private final static int mExportReduceIdx_my_float4_half4_0 = 214;
14207    // in1 = "a", flattened 4-vectors
14208    // in2 = "b", flattened 4-vectors
14209    public result_int reduce_my_float4_half4_0(float[] in1, short[] in2) {
14210        // Verify that "in1" is non-null.
14211        if (in1 == null) {
14212            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14213        }
14214        // Verify that the array length is a multiple of the vector size.
14215        if (in1.length % 4 != 0) {
14216            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14217        }
14218        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14219        ain1.setAutoPadding(true);
14220        ain1.copyFrom(in1);
14221        // Verify that "in2" is non-null.
14222        if (in2 == null) {
14223            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14224        }
14225        // Verify that the array length is a multiple of the vector size.
14226        if (in2.length % 4 != 0) {
14227            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
14228        }
14229        // Verify that input array lengths are the same.
14230        if (in1.length / 4 != in2.length / 4) {
14231            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14232        }
14233        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
14234        ain2.setAutoPadding(true);
14235        ain2.copyFrom(in2);
14236
14237        result_int result = reduce_my_float4_half4_0(ain1, ain2, null);
14238        result.mTempIns = new Allocation[]{ain1, ain2};
14239        return result;
14240    }
14241
14242    // ain1 = "float4 a"
14243    // ain2 = "half4 b"
14244    public result_int reduce_my_float4_half4_0(Allocation ain1, Allocation ain2) {
14245        return reduce_my_float4_half4_0(ain1, ain2, null);
14246    }
14247
14248    // ain1 = "float4 a"
14249    // ain2 = "half4 b"
14250    public result_int reduce_my_float4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14251        Type t0, t1;
14252        // check ain1
14253        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14254            throw new RSRuntimeException("Type mismatch with F32_4!");
14255        }
14256        // check ain2
14257        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
14258            throw new RSRuntimeException("Type mismatch with F16_4!");
14259        }
14260        // Verify dimensions
14261        t0 = ain1.getType();
14262        t1 = ain2.getType();
14263        if ((t0.getCount() != t1.getCount()) ||
14264            (t0.getX() != t1.getX()) ||
14265            (t0.getY() != t1.getY()) ||
14266            (t0.getZ() != t1.getZ()) ||
14267            (t0.hasFaces()   != t1.hasFaces()) ||
14268            (t0.hasMipmaps() != t1.hasMipmaps())) {
14269            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14270        }
14271
14272        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14273        aout.setAutoPadding(true);
14274        reduce(mExportReduceIdx_my_float4_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
14275        return new result_int(aout);
14276    }
14277
14278    private final static int mExportReduceIdx_my_float4_half4_1 = 215;
14279    // in1 = "a", flattened 4-vectors
14280    // in2 = "b", flattened 4-vectors
14281    public result_int reduce_my_float4_half4_1(float[] in1, short[] in2) {
14282        // Verify that "in1" is non-null.
14283        if (in1 == null) {
14284            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14285        }
14286        // Verify that the array length is a multiple of the vector size.
14287        if (in1.length % 4 != 0) {
14288            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14289        }
14290        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14291        ain1.setAutoPadding(true);
14292        ain1.copyFrom(in1);
14293        // Verify that "in2" is non-null.
14294        if (in2 == null) {
14295            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14296        }
14297        // Verify that the array length is a multiple of the vector size.
14298        if (in2.length % 4 != 0) {
14299            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
14300        }
14301        // Verify that input array lengths are the same.
14302        if (in1.length / 4 != in2.length / 4) {
14303            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14304        }
14305        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
14306        ain2.setAutoPadding(true);
14307        ain2.copyFrom(in2);
14308
14309        result_int result = reduce_my_float4_half4_1(ain1, ain2, null);
14310        result.mTempIns = new Allocation[]{ain1, ain2};
14311        return result;
14312    }
14313
14314    // ain1 = "float4 a"
14315    // ain2 = "half4 b"
14316    public result_int reduce_my_float4_half4_1(Allocation ain1, Allocation ain2) {
14317        return reduce_my_float4_half4_1(ain1, ain2, null);
14318    }
14319
14320    // ain1 = "float4 a"
14321    // ain2 = "half4 b"
14322    public result_int reduce_my_float4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14323        Type t0, t1;
14324        // check ain1
14325        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14326            throw new RSRuntimeException("Type mismatch with F32_4!");
14327        }
14328        // check ain2
14329        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
14330            throw new RSRuntimeException("Type mismatch with F16_4!");
14331        }
14332        // Verify dimensions
14333        t0 = ain1.getType();
14334        t1 = ain2.getType();
14335        if ((t0.getCount() != t1.getCount()) ||
14336            (t0.getX() != t1.getX()) ||
14337            (t0.getY() != t1.getY()) ||
14338            (t0.getZ() != t1.getZ()) ||
14339            (t0.hasFaces()   != t1.hasFaces()) ||
14340            (t0.hasMipmaps() != t1.hasMipmaps())) {
14341            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14342        }
14343
14344        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14345        aout.setAutoPadding(true);
14346        reduce(mExportReduceIdx_my_float4_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
14347        return new result_int(aout);
14348    }
14349
14350    private final static int mExportReduceIdx_my_float4_float_0 = 216;
14351    // in1 = "a", flattened 4-vectors
14352    // in2 = "b"
14353    public result_int reduce_my_float4_float_0(float[] in1, float[] in2) {
14354        // Verify that "in1" is non-null.
14355        if (in1 == null) {
14356            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14357        }
14358        // Verify that the array length is a multiple of the vector size.
14359        if (in1.length % 4 != 0) {
14360            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14361        }
14362        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14363        ain1.setAutoPadding(true);
14364        ain1.copyFrom(in1);
14365        // Verify that "in2" is non-null.
14366        if (in2 == null) {
14367            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14368        }
14369        // Verify that input array lengths are the same.
14370        if (in1.length / 4 != in2.length) {
14371            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14372        }
14373        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
14374        ain2.setAutoPadding(true);
14375        ain2.copyFrom(in2);
14376
14377        result_int result = reduce_my_float4_float_0(ain1, ain2, null);
14378        result.mTempIns = new Allocation[]{ain1, ain2};
14379        return result;
14380    }
14381
14382    // ain1 = "float4 a"
14383    // ain2 = "float b"
14384    public result_int reduce_my_float4_float_0(Allocation ain1, Allocation ain2) {
14385        return reduce_my_float4_float_0(ain1, ain2, null);
14386    }
14387
14388    // ain1 = "float4 a"
14389    // ain2 = "float b"
14390    public result_int reduce_my_float4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14391        Type t0, t1;
14392        // check ain1
14393        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14394            throw new RSRuntimeException("Type mismatch with F32_4!");
14395        }
14396        // check ain2
14397        if (!ain2.getType().getElement().isCompatible(__F32)) {
14398            throw new RSRuntimeException("Type mismatch with F32!");
14399        }
14400        // Verify dimensions
14401        t0 = ain1.getType();
14402        t1 = ain2.getType();
14403        if ((t0.getCount() != t1.getCount()) ||
14404            (t0.getX() != t1.getX()) ||
14405            (t0.getY() != t1.getY()) ||
14406            (t0.getZ() != t1.getZ()) ||
14407            (t0.hasFaces()   != t1.hasFaces()) ||
14408            (t0.hasMipmaps() != t1.hasMipmaps())) {
14409            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14410        }
14411
14412        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14413        aout.setAutoPadding(true);
14414        reduce(mExportReduceIdx_my_float4_float_0, new Allocation[]{ain1, ain2}, aout, sc);
14415        return new result_int(aout);
14416    }
14417
14418    private final static int mExportReduceIdx_my_float4_float_1 = 217;
14419    // in1 = "a", flattened 4-vectors
14420    // in2 = "b"
14421    public result_int reduce_my_float4_float_1(float[] in1, float[] in2) {
14422        // Verify that "in1" is non-null.
14423        if (in1 == null) {
14424            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14425        }
14426        // Verify that the array length is a multiple of the vector size.
14427        if (in1.length % 4 != 0) {
14428            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14429        }
14430        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14431        ain1.setAutoPadding(true);
14432        ain1.copyFrom(in1);
14433        // Verify that "in2" is non-null.
14434        if (in2 == null) {
14435            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14436        }
14437        // Verify that input array lengths are the same.
14438        if (in1.length / 4 != in2.length) {
14439            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14440        }
14441        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
14442        ain2.setAutoPadding(true);
14443        ain2.copyFrom(in2);
14444
14445        result_int result = reduce_my_float4_float_1(ain1, ain2, null);
14446        result.mTempIns = new Allocation[]{ain1, ain2};
14447        return result;
14448    }
14449
14450    // ain1 = "float4 a"
14451    // ain2 = "float b"
14452    public result_int reduce_my_float4_float_1(Allocation ain1, Allocation ain2) {
14453        return reduce_my_float4_float_1(ain1, ain2, null);
14454    }
14455
14456    // ain1 = "float4 a"
14457    // ain2 = "float b"
14458    public result_int reduce_my_float4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14459        Type t0, t1;
14460        // check ain1
14461        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14462            throw new RSRuntimeException("Type mismatch with F32_4!");
14463        }
14464        // check ain2
14465        if (!ain2.getType().getElement().isCompatible(__F32)) {
14466            throw new RSRuntimeException("Type mismatch with F32!");
14467        }
14468        // Verify dimensions
14469        t0 = ain1.getType();
14470        t1 = ain2.getType();
14471        if ((t0.getCount() != t1.getCount()) ||
14472            (t0.getX() != t1.getX()) ||
14473            (t0.getY() != t1.getY()) ||
14474            (t0.getZ() != t1.getZ()) ||
14475            (t0.hasFaces()   != t1.hasFaces()) ||
14476            (t0.hasMipmaps() != t1.hasMipmaps())) {
14477            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14478        }
14479
14480        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14481        aout.setAutoPadding(true);
14482        reduce(mExportReduceIdx_my_float4_float_1, new Allocation[]{ain1, ain2}, aout, sc);
14483        return new result_int(aout);
14484    }
14485
14486    private final static int mExportReduceIdx_my_float4_float2_0 = 218;
14487    // in1 = "a", flattened 4-vectors
14488    // in2 = "b", flattened 2-vectors
14489    public result_int reduce_my_float4_float2_0(float[] in1, float[] in2) {
14490        // Verify that "in1" is non-null.
14491        if (in1 == null) {
14492            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14493        }
14494        // Verify that the array length is a multiple of the vector size.
14495        if (in1.length % 4 != 0) {
14496            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14497        }
14498        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14499        ain1.setAutoPadding(true);
14500        ain1.copyFrom(in1);
14501        // Verify that "in2" is non-null.
14502        if (in2 == null) {
14503            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14504        }
14505        // Verify that the array length is a multiple of the vector size.
14506        if (in2.length % 2 != 0) {
14507            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
14508        }
14509        // Verify that input array lengths are the same.
14510        if (in1.length / 4 != in2.length / 2) {
14511            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14512        }
14513        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
14514        ain2.setAutoPadding(true);
14515        ain2.copyFrom(in2);
14516
14517        result_int result = reduce_my_float4_float2_0(ain1, ain2, null);
14518        result.mTempIns = new Allocation[]{ain1, ain2};
14519        return result;
14520    }
14521
14522    // ain1 = "float4 a"
14523    // ain2 = "float2 b"
14524    public result_int reduce_my_float4_float2_0(Allocation ain1, Allocation ain2) {
14525        return reduce_my_float4_float2_0(ain1, ain2, null);
14526    }
14527
14528    // ain1 = "float4 a"
14529    // ain2 = "float2 b"
14530    public result_int reduce_my_float4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14531        Type t0, t1;
14532        // check ain1
14533        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14534            throw new RSRuntimeException("Type mismatch with F32_4!");
14535        }
14536        // check ain2
14537        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
14538            throw new RSRuntimeException("Type mismatch with F32_2!");
14539        }
14540        // Verify dimensions
14541        t0 = ain1.getType();
14542        t1 = ain2.getType();
14543        if ((t0.getCount() != t1.getCount()) ||
14544            (t0.getX() != t1.getX()) ||
14545            (t0.getY() != t1.getY()) ||
14546            (t0.getZ() != t1.getZ()) ||
14547            (t0.hasFaces()   != t1.hasFaces()) ||
14548            (t0.hasMipmaps() != t1.hasMipmaps())) {
14549            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14550        }
14551
14552        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14553        aout.setAutoPadding(true);
14554        reduce(mExportReduceIdx_my_float4_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
14555        return new result_int(aout);
14556    }
14557
14558    private final static int mExportReduceIdx_my_float4_float2_1 = 219;
14559    // in1 = "a", flattened 4-vectors
14560    // in2 = "b", flattened 2-vectors
14561    public result_int reduce_my_float4_float2_1(float[] in1, float[] in2) {
14562        // Verify that "in1" is non-null.
14563        if (in1 == null) {
14564            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14565        }
14566        // Verify that the array length is a multiple of the vector size.
14567        if (in1.length % 4 != 0) {
14568            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14569        }
14570        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14571        ain1.setAutoPadding(true);
14572        ain1.copyFrom(in1);
14573        // Verify that "in2" is non-null.
14574        if (in2 == null) {
14575            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14576        }
14577        // Verify that the array length is a multiple of the vector size.
14578        if (in2.length % 2 != 0) {
14579            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
14580        }
14581        // Verify that input array lengths are the same.
14582        if (in1.length / 4 != in2.length / 2) {
14583            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14584        }
14585        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
14586        ain2.setAutoPadding(true);
14587        ain2.copyFrom(in2);
14588
14589        result_int result = reduce_my_float4_float2_1(ain1, ain2, null);
14590        result.mTempIns = new Allocation[]{ain1, ain2};
14591        return result;
14592    }
14593
14594    // ain1 = "float4 a"
14595    // ain2 = "float2 b"
14596    public result_int reduce_my_float4_float2_1(Allocation ain1, Allocation ain2) {
14597        return reduce_my_float4_float2_1(ain1, ain2, null);
14598    }
14599
14600    // ain1 = "float4 a"
14601    // ain2 = "float2 b"
14602    public result_int reduce_my_float4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14603        Type t0, t1;
14604        // check ain1
14605        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14606            throw new RSRuntimeException("Type mismatch with F32_4!");
14607        }
14608        // check ain2
14609        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
14610            throw new RSRuntimeException("Type mismatch with F32_2!");
14611        }
14612        // Verify dimensions
14613        t0 = ain1.getType();
14614        t1 = ain2.getType();
14615        if ((t0.getCount() != t1.getCount()) ||
14616            (t0.getX() != t1.getX()) ||
14617            (t0.getY() != t1.getY()) ||
14618            (t0.getZ() != t1.getZ()) ||
14619            (t0.hasFaces()   != t1.hasFaces()) ||
14620            (t0.hasMipmaps() != t1.hasMipmaps())) {
14621            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14622        }
14623
14624        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14625        aout.setAutoPadding(true);
14626        reduce(mExportReduceIdx_my_float4_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
14627        return new result_int(aout);
14628    }
14629
14630    private final static int mExportReduceIdx_my_float4_float4_0 = 220;
14631    // in1 = "a", flattened 4-vectors
14632    // in2 = "b", flattened 4-vectors
14633    public result_int reduce_my_float4_float4_0(float[] in1, float[] in2) {
14634        // Verify that "in1" is non-null.
14635        if (in1 == null) {
14636            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14637        }
14638        // Verify that the array length is a multiple of the vector size.
14639        if (in1.length % 4 != 0) {
14640            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14641        }
14642        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14643        ain1.setAutoPadding(true);
14644        ain1.copyFrom(in1);
14645        // Verify that "in2" is non-null.
14646        if (in2 == null) {
14647            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14648        }
14649        // Verify that the array length is a multiple of the vector size.
14650        if (in2.length % 4 != 0) {
14651            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
14652        }
14653        // Verify that input array lengths are the same.
14654        if (in1.length / 4 != in2.length / 4) {
14655            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14656        }
14657        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
14658        ain2.setAutoPadding(true);
14659        ain2.copyFrom(in2);
14660
14661        result_int result = reduce_my_float4_float4_0(ain1, ain2, null);
14662        result.mTempIns = new Allocation[]{ain1, ain2};
14663        return result;
14664    }
14665
14666    // ain1 = "float4 a"
14667    // ain2 = "float4 b"
14668    public result_int reduce_my_float4_float4_0(Allocation ain1, Allocation ain2) {
14669        return reduce_my_float4_float4_0(ain1, ain2, null);
14670    }
14671
14672    // ain1 = "float4 a"
14673    // ain2 = "float4 b"
14674    public result_int reduce_my_float4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14675        Type t0, t1;
14676        // check ain1
14677        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14678            throw new RSRuntimeException("Type mismatch with F32_4!");
14679        }
14680        // check ain2
14681        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
14682            throw new RSRuntimeException("Type mismatch with F32_4!");
14683        }
14684        // Verify dimensions
14685        t0 = ain1.getType();
14686        t1 = ain2.getType();
14687        if ((t0.getCount() != t1.getCount()) ||
14688            (t0.getX() != t1.getX()) ||
14689            (t0.getY() != t1.getY()) ||
14690            (t0.getZ() != t1.getZ()) ||
14691            (t0.hasFaces()   != t1.hasFaces()) ||
14692            (t0.hasMipmaps() != t1.hasMipmaps())) {
14693            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14694        }
14695
14696        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14697        aout.setAutoPadding(true);
14698        reduce(mExportReduceIdx_my_float4_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
14699        return new result_int(aout);
14700    }
14701
14702    private final static int mExportReduceIdx_my_float4_float4_1 = 221;
14703    // in1 = "a", flattened 4-vectors
14704    // in2 = "b", flattened 4-vectors
14705    public result_int reduce_my_float4_float4_1(float[] in1, float[] in2) {
14706        // Verify that "in1" is non-null.
14707        if (in1 == null) {
14708            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14709        }
14710        // Verify that the array length is a multiple of the vector size.
14711        if (in1.length % 4 != 0) {
14712            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14713        }
14714        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14715        ain1.setAutoPadding(true);
14716        ain1.copyFrom(in1);
14717        // Verify that "in2" is non-null.
14718        if (in2 == null) {
14719            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14720        }
14721        // Verify that the array length is a multiple of the vector size.
14722        if (in2.length % 4 != 0) {
14723            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
14724        }
14725        // Verify that input array lengths are the same.
14726        if (in1.length / 4 != in2.length / 4) {
14727            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14728        }
14729        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
14730        ain2.setAutoPadding(true);
14731        ain2.copyFrom(in2);
14732
14733        result_int result = reduce_my_float4_float4_1(ain1, ain2, null);
14734        result.mTempIns = new Allocation[]{ain1, ain2};
14735        return result;
14736    }
14737
14738    // ain1 = "float4 a"
14739    // ain2 = "float4 b"
14740    public result_int reduce_my_float4_float4_1(Allocation ain1, Allocation ain2) {
14741        return reduce_my_float4_float4_1(ain1, ain2, null);
14742    }
14743
14744    // ain1 = "float4 a"
14745    // ain2 = "float4 b"
14746    public result_int reduce_my_float4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14747        Type t0, t1;
14748        // check ain1
14749        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14750            throw new RSRuntimeException("Type mismatch with F32_4!");
14751        }
14752        // check ain2
14753        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
14754            throw new RSRuntimeException("Type mismatch with F32_4!");
14755        }
14756        // Verify dimensions
14757        t0 = ain1.getType();
14758        t1 = ain2.getType();
14759        if ((t0.getCount() != t1.getCount()) ||
14760            (t0.getX() != t1.getX()) ||
14761            (t0.getY() != t1.getY()) ||
14762            (t0.getZ() != t1.getZ()) ||
14763            (t0.hasFaces()   != t1.hasFaces()) ||
14764            (t0.hasMipmaps() != t1.hasMipmaps())) {
14765            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14766        }
14767
14768        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14769        aout.setAutoPadding(true);
14770        reduce(mExportReduceIdx_my_float4_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
14771        return new result_int(aout);
14772    }
14773
14774    private final static int mExportReduceIdx_my_float4_char_0 = 222;
14775    // in1 = "a", flattened 4-vectors
14776    // in2 = "b"
14777    public result_int reduce_my_float4_char_0(float[] in1, byte[] in2) {
14778        // Verify that "in1" is non-null.
14779        if (in1 == null) {
14780            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14781        }
14782        // Verify that the array length is a multiple of the vector size.
14783        if (in1.length % 4 != 0) {
14784            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14785        }
14786        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14787        ain1.setAutoPadding(true);
14788        ain1.copyFrom(in1);
14789        // Verify that "in2" is non-null.
14790        if (in2 == null) {
14791            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14792        }
14793        // Verify that input array lengths are the same.
14794        if (in1.length / 4 != in2.length) {
14795            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14796        }
14797        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
14798        ain2.setAutoPadding(true);
14799        ain2.copyFrom(in2);
14800
14801        result_int result = reduce_my_float4_char_0(ain1, ain2, null);
14802        result.mTempIns = new Allocation[]{ain1, ain2};
14803        return result;
14804    }
14805
14806    // ain1 = "float4 a"
14807    // ain2 = "char b"
14808    public result_int reduce_my_float4_char_0(Allocation ain1, Allocation ain2) {
14809        return reduce_my_float4_char_0(ain1, ain2, null);
14810    }
14811
14812    // ain1 = "float4 a"
14813    // ain2 = "char b"
14814    public result_int reduce_my_float4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14815        Type t0, t1;
14816        // check ain1
14817        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14818            throw new RSRuntimeException("Type mismatch with F32_4!");
14819        }
14820        // check ain2
14821        if (!ain2.getType().getElement().isCompatible(__I8)) {
14822            throw new RSRuntimeException("Type mismatch with I8!");
14823        }
14824        // Verify dimensions
14825        t0 = ain1.getType();
14826        t1 = ain2.getType();
14827        if ((t0.getCount() != t1.getCount()) ||
14828            (t0.getX() != t1.getX()) ||
14829            (t0.getY() != t1.getY()) ||
14830            (t0.getZ() != t1.getZ()) ||
14831            (t0.hasFaces()   != t1.hasFaces()) ||
14832            (t0.hasMipmaps() != t1.hasMipmaps())) {
14833            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14834        }
14835
14836        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14837        aout.setAutoPadding(true);
14838        reduce(mExportReduceIdx_my_float4_char_0, new Allocation[]{ain1, ain2}, aout, sc);
14839        return new result_int(aout);
14840    }
14841
14842    private final static int mExportReduceIdx_my_float4_char_1 = 223;
14843    // in1 = "a", flattened 4-vectors
14844    // in2 = "b"
14845    public result_int reduce_my_float4_char_1(float[] in1, byte[] in2) {
14846        // Verify that "in1" is non-null.
14847        if (in1 == null) {
14848            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14849        }
14850        // Verify that the array length is a multiple of the vector size.
14851        if (in1.length % 4 != 0) {
14852            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14853        }
14854        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14855        ain1.setAutoPadding(true);
14856        ain1.copyFrom(in1);
14857        // Verify that "in2" is non-null.
14858        if (in2 == null) {
14859            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14860        }
14861        // Verify that input array lengths are the same.
14862        if (in1.length / 4 != in2.length) {
14863            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14864        }
14865        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
14866        ain2.setAutoPadding(true);
14867        ain2.copyFrom(in2);
14868
14869        result_int result = reduce_my_float4_char_1(ain1, ain2, null);
14870        result.mTempIns = new Allocation[]{ain1, ain2};
14871        return result;
14872    }
14873
14874    // ain1 = "float4 a"
14875    // ain2 = "char b"
14876    public result_int reduce_my_float4_char_1(Allocation ain1, Allocation ain2) {
14877        return reduce_my_float4_char_1(ain1, ain2, null);
14878    }
14879
14880    // ain1 = "float4 a"
14881    // ain2 = "char b"
14882    public result_int reduce_my_float4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14883        Type t0, t1;
14884        // check ain1
14885        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14886            throw new RSRuntimeException("Type mismatch with F32_4!");
14887        }
14888        // check ain2
14889        if (!ain2.getType().getElement().isCompatible(__I8)) {
14890            throw new RSRuntimeException("Type mismatch with I8!");
14891        }
14892        // Verify dimensions
14893        t0 = ain1.getType();
14894        t1 = ain2.getType();
14895        if ((t0.getCount() != t1.getCount()) ||
14896            (t0.getX() != t1.getX()) ||
14897            (t0.getY() != t1.getY()) ||
14898            (t0.getZ() != t1.getZ()) ||
14899            (t0.hasFaces()   != t1.hasFaces()) ||
14900            (t0.hasMipmaps() != t1.hasMipmaps())) {
14901            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14902        }
14903
14904        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14905        aout.setAutoPadding(true);
14906        reduce(mExportReduceIdx_my_float4_char_1, new Allocation[]{ain1, ain2}, aout, sc);
14907        return new result_int(aout);
14908    }
14909
14910    private final static int mExportReduceIdx_my_float4_char2_0 = 224;
14911    // in1 = "a", flattened 4-vectors
14912    // in2 = "b", flattened 2-vectors
14913    public result_int reduce_my_float4_char2_0(float[] in1, byte[] in2) {
14914        // Verify that "in1" is non-null.
14915        if (in1 == null) {
14916            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14917        }
14918        // Verify that the array length is a multiple of the vector size.
14919        if (in1.length % 4 != 0) {
14920            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14921        }
14922        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14923        ain1.setAutoPadding(true);
14924        ain1.copyFrom(in1);
14925        // Verify that "in2" is non-null.
14926        if (in2 == null) {
14927            throw new RSIllegalArgumentException("Array \"in2\" is null!");
14928        }
14929        // Verify that the array length is a multiple of the vector size.
14930        if (in2.length % 2 != 0) {
14931            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
14932        }
14933        // Verify that input array lengths are the same.
14934        if (in1.length / 4 != in2.length / 2) {
14935            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
14936        }
14937        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
14938        ain2.setAutoPadding(true);
14939        ain2.copyFrom(in2);
14940
14941        result_int result = reduce_my_float4_char2_0(ain1, ain2, null);
14942        result.mTempIns = new Allocation[]{ain1, ain2};
14943        return result;
14944    }
14945
14946    // ain1 = "float4 a"
14947    // ain2 = "char2 b"
14948    public result_int reduce_my_float4_char2_0(Allocation ain1, Allocation ain2) {
14949        return reduce_my_float4_char2_0(ain1, ain2, null);
14950    }
14951
14952    // ain1 = "float4 a"
14953    // ain2 = "char2 b"
14954    public result_int reduce_my_float4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
14955        Type t0, t1;
14956        // check ain1
14957        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
14958            throw new RSRuntimeException("Type mismatch with F32_4!");
14959        }
14960        // check ain2
14961        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
14962            throw new RSRuntimeException("Type mismatch with I8_2!");
14963        }
14964        // Verify dimensions
14965        t0 = ain1.getType();
14966        t1 = ain2.getType();
14967        if ((t0.getCount() != t1.getCount()) ||
14968            (t0.getX() != t1.getX()) ||
14969            (t0.getY() != t1.getY()) ||
14970            (t0.getZ() != t1.getZ()) ||
14971            (t0.hasFaces()   != t1.hasFaces()) ||
14972            (t0.hasMipmaps() != t1.hasMipmaps())) {
14973            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
14974        }
14975
14976        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
14977        aout.setAutoPadding(true);
14978        reduce(mExportReduceIdx_my_float4_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
14979        return new result_int(aout);
14980    }
14981
14982    private final static int mExportReduceIdx_my_float4_char2_1 = 225;
14983    // in1 = "a", flattened 4-vectors
14984    // in2 = "b", flattened 2-vectors
14985    public result_int reduce_my_float4_char2_1(float[] in1, byte[] in2) {
14986        // Verify that "in1" is non-null.
14987        if (in1 == null) {
14988            throw new RSIllegalArgumentException("Array \"in1\" is null!");
14989        }
14990        // Verify that the array length is a multiple of the vector size.
14991        if (in1.length % 4 != 0) {
14992            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
14993        }
14994        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
14995        ain1.setAutoPadding(true);
14996        ain1.copyFrom(in1);
14997        // Verify that "in2" is non-null.
14998        if (in2 == null) {
14999            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15000        }
15001        // Verify that the array length is a multiple of the vector size.
15002        if (in2.length % 2 != 0) {
15003            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
15004        }
15005        // Verify that input array lengths are the same.
15006        if (in1.length / 4 != in2.length / 2) {
15007            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15008        }
15009        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
15010        ain2.setAutoPadding(true);
15011        ain2.copyFrom(in2);
15012
15013        result_int result = reduce_my_float4_char2_1(ain1, ain2, null);
15014        result.mTempIns = new Allocation[]{ain1, ain2};
15015        return result;
15016    }
15017
15018    // ain1 = "float4 a"
15019    // ain2 = "char2 b"
15020    public result_int reduce_my_float4_char2_1(Allocation ain1, Allocation ain2) {
15021        return reduce_my_float4_char2_1(ain1, ain2, null);
15022    }
15023
15024    // ain1 = "float4 a"
15025    // ain2 = "char2 b"
15026    public result_int reduce_my_float4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15027        Type t0, t1;
15028        // check ain1
15029        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15030            throw new RSRuntimeException("Type mismatch with F32_4!");
15031        }
15032        // check ain2
15033        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
15034            throw new RSRuntimeException("Type mismatch with I8_2!");
15035        }
15036        // Verify dimensions
15037        t0 = ain1.getType();
15038        t1 = ain2.getType();
15039        if ((t0.getCount() != t1.getCount()) ||
15040            (t0.getX() != t1.getX()) ||
15041            (t0.getY() != t1.getY()) ||
15042            (t0.getZ() != t1.getZ()) ||
15043            (t0.hasFaces()   != t1.hasFaces()) ||
15044            (t0.hasMipmaps() != t1.hasMipmaps())) {
15045            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15046        }
15047
15048        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15049        aout.setAutoPadding(true);
15050        reduce(mExportReduceIdx_my_float4_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
15051        return new result_int(aout);
15052    }
15053
15054    private final static int mExportReduceIdx_my_float4_char4_0 = 226;
15055    // in1 = "a", flattened 4-vectors
15056    // in2 = "b", flattened 4-vectors
15057    public result_int reduce_my_float4_char4_0(float[] in1, byte[] in2) {
15058        // Verify that "in1" is non-null.
15059        if (in1 == null) {
15060            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15061        }
15062        // Verify that the array length is a multiple of the vector size.
15063        if (in1.length % 4 != 0) {
15064            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15065        }
15066        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15067        ain1.setAutoPadding(true);
15068        ain1.copyFrom(in1);
15069        // Verify that "in2" is non-null.
15070        if (in2 == null) {
15071            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15072        }
15073        // Verify that the array length is a multiple of the vector size.
15074        if (in2.length % 4 != 0) {
15075            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
15076        }
15077        // Verify that input array lengths are the same.
15078        if (in1.length / 4 != in2.length / 4) {
15079            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15080        }
15081        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
15082        ain2.setAutoPadding(true);
15083        ain2.copyFrom(in2);
15084
15085        result_int result = reduce_my_float4_char4_0(ain1, ain2, null);
15086        result.mTempIns = new Allocation[]{ain1, ain2};
15087        return result;
15088    }
15089
15090    // ain1 = "float4 a"
15091    // ain2 = "char4 b"
15092    public result_int reduce_my_float4_char4_0(Allocation ain1, Allocation ain2) {
15093        return reduce_my_float4_char4_0(ain1, ain2, null);
15094    }
15095
15096    // ain1 = "float4 a"
15097    // ain2 = "char4 b"
15098    public result_int reduce_my_float4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15099        Type t0, t1;
15100        // check ain1
15101        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15102            throw new RSRuntimeException("Type mismatch with F32_4!");
15103        }
15104        // check ain2
15105        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
15106            throw new RSRuntimeException("Type mismatch with I8_4!");
15107        }
15108        // Verify dimensions
15109        t0 = ain1.getType();
15110        t1 = ain2.getType();
15111        if ((t0.getCount() != t1.getCount()) ||
15112            (t0.getX() != t1.getX()) ||
15113            (t0.getY() != t1.getY()) ||
15114            (t0.getZ() != t1.getZ()) ||
15115            (t0.hasFaces()   != t1.hasFaces()) ||
15116            (t0.hasMipmaps() != t1.hasMipmaps())) {
15117            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15118        }
15119
15120        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15121        aout.setAutoPadding(true);
15122        reduce(mExportReduceIdx_my_float4_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
15123        return new result_int(aout);
15124    }
15125
15126    private final static int mExportReduceIdx_my_float4_char4_1 = 227;
15127    // in1 = "a", flattened 4-vectors
15128    // in2 = "b", flattened 4-vectors
15129    public result_int reduce_my_float4_char4_1(float[] in1, byte[] in2) {
15130        // Verify that "in1" is non-null.
15131        if (in1 == null) {
15132            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15133        }
15134        // Verify that the array length is a multiple of the vector size.
15135        if (in1.length % 4 != 0) {
15136            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15137        }
15138        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15139        ain1.setAutoPadding(true);
15140        ain1.copyFrom(in1);
15141        // Verify that "in2" is non-null.
15142        if (in2 == null) {
15143            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15144        }
15145        // Verify that the array length is a multiple of the vector size.
15146        if (in2.length % 4 != 0) {
15147            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
15148        }
15149        // Verify that input array lengths are the same.
15150        if (in1.length / 4 != in2.length / 4) {
15151            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15152        }
15153        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
15154        ain2.setAutoPadding(true);
15155        ain2.copyFrom(in2);
15156
15157        result_int result = reduce_my_float4_char4_1(ain1, ain2, null);
15158        result.mTempIns = new Allocation[]{ain1, ain2};
15159        return result;
15160    }
15161
15162    // ain1 = "float4 a"
15163    // ain2 = "char4 b"
15164    public result_int reduce_my_float4_char4_1(Allocation ain1, Allocation ain2) {
15165        return reduce_my_float4_char4_1(ain1, ain2, null);
15166    }
15167
15168    // ain1 = "float4 a"
15169    // ain2 = "char4 b"
15170    public result_int reduce_my_float4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15171        Type t0, t1;
15172        // check ain1
15173        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15174            throw new RSRuntimeException("Type mismatch with F32_4!");
15175        }
15176        // check ain2
15177        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
15178            throw new RSRuntimeException("Type mismatch with I8_4!");
15179        }
15180        // Verify dimensions
15181        t0 = ain1.getType();
15182        t1 = ain2.getType();
15183        if ((t0.getCount() != t1.getCount()) ||
15184            (t0.getX() != t1.getX()) ||
15185            (t0.getY() != t1.getY()) ||
15186            (t0.getZ() != t1.getZ()) ||
15187            (t0.hasFaces()   != t1.hasFaces()) ||
15188            (t0.hasMipmaps() != t1.hasMipmaps())) {
15189            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15190        }
15191
15192        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15193        aout.setAutoPadding(true);
15194        reduce(mExportReduceIdx_my_float4_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
15195        return new result_int(aout);
15196    }
15197
15198    private final static int mExportReduceIdx_my_float4_short_0 = 228;
15199    // in1 = "a", flattened 4-vectors
15200    // in2 = "b"
15201    public result_int reduce_my_float4_short_0(float[] in1, short[] in2) {
15202        // Verify that "in1" is non-null.
15203        if (in1 == null) {
15204            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15205        }
15206        // Verify that the array length is a multiple of the vector size.
15207        if (in1.length % 4 != 0) {
15208            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15209        }
15210        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15211        ain1.setAutoPadding(true);
15212        ain1.copyFrom(in1);
15213        // Verify that "in2" is non-null.
15214        if (in2 == null) {
15215            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15216        }
15217        // Verify that input array lengths are the same.
15218        if (in1.length / 4 != in2.length) {
15219            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15220        }
15221        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
15222        ain2.setAutoPadding(true);
15223        ain2.copyFrom(in2);
15224
15225        result_int result = reduce_my_float4_short_0(ain1, ain2, null);
15226        result.mTempIns = new Allocation[]{ain1, ain2};
15227        return result;
15228    }
15229
15230    // ain1 = "float4 a"
15231    // ain2 = "short b"
15232    public result_int reduce_my_float4_short_0(Allocation ain1, Allocation ain2) {
15233        return reduce_my_float4_short_0(ain1, ain2, null);
15234    }
15235
15236    // ain1 = "float4 a"
15237    // ain2 = "short b"
15238    public result_int reduce_my_float4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15239        Type t0, t1;
15240        // check ain1
15241        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15242            throw new RSRuntimeException("Type mismatch with F32_4!");
15243        }
15244        // check ain2
15245        if (!ain2.getType().getElement().isCompatible(__I16)) {
15246            throw new RSRuntimeException("Type mismatch with I16!");
15247        }
15248        // Verify dimensions
15249        t0 = ain1.getType();
15250        t1 = ain2.getType();
15251        if ((t0.getCount() != t1.getCount()) ||
15252            (t0.getX() != t1.getX()) ||
15253            (t0.getY() != t1.getY()) ||
15254            (t0.getZ() != t1.getZ()) ||
15255            (t0.hasFaces()   != t1.hasFaces()) ||
15256            (t0.hasMipmaps() != t1.hasMipmaps())) {
15257            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15258        }
15259
15260        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15261        aout.setAutoPadding(true);
15262        reduce(mExportReduceIdx_my_float4_short_0, new Allocation[]{ain1, ain2}, aout, sc);
15263        return new result_int(aout);
15264    }
15265
15266    private final static int mExportReduceIdx_my_float4_short_1 = 229;
15267    // in1 = "a", flattened 4-vectors
15268    // in2 = "b"
15269    public result_int reduce_my_float4_short_1(float[] in1, short[] in2) {
15270        // Verify that "in1" is non-null.
15271        if (in1 == null) {
15272            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15273        }
15274        // Verify that the array length is a multiple of the vector size.
15275        if (in1.length % 4 != 0) {
15276            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15277        }
15278        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15279        ain1.setAutoPadding(true);
15280        ain1.copyFrom(in1);
15281        // Verify that "in2" is non-null.
15282        if (in2 == null) {
15283            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15284        }
15285        // Verify that input array lengths are the same.
15286        if (in1.length / 4 != in2.length) {
15287            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15288        }
15289        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
15290        ain2.setAutoPadding(true);
15291        ain2.copyFrom(in2);
15292
15293        result_int result = reduce_my_float4_short_1(ain1, ain2, null);
15294        result.mTempIns = new Allocation[]{ain1, ain2};
15295        return result;
15296    }
15297
15298    // ain1 = "float4 a"
15299    // ain2 = "short b"
15300    public result_int reduce_my_float4_short_1(Allocation ain1, Allocation ain2) {
15301        return reduce_my_float4_short_1(ain1, ain2, null);
15302    }
15303
15304    // ain1 = "float4 a"
15305    // ain2 = "short b"
15306    public result_int reduce_my_float4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15307        Type t0, t1;
15308        // check ain1
15309        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15310            throw new RSRuntimeException("Type mismatch with F32_4!");
15311        }
15312        // check ain2
15313        if (!ain2.getType().getElement().isCompatible(__I16)) {
15314            throw new RSRuntimeException("Type mismatch with I16!");
15315        }
15316        // Verify dimensions
15317        t0 = ain1.getType();
15318        t1 = ain2.getType();
15319        if ((t0.getCount() != t1.getCount()) ||
15320            (t0.getX() != t1.getX()) ||
15321            (t0.getY() != t1.getY()) ||
15322            (t0.getZ() != t1.getZ()) ||
15323            (t0.hasFaces()   != t1.hasFaces()) ||
15324            (t0.hasMipmaps() != t1.hasMipmaps())) {
15325            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15326        }
15327
15328        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15329        aout.setAutoPadding(true);
15330        reduce(mExportReduceIdx_my_float4_short_1, new Allocation[]{ain1, ain2}, aout, sc);
15331        return new result_int(aout);
15332    }
15333
15334    private final static int mExportReduceIdx_my_float4_short2_0 = 230;
15335    // in1 = "a", flattened 4-vectors
15336    // in2 = "b", flattened 2-vectors
15337    public result_int reduce_my_float4_short2_0(float[] in1, short[] in2) {
15338        // Verify that "in1" is non-null.
15339        if (in1 == null) {
15340            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15341        }
15342        // Verify that the array length is a multiple of the vector size.
15343        if (in1.length % 4 != 0) {
15344            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15345        }
15346        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15347        ain1.setAutoPadding(true);
15348        ain1.copyFrom(in1);
15349        // Verify that "in2" is non-null.
15350        if (in2 == null) {
15351            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15352        }
15353        // Verify that the array length is a multiple of the vector size.
15354        if (in2.length % 2 != 0) {
15355            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
15356        }
15357        // Verify that input array lengths are the same.
15358        if (in1.length / 4 != in2.length / 2) {
15359            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15360        }
15361        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
15362        ain2.setAutoPadding(true);
15363        ain2.copyFrom(in2);
15364
15365        result_int result = reduce_my_float4_short2_0(ain1, ain2, null);
15366        result.mTempIns = new Allocation[]{ain1, ain2};
15367        return result;
15368    }
15369
15370    // ain1 = "float4 a"
15371    // ain2 = "short2 b"
15372    public result_int reduce_my_float4_short2_0(Allocation ain1, Allocation ain2) {
15373        return reduce_my_float4_short2_0(ain1, ain2, null);
15374    }
15375
15376    // ain1 = "float4 a"
15377    // ain2 = "short2 b"
15378    public result_int reduce_my_float4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15379        Type t0, t1;
15380        // check ain1
15381        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15382            throw new RSRuntimeException("Type mismatch with F32_4!");
15383        }
15384        // check ain2
15385        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
15386            throw new RSRuntimeException("Type mismatch with I16_2!");
15387        }
15388        // Verify dimensions
15389        t0 = ain1.getType();
15390        t1 = ain2.getType();
15391        if ((t0.getCount() != t1.getCount()) ||
15392            (t0.getX() != t1.getX()) ||
15393            (t0.getY() != t1.getY()) ||
15394            (t0.getZ() != t1.getZ()) ||
15395            (t0.hasFaces()   != t1.hasFaces()) ||
15396            (t0.hasMipmaps() != t1.hasMipmaps())) {
15397            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15398        }
15399
15400        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15401        aout.setAutoPadding(true);
15402        reduce(mExportReduceIdx_my_float4_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
15403        return new result_int(aout);
15404    }
15405
15406    private final static int mExportReduceIdx_my_float4_short2_1 = 231;
15407    // in1 = "a", flattened 4-vectors
15408    // in2 = "b", flattened 2-vectors
15409    public result_int reduce_my_float4_short2_1(float[] in1, short[] in2) {
15410        // Verify that "in1" is non-null.
15411        if (in1 == null) {
15412            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15413        }
15414        // Verify that the array length is a multiple of the vector size.
15415        if (in1.length % 4 != 0) {
15416            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15417        }
15418        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15419        ain1.setAutoPadding(true);
15420        ain1.copyFrom(in1);
15421        // Verify that "in2" is non-null.
15422        if (in2 == null) {
15423            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15424        }
15425        // Verify that the array length is a multiple of the vector size.
15426        if (in2.length % 2 != 0) {
15427            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
15428        }
15429        // Verify that input array lengths are the same.
15430        if (in1.length / 4 != in2.length / 2) {
15431            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15432        }
15433        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
15434        ain2.setAutoPadding(true);
15435        ain2.copyFrom(in2);
15436
15437        result_int result = reduce_my_float4_short2_1(ain1, ain2, null);
15438        result.mTempIns = new Allocation[]{ain1, ain2};
15439        return result;
15440    }
15441
15442    // ain1 = "float4 a"
15443    // ain2 = "short2 b"
15444    public result_int reduce_my_float4_short2_1(Allocation ain1, Allocation ain2) {
15445        return reduce_my_float4_short2_1(ain1, ain2, null);
15446    }
15447
15448    // ain1 = "float4 a"
15449    // ain2 = "short2 b"
15450    public result_int reduce_my_float4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15451        Type t0, t1;
15452        // check ain1
15453        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15454            throw new RSRuntimeException("Type mismatch with F32_4!");
15455        }
15456        // check ain2
15457        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
15458            throw new RSRuntimeException("Type mismatch with I16_2!");
15459        }
15460        // Verify dimensions
15461        t0 = ain1.getType();
15462        t1 = ain2.getType();
15463        if ((t0.getCount() != t1.getCount()) ||
15464            (t0.getX() != t1.getX()) ||
15465            (t0.getY() != t1.getY()) ||
15466            (t0.getZ() != t1.getZ()) ||
15467            (t0.hasFaces()   != t1.hasFaces()) ||
15468            (t0.hasMipmaps() != t1.hasMipmaps())) {
15469            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15470        }
15471
15472        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15473        aout.setAutoPadding(true);
15474        reduce(mExportReduceIdx_my_float4_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
15475        return new result_int(aout);
15476    }
15477
15478    private final static int mExportReduceIdx_my_float4_short4_0 = 232;
15479    // in1 = "a", flattened 4-vectors
15480    // in2 = "b", flattened 4-vectors
15481    public result_int reduce_my_float4_short4_0(float[] in1, short[] in2) {
15482        // Verify that "in1" is non-null.
15483        if (in1 == null) {
15484            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15485        }
15486        // Verify that the array length is a multiple of the vector size.
15487        if (in1.length % 4 != 0) {
15488            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15489        }
15490        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15491        ain1.setAutoPadding(true);
15492        ain1.copyFrom(in1);
15493        // Verify that "in2" is non-null.
15494        if (in2 == null) {
15495            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15496        }
15497        // Verify that the array length is a multiple of the vector size.
15498        if (in2.length % 4 != 0) {
15499            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
15500        }
15501        // Verify that input array lengths are the same.
15502        if (in1.length / 4 != in2.length / 4) {
15503            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15504        }
15505        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
15506        ain2.setAutoPadding(true);
15507        ain2.copyFrom(in2);
15508
15509        result_int result = reduce_my_float4_short4_0(ain1, ain2, null);
15510        result.mTempIns = new Allocation[]{ain1, ain2};
15511        return result;
15512    }
15513
15514    // ain1 = "float4 a"
15515    // ain2 = "short4 b"
15516    public result_int reduce_my_float4_short4_0(Allocation ain1, Allocation ain2) {
15517        return reduce_my_float4_short4_0(ain1, ain2, null);
15518    }
15519
15520    // ain1 = "float4 a"
15521    // ain2 = "short4 b"
15522    public result_int reduce_my_float4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15523        Type t0, t1;
15524        // check ain1
15525        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15526            throw new RSRuntimeException("Type mismatch with F32_4!");
15527        }
15528        // check ain2
15529        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
15530            throw new RSRuntimeException("Type mismatch with I16_4!");
15531        }
15532        // Verify dimensions
15533        t0 = ain1.getType();
15534        t1 = ain2.getType();
15535        if ((t0.getCount() != t1.getCount()) ||
15536            (t0.getX() != t1.getX()) ||
15537            (t0.getY() != t1.getY()) ||
15538            (t0.getZ() != t1.getZ()) ||
15539            (t0.hasFaces()   != t1.hasFaces()) ||
15540            (t0.hasMipmaps() != t1.hasMipmaps())) {
15541            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15542        }
15543
15544        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15545        aout.setAutoPadding(true);
15546        reduce(mExportReduceIdx_my_float4_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
15547        return new result_int(aout);
15548    }
15549
15550    private final static int mExportReduceIdx_my_float4_short4_1 = 233;
15551    // in1 = "a", flattened 4-vectors
15552    // in2 = "b", flattened 4-vectors
15553    public result_int reduce_my_float4_short4_1(float[] in1, short[] in2) {
15554        // Verify that "in1" is non-null.
15555        if (in1 == null) {
15556            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15557        }
15558        // Verify that the array length is a multiple of the vector size.
15559        if (in1.length % 4 != 0) {
15560            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15561        }
15562        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15563        ain1.setAutoPadding(true);
15564        ain1.copyFrom(in1);
15565        // Verify that "in2" is non-null.
15566        if (in2 == null) {
15567            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15568        }
15569        // Verify that the array length is a multiple of the vector size.
15570        if (in2.length % 4 != 0) {
15571            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
15572        }
15573        // Verify that input array lengths are the same.
15574        if (in1.length / 4 != in2.length / 4) {
15575            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15576        }
15577        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
15578        ain2.setAutoPadding(true);
15579        ain2.copyFrom(in2);
15580
15581        result_int result = reduce_my_float4_short4_1(ain1, ain2, null);
15582        result.mTempIns = new Allocation[]{ain1, ain2};
15583        return result;
15584    }
15585
15586    // ain1 = "float4 a"
15587    // ain2 = "short4 b"
15588    public result_int reduce_my_float4_short4_1(Allocation ain1, Allocation ain2) {
15589        return reduce_my_float4_short4_1(ain1, ain2, null);
15590    }
15591
15592    // ain1 = "float4 a"
15593    // ain2 = "short4 b"
15594    public result_int reduce_my_float4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15595        Type t0, t1;
15596        // check ain1
15597        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15598            throw new RSRuntimeException("Type mismatch with F32_4!");
15599        }
15600        // check ain2
15601        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
15602            throw new RSRuntimeException("Type mismatch with I16_4!");
15603        }
15604        // Verify dimensions
15605        t0 = ain1.getType();
15606        t1 = ain2.getType();
15607        if ((t0.getCount() != t1.getCount()) ||
15608            (t0.getX() != t1.getX()) ||
15609            (t0.getY() != t1.getY()) ||
15610            (t0.getZ() != t1.getZ()) ||
15611            (t0.hasFaces()   != t1.hasFaces()) ||
15612            (t0.hasMipmaps() != t1.hasMipmaps())) {
15613            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15614        }
15615
15616        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15617        aout.setAutoPadding(true);
15618        reduce(mExportReduceIdx_my_float4_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
15619        return new result_int(aout);
15620    }
15621
15622    private final static int mExportReduceIdx_my_float4_uchar_0 = 234;
15623    // in1 = "a", flattened 4-vectors
15624    // in2 = "b"
15625    public result_int reduce_my_float4_uchar_0(float[] in1, byte[] in2) {
15626        // Verify that "in1" is non-null.
15627        if (in1 == null) {
15628            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15629        }
15630        // Verify that the array length is a multiple of the vector size.
15631        if (in1.length % 4 != 0) {
15632            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15633        }
15634        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15635        ain1.setAutoPadding(true);
15636        ain1.copyFrom(in1);
15637        // Verify that "in2" is non-null.
15638        if (in2 == null) {
15639            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15640        }
15641        // Verify that input array lengths are the same.
15642        if (in1.length / 4 != in2.length) {
15643            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15644        }
15645        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
15646        ain2.setAutoPadding(true);
15647        ain2.copyFrom(in2);
15648
15649        result_int result = reduce_my_float4_uchar_0(ain1, ain2, null);
15650        result.mTempIns = new Allocation[]{ain1, ain2};
15651        return result;
15652    }
15653
15654    // ain1 = "float4 a"
15655    // ain2 = "uchar b"
15656    public result_int reduce_my_float4_uchar_0(Allocation ain1, Allocation ain2) {
15657        return reduce_my_float4_uchar_0(ain1, ain2, null);
15658    }
15659
15660    // ain1 = "float4 a"
15661    // ain2 = "uchar b"
15662    public result_int reduce_my_float4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15663        Type t0, t1;
15664        // check ain1
15665        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15666            throw new RSRuntimeException("Type mismatch with F32_4!");
15667        }
15668        // check ain2
15669        if (!ain2.getType().getElement().isCompatible(__U8)) {
15670            throw new RSRuntimeException("Type mismatch with U8!");
15671        }
15672        // Verify dimensions
15673        t0 = ain1.getType();
15674        t1 = ain2.getType();
15675        if ((t0.getCount() != t1.getCount()) ||
15676            (t0.getX() != t1.getX()) ||
15677            (t0.getY() != t1.getY()) ||
15678            (t0.getZ() != t1.getZ()) ||
15679            (t0.hasFaces()   != t1.hasFaces()) ||
15680            (t0.hasMipmaps() != t1.hasMipmaps())) {
15681            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15682        }
15683
15684        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15685        aout.setAutoPadding(true);
15686        reduce(mExportReduceIdx_my_float4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
15687        return new result_int(aout);
15688    }
15689
15690    private final static int mExportReduceIdx_my_float4_uchar_1 = 235;
15691    // in1 = "a", flattened 4-vectors
15692    // in2 = "b"
15693    public result_int reduce_my_float4_uchar_1(float[] in1, byte[] in2) {
15694        // Verify that "in1" is non-null.
15695        if (in1 == null) {
15696            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15697        }
15698        // Verify that the array length is a multiple of the vector size.
15699        if (in1.length % 4 != 0) {
15700            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15701        }
15702        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15703        ain1.setAutoPadding(true);
15704        ain1.copyFrom(in1);
15705        // Verify that "in2" is non-null.
15706        if (in2 == null) {
15707            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15708        }
15709        // Verify that input array lengths are the same.
15710        if (in1.length / 4 != in2.length) {
15711            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15712        }
15713        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
15714        ain2.setAutoPadding(true);
15715        ain2.copyFrom(in2);
15716
15717        result_int result = reduce_my_float4_uchar_1(ain1, ain2, null);
15718        result.mTempIns = new Allocation[]{ain1, ain2};
15719        return result;
15720    }
15721
15722    // ain1 = "float4 a"
15723    // ain2 = "uchar b"
15724    public result_int reduce_my_float4_uchar_1(Allocation ain1, Allocation ain2) {
15725        return reduce_my_float4_uchar_1(ain1, ain2, null);
15726    }
15727
15728    // ain1 = "float4 a"
15729    // ain2 = "uchar b"
15730    public result_int reduce_my_float4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15731        Type t0, t1;
15732        // check ain1
15733        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15734            throw new RSRuntimeException("Type mismatch with F32_4!");
15735        }
15736        // check ain2
15737        if (!ain2.getType().getElement().isCompatible(__U8)) {
15738            throw new RSRuntimeException("Type mismatch with U8!");
15739        }
15740        // Verify dimensions
15741        t0 = ain1.getType();
15742        t1 = ain2.getType();
15743        if ((t0.getCount() != t1.getCount()) ||
15744            (t0.getX() != t1.getX()) ||
15745            (t0.getY() != t1.getY()) ||
15746            (t0.getZ() != t1.getZ()) ||
15747            (t0.hasFaces()   != t1.hasFaces()) ||
15748            (t0.hasMipmaps() != t1.hasMipmaps())) {
15749            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15750        }
15751
15752        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15753        aout.setAutoPadding(true);
15754        reduce(mExportReduceIdx_my_float4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
15755        return new result_int(aout);
15756    }
15757
15758    private final static int mExportReduceIdx_my_float4_uchar2_0 = 236;
15759    // in1 = "a", flattened 4-vectors
15760    // in2 = "b", flattened 2-vectors
15761    public result_int reduce_my_float4_uchar2_0(float[] in1, byte[] in2) {
15762        // Verify that "in1" is non-null.
15763        if (in1 == null) {
15764            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15765        }
15766        // Verify that the array length is a multiple of the vector size.
15767        if (in1.length % 4 != 0) {
15768            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15769        }
15770        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15771        ain1.setAutoPadding(true);
15772        ain1.copyFrom(in1);
15773        // Verify that "in2" is non-null.
15774        if (in2 == null) {
15775            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15776        }
15777        // Verify that the array length is a multiple of the vector size.
15778        if (in2.length % 2 != 0) {
15779            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
15780        }
15781        // Verify that input array lengths are the same.
15782        if (in1.length / 4 != in2.length / 2) {
15783            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15784        }
15785        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
15786        ain2.setAutoPadding(true);
15787        ain2.copyFrom(in2);
15788
15789        result_int result = reduce_my_float4_uchar2_0(ain1, ain2, null);
15790        result.mTempIns = new Allocation[]{ain1, ain2};
15791        return result;
15792    }
15793
15794    // ain1 = "float4 a"
15795    // ain2 = "uchar2 b"
15796    public result_int reduce_my_float4_uchar2_0(Allocation ain1, Allocation ain2) {
15797        return reduce_my_float4_uchar2_0(ain1, ain2, null);
15798    }
15799
15800    // ain1 = "float4 a"
15801    // ain2 = "uchar2 b"
15802    public result_int reduce_my_float4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15803        Type t0, t1;
15804        // check ain1
15805        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15806            throw new RSRuntimeException("Type mismatch with F32_4!");
15807        }
15808        // check ain2
15809        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
15810            throw new RSRuntimeException("Type mismatch with U8_2!");
15811        }
15812        // Verify dimensions
15813        t0 = ain1.getType();
15814        t1 = ain2.getType();
15815        if ((t0.getCount() != t1.getCount()) ||
15816            (t0.getX() != t1.getX()) ||
15817            (t0.getY() != t1.getY()) ||
15818            (t0.getZ() != t1.getZ()) ||
15819            (t0.hasFaces()   != t1.hasFaces()) ||
15820            (t0.hasMipmaps() != t1.hasMipmaps())) {
15821            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15822        }
15823
15824        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15825        aout.setAutoPadding(true);
15826        reduce(mExportReduceIdx_my_float4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
15827        return new result_int(aout);
15828    }
15829
15830    private final static int mExportReduceIdx_my_float4_uchar2_1 = 237;
15831    // in1 = "a", flattened 4-vectors
15832    // in2 = "b", flattened 2-vectors
15833    public result_int reduce_my_float4_uchar2_1(float[] in1, byte[] in2) {
15834        // Verify that "in1" is non-null.
15835        if (in1 == null) {
15836            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15837        }
15838        // Verify that the array length is a multiple of the vector size.
15839        if (in1.length % 4 != 0) {
15840            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15841        }
15842        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15843        ain1.setAutoPadding(true);
15844        ain1.copyFrom(in1);
15845        // Verify that "in2" is non-null.
15846        if (in2 == null) {
15847            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15848        }
15849        // Verify that the array length is a multiple of the vector size.
15850        if (in2.length % 2 != 0) {
15851            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
15852        }
15853        // Verify that input array lengths are the same.
15854        if (in1.length / 4 != in2.length / 2) {
15855            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15856        }
15857        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
15858        ain2.setAutoPadding(true);
15859        ain2.copyFrom(in2);
15860
15861        result_int result = reduce_my_float4_uchar2_1(ain1, ain2, null);
15862        result.mTempIns = new Allocation[]{ain1, ain2};
15863        return result;
15864    }
15865
15866    // ain1 = "float4 a"
15867    // ain2 = "uchar2 b"
15868    public result_int reduce_my_float4_uchar2_1(Allocation ain1, Allocation ain2) {
15869        return reduce_my_float4_uchar2_1(ain1, ain2, null);
15870    }
15871
15872    // ain1 = "float4 a"
15873    // ain2 = "uchar2 b"
15874    public result_int reduce_my_float4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15875        Type t0, t1;
15876        // check ain1
15877        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15878            throw new RSRuntimeException("Type mismatch with F32_4!");
15879        }
15880        // check ain2
15881        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
15882            throw new RSRuntimeException("Type mismatch with U8_2!");
15883        }
15884        // Verify dimensions
15885        t0 = ain1.getType();
15886        t1 = ain2.getType();
15887        if ((t0.getCount() != t1.getCount()) ||
15888            (t0.getX() != t1.getX()) ||
15889            (t0.getY() != t1.getY()) ||
15890            (t0.getZ() != t1.getZ()) ||
15891            (t0.hasFaces()   != t1.hasFaces()) ||
15892            (t0.hasMipmaps() != t1.hasMipmaps())) {
15893            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15894        }
15895
15896        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15897        aout.setAutoPadding(true);
15898        reduce(mExportReduceIdx_my_float4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
15899        return new result_int(aout);
15900    }
15901
15902    private final static int mExportReduceIdx_my_float4_uchar4_0 = 238;
15903    // in1 = "a", flattened 4-vectors
15904    // in2 = "b", flattened 4-vectors
15905    public result_int reduce_my_float4_uchar4_0(float[] in1, byte[] in2) {
15906        // Verify that "in1" is non-null.
15907        if (in1 == null) {
15908            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15909        }
15910        // Verify that the array length is a multiple of the vector size.
15911        if (in1.length % 4 != 0) {
15912            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15913        }
15914        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15915        ain1.setAutoPadding(true);
15916        ain1.copyFrom(in1);
15917        // Verify that "in2" is non-null.
15918        if (in2 == null) {
15919            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15920        }
15921        // Verify that the array length is a multiple of the vector size.
15922        if (in2.length % 4 != 0) {
15923            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
15924        }
15925        // Verify that input array lengths are the same.
15926        if (in1.length / 4 != in2.length / 4) {
15927            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
15928        }
15929        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
15930        ain2.setAutoPadding(true);
15931        ain2.copyFrom(in2);
15932
15933        result_int result = reduce_my_float4_uchar4_0(ain1, ain2, null);
15934        result.mTempIns = new Allocation[]{ain1, ain2};
15935        return result;
15936    }
15937
15938    // ain1 = "float4 a"
15939    // ain2 = "uchar4 b"
15940    public result_int reduce_my_float4_uchar4_0(Allocation ain1, Allocation ain2) {
15941        return reduce_my_float4_uchar4_0(ain1, ain2, null);
15942    }
15943
15944    // ain1 = "float4 a"
15945    // ain2 = "uchar4 b"
15946    public result_int reduce_my_float4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
15947        Type t0, t1;
15948        // check ain1
15949        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
15950            throw new RSRuntimeException("Type mismatch with F32_4!");
15951        }
15952        // check ain2
15953        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
15954            throw new RSRuntimeException("Type mismatch with U8_4!");
15955        }
15956        // Verify dimensions
15957        t0 = ain1.getType();
15958        t1 = ain2.getType();
15959        if ((t0.getCount() != t1.getCount()) ||
15960            (t0.getX() != t1.getX()) ||
15961            (t0.getY() != t1.getY()) ||
15962            (t0.getZ() != t1.getZ()) ||
15963            (t0.hasFaces()   != t1.hasFaces()) ||
15964            (t0.hasMipmaps() != t1.hasMipmaps())) {
15965            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
15966        }
15967
15968        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
15969        aout.setAutoPadding(true);
15970        reduce(mExportReduceIdx_my_float4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
15971        return new result_int(aout);
15972    }
15973
15974    private final static int mExportReduceIdx_my_float4_uchar4_1 = 239;
15975    // in1 = "a", flattened 4-vectors
15976    // in2 = "b", flattened 4-vectors
15977    public result_int reduce_my_float4_uchar4_1(float[] in1, byte[] in2) {
15978        // Verify that "in1" is non-null.
15979        if (in1 == null) {
15980            throw new RSIllegalArgumentException("Array \"in1\" is null!");
15981        }
15982        // Verify that the array length is a multiple of the vector size.
15983        if (in1.length % 4 != 0) {
15984            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
15985        }
15986        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
15987        ain1.setAutoPadding(true);
15988        ain1.copyFrom(in1);
15989        // Verify that "in2" is non-null.
15990        if (in2 == null) {
15991            throw new RSIllegalArgumentException("Array \"in2\" is null!");
15992        }
15993        // Verify that the array length is a multiple of the vector size.
15994        if (in2.length % 4 != 0) {
15995            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
15996        }
15997        // Verify that input array lengths are the same.
15998        if (in1.length / 4 != in2.length / 4) {
15999            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16000        }
16001        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
16002        ain2.setAutoPadding(true);
16003        ain2.copyFrom(in2);
16004
16005        result_int result = reduce_my_float4_uchar4_1(ain1, ain2, null);
16006        result.mTempIns = new Allocation[]{ain1, ain2};
16007        return result;
16008    }
16009
16010    // ain1 = "float4 a"
16011    // ain2 = "uchar4 b"
16012    public result_int reduce_my_float4_uchar4_1(Allocation ain1, Allocation ain2) {
16013        return reduce_my_float4_uchar4_1(ain1, ain2, null);
16014    }
16015
16016    // ain1 = "float4 a"
16017    // ain2 = "uchar4 b"
16018    public result_int reduce_my_float4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16019        Type t0, t1;
16020        // check ain1
16021        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16022            throw new RSRuntimeException("Type mismatch with F32_4!");
16023        }
16024        // check ain2
16025        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
16026            throw new RSRuntimeException("Type mismatch with U8_4!");
16027        }
16028        // Verify dimensions
16029        t0 = ain1.getType();
16030        t1 = ain2.getType();
16031        if ((t0.getCount() != t1.getCount()) ||
16032            (t0.getX() != t1.getX()) ||
16033            (t0.getY() != t1.getY()) ||
16034            (t0.getZ() != t1.getZ()) ||
16035            (t0.hasFaces()   != t1.hasFaces()) ||
16036            (t0.hasMipmaps() != t1.hasMipmaps())) {
16037            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16038        }
16039
16040        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16041        aout.setAutoPadding(true);
16042        reduce(mExportReduceIdx_my_float4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
16043        return new result_int(aout);
16044    }
16045
16046    private final static int mExportReduceIdx_my_float4_ushort_0 = 240;
16047    // in1 = "a", flattened 4-vectors
16048    // in2 = "b"
16049    public result_int reduce_my_float4_ushort_0(float[] in1, short[] in2) {
16050        // Verify that "in1" is non-null.
16051        if (in1 == null) {
16052            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16053        }
16054        // Verify that the array length is a multiple of the vector size.
16055        if (in1.length % 4 != 0) {
16056            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
16057        }
16058        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
16059        ain1.setAutoPadding(true);
16060        ain1.copyFrom(in1);
16061        // Verify that "in2" is non-null.
16062        if (in2 == null) {
16063            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16064        }
16065        // Verify that input array lengths are the same.
16066        if (in1.length / 4 != in2.length) {
16067            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16068        }
16069        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
16070        ain2.setAutoPadding(true);
16071        ain2.copyFrom(in2);
16072
16073        result_int result = reduce_my_float4_ushort_0(ain1, ain2, null);
16074        result.mTempIns = new Allocation[]{ain1, ain2};
16075        return result;
16076    }
16077
16078    // ain1 = "float4 a"
16079    // ain2 = "ushort b"
16080    public result_int reduce_my_float4_ushort_0(Allocation ain1, Allocation ain2) {
16081        return reduce_my_float4_ushort_0(ain1, ain2, null);
16082    }
16083
16084    // ain1 = "float4 a"
16085    // ain2 = "ushort b"
16086    public result_int reduce_my_float4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16087        Type t0, t1;
16088        // check ain1
16089        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16090            throw new RSRuntimeException("Type mismatch with F32_4!");
16091        }
16092        // check ain2
16093        if (!ain2.getType().getElement().isCompatible(__U16)) {
16094            throw new RSRuntimeException("Type mismatch with U16!");
16095        }
16096        // Verify dimensions
16097        t0 = ain1.getType();
16098        t1 = ain2.getType();
16099        if ((t0.getCount() != t1.getCount()) ||
16100            (t0.getX() != t1.getX()) ||
16101            (t0.getY() != t1.getY()) ||
16102            (t0.getZ() != t1.getZ()) ||
16103            (t0.hasFaces()   != t1.hasFaces()) ||
16104            (t0.hasMipmaps() != t1.hasMipmaps())) {
16105            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16106        }
16107
16108        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16109        aout.setAutoPadding(true);
16110        reduce(mExportReduceIdx_my_float4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
16111        return new result_int(aout);
16112    }
16113
16114    private final static int mExportReduceIdx_my_float4_ushort_1 = 241;
16115    // in1 = "a", flattened 4-vectors
16116    // in2 = "b"
16117    public result_int reduce_my_float4_ushort_1(float[] in1, short[] in2) {
16118        // Verify that "in1" is non-null.
16119        if (in1 == null) {
16120            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16121        }
16122        // Verify that the array length is a multiple of the vector size.
16123        if (in1.length % 4 != 0) {
16124            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
16125        }
16126        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
16127        ain1.setAutoPadding(true);
16128        ain1.copyFrom(in1);
16129        // Verify that "in2" is non-null.
16130        if (in2 == null) {
16131            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16132        }
16133        // Verify that input array lengths are the same.
16134        if (in1.length / 4 != in2.length) {
16135            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16136        }
16137        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
16138        ain2.setAutoPadding(true);
16139        ain2.copyFrom(in2);
16140
16141        result_int result = reduce_my_float4_ushort_1(ain1, ain2, null);
16142        result.mTempIns = new Allocation[]{ain1, ain2};
16143        return result;
16144    }
16145
16146    // ain1 = "float4 a"
16147    // ain2 = "ushort b"
16148    public result_int reduce_my_float4_ushort_1(Allocation ain1, Allocation ain2) {
16149        return reduce_my_float4_ushort_1(ain1, ain2, null);
16150    }
16151
16152    // ain1 = "float4 a"
16153    // ain2 = "ushort b"
16154    public result_int reduce_my_float4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16155        Type t0, t1;
16156        // check ain1
16157        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16158            throw new RSRuntimeException("Type mismatch with F32_4!");
16159        }
16160        // check ain2
16161        if (!ain2.getType().getElement().isCompatible(__U16)) {
16162            throw new RSRuntimeException("Type mismatch with U16!");
16163        }
16164        // Verify dimensions
16165        t0 = ain1.getType();
16166        t1 = ain2.getType();
16167        if ((t0.getCount() != t1.getCount()) ||
16168            (t0.getX() != t1.getX()) ||
16169            (t0.getY() != t1.getY()) ||
16170            (t0.getZ() != t1.getZ()) ||
16171            (t0.hasFaces()   != t1.hasFaces()) ||
16172            (t0.hasMipmaps() != t1.hasMipmaps())) {
16173            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16174        }
16175
16176        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16177        aout.setAutoPadding(true);
16178        reduce(mExportReduceIdx_my_float4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
16179        return new result_int(aout);
16180    }
16181
16182    private final static int mExportReduceIdx_my_float4_ushort2_0 = 242;
16183    // in1 = "a", flattened 4-vectors
16184    // in2 = "b", flattened 2-vectors
16185    public result_int reduce_my_float4_ushort2_0(float[] in1, short[] in2) {
16186        // Verify that "in1" is non-null.
16187        if (in1 == null) {
16188            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16189        }
16190        // Verify that the array length is a multiple of the vector size.
16191        if (in1.length % 4 != 0) {
16192            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
16193        }
16194        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
16195        ain1.setAutoPadding(true);
16196        ain1.copyFrom(in1);
16197        // Verify that "in2" is non-null.
16198        if (in2 == null) {
16199            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16200        }
16201        // Verify that the array length is a multiple of the vector size.
16202        if (in2.length % 2 != 0) {
16203            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
16204        }
16205        // Verify that input array lengths are the same.
16206        if (in1.length / 4 != in2.length / 2) {
16207            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16208        }
16209        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
16210        ain2.setAutoPadding(true);
16211        ain2.copyFrom(in2);
16212
16213        result_int result = reduce_my_float4_ushort2_0(ain1, ain2, null);
16214        result.mTempIns = new Allocation[]{ain1, ain2};
16215        return result;
16216    }
16217
16218    // ain1 = "float4 a"
16219    // ain2 = "ushort2 b"
16220    public result_int reduce_my_float4_ushort2_0(Allocation ain1, Allocation ain2) {
16221        return reduce_my_float4_ushort2_0(ain1, ain2, null);
16222    }
16223
16224    // ain1 = "float4 a"
16225    // ain2 = "ushort2 b"
16226    public result_int reduce_my_float4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16227        Type t0, t1;
16228        // check ain1
16229        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16230            throw new RSRuntimeException("Type mismatch with F32_4!");
16231        }
16232        // check ain2
16233        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
16234            throw new RSRuntimeException("Type mismatch with U16_2!");
16235        }
16236        // Verify dimensions
16237        t0 = ain1.getType();
16238        t1 = ain2.getType();
16239        if ((t0.getCount() != t1.getCount()) ||
16240            (t0.getX() != t1.getX()) ||
16241            (t0.getY() != t1.getY()) ||
16242            (t0.getZ() != t1.getZ()) ||
16243            (t0.hasFaces()   != t1.hasFaces()) ||
16244            (t0.hasMipmaps() != t1.hasMipmaps())) {
16245            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16246        }
16247
16248        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16249        aout.setAutoPadding(true);
16250        reduce(mExportReduceIdx_my_float4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
16251        return new result_int(aout);
16252    }
16253
16254    private final static int mExportReduceIdx_my_float4_ushort2_1 = 243;
16255    // in1 = "a", flattened 4-vectors
16256    // in2 = "b", flattened 2-vectors
16257    public result_int reduce_my_float4_ushort2_1(float[] in1, short[] in2) {
16258        // Verify that "in1" is non-null.
16259        if (in1 == null) {
16260            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16261        }
16262        // Verify that the array length is a multiple of the vector size.
16263        if (in1.length % 4 != 0) {
16264            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
16265        }
16266        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
16267        ain1.setAutoPadding(true);
16268        ain1.copyFrom(in1);
16269        // Verify that "in2" is non-null.
16270        if (in2 == null) {
16271            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16272        }
16273        // Verify that the array length is a multiple of the vector size.
16274        if (in2.length % 2 != 0) {
16275            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
16276        }
16277        // Verify that input array lengths are the same.
16278        if (in1.length / 4 != in2.length / 2) {
16279            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16280        }
16281        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
16282        ain2.setAutoPadding(true);
16283        ain2.copyFrom(in2);
16284
16285        result_int result = reduce_my_float4_ushort2_1(ain1, ain2, null);
16286        result.mTempIns = new Allocation[]{ain1, ain2};
16287        return result;
16288    }
16289
16290    // ain1 = "float4 a"
16291    // ain2 = "ushort2 b"
16292    public result_int reduce_my_float4_ushort2_1(Allocation ain1, Allocation ain2) {
16293        return reduce_my_float4_ushort2_1(ain1, ain2, null);
16294    }
16295
16296    // ain1 = "float4 a"
16297    // ain2 = "ushort2 b"
16298    public result_int reduce_my_float4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16299        Type t0, t1;
16300        // check ain1
16301        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16302            throw new RSRuntimeException("Type mismatch with F32_4!");
16303        }
16304        // check ain2
16305        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
16306            throw new RSRuntimeException("Type mismatch with U16_2!");
16307        }
16308        // Verify dimensions
16309        t0 = ain1.getType();
16310        t1 = ain2.getType();
16311        if ((t0.getCount() != t1.getCount()) ||
16312            (t0.getX() != t1.getX()) ||
16313            (t0.getY() != t1.getY()) ||
16314            (t0.getZ() != t1.getZ()) ||
16315            (t0.hasFaces()   != t1.hasFaces()) ||
16316            (t0.hasMipmaps() != t1.hasMipmaps())) {
16317            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16318        }
16319
16320        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16321        aout.setAutoPadding(true);
16322        reduce(mExportReduceIdx_my_float4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
16323        return new result_int(aout);
16324    }
16325
16326    private final static int mExportReduceIdx_my_float4_ushort4_0 = 244;
16327    // in1 = "a", flattened 4-vectors
16328    // in2 = "b", flattened 4-vectors
16329    public result_int reduce_my_float4_ushort4_0(float[] in1, short[] in2) {
16330        // Verify that "in1" is non-null.
16331        if (in1 == null) {
16332            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16333        }
16334        // Verify that the array length is a multiple of the vector size.
16335        if (in1.length % 4 != 0) {
16336            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
16337        }
16338        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
16339        ain1.setAutoPadding(true);
16340        ain1.copyFrom(in1);
16341        // Verify that "in2" is non-null.
16342        if (in2 == null) {
16343            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16344        }
16345        // Verify that the array length is a multiple of the vector size.
16346        if (in2.length % 4 != 0) {
16347            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
16348        }
16349        // Verify that input array lengths are the same.
16350        if (in1.length / 4 != in2.length / 4) {
16351            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16352        }
16353        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
16354        ain2.setAutoPadding(true);
16355        ain2.copyFrom(in2);
16356
16357        result_int result = reduce_my_float4_ushort4_0(ain1, ain2, null);
16358        result.mTempIns = new Allocation[]{ain1, ain2};
16359        return result;
16360    }
16361
16362    // ain1 = "float4 a"
16363    // ain2 = "ushort4 b"
16364    public result_int reduce_my_float4_ushort4_0(Allocation ain1, Allocation ain2) {
16365        return reduce_my_float4_ushort4_0(ain1, ain2, null);
16366    }
16367
16368    // ain1 = "float4 a"
16369    // ain2 = "ushort4 b"
16370    public result_int reduce_my_float4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16371        Type t0, t1;
16372        // check ain1
16373        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16374            throw new RSRuntimeException("Type mismatch with F32_4!");
16375        }
16376        // check ain2
16377        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
16378            throw new RSRuntimeException("Type mismatch with U16_4!");
16379        }
16380        // Verify dimensions
16381        t0 = ain1.getType();
16382        t1 = ain2.getType();
16383        if ((t0.getCount() != t1.getCount()) ||
16384            (t0.getX() != t1.getX()) ||
16385            (t0.getY() != t1.getY()) ||
16386            (t0.getZ() != t1.getZ()) ||
16387            (t0.hasFaces()   != t1.hasFaces()) ||
16388            (t0.hasMipmaps() != t1.hasMipmaps())) {
16389            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16390        }
16391
16392        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16393        aout.setAutoPadding(true);
16394        reduce(mExportReduceIdx_my_float4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
16395        return new result_int(aout);
16396    }
16397
16398    private final static int mExportReduceIdx_my_float4_ushort4_1 = 245;
16399    // in1 = "a", flattened 4-vectors
16400    // in2 = "b", flattened 4-vectors
16401    public result_int reduce_my_float4_ushort4_1(float[] in1, short[] in2) {
16402        // Verify that "in1" is non-null.
16403        if (in1 == null) {
16404            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16405        }
16406        // Verify that the array length is a multiple of the vector size.
16407        if (in1.length % 4 != 0) {
16408            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
16409        }
16410        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
16411        ain1.setAutoPadding(true);
16412        ain1.copyFrom(in1);
16413        // Verify that "in2" is non-null.
16414        if (in2 == null) {
16415            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16416        }
16417        // Verify that the array length is a multiple of the vector size.
16418        if (in2.length % 4 != 0) {
16419            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
16420        }
16421        // Verify that input array lengths are the same.
16422        if (in1.length / 4 != in2.length / 4) {
16423            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16424        }
16425        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
16426        ain2.setAutoPadding(true);
16427        ain2.copyFrom(in2);
16428
16429        result_int result = reduce_my_float4_ushort4_1(ain1, ain2, null);
16430        result.mTempIns = new Allocation[]{ain1, ain2};
16431        return result;
16432    }
16433
16434    // ain1 = "float4 a"
16435    // ain2 = "ushort4 b"
16436    public result_int reduce_my_float4_ushort4_1(Allocation ain1, Allocation ain2) {
16437        return reduce_my_float4_ushort4_1(ain1, ain2, null);
16438    }
16439
16440    // ain1 = "float4 a"
16441    // ain2 = "ushort4 b"
16442    public result_int reduce_my_float4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16443        Type t0, t1;
16444        // check ain1
16445        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16446            throw new RSRuntimeException("Type mismatch with F32_4!");
16447        }
16448        // check ain2
16449        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
16450            throw new RSRuntimeException("Type mismatch with U16_4!");
16451        }
16452        // Verify dimensions
16453        t0 = ain1.getType();
16454        t1 = ain2.getType();
16455        if ((t0.getCount() != t1.getCount()) ||
16456            (t0.getX() != t1.getX()) ||
16457            (t0.getY() != t1.getY()) ||
16458            (t0.getZ() != t1.getZ()) ||
16459            (t0.hasFaces()   != t1.hasFaces()) ||
16460            (t0.hasMipmaps() != t1.hasMipmaps())) {
16461            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16462        }
16463
16464        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16465        aout.setAutoPadding(true);
16466        reduce(mExportReduceIdx_my_float4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
16467        return new result_int(aout);
16468    }
16469
16470    private final static int mExportReduceIdx_my_float4_bool_0 = 246;
16471    // in1 = "a", flattened 4-vectors
16472    // in2 = "b"
16473    public result_int reduce_my_float4_bool_0(float[] in1, byte[] in2) {
16474        // Verify that "in1" is non-null.
16475        if (in1 == null) {
16476            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16477        }
16478        // Verify that the array length is a multiple of the vector size.
16479        if (in1.length % 4 != 0) {
16480            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
16481        }
16482        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
16483        ain1.setAutoPadding(true);
16484        ain1.copyFrom(in1);
16485        // Verify that "in2" is non-null.
16486        if (in2 == null) {
16487            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16488        }
16489        // Verify that input array lengths are the same.
16490        if (in1.length / 4 != in2.length) {
16491            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16492        }
16493        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
16494        ain2.setAutoPadding(true);
16495        ain2.copyFrom(in2);
16496
16497        result_int result = reduce_my_float4_bool_0(ain1, ain2, null);
16498        result.mTempIns = new Allocation[]{ain1, ain2};
16499        return result;
16500    }
16501
16502    // ain1 = "float4 a"
16503    // ain2 = "bool b"
16504    public result_int reduce_my_float4_bool_0(Allocation ain1, Allocation ain2) {
16505        return reduce_my_float4_bool_0(ain1, ain2, null);
16506    }
16507
16508    // ain1 = "float4 a"
16509    // ain2 = "bool b"
16510    public result_int reduce_my_float4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16511        Type t0, t1;
16512        // check ain1
16513        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16514            throw new RSRuntimeException("Type mismatch with F32_4!");
16515        }
16516        // check ain2
16517        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
16518            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
16519        }
16520        // Verify dimensions
16521        t0 = ain1.getType();
16522        t1 = ain2.getType();
16523        if ((t0.getCount() != t1.getCount()) ||
16524            (t0.getX() != t1.getX()) ||
16525            (t0.getY() != t1.getY()) ||
16526            (t0.getZ() != t1.getZ()) ||
16527            (t0.hasFaces()   != t1.hasFaces()) ||
16528            (t0.hasMipmaps() != t1.hasMipmaps())) {
16529            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16530        }
16531
16532        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16533        aout.setAutoPadding(true);
16534        reduce(mExportReduceIdx_my_float4_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
16535        return new result_int(aout);
16536    }
16537
16538    private final static int mExportReduceIdx_my_float4_bool_1 = 247;
16539    // in1 = "a", flattened 4-vectors
16540    // in2 = "b"
16541    public result_int reduce_my_float4_bool_1(float[] in1, byte[] in2) {
16542        // Verify that "in1" is non-null.
16543        if (in1 == null) {
16544            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16545        }
16546        // Verify that the array length is a multiple of the vector size.
16547        if (in1.length % 4 != 0) {
16548            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
16549        }
16550        Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4);
16551        ain1.setAutoPadding(true);
16552        ain1.copyFrom(in1);
16553        // Verify that "in2" is non-null.
16554        if (in2 == null) {
16555            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16556        }
16557        // Verify that input array lengths are the same.
16558        if (in1.length / 4 != in2.length) {
16559            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16560        }
16561        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
16562        ain2.setAutoPadding(true);
16563        ain2.copyFrom(in2);
16564
16565        result_int result = reduce_my_float4_bool_1(ain1, ain2, null);
16566        result.mTempIns = new Allocation[]{ain1, ain2};
16567        return result;
16568    }
16569
16570    // ain1 = "float4 a"
16571    // ain2 = "bool b"
16572    public result_int reduce_my_float4_bool_1(Allocation ain1, Allocation ain2) {
16573        return reduce_my_float4_bool_1(ain1, ain2, null);
16574    }
16575
16576    // ain1 = "float4 a"
16577    // ain2 = "bool b"
16578    public result_int reduce_my_float4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16579        Type t0, t1;
16580        // check ain1
16581        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16582            throw new RSRuntimeException("Type mismatch with F32_4!");
16583        }
16584        // check ain2
16585        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
16586            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
16587        }
16588        // Verify dimensions
16589        t0 = ain1.getType();
16590        t1 = ain2.getType();
16591        if ((t0.getCount() != t1.getCount()) ||
16592            (t0.getX() != t1.getX()) ||
16593            (t0.getY() != t1.getY()) ||
16594            (t0.getZ() != t1.getZ()) ||
16595            (t0.hasFaces()   != t1.hasFaces()) ||
16596            (t0.hasMipmaps() != t1.hasMipmaps())) {
16597            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16598        }
16599
16600        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16601        aout.setAutoPadding(true);
16602        reduce(mExportReduceIdx_my_float4_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
16603        return new result_int(aout);
16604    }
16605
16606    private final static int mExportReduceIdx_my_float4_rs_matrix2x2_0 = 248;
16607    // ain1 = "float4 a"
16608    // ain2 = "rs_matrix2x2 b"
16609    public result_int reduce_my_float4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
16610        return reduce_my_float4_rs_matrix2x2_0(ain1, ain2, null);
16611    }
16612
16613    // ain1 = "float4 a"
16614    // ain2 = "rs_matrix2x2 b"
16615    public result_int reduce_my_float4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16616        Type t0, t1;
16617        // check ain1
16618        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16619            throw new RSRuntimeException("Type mismatch with F32_4!");
16620        }
16621        // check ain2
16622        // Verify dimensions
16623        t0 = ain1.getType();
16624        t1 = ain2.getType();
16625        if ((t0.getCount() != t1.getCount()) ||
16626            (t0.getX() != t1.getX()) ||
16627            (t0.getY() != t1.getY()) ||
16628            (t0.getZ() != t1.getZ()) ||
16629            (t0.hasFaces()   != t1.hasFaces()) ||
16630            (t0.hasMipmaps() != t1.hasMipmaps())) {
16631            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16632        }
16633
16634        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16635        aout.setAutoPadding(true);
16636        reduce(mExportReduceIdx_my_float4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
16637        return new result_int(aout);
16638    }
16639
16640    private final static int mExportReduceIdx_my_float4_rs_matrix2x2_1 = 249;
16641    // ain1 = "float4 a"
16642    // ain2 = "rs_matrix2x2 b"
16643    public result_int reduce_my_float4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
16644        return reduce_my_float4_rs_matrix2x2_1(ain1, ain2, null);
16645    }
16646
16647    // ain1 = "float4 a"
16648    // ain2 = "rs_matrix2x2 b"
16649    public result_int reduce_my_float4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16650        Type t0, t1;
16651        // check ain1
16652        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16653            throw new RSRuntimeException("Type mismatch with F32_4!");
16654        }
16655        // check ain2
16656        // Verify dimensions
16657        t0 = ain1.getType();
16658        t1 = ain2.getType();
16659        if ((t0.getCount() != t1.getCount()) ||
16660            (t0.getX() != t1.getX()) ||
16661            (t0.getY() != t1.getY()) ||
16662            (t0.getZ() != t1.getZ()) ||
16663            (t0.hasFaces()   != t1.hasFaces()) ||
16664            (t0.hasMipmaps() != t1.hasMipmaps())) {
16665            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16666        }
16667
16668        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16669        aout.setAutoPadding(true);
16670        reduce(mExportReduceIdx_my_float4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
16671        return new result_int(aout);
16672    }
16673
16674    private final static int mExportReduceIdx_my_float4_MyStruct_0 = 250;
16675    // ain1 = "float4 a"
16676    // ain2 = "/* struct <> */ b"
16677    public result_int reduce_my_float4_MyStruct_0(Allocation ain1, Allocation ain2) {
16678        return reduce_my_float4_MyStruct_0(ain1, ain2, null);
16679    }
16680
16681    // ain1 = "float4 a"
16682    // ain2 = "/* struct <> */ b"
16683    public result_int reduce_my_float4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16684        Type t0, t1;
16685        // check ain1
16686        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16687            throw new RSRuntimeException("Type mismatch with F32_4!");
16688        }
16689        // check ain2
16690        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
16691            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
16692        }
16693        // Verify dimensions
16694        t0 = ain1.getType();
16695        t1 = ain2.getType();
16696        if ((t0.getCount() != t1.getCount()) ||
16697            (t0.getX() != t1.getX()) ||
16698            (t0.getY() != t1.getY()) ||
16699            (t0.getZ() != t1.getZ()) ||
16700            (t0.hasFaces()   != t1.hasFaces()) ||
16701            (t0.hasMipmaps() != t1.hasMipmaps())) {
16702            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16703        }
16704
16705        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16706        aout.setAutoPadding(true);
16707        reduce(mExportReduceIdx_my_float4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
16708        return new result_int(aout);
16709    }
16710
16711    private final static int mExportReduceIdx_my_float4_MyStruct_1 = 251;
16712    // ain1 = "float4 a"
16713    // ain2 = "/* struct <> */ b"
16714    public result_int reduce_my_float4_MyStruct_1(Allocation ain1, Allocation ain2) {
16715        return reduce_my_float4_MyStruct_1(ain1, ain2, null);
16716    }
16717
16718    // ain1 = "float4 a"
16719    // ain2 = "/* struct <> */ b"
16720    public result_int reduce_my_float4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16721        Type t0, t1;
16722        // check ain1
16723        if (!ain1.getType().getElement().isCompatible(__F32_4)) {
16724            throw new RSRuntimeException("Type mismatch with F32_4!");
16725        }
16726        // check ain2
16727        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
16728            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
16729        }
16730        // Verify dimensions
16731        t0 = ain1.getType();
16732        t1 = ain2.getType();
16733        if ((t0.getCount() != t1.getCount()) ||
16734            (t0.getX() != t1.getX()) ||
16735            (t0.getY() != t1.getY()) ||
16736            (t0.getZ() != t1.getZ()) ||
16737            (t0.hasFaces()   != t1.hasFaces()) ||
16738            (t0.hasMipmaps() != t1.hasMipmaps())) {
16739            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16740        }
16741
16742        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16743        aout.setAutoPadding(true);
16744        reduce(mExportReduceIdx_my_float4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
16745        return new result_int(aout);
16746    }
16747
16748    private final static int mExportReduceIdx_my_char_half_0 = 252;
16749    // in1 = "a"
16750    // in2 = "b"
16751    public result_int reduce_my_char_half_0(byte[] in1, short[] in2) {
16752        // Verify that "in1" is non-null.
16753        if (in1 == null) {
16754            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16755        }
16756        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
16757        ain1.setAutoPadding(true);
16758        ain1.copyFrom(in1);
16759        // Verify that "in2" is non-null.
16760        if (in2 == null) {
16761            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16762        }
16763        // Verify that input array lengths are the same.
16764        if (in1.length != in2.length) {
16765            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16766        }
16767        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
16768        ain2.setAutoPadding(true);
16769        ain2.copyFrom(in2);
16770
16771        result_int result = reduce_my_char_half_0(ain1, ain2, null);
16772        result.mTempIns = new Allocation[]{ain1, ain2};
16773        return result;
16774    }
16775
16776    // ain1 = "char a"
16777    // ain2 = "half b"
16778    public result_int reduce_my_char_half_0(Allocation ain1, Allocation ain2) {
16779        return reduce_my_char_half_0(ain1, ain2, null);
16780    }
16781
16782    // ain1 = "char a"
16783    // ain2 = "half b"
16784    public result_int reduce_my_char_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16785        Type t0, t1;
16786        // check ain1
16787        if (!ain1.getType().getElement().isCompatible(__I8)) {
16788            throw new RSRuntimeException("Type mismatch with I8!");
16789        }
16790        // check ain2
16791        if (!ain2.getType().getElement().isCompatible(__F16)) {
16792            throw new RSRuntimeException("Type mismatch with F16!");
16793        }
16794        // Verify dimensions
16795        t0 = ain1.getType();
16796        t1 = ain2.getType();
16797        if ((t0.getCount() != t1.getCount()) ||
16798            (t0.getX() != t1.getX()) ||
16799            (t0.getY() != t1.getY()) ||
16800            (t0.getZ() != t1.getZ()) ||
16801            (t0.hasFaces()   != t1.hasFaces()) ||
16802            (t0.hasMipmaps() != t1.hasMipmaps())) {
16803            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16804        }
16805
16806        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16807        aout.setAutoPadding(true);
16808        reduce(mExportReduceIdx_my_char_half_0, new Allocation[]{ain1, ain2}, aout, sc);
16809        return new result_int(aout);
16810    }
16811
16812    private final static int mExportReduceIdx_my_char_half_1 = 253;
16813    // in1 = "a"
16814    // in2 = "b"
16815    public result_int reduce_my_char_half_1(byte[] in1, short[] in2) {
16816        // Verify that "in1" is non-null.
16817        if (in1 == null) {
16818            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16819        }
16820        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
16821        ain1.setAutoPadding(true);
16822        ain1.copyFrom(in1);
16823        // Verify that "in2" is non-null.
16824        if (in2 == null) {
16825            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16826        }
16827        // Verify that input array lengths are the same.
16828        if (in1.length != in2.length) {
16829            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16830        }
16831        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
16832        ain2.setAutoPadding(true);
16833        ain2.copyFrom(in2);
16834
16835        result_int result = reduce_my_char_half_1(ain1, ain2, null);
16836        result.mTempIns = new Allocation[]{ain1, ain2};
16837        return result;
16838    }
16839
16840    // ain1 = "char a"
16841    // ain2 = "half b"
16842    public result_int reduce_my_char_half_1(Allocation ain1, Allocation ain2) {
16843        return reduce_my_char_half_1(ain1, ain2, null);
16844    }
16845
16846    // ain1 = "char a"
16847    // ain2 = "half b"
16848    public result_int reduce_my_char_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16849        Type t0, t1;
16850        // check ain1
16851        if (!ain1.getType().getElement().isCompatible(__I8)) {
16852            throw new RSRuntimeException("Type mismatch with I8!");
16853        }
16854        // check ain2
16855        if (!ain2.getType().getElement().isCompatible(__F16)) {
16856            throw new RSRuntimeException("Type mismatch with F16!");
16857        }
16858        // Verify dimensions
16859        t0 = ain1.getType();
16860        t1 = ain2.getType();
16861        if ((t0.getCount() != t1.getCount()) ||
16862            (t0.getX() != t1.getX()) ||
16863            (t0.getY() != t1.getY()) ||
16864            (t0.getZ() != t1.getZ()) ||
16865            (t0.hasFaces()   != t1.hasFaces()) ||
16866            (t0.hasMipmaps() != t1.hasMipmaps())) {
16867            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16868        }
16869
16870        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16871        aout.setAutoPadding(true);
16872        reduce(mExportReduceIdx_my_char_half_1, new Allocation[]{ain1, ain2}, aout, sc);
16873        return new result_int(aout);
16874    }
16875
16876    private final static int mExportReduceIdx_my_char_half2_0 = 254;
16877    // in1 = "a"
16878    // in2 = "b", flattened 2-vectors
16879    public result_int reduce_my_char_half2_0(byte[] in1, short[] in2) {
16880        // Verify that "in1" is non-null.
16881        if (in1 == null) {
16882            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16883        }
16884        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
16885        ain1.setAutoPadding(true);
16886        ain1.copyFrom(in1);
16887        // Verify that "in2" is non-null.
16888        if (in2 == null) {
16889            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16890        }
16891        // Verify that the array length is a multiple of the vector size.
16892        if (in2.length % 2 != 0) {
16893            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
16894        }
16895        // Verify that input array lengths are the same.
16896        if (in1.length != in2.length / 2) {
16897            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16898        }
16899        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
16900        ain2.setAutoPadding(true);
16901        ain2.copyFrom(in2);
16902
16903        result_int result = reduce_my_char_half2_0(ain1, ain2, null);
16904        result.mTempIns = new Allocation[]{ain1, ain2};
16905        return result;
16906    }
16907
16908    // ain1 = "char a"
16909    // ain2 = "half2 b"
16910    public result_int reduce_my_char_half2_0(Allocation ain1, Allocation ain2) {
16911        return reduce_my_char_half2_0(ain1, ain2, null);
16912    }
16913
16914    // ain1 = "char a"
16915    // ain2 = "half2 b"
16916    public result_int reduce_my_char_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16917        Type t0, t1;
16918        // check ain1
16919        if (!ain1.getType().getElement().isCompatible(__I8)) {
16920            throw new RSRuntimeException("Type mismatch with I8!");
16921        }
16922        // check ain2
16923        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
16924            throw new RSRuntimeException("Type mismatch with F16_2!");
16925        }
16926        // Verify dimensions
16927        t0 = ain1.getType();
16928        t1 = ain2.getType();
16929        if ((t0.getCount() != t1.getCount()) ||
16930            (t0.getX() != t1.getX()) ||
16931            (t0.getY() != t1.getY()) ||
16932            (t0.getZ() != t1.getZ()) ||
16933            (t0.hasFaces()   != t1.hasFaces()) ||
16934            (t0.hasMipmaps() != t1.hasMipmaps())) {
16935            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
16936        }
16937
16938        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
16939        aout.setAutoPadding(true);
16940        reduce(mExportReduceIdx_my_char_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
16941        return new result_int(aout);
16942    }
16943
16944    private final static int mExportReduceIdx_my_char_half2_1 = 255;
16945    // in1 = "a"
16946    // in2 = "b", flattened 2-vectors
16947    public result_int reduce_my_char_half2_1(byte[] in1, short[] in2) {
16948        // Verify that "in1" is non-null.
16949        if (in1 == null) {
16950            throw new RSIllegalArgumentException("Array \"in1\" is null!");
16951        }
16952        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
16953        ain1.setAutoPadding(true);
16954        ain1.copyFrom(in1);
16955        // Verify that "in2" is non-null.
16956        if (in2 == null) {
16957            throw new RSIllegalArgumentException("Array \"in2\" is null!");
16958        }
16959        // Verify that the array length is a multiple of the vector size.
16960        if (in2.length % 2 != 0) {
16961            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
16962        }
16963        // Verify that input array lengths are the same.
16964        if (in1.length != in2.length / 2) {
16965            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
16966        }
16967        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
16968        ain2.setAutoPadding(true);
16969        ain2.copyFrom(in2);
16970
16971        result_int result = reduce_my_char_half2_1(ain1, ain2, null);
16972        result.mTempIns = new Allocation[]{ain1, ain2};
16973        return result;
16974    }
16975
16976    // ain1 = "char a"
16977    // ain2 = "half2 b"
16978    public result_int reduce_my_char_half2_1(Allocation ain1, Allocation ain2) {
16979        return reduce_my_char_half2_1(ain1, ain2, null);
16980    }
16981
16982    // ain1 = "char a"
16983    // ain2 = "half2 b"
16984    public result_int reduce_my_char_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
16985        Type t0, t1;
16986        // check ain1
16987        if (!ain1.getType().getElement().isCompatible(__I8)) {
16988            throw new RSRuntimeException("Type mismatch with I8!");
16989        }
16990        // check ain2
16991        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
16992            throw new RSRuntimeException("Type mismatch with F16_2!");
16993        }
16994        // Verify dimensions
16995        t0 = ain1.getType();
16996        t1 = ain2.getType();
16997        if ((t0.getCount() != t1.getCount()) ||
16998            (t0.getX() != t1.getX()) ||
16999            (t0.getY() != t1.getY()) ||
17000            (t0.getZ() != t1.getZ()) ||
17001            (t0.hasFaces()   != t1.hasFaces()) ||
17002            (t0.hasMipmaps() != t1.hasMipmaps())) {
17003            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17004        }
17005
17006        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17007        aout.setAutoPadding(true);
17008        reduce(mExportReduceIdx_my_char_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
17009        return new result_int(aout);
17010    }
17011
17012    private final static int mExportReduceIdx_my_char_half4_0 = 256;
17013    // in1 = "a"
17014    // in2 = "b", flattened 4-vectors
17015    public result_int reduce_my_char_half4_0(byte[] in1, short[] in2) {
17016        // Verify that "in1" is non-null.
17017        if (in1 == null) {
17018            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17019        }
17020        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17021        ain1.setAutoPadding(true);
17022        ain1.copyFrom(in1);
17023        // Verify that "in2" is non-null.
17024        if (in2 == null) {
17025            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17026        }
17027        // Verify that the array length is a multiple of the vector size.
17028        if (in2.length % 4 != 0) {
17029            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
17030        }
17031        // Verify that input array lengths are the same.
17032        if (in1.length != in2.length / 4) {
17033            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17034        }
17035        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
17036        ain2.setAutoPadding(true);
17037        ain2.copyFrom(in2);
17038
17039        result_int result = reduce_my_char_half4_0(ain1, ain2, null);
17040        result.mTempIns = new Allocation[]{ain1, ain2};
17041        return result;
17042    }
17043
17044    // ain1 = "char a"
17045    // ain2 = "half4 b"
17046    public result_int reduce_my_char_half4_0(Allocation ain1, Allocation ain2) {
17047        return reduce_my_char_half4_0(ain1, ain2, null);
17048    }
17049
17050    // ain1 = "char a"
17051    // ain2 = "half4 b"
17052    public result_int reduce_my_char_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17053        Type t0, t1;
17054        // check ain1
17055        if (!ain1.getType().getElement().isCompatible(__I8)) {
17056            throw new RSRuntimeException("Type mismatch with I8!");
17057        }
17058        // check ain2
17059        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
17060            throw new RSRuntimeException("Type mismatch with F16_4!");
17061        }
17062        // Verify dimensions
17063        t0 = ain1.getType();
17064        t1 = ain2.getType();
17065        if ((t0.getCount() != t1.getCount()) ||
17066            (t0.getX() != t1.getX()) ||
17067            (t0.getY() != t1.getY()) ||
17068            (t0.getZ() != t1.getZ()) ||
17069            (t0.hasFaces()   != t1.hasFaces()) ||
17070            (t0.hasMipmaps() != t1.hasMipmaps())) {
17071            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17072        }
17073
17074        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17075        aout.setAutoPadding(true);
17076        reduce(mExportReduceIdx_my_char_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
17077        return new result_int(aout);
17078    }
17079
17080    private final static int mExportReduceIdx_my_char_half4_1 = 257;
17081    // in1 = "a"
17082    // in2 = "b", flattened 4-vectors
17083    public result_int reduce_my_char_half4_1(byte[] in1, short[] in2) {
17084        // Verify that "in1" is non-null.
17085        if (in1 == null) {
17086            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17087        }
17088        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17089        ain1.setAutoPadding(true);
17090        ain1.copyFrom(in1);
17091        // Verify that "in2" is non-null.
17092        if (in2 == null) {
17093            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17094        }
17095        // Verify that the array length is a multiple of the vector size.
17096        if (in2.length % 4 != 0) {
17097            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
17098        }
17099        // Verify that input array lengths are the same.
17100        if (in1.length != in2.length / 4) {
17101            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17102        }
17103        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
17104        ain2.setAutoPadding(true);
17105        ain2.copyFrom(in2);
17106
17107        result_int result = reduce_my_char_half4_1(ain1, ain2, null);
17108        result.mTempIns = new Allocation[]{ain1, ain2};
17109        return result;
17110    }
17111
17112    // ain1 = "char a"
17113    // ain2 = "half4 b"
17114    public result_int reduce_my_char_half4_1(Allocation ain1, Allocation ain2) {
17115        return reduce_my_char_half4_1(ain1, ain2, null);
17116    }
17117
17118    // ain1 = "char a"
17119    // ain2 = "half4 b"
17120    public result_int reduce_my_char_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17121        Type t0, t1;
17122        // check ain1
17123        if (!ain1.getType().getElement().isCompatible(__I8)) {
17124            throw new RSRuntimeException("Type mismatch with I8!");
17125        }
17126        // check ain2
17127        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
17128            throw new RSRuntimeException("Type mismatch with F16_4!");
17129        }
17130        // Verify dimensions
17131        t0 = ain1.getType();
17132        t1 = ain2.getType();
17133        if ((t0.getCount() != t1.getCount()) ||
17134            (t0.getX() != t1.getX()) ||
17135            (t0.getY() != t1.getY()) ||
17136            (t0.getZ() != t1.getZ()) ||
17137            (t0.hasFaces()   != t1.hasFaces()) ||
17138            (t0.hasMipmaps() != t1.hasMipmaps())) {
17139            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17140        }
17141
17142        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17143        aout.setAutoPadding(true);
17144        reduce(mExportReduceIdx_my_char_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
17145        return new result_int(aout);
17146    }
17147
17148    private final static int mExportReduceIdx_my_char_float_0 = 258;
17149    // in1 = "a"
17150    // in2 = "b"
17151    public result_int reduce_my_char_float_0(byte[] in1, float[] in2) {
17152        // Verify that "in1" is non-null.
17153        if (in1 == null) {
17154            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17155        }
17156        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17157        ain1.setAutoPadding(true);
17158        ain1.copyFrom(in1);
17159        // Verify that "in2" is non-null.
17160        if (in2 == null) {
17161            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17162        }
17163        // Verify that input array lengths are the same.
17164        if (in1.length != in2.length) {
17165            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17166        }
17167        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
17168        ain2.setAutoPadding(true);
17169        ain2.copyFrom(in2);
17170
17171        result_int result = reduce_my_char_float_0(ain1, ain2, null);
17172        result.mTempIns = new Allocation[]{ain1, ain2};
17173        return result;
17174    }
17175
17176    // ain1 = "char a"
17177    // ain2 = "float b"
17178    public result_int reduce_my_char_float_0(Allocation ain1, Allocation ain2) {
17179        return reduce_my_char_float_0(ain1, ain2, null);
17180    }
17181
17182    // ain1 = "char a"
17183    // ain2 = "float b"
17184    public result_int reduce_my_char_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17185        Type t0, t1;
17186        // check ain1
17187        if (!ain1.getType().getElement().isCompatible(__I8)) {
17188            throw new RSRuntimeException("Type mismatch with I8!");
17189        }
17190        // check ain2
17191        if (!ain2.getType().getElement().isCompatible(__F32)) {
17192            throw new RSRuntimeException("Type mismatch with F32!");
17193        }
17194        // Verify dimensions
17195        t0 = ain1.getType();
17196        t1 = ain2.getType();
17197        if ((t0.getCount() != t1.getCount()) ||
17198            (t0.getX() != t1.getX()) ||
17199            (t0.getY() != t1.getY()) ||
17200            (t0.getZ() != t1.getZ()) ||
17201            (t0.hasFaces()   != t1.hasFaces()) ||
17202            (t0.hasMipmaps() != t1.hasMipmaps())) {
17203            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17204        }
17205
17206        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17207        aout.setAutoPadding(true);
17208        reduce(mExportReduceIdx_my_char_float_0, new Allocation[]{ain1, ain2}, aout, sc);
17209        return new result_int(aout);
17210    }
17211
17212    private final static int mExportReduceIdx_my_char_float_1 = 259;
17213    // in1 = "a"
17214    // in2 = "b"
17215    public result_int reduce_my_char_float_1(byte[] in1, float[] in2) {
17216        // Verify that "in1" is non-null.
17217        if (in1 == null) {
17218            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17219        }
17220        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17221        ain1.setAutoPadding(true);
17222        ain1.copyFrom(in1);
17223        // Verify that "in2" is non-null.
17224        if (in2 == null) {
17225            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17226        }
17227        // Verify that input array lengths are the same.
17228        if (in1.length != in2.length) {
17229            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17230        }
17231        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
17232        ain2.setAutoPadding(true);
17233        ain2.copyFrom(in2);
17234
17235        result_int result = reduce_my_char_float_1(ain1, ain2, null);
17236        result.mTempIns = new Allocation[]{ain1, ain2};
17237        return result;
17238    }
17239
17240    // ain1 = "char a"
17241    // ain2 = "float b"
17242    public result_int reduce_my_char_float_1(Allocation ain1, Allocation ain2) {
17243        return reduce_my_char_float_1(ain1, ain2, null);
17244    }
17245
17246    // ain1 = "char a"
17247    // ain2 = "float b"
17248    public result_int reduce_my_char_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17249        Type t0, t1;
17250        // check ain1
17251        if (!ain1.getType().getElement().isCompatible(__I8)) {
17252            throw new RSRuntimeException("Type mismatch with I8!");
17253        }
17254        // check ain2
17255        if (!ain2.getType().getElement().isCompatible(__F32)) {
17256            throw new RSRuntimeException("Type mismatch with F32!");
17257        }
17258        // Verify dimensions
17259        t0 = ain1.getType();
17260        t1 = ain2.getType();
17261        if ((t0.getCount() != t1.getCount()) ||
17262            (t0.getX() != t1.getX()) ||
17263            (t0.getY() != t1.getY()) ||
17264            (t0.getZ() != t1.getZ()) ||
17265            (t0.hasFaces()   != t1.hasFaces()) ||
17266            (t0.hasMipmaps() != t1.hasMipmaps())) {
17267            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17268        }
17269
17270        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17271        aout.setAutoPadding(true);
17272        reduce(mExportReduceIdx_my_char_float_1, new Allocation[]{ain1, ain2}, aout, sc);
17273        return new result_int(aout);
17274    }
17275
17276    private final static int mExportReduceIdx_my_char_float2_0 = 260;
17277    // in1 = "a"
17278    // in2 = "b", flattened 2-vectors
17279    public result_int reduce_my_char_float2_0(byte[] in1, float[] in2) {
17280        // Verify that "in1" is non-null.
17281        if (in1 == null) {
17282            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17283        }
17284        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17285        ain1.setAutoPadding(true);
17286        ain1.copyFrom(in1);
17287        // Verify that "in2" is non-null.
17288        if (in2 == null) {
17289            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17290        }
17291        // Verify that the array length is a multiple of the vector size.
17292        if (in2.length % 2 != 0) {
17293            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
17294        }
17295        // Verify that input array lengths are the same.
17296        if (in1.length != in2.length / 2) {
17297            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17298        }
17299        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
17300        ain2.setAutoPadding(true);
17301        ain2.copyFrom(in2);
17302
17303        result_int result = reduce_my_char_float2_0(ain1, ain2, null);
17304        result.mTempIns = new Allocation[]{ain1, ain2};
17305        return result;
17306    }
17307
17308    // ain1 = "char a"
17309    // ain2 = "float2 b"
17310    public result_int reduce_my_char_float2_0(Allocation ain1, Allocation ain2) {
17311        return reduce_my_char_float2_0(ain1, ain2, null);
17312    }
17313
17314    // ain1 = "char a"
17315    // ain2 = "float2 b"
17316    public result_int reduce_my_char_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17317        Type t0, t1;
17318        // check ain1
17319        if (!ain1.getType().getElement().isCompatible(__I8)) {
17320            throw new RSRuntimeException("Type mismatch with I8!");
17321        }
17322        // check ain2
17323        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
17324            throw new RSRuntimeException("Type mismatch with F32_2!");
17325        }
17326        // Verify dimensions
17327        t0 = ain1.getType();
17328        t1 = ain2.getType();
17329        if ((t0.getCount() != t1.getCount()) ||
17330            (t0.getX() != t1.getX()) ||
17331            (t0.getY() != t1.getY()) ||
17332            (t0.getZ() != t1.getZ()) ||
17333            (t0.hasFaces()   != t1.hasFaces()) ||
17334            (t0.hasMipmaps() != t1.hasMipmaps())) {
17335            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17336        }
17337
17338        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17339        aout.setAutoPadding(true);
17340        reduce(mExportReduceIdx_my_char_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
17341        return new result_int(aout);
17342    }
17343
17344    private final static int mExportReduceIdx_my_char_float2_1 = 261;
17345    // in1 = "a"
17346    // in2 = "b", flattened 2-vectors
17347    public result_int reduce_my_char_float2_1(byte[] in1, float[] in2) {
17348        // Verify that "in1" is non-null.
17349        if (in1 == null) {
17350            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17351        }
17352        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17353        ain1.setAutoPadding(true);
17354        ain1.copyFrom(in1);
17355        // Verify that "in2" is non-null.
17356        if (in2 == null) {
17357            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17358        }
17359        // Verify that the array length is a multiple of the vector size.
17360        if (in2.length % 2 != 0) {
17361            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
17362        }
17363        // Verify that input array lengths are the same.
17364        if (in1.length != in2.length / 2) {
17365            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17366        }
17367        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
17368        ain2.setAutoPadding(true);
17369        ain2.copyFrom(in2);
17370
17371        result_int result = reduce_my_char_float2_1(ain1, ain2, null);
17372        result.mTempIns = new Allocation[]{ain1, ain2};
17373        return result;
17374    }
17375
17376    // ain1 = "char a"
17377    // ain2 = "float2 b"
17378    public result_int reduce_my_char_float2_1(Allocation ain1, Allocation ain2) {
17379        return reduce_my_char_float2_1(ain1, ain2, null);
17380    }
17381
17382    // ain1 = "char a"
17383    // ain2 = "float2 b"
17384    public result_int reduce_my_char_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17385        Type t0, t1;
17386        // check ain1
17387        if (!ain1.getType().getElement().isCompatible(__I8)) {
17388            throw new RSRuntimeException("Type mismatch with I8!");
17389        }
17390        // check ain2
17391        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
17392            throw new RSRuntimeException("Type mismatch with F32_2!");
17393        }
17394        // Verify dimensions
17395        t0 = ain1.getType();
17396        t1 = ain2.getType();
17397        if ((t0.getCount() != t1.getCount()) ||
17398            (t0.getX() != t1.getX()) ||
17399            (t0.getY() != t1.getY()) ||
17400            (t0.getZ() != t1.getZ()) ||
17401            (t0.hasFaces()   != t1.hasFaces()) ||
17402            (t0.hasMipmaps() != t1.hasMipmaps())) {
17403            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17404        }
17405
17406        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17407        aout.setAutoPadding(true);
17408        reduce(mExportReduceIdx_my_char_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
17409        return new result_int(aout);
17410    }
17411
17412    private final static int mExportReduceIdx_my_char_float4_0 = 262;
17413    // in1 = "a"
17414    // in2 = "b", flattened 4-vectors
17415    public result_int reduce_my_char_float4_0(byte[] in1, float[] in2) {
17416        // Verify that "in1" is non-null.
17417        if (in1 == null) {
17418            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17419        }
17420        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17421        ain1.setAutoPadding(true);
17422        ain1.copyFrom(in1);
17423        // Verify that "in2" is non-null.
17424        if (in2 == null) {
17425            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17426        }
17427        // Verify that the array length is a multiple of the vector size.
17428        if (in2.length % 4 != 0) {
17429            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
17430        }
17431        // Verify that input array lengths are the same.
17432        if (in1.length != in2.length / 4) {
17433            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17434        }
17435        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
17436        ain2.setAutoPadding(true);
17437        ain2.copyFrom(in2);
17438
17439        result_int result = reduce_my_char_float4_0(ain1, ain2, null);
17440        result.mTempIns = new Allocation[]{ain1, ain2};
17441        return result;
17442    }
17443
17444    // ain1 = "char a"
17445    // ain2 = "float4 b"
17446    public result_int reduce_my_char_float4_0(Allocation ain1, Allocation ain2) {
17447        return reduce_my_char_float4_0(ain1, ain2, null);
17448    }
17449
17450    // ain1 = "char a"
17451    // ain2 = "float4 b"
17452    public result_int reduce_my_char_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17453        Type t0, t1;
17454        // check ain1
17455        if (!ain1.getType().getElement().isCompatible(__I8)) {
17456            throw new RSRuntimeException("Type mismatch with I8!");
17457        }
17458        // check ain2
17459        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
17460            throw new RSRuntimeException("Type mismatch with F32_4!");
17461        }
17462        // Verify dimensions
17463        t0 = ain1.getType();
17464        t1 = ain2.getType();
17465        if ((t0.getCount() != t1.getCount()) ||
17466            (t0.getX() != t1.getX()) ||
17467            (t0.getY() != t1.getY()) ||
17468            (t0.getZ() != t1.getZ()) ||
17469            (t0.hasFaces()   != t1.hasFaces()) ||
17470            (t0.hasMipmaps() != t1.hasMipmaps())) {
17471            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17472        }
17473
17474        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17475        aout.setAutoPadding(true);
17476        reduce(mExportReduceIdx_my_char_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
17477        return new result_int(aout);
17478    }
17479
17480    private final static int mExportReduceIdx_my_char_float4_1 = 263;
17481    // in1 = "a"
17482    // in2 = "b", flattened 4-vectors
17483    public result_int reduce_my_char_float4_1(byte[] in1, float[] in2) {
17484        // Verify that "in1" is non-null.
17485        if (in1 == null) {
17486            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17487        }
17488        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17489        ain1.setAutoPadding(true);
17490        ain1.copyFrom(in1);
17491        // Verify that "in2" is non-null.
17492        if (in2 == null) {
17493            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17494        }
17495        // Verify that the array length is a multiple of the vector size.
17496        if (in2.length % 4 != 0) {
17497            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
17498        }
17499        // Verify that input array lengths are the same.
17500        if (in1.length != in2.length / 4) {
17501            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17502        }
17503        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
17504        ain2.setAutoPadding(true);
17505        ain2.copyFrom(in2);
17506
17507        result_int result = reduce_my_char_float4_1(ain1, ain2, null);
17508        result.mTempIns = new Allocation[]{ain1, ain2};
17509        return result;
17510    }
17511
17512    // ain1 = "char a"
17513    // ain2 = "float4 b"
17514    public result_int reduce_my_char_float4_1(Allocation ain1, Allocation ain2) {
17515        return reduce_my_char_float4_1(ain1, ain2, null);
17516    }
17517
17518    // ain1 = "char a"
17519    // ain2 = "float4 b"
17520    public result_int reduce_my_char_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17521        Type t0, t1;
17522        // check ain1
17523        if (!ain1.getType().getElement().isCompatible(__I8)) {
17524            throw new RSRuntimeException("Type mismatch with I8!");
17525        }
17526        // check ain2
17527        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
17528            throw new RSRuntimeException("Type mismatch with F32_4!");
17529        }
17530        // Verify dimensions
17531        t0 = ain1.getType();
17532        t1 = ain2.getType();
17533        if ((t0.getCount() != t1.getCount()) ||
17534            (t0.getX() != t1.getX()) ||
17535            (t0.getY() != t1.getY()) ||
17536            (t0.getZ() != t1.getZ()) ||
17537            (t0.hasFaces()   != t1.hasFaces()) ||
17538            (t0.hasMipmaps() != t1.hasMipmaps())) {
17539            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17540        }
17541
17542        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17543        aout.setAutoPadding(true);
17544        reduce(mExportReduceIdx_my_char_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
17545        return new result_int(aout);
17546    }
17547
17548    private final static int mExportReduceIdx_my_char_char_0 = 264;
17549    // in1 = "a"
17550    // in2 = "b"
17551    public result_int reduce_my_char_char_0(byte[] in1, byte[] in2) {
17552        // Verify that "in1" is non-null.
17553        if (in1 == null) {
17554            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17555        }
17556        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17557        ain1.setAutoPadding(true);
17558        ain1.copyFrom(in1);
17559        // Verify that "in2" is non-null.
17560        if (in2 == null) {
17561            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17562        }
17563        // Verify that input array lengths are the same.
17564        if (in1.length != in2.length) {
17565            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17566        }
17567        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
17568        ain2.setAutoPadding(true);
17569        ain2.copyFrom(in2);
17570
17571        result_int result = reduce_my_char_char_0(ain1, ain2, null);
17572        result.mTempIns = new Allocation[]{ain1, ain2};
17573        return result;
17574    }
17575
17576    // ain1 = "char a"
17577    // ain2 = "char b"
17578    public result_int reduce_my_char_char_0(Allocation ain1, Allocation ain2) {
17579        return reduce_my_char_char_0(ain1, ain2, null);
17580    }
17581
17582    // ain1 = "char a"
17583    // ain2 = "char b"
17584    public result_int reduce_my_char_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17585        Type t0, t1;
17586        // check ain1
17587        if (!ain1.getType().getElement().isCompatible(__I8)) {
17588            throw new RSRuntimeException("Type mismatch with I8!");
17589        }
17590        // check ain2
17591        if (!ain2.getType().getElement().isCompatible(__I8)) {
17592            throw new RSRuntimeException("Type mismatch with I8!");
17593        }
17594        // Verify dimensions
17595        t0 = ain1.getType();
17596        t1 = ain2.getType();
17597        if ((t0.getCount() != t1.getCount()) ||
17598            (t0.getX() != t1.getX()) ||
17599            (t0.getY() != t1.getY()) ||
17600            (t0.getZ() != t1.getZ()) ||
17601            (t0.hasFaces()   != t1.hasFaces()) ||
17602            (t0.hasMipmaps() != t1.hasMipmaps())) {
17603            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17604        }
17605
17606        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17607        aout.setAutoPadding(true);
17608        reduce(mExportReduceIdx_my_char_char_0, new Allocation[]{ain1, ain2}, aout, sc);
17609        return new result_int(aout);
17610    }
17611
17612    private final static int mExportReduceIdx_my_char_char_1 = 265;
17613    // in1 = "a"
17614    // in2 = "b"
17615    public result_int reduce_my_char_char_1(byte[] in1, byte[] in2) {
17616        // Verify that "in1" is non-null.
17617        if (in1 == null) {
17618            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17619        }
17620        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17621        ain1.setAutoPadding(true);
17622        ain1.copyFrom(in1);
17623        // Verify that "in2" is non-null.
17624        if (in2 == null) {
17625            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17626        }
17627        // Verify that input array lengths are the same.
17628        if (in1.length != in2.length) {
17629            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17630        }
17631        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
17632        ain2.setAutoPadding(true);
17633        ain2.copyFrom(in2);
17634
17635        result_int result = reduce_my_char_char_1(ain1, ain2, null);
17636        result.mTempIns = new Allocation[]{ain1, ain2};
17637        return result;
17638    }
17639
17640    // ain1 = "char a"
17641    // ain2 = "char b"
17642    public result_int reduce_my_char_char_1(Allocation ain1, Allocation ain2) {
17643        return reduce_my_char_char_1(ain1, ain2, null);
17644    }
17645
17646    // ain1 = "char a"
17647    // ain2 = "char b"
17648    public result_int reduce_my_char_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17649        Type t0, t1;
17650        // check ain1
17651        if (!ain1.getType().getElement().isCompatible(__I8)) {
17652            throw new RSRuntimeException("Type mismatch with I8!");
17653        }
17654        // check ain2
17655        if (!ain2.getType().getElement().isCompatible(__I8)) {
17656            throw new RSRuntimeException("Type mismatch with I8!");
17657        }
17658        // Verify dimensions
17659        t0 = ain1.getType();
17660        t1 = ain2.getType();
17661        if ((t0.getCount() != t1.getCount()) ||
17662            (t0.getX() != t1.getX()) ||
17663            (t0.getY() != t1.getY()) ||
17664            (t0.getZ() != t1.getZ()) ||
17665            (t0.hasFaces()   != t1.hasFaces()) ||
17666            (t0.hasMipmaps() != t1.hasMipmaps())) {
17667            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17668        }
17669
17670        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17671        aout.setAutoPadding(true);
17672        reduce(mExportReduceIdx_my_char_char_1, new Allocation[]{ain1, ain2}, aout, sc);
17673        return new result_int(aout);
17674    }
17675
17676    private final static int mExportReduceIdx_my_char_char2_0 = 266;
17677    // in1 = "a"
17678    // in2 = "b", flattened 2-vectors
17679    public result_int reduce_my_char_char2_0(byte[] in1, byte[] in2) {
17680        // Verify that "in1" is non-null.
17681        if (in1 == null) {
17682            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17683        }
17684        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17685        ain1.setAutoPadding(true);
17686        ain1.copyFrom(in1);
17687        // Verify that "in2" is non-null.
17688        if (in2 == null) {
17689            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17690        }
17691        // Verify that the array length is a multiple of the vector size.
17692        if (in2.length % 2 != 0) {
17693            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
17694        }
17695        // Verify that input array lengths are the same.
17696        if (in1.length != in2.length / 2) {
17697            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17698        }
17699        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
17700        ain2.setAutoPadding(true);
17701        ain2.copyFrom(in2);
17702
17703        result_int result = reduce_my_char_char2_0(ain1, ain2, null);
17704        result.mTempIns = new Allocation[]{ain1, ain2};
17705        return result;
17706    }
17707
17708    // ain1 = "char a"
17709    // ain2 = "char2 b"
17710    public result_int reduce_my_char_char2_0(Allocation ain1, Allocation ain2) {
17711        return reduce_my_char_char2_0(ain1, ain2, null);
17712    }
17713
17714    // ain1 = "char a"
17715    // ain2 = "char2 b"
17716    public result_int reduce_my_char_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17717        Type t0, t1;
17718        // check ain1
17719        if (!ain1.getType().getElement().isCompatible(__I8)) {
17720            throw new RSRuntimeException("Type mismatch with I8!");
17721        }
17722        // check ain2
17723        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
17724            throw new RSRuntimeException("Type mismatch with I8_2!");
17725        }
17726        // Verify dimensions
17727        t0 = ain1.getType();
17728        t1 = ain2.getType();
17729        if ((t0.getCount() != t1.getCount()) ||
17730            (t0.getX() != t1.getX()) ||
17731            (t0.getY() != t1.getY()) ||
17732            (t0.getZ() != t1.getZ()) ||
17733            (t0.hasFaces()   != t1.hasFaces()) ||
17734            (t0.hasMipmaps() != t1.hasMipmaps())) {
17735            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17736        }
17737
17738        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17739        aout.setAutoPadding(true);
17740        reduce(mExportReduceIdx_my_char_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
17741        return new result_int(aout);
17742    }
17743
17744    private final static int mExportReduceIdx_my_char_char2_1 = 267;
17745    // in1 = "a"
17746    // in2 = "b", flattened 2-vectors
17747    public result_int reduce_my_char_char2_1(byte[] in1, byte[] in2) {
17748        // Verify that "in1" is non-null.
17749        if (in1 == null) {
17750            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17751        }
17752        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17753        ain1.setAutoPadding(true);
17754        ain1.copyFrom(in1);
17755        // Verify that "in2" is non-null.
17756        if (in2 == null) {
17757            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17758        }
17759        // Verify that the array length is a multiple of the vector size.
17760        if (in2.length % 2 != 0) {
17761            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
17762        }
17763        // Verify that input array lengths are the same.
17764        if (in1.length != in2.length / 2) {
17765            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17766        }
17767        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
17768        ain2.setAutoPadding(true);
17769        ain2.copyFrom(in2);
17770
17771        result_int result = reduce_my_char_char2_1(ain1, ain2, null);
17772        result.mTempIns = new Allocation[]{ain1, ain2};
17773        return result;
17774    }
17775
17776    // ain1 = "char a"
17777    // ain2 = "char2 b"
17778    public result_int reduce_my_char_char2_1(Allocation ain1, Allocation ain2) {
17779        return reduce_my_char_char2_1(ain1, ain2, null);
17780    }
17781
17782    // ain1 = "char a"
17783    // ain2 = "char2 b"
17784    public result_int reduce_my_char_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17785        Type t0, t1;
17786        // check ain1
17787        if (!ain1.getType().getElement().isCompatible(__I8)) {
17788            throw new RSRuntimeException("Type mismatch with I8!");
17789        }
17790        // check ain2
17791        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
17792            throw new RSRuntimeException("Type mismatch with I8_2!");
17793        }
17794        // Verify dimensions
17795        t0 = ain1.getType();
17796        t1 = ain2.getType();
17797        if ((t0.getCount() != t1.getCount()) ||
17798            (t0.getX() != t1.getX()) ||
17799            (t0.getY() != t1.getY()) ||
17800            (t0.getZ() != t1.getZ()) ||
17801            (t0.hasFaces()   != t1.hasFaces()) ||
17802            (t0.hasMipmaps() != t1.hasMipmaps())) {
17803            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17804        }
17805
17806        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17807        aout.setAutoPadding(true);
17808        reduce(mExportReduceIdx_my_char_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
17809        return new result_int(aout);
17810    }
17811
17812    private final static int mExportReduceIdx_my_char_char4_0 = 268;
17813    // in1 = "a"
17814    // in2 = "b", flattened 4-vectors
17815    public result_int reduce_my_char_char4_0(byte[] in1, byte[] in2) {
17816        // Verify that "in1" is non-null.
17817        if (in1 == null) {
17818            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17819        }
17820        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17821        ain1.setAutoPadding(true);
17822        ain1.copyFrom(in1);
17823        // Verify that "in2" is non-null.
17824        if (in2 == null) {
17825            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17826        }
17827        // Verify that the array length is a multiple of the vector size.
17828        if (in2.length % 4 != 0) {
17829            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
17830        }
17831        // Verify that input array lengths are the same.
17832        if (in1.length != in2.length / 4) {
17833            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17834        }
17835        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
17836        ain2.setAutoPadding(true);
17837        ain2.copyFrom(in2);
17838
17839        result_int result = reduce_my_char_char4_0(ain1, ain2, null);
17840        result.mTempIns = new Allocation[]{ain1, ain2};
17841        return result;
17842    }
17843
17844    // ain1 = "char a"
17845    // ain2 = "char4 b"
17846    public result_int reduce_my_char_char4_0(Allocation ain1, Allocation ain2) {
17847        return reduce_my_char_char4_0(ain1, ain2, null);
17848    }
17849
17850    // ain1 = "char a"
17851    // ain2 = "char4 b"
17852    public result_int reduce_my_char_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17853        Type t0, t1;
17854        // check ain1
17855        if (!ain1.getType().getElement().isCompatible(__I8)) {
17856            throw new RSRuntimeException("Type mismatch with I8!");
17857        }
17858        // check ain2
17859        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
17860            throw new RSRuntimeException("Type mismatch with I8_4!");
17861        }
17862        // Verify dimensions
17863        t0 = ain1.getType();
17864        t1 = ain2.getType();
17865        if ((t0.getCount() != t1.getCount()) ||
17866            (t0.getX() != t1.getX()) ||
17867            (t0.getY() != t1.getY()) ||
17868            (t0.getZ() != t1.getZ()) ||
17869            (t0.hasFaces()   != t1.hasFaces()) ||
17870            (t0.hasMipmaps() != t1.hasMipmaps())) {
17871            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17872        }
17873
17874        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17875        aout.setAutoPadding(true);
17876        reduce(mExportReduceIdx_my_char_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
17877        return new result_int(aout);
17878    }
17879
17880    private final static int mExportReduceIdx_my_char_char4_1 = 269;
17881    // in1 = "a"
17882    // in2 = "b", flattened 4-vectors
17883    public result_int reduce_my_char_char4_1(byte[] in1, byte[] in2) {
17884        // Verify that "in1" is non-null.
17885        if (in1 == null) {
17886            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17887        }
17888        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17889        ain1.setAutoPadding(true);
17890        ain1.copyFrom(in1);
17891        // Verify that "in2" is non-null.
17892        if (in2 == null) {
17893            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17894        }
17895        // Verify that the array length is a multiple of the vector size.
17896        if (in2.length % 4 != 0) {
17897            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
17898        }
17899        // Verify that input array lengths are the same.
17900        if (in1.length != in2.length / 4) {
17901            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17902        }
17903        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
17904        ain2.setAutoPadding(true);
17905        ain2.copyFrom(in2);
17906
17907        result_int result = reduce_my_char_char4_1(ain1, ain2, null);
17908        result.mTempIns = new Allocation[]{ain1, ain2};
17909        return result;
17910    }
17911
17912    // ain1 = "char a"
17913    // ain2 = "char4 b"
17914    public result_int reduce_my_char_char4_1(Allocation ain1, Allocation ain2) {
17915        return reduce_my_char_char4_1(ain1, ain2, null);
17916    }
17917
17918    // ain1 = "char a"
17919    // ain2 = "char4 b"
17920    public result_int reduce_my_char_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17921        Type t0, t1;
17922        // check ain1
17923        if (!ain1.getType().getElement().isCompatible(__I8)) {
17924            throw new RSRuntimeException("Type mismatch with I8!");
17925        }
17926        // check ain2
17927        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
17928            throw new RSRuntimeException("Type mismatch with I8_4!");
17929        }
17930        // Verify dimensions
17931        t0 = ain1.getType();
17932        t1 = ain2.getType();
17933        if ((t0.getCount() != t1.getCount()) ||
17934            (t0.getX() != t1.getX()) ||
17935            (t0.getY() != t1.getY()) ||
17936            (t0.getZ() != t1.getZ()) ||
17937            (t0.hasFaces()   != t1.hasFaces()) ||
17938            (t0.hasMipmaps() != t1.hasMipmaps())) {
17939            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
17940        }
17941
17942        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
17943        aout.setAutoPadding(true);
17944        reduce(mExportReduceIdx_my_char_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
17945        return new result_int(aout);
17946    }
17947
17948    private final static int mExportReduceIdx_my_char_short_0 = 270;
17949    // in1 = "a"
17950    // in2 = "b"
17951    public result_int reduce_my_char_short_0(byte[] in1, short[] in2) {
17952        // Verify that "in1" is non-null.
17953        if (in1 == null) {
17954            throw new RSIllegalArgumentException("Array \"in1\" is null!");
17955        }
17956        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
17957        ain1.setAutoPadding(true);
17958        ain1.copyFrom(in1);
17959        // Verify that "in2" is non-null.
17960        if (in2 == null) {
17961            throw new RSIllegalArgumentException("Array \"in2\" is null!");
17962        }
17963        // Verify that input array lengths are the same.
17964        if (in1.length != in2.length) {
17965            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
17966        }
17967        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
17968        ain2.setAutoPadding(true);
17969        ain2.copyFrom(in2);
17970
17971        result_int result = reduce_my_char_short_0(ain1, ain2, null);
17972        result.mTempIns = new Allocation[]{ain1, ain2};
17973        return result;
17974    }
17975
17976    // ain1 = "char a"
17977    // ain2 = "short b"
17978    public result_int reduce_my_char_short_0(Allocation ain1, Allocation ain2) {
17979        return reduce_my_char_short_0(ain1, ain2, null);
17980    }
17981
17982    // ain1 = "char a"
17983    // ain2 = "short b"
17984    public result_int reduce_my_char_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
17985        Type t0, t1;
17986        // check ain1
17987        if (!ain1.getType().getElement().isCompatible(__I8)) {
17988            throw new RSRuntimeException("Type mismatch with I8!");
17989        }
17990        // check ain2
17991        if (!ain2.getType().getElement().isCompatible(__I16)) {
17992            throw new RSRuntimeException("Type mismatch with I16!");
17993        }
17994        // Verify dimensions
17995        t0 = ain1.getType();
17996        t1 = ain2.getType();
17997        if ((t0.getCount() != t1.getCount()) ||
17998            (t0.getX() != t1.getX()) ||
17999            (t0.getY() != t1.getY()) ||
18000            (t0.getZ() != t1.getZ()) ||
18001            (t0.hasFaces()   != t1.hasFaces()) ||
18002            (t0.hasMipmaps() != t1.hasMipmaps())) {
18003            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18004        }
18005
18006        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18007        aout.setAutoPadding(true);
18008        reduce(mExportReduceIdx_my_char_short_0, new Allocation[]{ain1, ain2}, aout, sc);
18009        return new result_int(aout);
18010    }
18011
18012    private final static int mExportReduceIdx_my_char_short_1 = 271;
18013    // in1 = "a"
18014    // in2 = "b"
18015    public result_int reduce_my_char_short_1(byte[] in1, short[] in2) {
18016        // Verify that "in1" is non-null.
18017        if (in1 == null) {
18018            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18019        }
18020        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18021        ain1.setAutoPadding(true);
18022        ain1.copyFrom(in1);
18023        // Verify that "in2" is non-null.
18024        if (in2 == null) {
18025            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18026        }
18027        // Verify that input array lengths are the same.
18028        if (in1.length != in2.length) {
18029            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18030        }
18031        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
18032        ain2.setAutoPadding(true);
18033        ain2.copyFrom(in2);
18034
18035        result_int result = reduce_my_char_short_1(ain1, ain2, null);
18036        result.mTempIns = new Allocation[]{ain1, ain2};
18037        return result;
18038    }
18039
18040    // ain1 = "char a"
18041    // ain2 = "short b"
18042    public result_int reduce_my_char_short_1(Allocation ain1, Allocation ain2) {
18043        return reduce_my_char_short_1(ain1, ain2, null);
18044    }
18045
18046    // ain1 = "char a"
18047    // ain2 = "short b"
18048    public result_int reduce_my_char_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18049        Type t0, t1;
18050        // check ain1
18051        if (!ain1.getType().getElement().isCompatible(__I8)) {
18052            throw new RSRuntimeException("Type mismatch with I8!");
18053        }
18054        // check ain2
18055        if (!ain2.getType().getElement().isCompatible(__I16)) {
18056            throw new RSRuntimeException("Type mismatch with I16!");
18057        }
18058        // Verify dimensions
18059        t0 = ain1.getType();
18060        t1 = ain2.getType();
18061        if ((t0.getCount() != t1.getCount()) ||
18062            (t0.getX() != t1.getX()) ||
18063            (t0.getY() != t1.getY()) ||
18064            (t0.getZ() != t1.getZ()) ||
18065            (t0.hasFaces()   != t1.hasFaces()) ||
18066            (t0.hasMipmaps() != t1.hasMipmaps())) {
18067            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18068        }
18069
18070        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18071        aout.setAutoPadding(true);
18072        reduce(mExportReduceIdx_my_char_short_1, new Allocation[]{ain1, ain2}, aout, sc);
18073        return new result_int(aout);
18074    }
18075
18076    private final static int mExportReduceIdx_my_char_short2_0 = 272;
18077    // in1 = "a"
18078    // in2 = "b", flattened 2-vectors
18079    public result_int reduce_my_char_short2_0(byte[] in1, short[] in2) {
18080        // Verify that "in1" is non-null.
18081        if (in1 == null) {
18082            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18083        }
18084        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18085        ain1.setAutoPadding(true);
18086        ain1.copyFrom(in1);
18087        // Verify that "in2" is non-null.
18088        if (in2 == null) {
18089            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18090        }
18091        // Verify that the array length is a multiple of the vector size.
18092        if (in2.length % 2 != 0) {
18093            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
18094        }
18095        // Verify that input array lengths are the same.
18096        if (in1.length != in2.length / 2) {
18097            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18098        }
18099        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
18100        ain2.setAutoPadding(true);
18101        ain2.copyFrom(in2);
18102
18103        result_int result = reduce_my_char_short2_0(ain1, ain2, null);
18104        result.mTempIns = new Allocation[]{ain1, ain2};
18105        return result;
18106    }
18107
18108    // ain1 = "char a"
18109    // ain2 = "short2 b"
18110    public result_int reduce_my_char_short2_0(Allocation ain1, Allocation ain2) {
18111        return reduce_my_char_short2_0(ain1, ain2, null);
18112    }
18113
18114    // ain1 = "char a"
18115    // ain2 = "short2 b"
18116    public result_int reduce_my_char_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18117        Type t0, t1;
18118        // check ain1
18119        if (!ain1.getType().getElement().isCompatible(__I8)) {
18120            throw new RSRuntimeException("Type mismatch with I8!");
18121        }
18122        // check ain2
18123        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
18124            throw new RSRuntimeException("Type mismatch with I16_2!");
18125        }
18126        // Verify dimensions
18127        t0 = ain1.getType();
18128        t1 = ain2.getType();
18129        if ((t0.getCount() != t1.getCount()) ||
18130            (t0.getX() != t1.getX()) ||
18131            (t0.getY() != t1.getY()) ||
18132            (t0.getZ() != t1.getZ()) ||
18133            (t0.hasFaces()   != t1.hasFaces()) ||
18134            (t0.hasMipmaps() != t1.hasMipmaps())) {
18135            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18136        }
18137
18138        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18139        aout.setAutoPadding(true);
18140        reduce(mExportReduceIdx_my_char_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
18141        return new result_int(aout);
18142    }
18143
18144    private final static int mExportReduceIdx_my_char_short2_1 = 273;
18145    // in1 = "a"
18146    // in2 = "b", flattened 2-vectors
18147    public result_int reduce_my_char_short2_1(byte[] in1, short[] in2) {
18148        // Verify that "in1" is non-null.
18149        if (in1 == null) {
18150            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18151        }
18152        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18153        ain1.setAutoPadding(true);
18154        ain1.copyFrom(in1);
18155        // Verify that "in2" is non-null.
18156        if (in2 == null) {
18157            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18158        }
18159        // Verify that the array length is a multiple of the vector size.
18160        if (in2.length % 2 != 0) {
18161            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
18162        }
18163        // Verify that input array lengths are the same.
18164        if (in1.length != in2.length / 2) {
18165            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18166        }
18167        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
18168        ain2.setAutoPadding(true);
18169        ain2.copyFrom(in2);
18170
18171        result_int result = reduce_my_char_short2_1(ain1, ain2, null);
18172        result.mTempIns = new Allocation[]{ain1, ain2};
18173        return result;
18174    }
18175
18176    // ain1 = "char a"
18177    // ain2 = "short2 b"
18178    public result_int reduce_my_char_short2_1(Allocation ain1, Allocation ain2) {
18179        return reduce_my_char_short2_1(ain1, ain2, null);
18180    }
18181
18182    // ain1 = "char a"
18183    // ain2 = "short2 b"
18184    public result_int reduce_my_char_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18185        Type t0, t1;
18186        // check ain1
18187        if (!ain1.getType().getElement().isCompatible(__I8)) {
18188            throw new RSRuntimeException("Type mismatch with I8!");
18189        }
18190        // check ain2
18191        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
18192            throw new RSRuntimeException("Type mismatch with I16_2!");
18193        }
18194        // Verify dimensions
18195        t0 = ain1.getType();
18196        t1 = ain2.getType();
18197        if ((t0.getCount() != t1.getCount()) ||
18198            (t0.getX() != t1.getX()) ||
18199            (t0.getY() != t1.getY()) ||
18200            (t0.getZ() != t1.getZ()) ||
18201            (t0.hasFaces()   != t1.hasFaces()) ||
18202            (t0.hasMipmaps() != t1.hasMipmaps())) {
18203            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18204        }
18205
18206        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18207        aout.setAutoPadding(true);
18208        reduce(mExportReduceIdx_my_char_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
18209        return new result_int(aout);
18210    }
18211
18212    private final static int mExportReduceIdx_my_char_short4_0 = 274;
18213    // in1 = "a"
18214    // in2 = "b", flattened 4-vectors
18215    public result_int reduce_my_char_short4_0(byte[] in1, short[] in2) {
18216        // Verify that "in1" is non-null.
18217        if (in1 == null) {
18218            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18219        }
18220        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18221        ain1.setAutoPadding(true);
18222        ain1.copyFrom(in1);
18223        // Verify that "in2" is non-null.
18224        if (in2 == null) {
18225            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18226        }
18227        // Verify that the array length is a multiple of the vector size.
18228        if (in2.length % 4 != 0) {
18229            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
18230        }
18231        // Verify that input array lengths are the same.
18232        if (in1.length != in2.length / 4) {
18233            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18234        }
18235        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
18236        ain2.setAutoPadding(true);
18237        ain2.copyFrom(in2);
18238
18239        result_int result = reduce_my_char_short4_0(ain1, ain2, null);
18240        result.mTempIns = new Allocation[]{ain1, ain2};
18241        return result;
18242    }
18243
18244    // ain1 = "char a"
18245    // ain2 = "short4 b"
18246    public result_int reduce_my_char_short4_0(Allocation ain1, Allocation ain2) {
18247        return reduce_my_char_short4_0(ain1, ain2, null);
18248    }
18249
18250    // ain1 = "char a"
18251    // ain2 = "short4 b"
18252    public result_int reduce_my_char_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18253        Type t0, t1;
18254        // check ain1
18255        if (!ain1.getType().getElement().isCompatible(__I8)) {
18256            throw new RSRuntimeException("Type mismatch with I8!");
18257        }
18258        // check ain2
18259        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
18260            throw new RSRuntimeException("Type mismatch with I16_4!");
18261        }
18262        // Verify dimensions
18263        t0 = ain1.getType();
18264        t1 = ain2.getType();
18265        if ((t0.getCount() != t1.getCount()) ||
18266            (t0.getX() != t1.getX()) ||
18267            (t0.getY() != t1.getY()) ||
18268            (t0.getZ() != t1.getZ()) ||
18269            (t0.hasFaces()   != t1.hasFaces()) ||
18270            (t0.hasMipmaps() != t1.hasMipmaps())) {
18271            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18272        }
18273
18274        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18275        aout.setAutoPadding(true);
18276        reduce(mExportReduceIdx_my_char_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
18277        return new result_int(aout);
18278    }
18279
18280    private final static int mExportReduceIdx_my_char_short4_1 = 275;
18281    // in1 = "a"
18282    // in2 = "b", flattened 4-vectors
18283    public result_int reduce_my_char_short4_1(byte[] in1, short[] in2) {
18284        // Verify that "in1" is non-null.
18285        if (in1 == null) {
18286            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18287        }
18288        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18289        ain1.setAutoPadding(true);
18290        ain1.copyFrom(in1);
18291        // Verify that "in2" is non-null.
18292        if (in2 == null) {
18293            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18294        }
18295        // Verify that the array length is a multiple of the vector size.
18296        if (in2.length % 4 != 0) {
18297            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
18298        }
18299        // Verify that input array lengths are the same.
18300        if (in1.length != in2.length / 4) {
18301            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18302        }
18303        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
18304        ain2.setAutoPadding(true);
18305        ain2.copyFrom(in2);
18306
18307        result_int result = reduce_my_char_short4_1(ain1, ain2, null);
18308        result.mTempIns = new Allocation[]{ain1, ain2};
18309        return result;
18310    }
18311
18312    // ain1 = "char a"
18313    // ain2 = "short4 b"
18314    public result_int reduce_my_char_short4_1(Allocation ain1, Allocation ain2) {
18315        return reduce_my_char_short4_1(ain1, ain2, null);
18316    }
18317
18318    // ain1 = "char a"
18319    // ain2 = "short4 b"
18320    public result_int reduce_my_char_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18321        Type t0, t1;
18322        // check ain1
18323        if (!ain1.getType().getElement().isCompatible(__I8)) {
18324            throw new RSRuntimeException("Type mismatch with I8!");
18325        }
18326        // check ain2
18327        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
18328            throw new RSRuntimeException("Type mismatch with I16_4!");
18329        }
18330        // Verify dimensions
18331        t0 = ain1.getType();
18332        t1 = ain2.getType();
18333        if ((t0.getCount() != t1.getCount()) ||
18334            (t0.getX() != t1.getX()) ||
18335            (t0.getY() != t1.getY()) ||
18336            (t0.getZ() != t1.getZ()) ||
18337            (t0.hasFaces()   != t1.hasFaces()) ||
18338            (t0.hasMipmaps() != t1.hasMipmaps())) {
18339            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18340        }
18341
18342        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18343        aout.setAutoPadding(true);
18344        reduce(mExportReduceIdx_my_char_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
18345        return new result_int(aout);
18346    }
18347
18348    private final static int mExportReduceIdx_my_char_uchar_0 = 276;
18349    // in1 = "a"
18350    // in2 = "b"
18351    public result_int reduce_my_char_uchar_0(byte[] in1, byte[] in2) {
18352        // Verify that "in1" is non-null.
18353        if (in1 == null) {
18354            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18355        }
18356        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18357        ain1.setAutoPadding(true);
18358        ain1.copyFrom(in1);
18359        // Verify that "in2" is non-null.
18360        if (in2 == null) {
18361            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18362        }
18363        // Verify that input array lengths are the same.
18364        if (in1.length != in2.length) {
18365            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18366        }
18367        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
18368        ain2.setAutoPadding(true);
18369        ain2.copyFrom(in2);
18370
18371        result_int result = reduce_my_char_uchar_0(ain1, ain2, null);
18372        result.mTempIns = new Allocation[]{ain1, ain2};
18373        return result;
18374    }
18375
18376    // ain1 = "char a"
18377    // ain2 = "uchar b"
18378    public result_int reduce_my_char_uchar_0(Allocation ain1, Allocation ain2) {
18379        return reduce_my_char_uchar_0(ain1, ain2, null);
18380    }
18381
18382    // ain1 = "char a"
18383    // ain2 = "uchar b"
18384    public result_int reduce_my_char_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18385        Type t0, t1;
18386        // check ain1
18387        if (!ain1.getType().getElement().isCompatible(__I8)) {
18388            throw new RSRuntimeException("Type mismatch with I8!");
18389        }
18390        // check ain2
18391        if (!ain2.getType().getElement().isCompatible(__U8)) {
18392            throw new RSRuntimeException("Type mismatch with U8!");
18393        }
18394        // Verify dimensions
18395        t0 = ain1.getType();
18396        t1 = ain2.getType();
18397        if ((t0.getCount() != t1.getCount()) ||
18398            (t0.getX() != t1.getX()) ||
18399            (t0.getY() != t1.getY()) ||
18400            (t0.getZ() != t1.getZ()) ||
18401            (t0.hasFaces()   != t1.hasFaces()) ||
18402            (t0.hasMipmaps() != t1.hasMipmaps())) {
18403            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18404        }
18405
18406        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18407        aout.setAutoPadding(true);
18408        reduce(mExportReduceIdx_my_char_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
18409        return new result_int(aout);
18410    }
18411
18412    private final static int mExportReduceIdx_my_char_uchar_1 = 277;
18413    // in1 = "a"
18414    // in2 = "b"
18415    public result_int reduce_my_char_uchar_1(byte[] in1, byte[] in2) {
18416        // Verify that "in1" is non-null.
18417        if (in1 == null) {
18418            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18419        }
18420        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18421        ain1.setAutoPadding(true);
18422        ain1.copyFrom(in1);
18423        // Verify that "in2" is non-null.
18424        if (in2 == null) {
18425            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18426        }
18427        // Verify that input array lengths are the same.
18428        if (in1.length != in2.length) {
18429            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18430        }
18431        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
18432        ain2.setAutoPadding(true);
18433        ain2.copyFrom(in2);
18434
18435        result_int result = reduce_my_char_uchar_1(ain1, ain2, null);
18436        result.mTempIns = new Allocation[]{ain1, ain2};
18437        return result;
18438    }
18439
18440    // ain1 = "char a"
18441    // ain2 = "uchar b"
18442    public result_int reduce_my_char_uchar_1(Allocation ain1, Allocation ain2) {
18443        return reduce_my_char_uchar_1(ain1, ain2, null);
18444    }
18445
18446    // ain1 = "char a"
18447    // ain2 = "uchar b"
18448    public result_int reduce_my_char_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18449        Type t0, t1;
18450        // check ain1
18451        if (!ain1.getType().getElement().isCompatible(__I8)) {
18452            throw new RSRuntimeException("Type mismatch with I8!");
18453        }
18454        // check ain2
18455        if (!ain2.getType().getElement().isCompatible(__U8)) {
18456            throw new RSRuntimeException("Type mismatch with U8!");
18457        }
18458        // Verify dimensions
18459        t0 = ain1.getType();
18460        t1 = ain2.getType();
18461        if ((t0.getCount() != t1.getCount()) ||
18462            (t0.getX() != t1.getX()) ||
18463            (t0.getY() != t1.getY()) ||
18464            (t0.getZ() != t1.getZ()) ||
18465            (t0.hasFaces()   != t1.hasFaces()) ||
18466            (t0.hasMipmaps() != t1.hasMipmaps())) {
18467            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18468        }
18469
18470        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18471        aout.setAutoPadding(true);
18472        reduce(mExportReduceIdx_my_char_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
18473        return new result_int(aout);
18474    }
18475
18476    private final static int mExportReduceIdx_my_char_uchar2_0 = 278;
18477    // in1 = "a"
18478    // in2 = "b", flattened 2-vectors
18479    public result_int reduce_my_char_uchar2_0(byte[] in1, byte[] in2) {
18480        // Verify that "in1" is non-null.
18481        if (in1 == null) {
18482            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18483        }
18484        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18485        ain1.setAutoPadding(true);
18486        ain1.copyFrom(in1);
18487        // Verify that "in2" is non-null.
18488        if (in2 == null) {
18489            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18490        }
18491        // Verify that the array length is a multiple of the vector size.
18492        if (in2.length % 2 != 0) {
18493            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
18494        }
18495        // Verify that input array lengths are the same.
18496        if (in1.length != in2.length / 2) {
18497            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18498        }
18499        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
18500        ain2.setAutoPadding(true);
18501        ain2.copyFrom(in2);
18502
18503        result_int result = reduce_my_char_uchar2_0(ain1, ain2, null);
18504        result.mTempIns = new Allocation[]{ain1, ain2};
18505        return result;
18506    }
18507
18508    // ain1 = "char a"
18509    // ain2 = "uchar2 b"
18510    public result_int reduce_my_char_uchar2_0(Allocation ain1, Allocation ain2) {
18511        return reduce_my_char_uchar2_0(ain1, ain2, null);
18512    }
18513
18514    // ain1 = "char a"
18515    // ain2 = "uchar2 b"
18516    public result_int reduce_my_char_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18517        Type t0, t1;
18518        // check ain1
18519        if (!ain1.getType().getElement().isCompatible(__I8)) {
18520            throw new RSRuntimeException("Type mismatch with I8!");
18521        }
18522        // check ain2
18523        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
18524            throw new RSRuntimeException("Type mismatch with U8_2!");
18525        }
18526        // Verify dimensions
18527        t0 = ain1.getType();
18528        t1 = ain2.getType();
18529        if ((t0.getCount() != t1.getCount()) ||
18530            (t0.getX() != t1.getX()) ||
18531            (t0.getY() != t1.getY()) ||
18532            (t0.getZ() != t1.getZ()) ||
18533            (t0.hasFaces()   != t1.hasFaces()) ||
18534            (t0.hasMipmaps() != t1.hasMipmaps())) {
18535            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18536        }
18537
18538        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18539        aout.setAutoPadding(true);
18540        reduce(mExportReduceIdx_my_char_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
18541        return new result_int(aout);
18542    }
18543
18544    private final static int mExportReduceIdx_my_char_uchar2_1 = 279;
18545    // in1 = "a"
18546    // in2 = "b", flattened 2-vectors
18547    public result_int reduce_my_char_uchar2_1(byte[] in1, byte[] in2) {
18548        // Verify that "in1" is non-null.
18549        if (in1 == null) {
18550            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18551        }
18552        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18553        ain1.setAutoPadding(true);
18554        ain1.copyFrom(in1);
18555        // Verify that "in2" is non-null.
18556        if (in2 == null) {
18557            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18558        }
18559        // Verify that the array length is a multiple of the vector size.
18560        if (in2.length % 2 != 0) {
18561            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
18562        }
18563        // Verify that input array lengths are the same.
18564        if (in1.length != in2.length / 2) {
18565            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18566        }
18567        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
18568        ain2.setAutoPadding(true);
18569        ain2.copyFrom(in2);
18570
18571        result_int result = reduce_my_char_uchar2_1(ain1, ain2, null);
18572        result.mTempIns = new Allocation[]{ain1, ain2};
18573        return result;
18574    }
18575
18576    // ain1 = "char a"
18577    // ain2 = "uchar2 b"
18578    public result_int reduce_my_char_uchar2_1(Allocation ain1, Allocation ain2) {
18579        return reduce_my_char_uchar2_1(ain1, ain2, null);
18580    }
18581
18582    // ain1 = "char a"
18583    // ain2 = "uchar2 b"
18584    public result_int reduce_my_char_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18585        Type t0, t1;
18586        // check ain1
18587        if (!ain1.getType().getElement().isCompatible(__I8)) {
18588            throw new RSRuntimeException("Type mismatch with I8!");
18589        }
18590        // check ain2
18591        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
18592            throw new RSRuntimeException("Type mismatch with U8_2!");
18593        }
18594        // Verify dimensions
18595        t0 = ain1.getType();
18596        t1 = ain2.getType();
18597        if ((t0.getCount() != t1.getCount()) ||
18598            (t0.getX() != t1.getX()) ||
18599            (t0.getY() != t1.getY()) ||
18600            (t0.getZ() != t1.getZ()) ||
18601            (t0.hasFaces()   != t1.hasFaces()) ||
18602            (t0.hasMipmaps() != t1.hasMipmaps())) {
18603            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18604        }
18605
18606        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18607        aout.setAutoPadding(true);
18608        reduce(mExportReduceIdx_my_char_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
18609        return new result_int(aout);
18610    }
18611
18612    private final static int mExportReduceIdx_my_char_uchar4_0 = 280;
18613    // in1 = "a"
18614    // in2 = "b", flattened 4-vectors
18615    public result_int reduce_my_char_uchar4_0(byte[] in1, byte[] in2) {
18616        // Verify that "in1" is non-null.
18617        if (in1 == null) {
18618            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18619        }
18620        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18621        ain1.setAutoPadding(true);
18622        ain1.copyFrom(in1);
18623        // Verify that "in2" is non-null.
18624        if (in2 == null) {
18625            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18626        }
18627        // Verify that the array length is a multiple of the vector size.
18628        if (in2.length % 4 != 0) {
18629            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
18630        }
18631        // Verify that input array lengths are the same.
18632        if (in1.length != in2.length / 4) {
18633            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18634        }
18635        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
18636        ain2.setAutoPadding(true);
18637        ain2.copyFrom(in2);
18638
18639        result_int result = reduce_my_char_uchar4_0(ain1, ain2, null);
18640        result.mTempIns = new Allocation[]{ain1, ain2};
18641        return result;
18642    }
18643
18644    // ain1 = "char a"
18645    // ain2 = "uchar4 b"
18646    public result_int reduce_my_char_uchar4_0(Allocation ain1, Allocation ain2) {
18647        return reduce_my_char_uchar4_0(ain1, ain2, null);
18648    }
18649
18650    // ain1 = "char a"
18651    // ain2 = "uchar4 b"
18652    public result_int reduce_my_char_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18653        Type t0, t1;
18654        // check ain1
18655        if (!ain1.getType().getElement().isCompatible(__I8)) {
18656            throw new RSRuntimeException("Type mismatch with I8!");
18657        }
18658        // check ain2
18659        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
18660            throw new RSRuntimeException("Type mismatch with U8_4!");
18661        }
18662        // Verify dimensions
18663        t0 = ain1.getType();
18664        t1 = ain2.getType();
18665        if ((t0.getCount() != t1.getCount()) ||
18666            (t0.getX() != t1.getX()) ||
18667            (t0.getY() != t1.getY()) ||
18668            (t0.getZ() != t1.getZ()) ||
18669            (t0.hasFaces()   != t1.hasFaces()) ||
18670            (t0.hasMipmaps() != t1.hasMipmaps())) {
18671            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18672        }
18673
18674        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18675        aout.setAutoPadding(true);
18676        reduce(mExportReduceIdx_my_char_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
18677        return new result_int(aout);
18678    }
18679
18680    private final static int mExportReduceIdx_my_char_uchar4_1 = 281;
18681    // in1 = "a"
18682    // in2 = "b", flattened 4-vectors
18683    public result_int reduce_my_char_uchar4_1(byte[] in1, byte[] in2) {
18684        // Verify that "in1" is non-null.
18685        if (in1 == null) {
18686            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18687        }
18688        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18689        ain1.setAutoPadding(true);
18690        ain1.copyFrom(in1);
18691        // Verify that "in2" is non-null.
18692        if (in2 == null) {
18693            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18694        }
18695        // Verify that the array length is a multiple of the vector size.
18696        if (in2.length % 4 != 0) {
18697            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
18698        }
18699        // Verify that input array lengths are the same.
18700        if (in1.length != in2.length / 4) {
18701            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18702        }
18703        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
18704        ain2.setAutoPadding(true);
18705        ain2.copyFrom(in2);
18706
18707        result_int result = reduce_my_char_uchar4_1(ain1, ain2, null);
18708        result.mTempIns = new Allocation[]{ain1, ain2};
18709        return result;
18710    }
18711
18712    // ain1 = "char a"
18713    // ain2 = "uchar4 b"
18714    public result_int reduce_my_char_uchar4_1(Allocation ain1, Allocation ain2) {
18715        return reduce_my_char_uchar4_1(ain1, ain2, null);
18716    }
18717
18718    // ain1 = "char a"
18719    // ain2 = "uchar4 b"
18720    public result_int reduce_my_char_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18721        Type t0, t1;
18722        // check ain1
18723        if (!ain1.getType().getElement().isCompatible(__I8)) {
18724            throw new RSRuntimeException("Type mismatch with I8!");
18725        }
18726        // check ain2
18727        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
18728            throw new RSRuntimeException("Type mismatch with U8_4!");
18729        }
18730        // Verify dimensions
18731        t0 = ain1.getType();
18732        t1 = ain2.getType();
18733        if ((t0.getCount() != t1.getCount()) ||
18734            (t0.getX() != t1.getX()) ||
18735            (t0.getY() != t1.getY()) ||
18736            (t0.getZ() != t1.getZ()) ||
18737            (t0.hasFaces()   != t1.hasFaces()) ||
18738            (t0.hasMipmaps() != t1.hasMipmaps())) {
18739            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18740        }
18741
18742        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18743        aout.setAutoPadding(true);
18744        reduce(mExportReduceIdx_my_char_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
18745        return new result_int(aout);
18746    }
18747
18748    private final static int mExportReduceIdx_my_char_ushort_0 = 282;
18749    // in1 = "a"
18750    // in2 = "b"
18751    public result_int reduce_my_char_ushort_0(byte[] in1, short[] in2) {
18752        // Verify that "in1" is non-null.
18753        if (in1 == null) {
18754            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18755        }
18756        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18757        ain1.setAutoPadding(true);
18758        ain1.copyFrom(in1);
18759        // Verify that "in2" is non-null.
18760        if (in2 == null) {
18761            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18762        }
18763        // Verify that input array lengths are the same.
18764        if (in1.length != in2.length) {
18765            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18766        }
18767        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
18768        ain2.setAutoPadding(true);
18769        ain2.copyFrom(in2);
18770
18771        result_int result = reduce_my_char_ushort_0(ain1, ain2, null);
18772        result.mTempIns = new Allocation[]{ain1, ain2};
18773        return result;
18774    }
18775
18776    // ain1 = "char a"
18777    // ain2 = "ushort b"
18778    public result_int reduce_my_char_ushort_0(Allocation ain1, Allocation ain2) {
18779        return reduce_my_char_ushort_0(ain1, ain2, null);
18780    }
18781
18782    // ain1 = "char a"
18783    // ain2 = "ushort b"
18784    public result_int reduce_my_char_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18785        Type t0, t1;
18786        // check ain1
18787        if (!ain1.getType().getElement().isCompatible(__I8)) {
18788            throw new RSRuntimeException("Type mismatch with I8!");
18789        }
18790        // check ain2
18791        if (!ain2.getType().getElement().isCompatible(__U16)) {
18792            throw new RSRuntimeException("Type mismatch with U16!");
18793        }
18794        // Verify dimensions
18795        t0 = ain1.getType();
18796        t1 = ain2.getType();
18797        if ((t0.getCount() != t1.getCount()) ||
18798            (t0.getX() != t1.getX()) ||
18799            (t0.getY() != t1.getY()) ||
18800            (t0.getZ() != t1.getZ()) ||
18801            (t0.hasFaces()   != t1.hasFaces()) ||
18802            (t0.hasMipmaps() != t1.hasMipmaps())) {
18803            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18804        }
18805
18806        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18807        aout.setAutoPadding(true);
18808        reduce(mExportReduceIdx_my_char_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
18809        return new result_int(aout);
18810    }
18811
18812    private final static int mExportReduceIdx_my_char_ushort_1 = 283;
18813    // in1 = "a"
18814    // in2 = "b"
18815    public result_int reduce_my_char_ushort_1(byte[] in1, short[] in2) {
18816        // Verify that "in1" is non-null.
18817        if (in1 == null) {
18818            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18819        }
18820        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18821        ain1.setAutoPadding(true);
18822        ain1.copyFrom(in1);
18823        // Verify that "in2" is non-null.
18824        if (in2 == null) {
18825            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18826        }
18827        // Verify that input array lengths are the same.
18828        if (in1.length != in2.length) {
18829            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18830        }
18831        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
18832        ain2.setAutoPadding(true);
18833        ain2.copyFrom(in2);
18834
18835        result_int result = reduce_my_char_ushort_1(ain1, ain2, null);
18836        result.mTempIns = new Allocation[]{ain1, ain2};
18837        return result;
18838    }
18839
18840    // ain1 = "char a"
18841    // ain2 = "ushort b"
18842    public result_int reduce_my_char_ushort_1(Allocation ain1, Allocation ain2) {
18843        return reduce_my_char_ushort_1(ain1, ain2, null);
18844    }
18845
18846    // ain1 = "char a"
18847    // ain2 = "ushort b"
18848    public result_int reduce_my_char_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18849        Type t0, t1;
18850        // check ain1
18851        if (!ain1.getType().getElement().isCompatible(__I8)) {
18852            throw new RSRuntimeException("Type mismatch with I8!");
18853        }
18854        // check ain2
18855        if (!ain2.getType().getElement().isCompatible(__U16)) {
18856            throw new RSRuntimeException("Type mismatch with U16!");
18857        }
18858        // Verify dimensions
18859        t0 = ain1.getType();
18860        t1 = ain2.getType();
18861        if ((t0.getCount() != t1.getCount()) ||
18862            (t0.getX() != t1.getX()) ||
18863            (t0.getY() != t1.getY()) ||
18864            (t0.getZ() != t1.getZ()) ||
18865            (t0.hasFaces()   != t1.hasFaces()) ||
18866            (t0.hasMipmaps() != t1.hasMipmaps())) {
18867            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18868        }
18869
18870        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18871        aout.setAutoPadding(true);
18872        reduce(mExportReduceIdx_my_char_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
18873        return new result_int(aout);
18874    }
18875
18876    private final static int mExportReduceIdx_my_char_ushort2_0 = 284;
18877    // in1 = "a"
18878    // in2 = "b", flattened 2-vectors
18879    public result_int reduce_my_char_ushort2_0(byte[] in1, short[] in2) {
18880        // Verify that "in1" is non-null.
18881        if (in1 == null) {
18882            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18883        }
18884        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18885        ain1.setAutoPadding(true);
18886        ain1.copyFrom(in1);
18887        // Verify that "in2" is non-null.
18888        if (in2 == null) {
18889            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18890        }
18891        // Verify that the array length is a multiple of the vector size.
18892        if (in2.length % 2 != 0) {
18893            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
18894        }
18895        // Verify that input array lengths are the same.
18896        if (in1.length != in2.length / 2) {
18897            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18898        }
18899        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
18900        ain2.setAutoPadding(true);
18901        ain2.copyFrom(in2);
18902
18903        result_int result = reduce_my_char_ushort2_0(ain1, ain2, null);
18904        result.mTempIns = new Allocation[]{ain1, ain2};
18905        return result;
18906    }
18907
18908    // ain1 = "char a"
18909    // ain2 = "ushort2 b"
18910    public result_int reduce_my_char_ushort2_0(Allocation ain1, Allocation ain2) {
18911        return reduce_my_char_ushort2_0(ain1, ain2, null);
18912    }
18913
18914    // ain1 = "char a"
18915    // ain2 = "ushort2 b"
18916    public result_int reduce_my_char_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18917        Type t0, t1;
18918        // check ain1
18919        if (!ain1.getType().getElement().isCompatible(__I8)) {
18920            throw new RSRuntimeException("Type mismatch with I8!");
18921        }
18922        // check ain2
18923        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
18924            throw new RSRuntimeException("Type mismatch with U16_2!");
18925        }
18926        // Verify dimensions
18927        t0 = ain1.getType();
18928        t1 = ain2.getType();
18929        if ((t0.getCount() != t1.getCount()) ||
18930            (t0.getX() != t1.getX()) ||
18931            (t0.getY() != t1.getY()) ||
18932            (t0.getZ() != t1.getZ()) ||
18933            (t0.hasFaces()   != t1.hasFaces()) ||
18934            (t0.hasMipmaps() != t1.hasMipmaps())) {
18935            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
18936        }
18937
18938        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
18939        aout.setAutoPadding(true);
18940        reduce(mExportReduceIdx_my_char_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
18941        return new result_int(aout);
18942    }
18943
18944    private final static int mExportReduceIdx_my_char_ushort2_1 = 285;
18945    // in1 = "a"
18946    // in2 = "b", flattened 2-vectors
18947    public result_int reduce_my_char_ushort2_1(byte[] in1, short[] in2) {
18948        // Verify that "in1" is non-null.
18949        if (in1 == null) {
18950            throw new RSIllegalArgumentException("Array \"in1\" is null!");
18951        }
18952        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
18953        ain1.setAutoPadding(true);
18954        ain1.copyFrom(in1);
18955        // Verify that "in2" is non-null.
18956        if (in2 == null) {
18957            throw new RSIllegalArgumentException("Array \"in2\" is null!");
18958        }
18959        // Verify that the array length is a multiple of the vector size.
18960        if (in2.length % 2 != 0) {
18961            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
18962        }
18963        // Verify that input array lengths are the same.
18964        if (in1.length != in2.length / 2) {
18965            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
18966        }
18967        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
18968        ain2.setAutoPadding(true);
18969        ain2.copyFrom(in2);
18970
18971        result_int result = reduce_my_char_ushort2_1(ain1, ain2, null);
18972        result.mTempIns = new Allocation[]{ain1, ain2};
18973        return result;
18974    }
18975
18976    // ain1 = "char a"
18977    // ain2 = "ushort2 b"
18978    public result_int reduce_my_char_ushort2_1(Allocation ain1, Allocation ain2) {
18979        return reduce_my_char_ushort2_1(ain1, ain2, null);
18980    }
18981
18982    // ain1 = "char a"
18983    // ain2 = "ushort2 b"
18984    public result_int reduce_my_char_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
18985        Type t0, t1;
18986        // check ain1
18987        if (!ain1.getType().getElement().isCompatible(__I8)) {
18988            throw new RSRuntimeException("Type mismatch with I8!");
18989        }
18990        // check ain2
18991        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
18992            throw new RSRuntimeException("Type mismatch with U16_2!");
18993        }
18994        // Verify dimensions
18995        t0 = ain1.getType();
18996        t1 = ain2.getType();
18997        if ((t0.getCount() != t1.getCount()) ||
18998            (t0.getX() != t1.getX()) ||
18999            (t0.getY() != t1.getY()) ||
19000            (t0.getZ() != t1.getZ()) ||
19001            (t0.hasFaces()   != t1.hasFaces()) ||
19002            (t0.hasMipmaps() != t1.hasMipmaps())) {
19003            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19004        }
19005
19006        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19007        aout.setAutoPadding(true);
19008        reduce(mExportReduceIdx_my_char_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
19009        return new result_int(aout);
19010    }
19011
19012    private final static int mExportReduceIdx_my_char_ushort4_0 = 286;
19013    // in1 = "a"
19014    // in2 = "b", flattened 4-vectors
19015    public result_int reduce_my_char_ushort4_0(byte[] in1, short[] in2) {
19016        // Verify that "in1" is non-null.
19017        if (in1 == null) {
19018            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19019        }
19020        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
19021        ain1.setAutoPadding(true);
19022        ain1.copyFrom(in1);
19023        // Verify that "in2" is non-null.
19024        if (in2 == null) {
19025            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19026        }
19027        // Verify that the array length is a multiple of the vector size.
19028        if (in2.length % 4 != 0) {
19029            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
19030        }
19031        // Verify that input array lengths are the same.
19032        if (in1.length != in2.length / 4) {
19033            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19034        }
19035        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
19036        ain2.setAutoPadding(true);
19037        ain2.copyFrom(in2);
19038
19039        result_int result = reduce_my_char_ushort4_0(ain1, ain2, null);
19040        result.mTempIns = new Allocation[]{ain1, ain2};
19041        return result;
19042    }
19043
19044    // ain1 = "char a"
19045    // ain2 = "ushort4 b"
19046    public result_int reduce_my_char_ushort4_0(Allocation ain1, Allocation ain2) {
19047        return reduce_my_char_ushort4_0(ain1, ain2, null);
19048    }
19049
19050    // ain1 = "char a"
19051    // ain2 = "ushort4 b"
19052    public result_int reduce_my_char_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19053        Type t0, t1;
19054        // check ain1
19055        if (!ain1.getType().getElement().isCompatible(__I8)) {
19056            throw new RSRuntimeException("Type mismatch with I8!");
19057        }
19058        // check ain2
19059        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
19060            throw new RSRuntimeException("Type mismatch with U16_4!");
19061        }
19062        // Verify dimensions
19063        t0 = ain1.getType();
19064        t1 = ain2.getType();
19065        if ((t0.getCount() != t1.getCount()) ||
19066            (t0.getX() != t1.getX()) ||
19067            (t0.getY() != t1.getY()) ||
19068            (t0.getZ() != t1.getZ()) ||
19069            (t0.hasFaces()   != t1.hasFaces()) ||
19070            (t0.hasMipmaps() != t1.hasMipmaps())) {
19071            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19072        }
19073
19074        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19075        aout.setAutoPadding(true);
19076        reduce(mExportReduceIdx_my_char_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
19077        return new result_int(aout);
19078    }
19079
19080    private final static int mExportReduceIdx_my_char_ushort4_1 = 287;
19081    // in1 = "a"
19082    // in2 = "b", flattened 4-vectors
19083    public result_int reduce_my_char_ushort4_1(byte[] in1, short[] in2) {
19084        // Verify that "in1" is non-null.
19085        if (in1 == null) {
19086            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19087        }
19088        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
19089        ain1.setAutoPadding(true);
19090        ain1.copyFrom(in1);
19091        // Verify that "in2" is non-null.
19092        if (in2 == null) {
19093            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19094        }
19095        // Verify that the array length is a multiple of the vector size.
19096        if (in2.length % 4 != 0) {
19097            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
19098        }
19099        // Verify that input array lengths are the same.
19100        if (in1.length != in2.length / 4) {
19101            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19102        }
19103        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
19104        ain2.setAutoPadding(true);
19105        ain2.copyFrom(in2);
19106
19107        result_int result = reduce_my_char_ushort4_1(ain1, ain2, null);
19108        result.mTempIns = new Allocation[]{ain1, ain2};
19109        return result;
19110    }
19111
19112    // ain1 = "char a"
19113    // ain2 = "ushort4 b"
19114    public result_int reduce_my_char_ushort4_1(Allocation ain1, Allocation ain2) {
19115        return reduce_my_char_ushort4_1(ain1, ain2, null);
19116    }
19117
19118    // ain1 = "char a"
19119    // ain2 = "ushort4 b"
19120    public result_int reduce_my_char_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19121        Type t0, t1;
19122        // check ain1
19123        if (!ain1.getType().getElement().isCompatible(__I8)) {
19124            throw new RSRuntimeException("Type mismatch with I8!");
19125        }
19126        // check ain2
19127        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
19128            throw new RSRuntimeException("Type mismatch with U16_4!");
19129        }
19130        // Verify dimensions
19131        t0 = ain1.getType();
19132        t1 = ain2.getType();
19133        if ((t0.getCount() != t1.getCount()) ||
19134            (t0.getX() != t1.getX()) ||
19135            (t0.getY() != t1.getY()) ||
19136            (t0.getZ() != t1.getZ()) ||
19137            (t0.hasFaces()   != t1.hasFaces()) ||
19138            (t0.hasMipmaps() != t1.hasMipmaps())) {
19139            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19140        }
19141
19142        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19143        aout.setAutoPadding(true);
19144        reduce(mExportReduceIdx_my_char_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
19145        return new result_int(aout);
19146    }
19147
19148    private final static int mExportReduceIdx_my_char_bool_0 = 288;
19149    // in1 = "a"
19150    // in2 = "b"
19151    public result_int reduce_my_char_bool_0(byte[] in1, byte[] in2) {
19152        // Verify that "in1" is non-null.
19153        if (in1 == null) {
19154            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19155        }
19156        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
19157        ain1.setAutoPadding(true);
19158        ain1.copyFrom(in1);
19159        // Verify that "in2" is non-null.
19160        if (in2 == null) {
19161            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19162        }
19163        // Verify that input array lengths are the same.
19164        if (in1.length != in2.length) {
19165            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19166        }
19167        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
19168        ain2.setAutoPadding(true);
19169        ain2.copyFrom(in2);
19170
19171        result_int result = reduce_my_char_bool_0(ain1, ain2, null);
19172        result.mTempIns = new Allocation[]{ain1, ain2};
19173        return result;
19174    }
19175
19176    // ain1 = "char a"
19177    // ain2 = "bool b"
19178    public result_int reduce_my_char_bool_0(Allocation ain1, Allocation ain2) {
19179        return reduce_my_char_bool_0(ain1, ain2, null);
19180    }
19181
19182    // ain1 = "char a"
19183    // ain2 = "bool b"
19184    public result_int reduce_my_char_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19185        Type t0, t1;
19186        // check ain1
19187        if (!ain1.getType().getElement().isCompatible(__I8)) {
19188            throw new RSRuntimeException("Type mismatch with I8!");
19189        }
19190        // check ain2
19191        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
19192            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
19193        }
19194        // Verify dimensions
19195        t0 = ain1.getType();
19196        t1 = ain2.getType();
19197        if ((t0.getCount() != t1.getCount()) ||
19198            (t0.getX() != t1.getX()) ||
19199            (t0.getY() != t1.getY()) ||
19200            (t0.getZ() != t1.getZ()) ||
19201            (t0.hasFaces()   != t1.hasFaces()) ||
19202            (t0.hasMipmaps() != t1.hasMipmaps())) {
19203            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19204        }
19205
19206        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19207        aout.setAutoPadding(true);
19208        reduce(mExportReduceIdx_my_char_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
19209        return new result_int(aout);
19210    }
19211
19212    private final static int mExportReduceIdx_my_char_bool_1 = 289;
19213    // in1 = "a"
19214    // in2 = "b"
19215    public result_int reduce_my_char_bool_1(byte[] in1, byte[] in2) {
19216        // Verify that "in1" is non-null.
19217        if (in1 == null) {
19218            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19219        }
19220        Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length);
19221        ain1.setAutoPadding(true);
19222        ain1.copyFrom(in1);
19223        // Verify that "in2" is non-null.
19224        if (in2 == null) {
19225            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19226        }
19227        // Verify that input array lengths are the same.
19228        if (in1.length != in2.length) {
19229            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19230        }
19231        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
19232        ain2.setAutoPadding(true);
19233        ain2.copyFrom(in2);
19234
19235        result_int result = reduce_my_char_bool_1(ain1, ain2, null);
19236        result.mTempIns = new Allocation[]{ain1, ain2};
19237        return result;
19238    }
19239
19240    // ain1 = "char a"
19241    // ain2 = "bool b"
19242    public result_int reduce_my_char_bool_1(Allocation ain1, Allocation ain2) {
19243        return reduce_my_char_bool_1(ain1, ain2, null);
19244    }
19245
19246    // ain1 = "char a"
19247    // ain2 = "bool b"
19248    public result_int reduce_my_char_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19249        Type t0, t1;
19250        // check ain1
19251        if (!ain1.getType().getElement().isCompatible(__I8)) {
19252            throw new RSRuntimeException("Type mismatch with I8!");
19253        }
19254        // check ain2
19255        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
19256            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
19257        }
19258        // Verify dimensions
19259        t0 = ain1.getType();
19260        t1 = ain2.getType();
19261        if ((t0.getCount() != t1.getCount()) ||
19262            (t0.getX() != t1.getX()) ||
19263            (t0.getY() != t1.getY()) ||
19264            (t0.getZ() != t1.getZ()) ||
19265            (t0.hasFaces()   != t1.hasFaces()) ||
19266            (t0.hasMipmaps() != t1.hasMipmaps())) {
19267            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19268        }
19269
19270        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19271        aout.setAutoPadding(true);
19272        reduce(mExportReduceIdx_my_char_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
19273        return new result_int(aout);
19274    }
19275
19276    private final static int mExportReduceIdx_my_char_rs_matrix2x2_0 = 290;
19277    // ain1 = "char a"
19278    // ain2 = "rs_matrix2x2 b"
19279    public result_int reduce_my_char_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
19280        return reduce_my_char_rs_matrix2x2_0(ain1, ain2, null);
19281    }
19282
19283    // ain1 = "char a"
19284    // ain2 = "rs_matrix2x2 b"
19285    public result_int reduce_my_char_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19286        Type t0, t1;
19287        // check ain1
19288        if (!ain1.getType().getElement().isCompatible(__I8)) {
19289            throw new RSRuntimeException("Type mismatch with I8!");
19290        }
19291        // check ain2
19292        // Verify dimensions
19293        t0 = ain1.getType();
19294        t1 = ain2.getType();
19295        if ((t0.getCount() != t1.getCount()) ||
19296            (t0.getX() != t1.getX()) ||
19297            (t0.getY() != t1.getY()) ||
19298            (t0.getZ() != t1.getZ()) ||
19299            (t0.hasFaces()   != t1.hasFaces()) ||
19300            (t0.hasMipmaps() != t1.hasMipmaps())) {
19301            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19302        }
19303
19304        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19305        aout.setAutoPadding(true);
19306        reduce(mExportReduceIdx_my_char_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
19307        return new result_int(aout);
19308    }
19309
19310    private final static int mExportReduceIdx_my_char_rs_matrix2x2_1 = 291;
19311    // ain1 = "char a"
19312    // ain2 = "rs_matrix2x2 b"
19313    public result_int reduce_my_char_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
19314        return reduce_my_char_rs_matrix2x2_1(ain1, ain2, null);
19315    }
19316
19317    // ain1 = "char a"
19318    // ain2 = "rs_matrix2x2 b"
19319    public result_int reduce_my_char_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19320        Type t0, t1;
19321        // check ain1
19322        if (!ain1.getType().getElement().isCompatible(__I8)) {
19323            throw new RSRuntimeException("Type mismatch with I8!");
19324        }
19325        // check ain2
19326        // Verify dimensions
19327        t0 = ain1.getType();
19328        t1 = ain2.getType();
19329        if ((t0.getCount() != t1.getCount()) ||
19330            (t0.getX() != t1.getX()) ||
19331            (t0.getY() != t1.getY()) ||
19332            (t0.getZ() != t1.getZ()) ||
19333            (t0.hasFaces()   != t1.hasFaces()) ||
19334            (t0.hasMipmaps() != t1.hasMipmaps())) {
19335            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19336        }
19337
19338        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19339        aout.setAutoPadding(true);
19340        reduce(mExportReduceIdx_my_char_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
19341        return new result_int(aout);
19342    }
19343
19344    private final static int mExportReduceIdx_my_char_MyStruct_0 = 292;
19345    // ain1 = "char a"
19346    // ain2 = "/* struct <> */ b"
19347    public result_int reduce_my_char_MyStruct_0(Allocation ain1, Allocation ain2) {
19348        return reduce_my_char_MyStruct_0(ain1, ain2, null);
19349    }
19350
19351    // ain1 = "char a"
19352    // ain2 = "/* struct <> */ b"
19353    public result_int reduce_my_char_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19354        Type t0, t1;
19355        // check ain1
19356        if (!ain1.getType().getElement().isCompatible(__I8)) {
19357            throw new RSRuntimeException("Type mismatch with I8!");
19358        }
19359        // check ain2
19360        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
19361            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
19362        }
19363        // Verify dimensions
19364        t0 = ain1.getType();
19365        t1 = ain2.getType();
19366        if ((t0.getCount() != t1.getCount()) ||
19367            (t0.getX() != t1.getX()) ||
19368            (t0.getY() != t1.getY()) ||
19369            (t0.getZ() != t1.getZ()) ||
19370            (t0.hasFaces()   != t1.hasFaces()) ||
19371            (t0.hasMipmaps() != t1.hasMipmaps())) {
19372            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19373        }
19374
19375        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19376        aout.setAutoPadding(true);
19377        reduce(mExportReduceIdx_my_char_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
19378        return new result_int(aout);
19379    }
19380
19381    private final static int mExportReduceIdx_my_char_MyStruct_1 = 293;
19382    // ain1 = "char a"
19383    // ain2 = "/* struct <> */ b"
19384    public result_int reduce_my_char_MyStruct_1(Allocation ain1, Allocation ain2) {
19385        return reduce_my_char_MyStruct_1(ain1, ain2, null);
19386    }
19387
19388    // ain1 = "char a"
19389    // ain2 = "/* struct <> */ b"
19390    public result_int reduce_my_char_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19391        Type t0, t1;
19392        // check ain1
19393        if (!ain1.getType().getElement().isCompatible(__I8)) {
19394            throw new RSRuntimeException("Type mismatch with I8!");
19395        }
19396        // check ain2
19397        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
19398            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
19399        }
19400        // Verify dimensions
19401        t0 = ain1.getType();
19402        t1 = ain2.getType();
19403        if ((t0.getCount() != t1.getCount()) ||
19404            (t0.getX() != t1.getX()) ||
19405            (t0.getY() != t1.getY()) ||
19406            (t0.getZ() != t1.getZ()) ||
19407            (t0.hasFaces()   != t1.hasFaces()) ||
19408            (t0.hasMipmaps() != t1.hasMipmaps())) {
19409            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19410        }
19411
19412        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19413        aout.setAutoPadding(true);
19414        reduce(mExportReduceIdx_my_char_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
19415        return new result_int(aout);
19416    }
19417
19418    private final static int mExportReduceIdx_my_char2_half_0 = 294;
19419    // in1 = "a", flattened 2-vectors
19420    // in2 = "b"
19421    public result_int reduce_my_char2_half_0(byte[] in1, short[] in2) {
19422        // Verify that "in1" is non-null.
19423        if (in1 == null) {
19424            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19425        }
19426        // Verify that the array length is a multiple of the vector size.
19427        if (in1.length % 2 != 0) {
19428            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19429        }
19430        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19431        ain1.setAutoPadding(true);
19432        ain1.copyFrom(in1);
19433        // Verify that "in2" is non-null.
19434        if (in2 == null) {
19435            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19436        }
19437        // Verify that input array lengths are the same.
19438        if (in1.length / 2 != in2.length) {
19439            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19440        }
19441        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
19442        ain2.setAutoPadding(true);
19443        ain2.copyFrom(in2);
19444
19445        result_int result = reduce_my_char2_half_0(ain1, ain2, null);
19446        result.mTempIns = new Allocation[]{ain1, ain2};
19447        return result;
19448    }
19449
19450    // ain1 = "char2 a"
19451    // ain2 = "half b"
19452    public result_int reduce_my_char2_half_0(Allocation ain1, Allocation ain2) {
19453        return reduce_my_char2_half_0(ain1, ain2, null);
19454    }
19455
19456    // ain1 = "char2 a"
19457    // ain2 = "half b"
19458    public result_int reduce_my_char2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19459        Type t0, t1;
19460        // check ain1
19461        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
19462            throw new RSRuntimeException("Type mismatch with I8_2!");
19463        }
19464        // check ain2
19465        if (!ain2.getType().getElement().isCompatible(__F16)) {
19466            throw new RSRuntimeException("Type mismatch with F16!");
19467        }
19468        // Verify dimensions
19469        t0 = ain1.getType();
19470        t1 = ain2.getType();
19471        if ((t0.getCount() != t1.getCount()) ||
19472            (t0.getX() != t1.getX()) ||
19473            (t0.getY() != t1.getY()) ||
19474            (t0.getZ() != t1.getZ()) ||
19475            (t0.hasFaces()   != t1.hasFaces()) ||
19476            (t0.hasMipmaps() != t1.hasMipmaps())) {
19477            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19478        }
19479
19480        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19481        aout.setAutoPadding(true);
19482        reduce(mExportReduceIdx_my_char2_half_0, new Allocation[]{ain1, ain2}, aout, sc);
19483        return new result_int(aout);
19484    }
19485
19486    private final static int mExportReduceIdx_my_char2_half_1 = 295;
19487    // in1 = "a", flattened 2-vectors
19488    // in2 = "b"
19489    public result_int reduce_my_char2_half_1(byte[] in1, short[] in2) {
19490        // Verify that "in1" is non-null.
19491        if (in1 == null) {
19492            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19493        }
19494        // Verify that the array length is a multiple of the vector size.
19495        if (in1.length % 2 != 0) {
19496            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19497        }
19498        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19499        ain1.setAutoPadding(true);
19500        ain1.copyFrom(in1);
19501        // Verify that "in2" is non-null.
19502        if (in2 == null) {
19503            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19504        }
19505        // Verify that input array lengths are the same.
19506        if (in1.length / 2 != in2.length) {
19507            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19508        }
19509        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
19510        ain2.setAutoPadding(true);
19511        ain2.copyFrom(in2);
19512
19513        result_int result = reduce_my_char2_half_1(ain1, ain2, null);
19514        result.mTempIns = new Allocation[]{ain1, ain2};
19515        return result;
19516    }
19517
19518    // ain1 = "char2 a"
19519    // ain2 = "half b"
19520    public result_int reduce_my_char2_half_1(Allocation ain1, Allocation ain2) {
19521        return reduce_my_char2_half_1(ain1, ain2, null);
19522    }
19523
19524    // ain1 = "char2 a"
19525    // ain2 = "half b"
19526    public result_int reduce_my_char2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19527        Type t0, t1;
19528        // check ain1
19529        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
19530            throw new RSRuntimeException("Type mismatch with I8_2!");
19531        }
19532        // check ain2
19533        if (!ain2.getType().getElement().isCompatible(__F16)) {
19534            throw new RSRuntimeException("Type mismatch with F16!");
19535        }
19536        // Verify dimensions
19537        t0 = ain1.getType();
19538        t1 = ain2.getType();
19539        if ((t0.getCount() != t1.getCount()) ||
19540            (t0.getX() != t1.getX()) ||
19541            (t0.getY() != t1.getY()) ||
19542            (t0.getZ() != t1.getZ()) ||
19543            (t0.hasFaces()   != t1.hasFaces()) ||
19544            (t0.hasMipmaps() != t1.hasMipmaps())) {
19545            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19546        }
19547
19548        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19549        aout.setAutoPadding(true);
19550        reduce(mExportReduceIdx_my_char2_half_1, new Allocation[]{ain1, ain2}, aout, sc);
19551        return new result_int(aout);
19552    }
19553
19554    private final static int mExportReduceIdx_my_char2_half2_0 = 296;
19555    // in1 = "a", flattened 2-vectors
19556    // in2 = "b", flattened 2-vectors
19557    public result_int reduce_my_char2_half2_0(byte[] in1, short[] in2) {
19558        // Verify that "in1" is non-null.
19559        if (in1 == null) {
19560            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19561        }
19562        // Verify that the array length is a multiple of the vector size.
19563        if (in1.length % 2 != 0) {
19564            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19565        }
19566        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19567        ain1.setAutoPadding(true);
19568        ain1.copyFrom(in1);
19569        // Verify that "in2" is non-null.
19570        if (in2 == null) {
19571            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19572        }
19573        // Verify that the array length is a multiple of the vector size.
19574        if (in2.length % 2 != 0) {
19575            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
19576        }
19577        // Verify that input array lengths are the same.
19578        if (in1.length / 2 != in2.length / 2) {
19579            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19580        }
19581        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
19582        ain2.setAutoPadding(true);
19583        ain2.copyFrom(in2);
19584
19585        result_int result = reduce_my_char2_half2_0(ain1, ain2, null);
19586        result.mTempIns = new Allocation[]{ain1, ain2};
19587        return result;
19588    }
19589
19590    // ain1 = "char2 a"
19591    // ain2 = "half2 b"
19592    public result_int reduce_my_char2_half2_0(Allocation ain1, Allocation ain2) {
19593        return reduce_my_char2_half2_0(ain1, ain2, null);
19594    }
19595
19596    // ain1 = "char2 a"
19597    // ain2 = "half2 b"
19598    public result_int reduce_my_char2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19599        Type t0, t1;
19600        // check ain1
19601        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
19602            throw new RSRuntimeException("Type mismatch with I8_2!");
19603        }
19604        // check ain2
19605        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
19606            throw new RSRuntimeException("Type mismatch with F16_2!");
19607        }
19608        // Verify dimensions
19609        t0 = ain1.getType();
19610        t1 = ain2.getType();
19611        if ((t0.getCount() != t1.getCount()) ||
19612            (t0.getX() != t1.getX()) ||
19613            (t0.getY() != t1.getY()) ||
19614            (t0.getZ() != t1.getZ()) ||
19615            (t0.hasFaces()   != t1.hasFaces()) ||
19616            (t0.hasMipmaps() != t1.hasMipmaps())) {
19617            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19618        }
19619
19620        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19621        aout.setAutoPadding(true);
19622        reduce(mExportReduceIdx_my_char2_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
19623        return new result_int(aout);
19624    }
19625
19626    private final static int mExportReduceIdx_my_char2_half2_1 = 297;
19627    // in1 = "a", flattened 2-vectors
19628    // in2 = "b", flattened 2-vectors
19629    public result_int reduce_my_char2_half2_1(byte[] in1, short[] in2) {
19630        // Verify that "in1" is non-null.
19631        if (in1 == null) {
19632            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19633        }
19634        // Verify that the array length is a multiple of the vector size.
19635        if (in1.length % 2 != 0) {
19636            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19637        }
19638        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19639        ain1.setAutoPadding(true);
19640        ain1.copyFrom(in1);
19641        // Verify that "in2" is non-null.
19642        if (in2 == null) {
19643            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19644        }
19645        // Verify that the array length is a multiple of the vector size.
19646        if (in2.length % 2 != 0) {
19647            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
19648        }
19649        // Verify that input array lengths are the same.
19650        if (in1.length / 2 != in2.length / 2) {
19651            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19652        }
19653        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
19654        ain2.setAutoPadding(true);
19655        ain2.copyFrom(in2);
19656
19657        result_int result = reduce_my_char2_half2_1(ain1, ain2, null);
19658        result.mTempIns = new Allocation[]{ain1, ain2};
19659        return result;
19660    }
19661
19662    // ain1 = "char2 a"
19663    // ain2 = "half2 b"
19664    public result_int reduce_my_char2_half2_1(Allocation ain1, Allocation ain2) {
19665        return reduce_my_char2_half2_1(ain1, ain2, null);
19666    }
19667
19668    // ain1 = "char2 a"
19669    // ain2 = "half2 b"
19670    public result_int reduce_my_char2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19671        Type t0, t1;
19672        // check ain1
19673        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
19674            throw new RSRuntimeException("Type mismatch with I8_2!");
19675        }
19676        // check ain2
19677        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
19678            throw new RSRuntimeException("Type mismatch with F16_2!");
19679        }
19680        // Verify dimensions
19681        t0 = ain1.getType();
19682        t1 = ain2.getType();
19683        if ((t0.getCount() != t1.getCount()) ||
19684            (t0.getX() != t1.getX()) ||
19685            (t0.getY() != t1.getY()) ||
19686            (t0.getZ() != t1.getZ()) ||
19687            (t0.hasFaces()   != t1.hasFaces()) ||
19688            (t0.hasMipmaps() != t1.hasMipmaps())) {
19689            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19690        }
19691
19692        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19693        aout.setAutoPadding(true);
19694        reduce(mExportReduceIdx_my_char2_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
19695        return new result_int(aout);
19696    }
19697
19698    private final static int mExportReduceIdx_my_char2_half4_0 = 298;
19699    // in1 = "a", flattened 2-vectors
19700    // in2 = "b", flattened 4-vectors
19701    public result_int reduce_my_char2_half4_0(byte[] in1, short[] in2) {
19702        // Verify that "in1" is non-null.
19703        if (in1 == null) {
19704            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19705        }
19706        // Verify that the array length is a multiple of the vector size.
19707        if (in1.length % 2 != 0) {
19708            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19709        }
19710        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19711        ain1.setAutoPadding(true);
19712        ain1.copyFrom(in1);
19713        // Verify that "in2" is non-null.
19714        if (in2 == null) {
19715            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19716        }
19717        // Verify that the array length is a multiple of the vector size.
19718        if (in2.length % 4 != 0) {
19719            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
19720        }
19721        // Verify that input array lengths are the same.
19722        if (in1.length / 2 != in2.length / 4) {
19723            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19724        }
19725        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
19726        ain2.setAutoPadding(true);
19727        ain2.copyFrom(in2);
19728
19729        result_int result = reduce_my_char2_half4_0(ain1, ain2, null);
19730        result.mTempIns = new Allocation[]{ain1, ain2};
19731        return result;
19732    }
19733
19734    // ain1 = "char2 a"
19735    // ain2 = "half4 b"
19736    public result_int reduce_my_char2_half4_0(Allocation ain1, Allocation ain2) {
19737        return reduce_my_char2_half4_0(ain1, ain2, null);
19738    }
19739
19740    // ain1 = "char2 a"
19741    // ain2 = "half4 b"
19742    public result_int reduce_my_char2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19743        Type t0, t1;
19744        // check ain1
19745        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
19746            throw new RSRuntimeException("Type mismatch with I8_2!");
19747        }
19748        // check ain2
19749        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
19750            throw new RSRuntimeException("Type mismatch with F16_4!");
19751        }
19752        // Verify dimensions
19753        t0 = ain1.getType();
19754        t1 = ain2.getType();
19755        if ((t0.getCount() != t1.getCount()) ||
19756            (t0.getX() != t1.getX()) ||
19757            (t0.getY() != t1.getY()) ||
19758            (t0.getZ() != t1.getZ()) ||
19759            (t0.hasFaces()   != t1.hasFaces()) ||
19760            (t0.hasMipmaps() != t1.hasMipmaps())) {
19761            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19762        }
19763
19764        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19765        aout.setAutoPadding(true);
19766        reduce(mExportReduceIdx_my_char2_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
19767        return new result_int(aout);
19768    }
19769
19770    private final static int mExportReduceIdx_my_char2_half4_1 = 299;
19771    // in1 = "a", flattened 2-vectors
19772    // in2 = "b", flattened 4-vectors
19773    public result_int reduce_my_char2_half4_1(byte[] in1, short[] in2) {
19774        // Verify that "in1" is non-null.
19775        if (in1 == null) {
19776            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19777        }
19778        // Verify that the array length is a multiple of the vector size.
19779        if (in1.length % 2 != 0) {
19780            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19781        }
19782        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19783        ain1.setAutoPadding(true);
19784        ain1.copyFrom(in1);
19785        // Verify that "in2" is non-null.
19786        if (in2 == null) {
19787            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19788        }
19789        // Verify that the array length is a multiple of the vector size.
19790        if (in2.length % 4 != 0) {
19791            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
19792        }
19793        // Verify that input array lengths are the same.
19794        if (in1.length / 2 != in2.length / 4) {
19795            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19796        }
19797        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
19798        ain2.setAutoPadding(true);
19799        ain2.copyFrom(in2);
19800
19801        result_int result = reduce_my_char2_half4_1(ain1, ain2, null);
19802        result.mTempIns = new Allocation[]{ain1, ain2};
19803        return result;
19804    }
19805
19806    // ain1 = "char2 a"
19807    // ain2 = "half4 b"
19808    public result_int reduce_my_char2_half4_1(Allocation ain1, Allocation ain2) {
19809        return reduce_my_char2_half4_1(ain1, ain2, null);
19810    }
19811
19812    // ain1 = "char2 a"
19813    // ain2 = "half4 b"
19814    public result_int reduce_my_char2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19815        Type t0, t1;
19816        // check ain1
19817        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
19818            throw new RSRuntimeException("Type mismatch with I8_2!");
19819        }
19820        // check ain2
19821        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
19822            throw new RSRuntimeException("Type mismatch with F16_4!");
19823        }
19824        // Verify dimensions
19825        t0 = ain1.getType();
19826        t1 = ain2.getType();
19827        if ((t0.getCount() != t1.getCount()) ||
19828            (t0.getX() != t1.getX()) ||
19829            (t0.getY() != t1.getY()) ||
19830            (t0.getZ() != t1.getZ()) ||
19831            (t0.hasFaces()   != t1.hasFaces()) ||
19832            (t0.hasMipmaps() != t1.hasMipmaps())) {
19833            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19834        }
19835
19836        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19837        aout.setAutoPadding(true);
19838        reduce(mExportReduceIdx_my_char2_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
19839        return new result_int(aout);
19840    }
19841
19842    private final static int mExportReduceIdx_my_char2_float_0 = 300;
19843    // in1 = "a", flattened 2-vectors
19844    // in2 = "b"
19845    public result_int reduce_my_char2_float_0(byte[] in1, float[] in2) {
19846        // Verify that "in1" is non-null.
19847        if (in1 == null) {
19848            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19849        }
19850        // Verify that the array length is a multiple of the vector size.
19851        if (in1.length % 2 != 0) {
19852            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19853        }
19854        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19855        ain1.setAutoPadding(true);
19856        ain1.copyFrom(in1);
19857        // Verify that "in2" is non-null.
19858        if (in2 == null) {
19859            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19860        }
19861        // Verify that input array lengths are the same.
19862        if (in1.length / 2 != in2.length) {
19863            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19864        }
19865        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
19866        ain2.setAutoPadding(true);
19867        ain2.copyFrom(in2);
19868
19869        result_int result = reduce_my_char2_float_0(ain1, ain2, null);
19870        result.mTempIns = new Allocation[]{ain1, ain2};
19871        return result;
19872    }
19873
19874    // ain1 = "char2 a"
19875    // ain2 = "float b"
19876    public result_int reduce_my_char2_float_0(Allocation ain1, Allocation ain2) {
19877        return reduce_my_char2_float_0(ain1, ain2, null);
19878    }
19879
19880    // ain1 = "char2 a"
19881    // ain2 = "float b"
19882    public result_int reduce_my_char2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19883        Type t0, t1;
19884        // check ain1
19885        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
19886            throw new RSRuntimeException("Type mismatch with I8_2!");
19887        }
19888        // check ain2
19889        if (!ain2.getType().getElement().isCompatible(__F32)) {
19890            throw new RSRuntimeException("Type mismatch with F32!");
19891        }
19892        // Verify dimensions
19893        t0 = ain1.getType();
19894        t1 = ain2.getType();
19895        if ((t0.getCount() != t1.getCount()) ||
19896            (t0.getX() != t1.getX()) ||
19897            (t0.getY() != t1.getY()) ||
19898            (t0.getZ() != t1.getZ()) ||
19899            (t0.hasFaces()   != t1.hasFaces()) ||
19900            (t0.hasMipmaps() != t1.hasMipmaps())) {
19901            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19902        }
19903
19904        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19905        aout.setAutoPadding(true);
19906        reduce(mExportReduceIdx_my_char2_float_0, new Allocation[]{ain1, ain2}, aout, sc);
19907        return new result_int(aout);
19908    }
19909
19910    private final static int mExportReduceIdx_my_char2_float_1 = 301;
19911    // in1 = "a", flattened 2-vectors
19912    // in2 = "b"
19913    public result_int reduce_my_char2_float_1(byte[] in1, float[] in2) {
19914        // Verify that "in1" is non-null.
19915        if (in1 == null) {
19916            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19917        }
19918        // Verify that the array length is a multiple of the vector size.
19919        if (in1.length % 2 != 0) {
19920            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19921        }
19922        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19923        ain1.setAutoPadding(true);
19924        ain1.copyFrom(in1);
19925        // Verify that "in2" is non-null.
19926        if (in2 == null) {
19927            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19928        }
19929        // Verify that input array lengths are the same.
19930        if (in1.length / 2 != in2.length) {
19931            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
19932        }
19933        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
19934        ain2.setAutoPadding(true);
19935        ain2.copyFrom(in2);
19936
19937        result_int result = reduce_my_char2_float_1(ain1, ain2, null);
19938        result.mTempIns = new Allocation[]{ain1, ain2};
19939        return result;
19940    }
19941
19942    // ain1 = "char2 a"
19943    // ain2 = "float b"
19944    public result_int reduce_my_char2_float_1(Allocation ain1, Allocation ain2) {
19945        return reduce_my_char2_float_1(ain1, ain2, null);
19946    }
19947
19948    // ain1 = "char2 a"
19949    // ain2 = "float b"
19950    public result_int reduce_my_char2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
19951        Type t0, t1;
19952        // check ain1
19953        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
19954            throw new RSRuntimeException("Type mismatch with I8_2!");
19955        }
19956        // check ain2
19957        if (!ain2.getType().getElement().isCompatible(__F32)) {
19958            throw new RSRuntimeException("Type mismatch with F32!");
19959        }
19960        // Verify dimensions
19961        t0 = ain1.getType();
19962        t1 = ain2.getType();
19963        if ((t0.getCount() != t1.getCount()) ||
19964            (t0.getX() != t1.getX()) ||
19965            (t0.getY() != t1.getY()) ||
19966            (t0.getZ() != t1.getZ()) ||
19967            (t0.hasFaces()   != t1.hasFaces()) ||
19968            (t0.hasMipmaps() != t1.hasMipmaps())) {
19969            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
19970        }
19971
19972        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
19973        aout.setAutoPadding(true);
19974        reduce(mExportReduceIdx_my_char2_float_1, new Allocation[]{ain1, ain2}, aout, sc);
19975        return new result_int(aout);
19976    }
19977
19978    private final static int mExportReduceIdx_my_char2_float2_0 = 302;
19979    // in1 = "a", flattened 2-vectors
19980    // in2 = "b", flattened 2-vectors
19981    public result_int reduce_my_char2_float2_0(byte[] in1, float[] in2) {
19982        // Verify that "in1" is non-null.
19983        if (in1 == null) {
19984            throw new RSIllegalArgumentException("Array \"in1\" is null!");
19985        }
19986        // Verify that the array length is a multiple of the vector size.
19987        if (in1.length % 2 != 0) {
19988            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
19989        }
19990        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
19991        ain1.setAutoPadding(true);
19992        ain1.copyFrom(in1);
19993        // Verify that "in2" is non-null.
19994        if (in2 == null) {
19995            throw new RSIllegalArgumentException("Array \"in2\" is null!");
19996        }
19997        // Verify that the array length is a multiple of the vector size.
19998        if (in2.length % 2 != 0) {
19999            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
20000        }
20001        // Verify that input array lengths are the same.
20002        if (in1.length / 2 != in2.length / 2) {
20003            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20004        }
20005        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
20006        ain2.setAutoPadding(true);
20007        ain2.copyFrom(in2);
20008
20009        result_int result = reduce_my_char2_float2_0(ain1, ain2, null);
20010        result.mTempIns = new Allocation[]{ain1, ain2};
20011        return result;
20012    }
20013
20014    // ain1 = "char2 a"
20015    // ain2 = "float2 b"
20016    public result_int reduce_my_char2_float2_0(Allocation ain1, Allocation ain2) {
20017        return reduce_my_char2_float2_0(ain1, ain2, null);
20018    }
20019
20020    // ain1 = "char2 a"
20021    // ain2 = "float2 b"
20022    public result_int reduce_my_char2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20023        Type t0, t1;
20024        // check ain1
20025        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20026            throw new RSRuntimeException("Type mismatch with I8_2!");
20027        }
20028        // check ain2
20029        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
20030            throw new RSRuntimeException("Type mismatch with F32_2!");
20031        }
20032        // Verify dimensions
20033        t0 = ain1.getType();
20034        t1 = ain2.getType();
20035        if ((t0.getCount() != t1.getCount()) ||
20036            (t0.getX() != t1.getX()) ||
20037            (t0.getY() != t1.getY()) ||
20038            (t0.getZ() != t1.getZ()) ||
20039            (t0.hasFaces()   != t1.hasFaces()) ||
20040            (t0.hasMipmaps() != t1.hasMipmaps())) {
20041            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20042        }
20043
20044        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20045        aout.setAutoPadding(true);
20046        reduce(mExportReduceIdx_my_char2_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
20047        return new result_int(aout);
20048    }
20049
20050    private final static int mExportReduceIdx_my_char2_float2_1 = 303;
20051    // in1 = "a", flattened 2-vectors
20052    // in2 = "b", flattened 2-vectors
20053    public result_int reduce_my_char2_float2_1(byte[] in1, float[] in2) {
20054        // Verify that "in1" is non-null.
20055        if (in1 == null) {
20056            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20057        }
20058        // Verify that the array length is a multiple of the vector size.
20059        if (in1.length % 2 != 0) {
20060            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20061        }
20062        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20063        ain1.setAutoPadding(true);
20064        ain1.copyFrom(in1);
20065        // Verify that "in2" is non-null.
20066        if (in2 == null) {
20067            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20068        }
20069        // Verify that the array length is a multiple of the vector size.
20070        if (in2.length % 2 != 0) {
20071            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
20072        }
20073        // Verify that input array lengths are the same.
20074        if (in1.length / 2 != in2.length / 2) {
20075            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20076        }
20077        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
20078        ain2.setAutoPadding(true);
20079        ain2.copyFrom(in2);
20080
20081        result_int result = reduce_my_char2_float2_1(ain1, ain2, null);
20082        result.mTempIns = new Allocation[]{ain1, ain2};
20083        return result;
20084    }
20085
20086    // ain1 = "char2 a"
20087    // ain2 = "float2 b"
20088    public result_int reduce_my_char2_float2_1(Allocation ain1, Allocation ain2) {
20089        return reduce_my_char2_float2_1(ain1, ain2, null);
20090    }
20091
20092    // ain1 = "char2 a"
20093    // ain2 = "float2 b"
20094    public result_int reduce_my_char2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20095        Type t0, t1;
20096        // check ain1
20097        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20098            throw new RSRuntimeException("Type mismatch with I8_2!");
20099        }
20100        // check ain2
20101        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
20102            throw new RSRuntimeException("Type mismatch with F32_2!");
20103        }
20104        // Verify dimensions
20105        t0 = ain1.getType();
20106        t1 = ain2.getType();
20107        if ((t0.getCount() != t1.getCount()) ||
20108            (t0.getX() != t1.getX()) ||
20109            (t0.getY() != t1.getY()) ||
20110            (t0.getZ() != t1.getZ()) ||
20111            (t0.hasFaces()   != t1.hasFaces()) ||
20112            (t0.hasMipmaps() != t1.hasMipmaps())) {
20113            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20114        }
20115
20116        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20117        aout.setAutoPadding(true);
20118        reduce(mExportReduceIdx_my_char2_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
20119        return new result_int(aout);
20120    }
20121
20122    private final static int mExportReduceIdx_my_char2_float4_0 = 304;
20123    // in1 = "a", flattened 2-vectors
20124    // in2 = "b", flattened 4-vectors
20125    public result_int reduce_my_char2_float4_0(byte[] in1, float[] in2) {
20126        // Verify that "in1" is non-null.
20127        if (in1 == null) {
20128            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20129        }
20130        // Verify that the array length is a multiple of the vector size.
20131        if (in1.length % 2 != 0) {
20132            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20133        }
20134        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20135        ain1.setAutoPadding(true);
20136        ain1.copyFrom(in1);
20137        // Verify that "in2" is non-null.
20138        if (in2 == null) {
20139            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20140        }
20141        // Verify that the array length is a multiple of the vector size.
20142        if (in2.length % 4 != 0) {
20143            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
20144        }
20145        // Verify that input array lengths are the same.
20146        if (in1.length / 2 != in2.length / 4) {
20147            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20148        }
20149        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
20150        ain2.setAutoPadding(true);
20151        ain2.copyFrom(in2);
20152
20153        result_int result = reduce_my_char2_float4_0(ain1, ain2, null);
20154        result.mTempIns = new Allocation[]{ain1, ain2};
20155        return result;
20156    }
20157
20158    // ain1 = "char2 a"
20159    // ain2 = "float4 b"
20160    public result_int reduce_my_char2_float4_0(Allocation ain1, Allocation ain2) {
20161        return reduce_my_char2_float4_0(ain1, ain2, null);
20162    }
20163
20164    // ain1 = "char2 a"
20165    // ain2 = "float4 b"
20166    public result_int reduce_my_char2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20167        Type t0, t1;
20168        // check ain1
20169        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20170            throw new RSRuntimeException("Type mismatch with I8_2!");
20171        }
20172        // check ain2
20173        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
20174            throw new RSRuntimeException("Type mismatch with F32_4!");
20175        }
20176        // Verify dimensions
20177        t0 = ain1.getType();
20178        t1 = ain2.getType();
20179        if ((t0.getCount() != t1.getCount()) ||
20180            (t0.getX() != t1.getX()) ||
20181            (t0.getY() != t1.getY()) ||
20182            (t0.getZ() != t1.getZ()) ||
20183            (t0.hasFaces()   != t1.hasFaces()) ||
20184            (t0.hasMipmaps() != t1.hasMipmaps())) {
20185            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20186        }
20187
20188        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20189        aout.setAutoPadding(true);
20190        reduce(mExportReduceIdx_my_char2_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
20191        return new result_int(aout);
20192    }
20193
20194    private final static int mExportReduceIdx_my_char2_float4_1 = 305;
20195    // in1 = "a", flattened 2-vectors
20196    // in2 = "b", flattened 4-vectors
20197    public result_int reduce_my_char2_float4_1(byte[] in1, float[] in2) {
20198        // Verify that "in1" is non-null.
20199        if (in1 == null) {
20200            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20201        }
20202        // Verify that the array length is a multiple of the vector size.
20203        if (in1.length % 2 != 0) {
20204            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20205        }
20206        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20207        ain1.setAutoPadding(true);
20208        ain1.copyFrom(in1);
20209        // Verify that "in2" is non-null.
20210        if (in2 == null) {
20211            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20212        }
20213        // Verify that the array length is a multiple of the vector size.
20214        if (in2.length % 4 != 0) {
20215            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
20216        }
20217        // Verify that input array lengths are the same.
20218        if (in1.length / 2 != in2.length / 4) {
20219            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20220        }
20221        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
20222        ain2.setAutoPadding(true);
20223        ain2.copyFrom(in2);
20224
20225        result_int result = reduce_my_char2_float4_1(ain1, ain2, null);
20226        result.mTempIns = new Allocation[]{ain1, ain2};
20227        return result;
20228    }
20229
20230    // ain1 = "char2 a"
20231    // ain2 = "float4 b"
20232    public result_int reduce_my_char2_float4_1(Allocation ain1, Allocation ain2) {
20233        return reduce_my_char2_float4_1(ain1, ain2, null);
20234    }
20235
20236    // ain1 = "char2 a"
20237    // ain2 = "float4 b"
20238    public result_int reduce_my_char2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20239        Type t0, t1;
20240        // check ain1
20241        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20242            throw new RSRuntimeException("Type mismatch with I8_2!");
20243        }
20244        // check ain2
20245        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
20246            throw new RSRuntimeException("Type mismatch with F32_4!");
20247        }
20248        // Verify dimensions
20249        t0 = ain1.getType();
20250        t1 = ain2.getType();
20251        if ((t0.getCount() != t1.getCount()) ||
20252            (t0.getX() != t1.getX()) ||
20253            (t0.getY() != t1.getY()) ||
20254            (t0.getZ() != t1.getZ()) ||
20255            (t0.hasFaces()   != t1.hasFaces()) ||
20256            (t0.hasMipmaps() != t1.hasMipmaps())) {
20257            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20258        }
20259
20260        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20261        aout.setAutoPadding(true);
20262        reduce(mExportReduceIdx_my_char2_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
20263        return new result_int(aout);
20264    }
20265
20266    private final static int mExportReduceIdx_my_char2_char_0 = 306;
20267    // in1 = "a", flattened 2-vectors
20268    // in2 = "b"
20269    public result_int reduce_my_char2_char_0(byte[] in1, byte[] in2) {
20270        // Verify that "in1" is non-null.
20271        if (in1 == null) {
20272            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20273        }
20274        // Verify that the array length is a multiple of the vector size.
20275        if (in1.length % 2 != 0) {
20276            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20277        }
20278        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20279        ain1.setAutoPadding(true);
20280        ain1.copyFrom(in1);
20281        // Verify that "in2" is non-null.
20282        if (in2 == null) {
20283            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20284        }
20285        // Verify that input array lengths are the same.
20286        if (in1.length / 2 != in2.length) {
20287            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20288        }
20289        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
20290        ain2.setAutoPadding(true);
20291        ain2.copyFrom(in2);
20292
20293        result_int result = reduce_my_char2_char_0(ain1, ain2, null);
20294        result.mTempIns = new Allocation[]{ain1, ain2};
20295        return result;
20296    }
20297
20298    // ain1 = "char2 a"
20299    // ain2 = "char b"
20300    public result_int reduce_my_char2_char_0(Allocation ain1, Allocation ain2) {
20301        return reduce_my_char2_char_0(ain1, ain2, null);
20302    }
20303
20304    // ain1 = "char2 a"
20305    // ain2 = "char b"
20306    public result_int reduce_my_char2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20307        Type t0, t1;
20308        // check ain1
20309        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20310            throw new RSRuntimeException("Type mismatch with I8_2!");
20311        }
20312        // check ain2
20313        if (!ain2.getType().getElement().isCompatible(__I8)) {
20314            throw new RSRuntimeException("Type mismatch with I8!");
20315        }
20316        // Verify dimensions
20317        t0 = ain1.getType();
20318        t1 = ain2.getType();
20319        if ((t0.getCount() != t1.getCount()) ||
20320            (t0.getX() != t1.getX()) ||
20321            (t0.getY() != t1.getY()) ||
20322            (t0.getZ() != t1.getZ()) ||
20323            (t0.hasFaces()   != t1.hasFaces()) ||
20324            (t0.hasMipmaps() != t1.hasMipmaps())) {
20325            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20326        }
20327
20328        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20329        aout.setAutoPadding(true);
20330        reduce(mExportReduceIdx_my_char2_char_0, new Allocation[]{ain1, ain2}, aout, sc);
20331        return new result_int(aout);
20332    }
20333
20334    private final static int mExportReduceIdx_my_char2_char_1 = 307;
20335    // in1 = "a", flattened 2-vectors
20336    // in2 = "b"
20337    public result_int reduce_my_char2_char_1(byte[] in1, byte[] in2) {
20338        // Verify that "in1" is non-null.
20339        if (in1 == null) {
20340            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20341        }
20342        // Verify that the array length is a multiple of the vector size.
20343        if (in1.length % 2 != 0) {
20344            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20345        }
20346        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20347        ain1.setAutoPadding(true);
20348        ain1.copyFrom(in1);
20349        // Verify that "in2" is non-null.
20350        if (in2 == null) {
20351            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20352        }
20353        // Verify that input array lengths are the same.
20354        if (in1.length / 2 != in2.length) {
20355            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20356        }
20357        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
20358        ain2.setAutoPadding(true);
20359        ain2.copyFrom(in2);
20360
20361        result_int result = reduce_my_char2_char_1(ain1, ain2, null);
20362        result.mTempIns = new Allocation[]{ain1, ain2};
20363        return result;
20364    }
20365
20366    // ain1 = "char2 a"
20367    // ain2 = "char b"
20368    public result_int reduce_my_char2_char_1(Allocation ain1, Allocation ain2) {
20369        return reduce_my_char2_char_1(ain1, ain2, null);
20370    }
20371
20372    // ain1 = "char2 a"
20373    // ain2 = "char b"
20374    public result_int reduce_my_char2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20375        Type t0, t1;
20376        // check ain1
20377        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20378            throw new RSRuntimeException("Type mismatch with I8_2!");
20379        }
20380        // check ain2
20381        if (!ain2.getType().getElement().isCompatible(__I8)) {
20382            throw new RSRuntimeException("Type mismatch with I8!");
20383        }
20384        // Verify dimensions
20385        t0 = ain1.getType();
20386        t1 = ain2.getType();
20387        if ((t0.getCount() != t1.getCount()) ||
20388            (t0.getX() != t1.getX()) ||
20389            (t0.getY() != t1.getY()) ||
20390            (t0.getZ() != t1.getZ()) ||
20391            (t0.hasFaces()   != t1.hasFaces()) ||
20392            (t0.hasMipmaps() != t1.hasMipmaps())) {
20393            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20394        }
20395
20396        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20397        aout.setAutoPadding(true);
20398        reduce(mExportReduceIdx_my_char2_char_1, new Allocation[]{ain1, ain2}, aout, sc);
20399        return new result_int(aout);
20400    }
20401
20402    private final static int mExportReduceIdx_my_char2_char2_0 = 308;
20403    // in1 = "a", flattened 2-vectors
20404    // in2 = "b", flattened 2-vectors
20405    public result_int reduce_my_char2_char2_0(byte[] in1, byte[] in2) {
20406        // Verify that "in1" is non-null.
20407        if (in1 == null) {
20408            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20409        }
20410        // Verify that the array length is a multiple of the vector size.
20411        if (in1.length % 2 != 0) {
20412            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20413        }
20414        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20415        ain1.setAutoPadding(true);
20416        ain1.copyFrom(in1);
20417        // Verify that "in2" is non-null.
20418        if (in2 == null) {
20419            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20420        }
20421        // Verify that the array length is a multiple of the vector size.
20422        if (in2.length % 2 != 0) {
20423            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
20424        }
20425        // Verify that input array lengths are the same.
20426        if (in1.length / 2 != in2.length / 2) {
20427            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20428        }
20429        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
20430        ain2.setAutoPadding(true);
20431        ain2.copyFrom(in2);
20432
20433        result_int result = reduce_my_char2_char2_0(ain1, ain2, null);
20434        result.mTempIns = new Allocation[]{ain1, ain2};
20435        return result;
20436    }
20437
20438    // ain1 = "char2 a"
20439    // ain2 = "char2 b"
20440    public result_int reduce_my_char2_char2_0(Allocation ain1, Allocation ain2) {
20441        return reduce_my_char2_char2_0(ain1, ain2, null);
20442    }
20443
20444    // ain1 = "char2 a"
20445    // ain2 = "char2 b"
20446    public result_int reduce_my_char2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20447        Type t0, t1;
20448        // check ain1
20449        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20450            throw new RSRuntimeException("Type mismatch with I8_2!");
20451        }
20452        // check ain2
20453        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
20454            throw new RSRuntimeException("Type mismatch with I8_2!");
20455        }
20456        // Verify dimensions
20457        t0 = ain1.getType();
20458        t1 = ain2.getType();
20459        if ((t0.getCount() != t1.getCount()) ||
20460            (t0.getX() != t1.getX()) ||
20461            (t0.getY() != t1.getY()) ||
20462            (t0.getZ() != t1.getZ()) ||
20463            (t0.hasFaces()   != t1.hasFaces()) ||
20464            (t0.hasMipmaps() != t1.hasMipmaps())) {
20465            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20466        }
20467
20468        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20469        aout.setAutoPadding(true);
20470        reduce(mExportReduceIdx_my_char2_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
20471        return new result_int(aout);
20472    }
20473
20474    private final static int mExportReduceIdx_my_char2_char2_1 = 309;
20475    // in1 = "a", flattened 2-vectors
20476    // in2 = "b", flattened 2-vectors
20477    public result_int reduce_my_char2_char2_1(byte[] in1, byte[] in2) {
20478        // Verify that "in1" is non-null.
20479        if (in1 == null) {
20480            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20481        }
20482        // Verify that the array length is a multiple of the vector size.
20483        if (in1.length % 2 != 0) {
20484            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20485        }
20486        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20487        ain1.setAutoPadding(true);
20488        ain1.copyFrom(in1);
20489        // Verify that "in2" is non-null.
20490        if (in2 == null) {
20491            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20492        }
20493        // Verify that the array length is a multiple of the vector size.
20494        if (in2.length % 2 != 0) {
20495            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
20496        }
20497        // Verify that input array lengths are the same.
20498        if (in1.length / 2 != in2.length / 2) {
20499            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20500        }
20501        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
20502        ain2.setAutoPadding(true);
20503        ain2.copyFrom(in2);
20504
20505        result_int result = reduce_my_char2_char2_1(ain1, ain2, null);
20506        result.mTempIns = new Allocation[]{ain1, ain2};
20507        return result;
20508    }
20509
20510    // ain1 = "char2 a"
20511    // ain2 = "char2 b"
20512    public result_int reduce_my_char2_char2_1(Allocation ain1, Allocation ain2) {
20513        return reduce_my_char2_char2_1(ain1, ain2, null);
20514    }
20515
20516    // ain1 = "char2 a"
20517    // ain2 = "char2 b"
20518    public result_int reduce_my_char2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20519        Type t0, t1;
20520        // check ain1
20521        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20522            throw new RSRuntimeException("Type mismatch with I8_2!");
20523        }
20524        // check ain2
20525        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
20526            throw new RSRuntimeException("Type mismatch with I8_2!");
20527        }
20528        // Verify dimensions
20529        t0 = ain1.getType();
20530        t1 = ain2.getType();
20531        if ((t0.getCount() != t1.getCount()) ||
20532            (t0.getX() != t1.getX()) ||
20533            (t0.getY() != t1.getY()) ||
20534            (t0.getZ() != t1.getZ()) ||
20535            (t0.hasFaces()   != t1.hasFaces()) ||
20536            (t0.hasMipmaps() != t1.hasMipmaps())) {
20537            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20538        }
20539
20540        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20541        aout.setAutoPadding(true);
20542        reduce(mExportReduceIdx_my_char2_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
20543        return new result_int(aout);
20544    }
20545
20546    private final static int mExportReduceIdx_my_char2_char4_0 = 310;
20547    // in1 = "a", flattened 2-vectors
20548    // in2 = "b", flattened 4-vectors
20549    public result_int reduce_my_char2_char4_0(byte[] in1, byte[] in2) {
20550        // Verify that "in1" is non-null.
20551        if (in1 == null) {
20552            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20553        }
20554        // Verify that the array length is a multiple of the vector size.
20555        if (in1.length % 2 != 0) {
20556            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20557        }
20558        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20559        ain1.setAutoPadding(true);
20560        ain1.copyFrom(in1);
20561        // Verify that "in2" is non-null.
20562        if (in2 == null) {
20563            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20564        }
20565        // Verify that the array length is a multiple of the vector size.
20566        if (in2.length % 4 != 0) {
20567            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
20568        }
20569        // Verify that input array lengths are the same.
20570        if (in1.length / 2 != in2.length / 4) {
20571            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20572        }
20573        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
20574        ain2.setAutoPadding(true);
20575        ain2.copyFrom(in2);
20576
20577        result_int result = reduce_my_char2_char4_0(ain1, ain2, null);
20578        result.mTempIns = new Allocation[]{ain1, ain2};
20579        return result;
20580    }
20581
20582    // ain1 = "char2 a"
20583    // ain2 = "char4 b"
20584    public result_int reduce_my_char2_char4_0(Allocation ain1, Allocation ain2) {
20585        return reduce_my_char2_char4_0(ain1, ain2, null);
20586    }
20587
20588    // ain1 = "char2 a"
20589    // ain2 = "char4 b"
20590    public result_int reduce_my_char2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20591        Type t0, t1;
20592        // check ain1
20593        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20594            throw new RSRuntimeException("Type mismatch with I8_2!");
20595        }
20596        // check ain2
20597        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
20598            throw new RSRuntimeException("Type mismatch with I8_4!");
20599        }
20600        // Verify dimensions
20601        t0 = ain1.getType();
20602        t1 = ain2.getType();
20603        if ((t0.getCount() != t1.getCount()) ||
20604            (t0.getX() != t1.getX()) ||
20605            (t0.getY() != t1.getY()) ||
20606            (t0.getZ() != t1.getZ()) ||
20607            (t0.hasFaces()   != t1.hasFaces()) ||
20608            (t0.hasMipmaps() != t1.hasMipmaps())) {
20609            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20610        }
20611
20612        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20613        aout.setAutoPadding(true);
20614        reduce(mExportReduceIdx_my_char2_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
20615        return new result_int(aout);
20616    }
20617
20618    private final static int mExportReduceIdx_my_char2_char4_1 = 311;
20619    // in1 = "a", flattened 2-vectors
20620    // in2 = "b", flattened 4-vectors
20621    public result_int reduce_my_char2_char4_1(byte[] in1, byte[] in2) {
20622        // Verify that "in1" is non-null.
20623        if (in1 == null) {
20624            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20625        }
20626        // Verify that the array length is a multiple of the vector size.
20627        if (in1.length % 2 != 0) {
20628            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20629        }
20630        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20631        ain1.setAutoPadding(true);
20632        ain1.copyFrom(in1);
20633        // Verify that "in2" is non-null.
20634        if (in2 == null) {
20635            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20636        }
20637        // Verify that the array length is a multiple of the vector size.
20638        if (in2.length % 4 != 0) {
20639            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
20640        }
20641        // Verify that input array lengths are the same.
20642        if (in1.length / 2 != in2.length / 4) {
20643            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20644        }
20645        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
20646        ain2.setAutoPadding(true);
20647        ain2.copyFrom(in2);
20648
20649        result_int result = reduce_my_char2_char4_1(ain1, ain2, null);
20650        result.mTempIns = new Allocation[]{ain1, ain2};
20651        return result;
20652    }
20653
20654    // ain1 = "char2 a"
20655    // ain2 = "char4 b"
20656    public result_int reduce_my_char2_char4_1(Allocation ain1, Allocation ain2) {
20657        return reduce_my_char2_char4_1(ain1, ain2, null);
20658    }
20659
20660    // ain1 = "char2 a"
20661    // ain2 = "char4 b"
20662    public result_int reduce_my_char2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20663        Type t0, t1;
20664        // check ain1
20665        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20666            throw new RSRuntimeException("Type mismatch with I8_2!");
20667        }
20668        // check ain2
20669        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
20670            throw new RSRuntimeException("Type mismatch with I8_4!");
20671        }
20672        // Verify dimensions
20673        t0 = ain1.getType();
20674        t1 = ain2.getType();
20675        if ((t0.getCount() != t1.getCount()) ||
20676            (t0.getX() != t1.getX()) ||
20677            (t0.getY() != t1.getY()) ||
20678            (t0.getZ() != t1.getZ()) ||
20679            (t0.hasFaces()   != t1.hasFaces()) ||
20680            (t0.hasMipmaps() != t1.hasMipmaps())) {
20681            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20682        }
20683
20684        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20685        aout.setAutoPadding(true);
20686        reduce(mExportReduceIdx_my_char2_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
20687        return new result_int(aout);
20688    }
20689
20690    private final static int mExportReduceIdx_my_char2_short_0 = 312;
20691    // in1 = "a", flattened 2-vectors
20692    // in2 = "b"
20693    public result_int reduce_my_char2_short_0(byte[] in1, short[] in2) {
20694        // Verify that "in1" is non-null.
20695        if (in1 == null) {
20696            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20697        }
20698        // Verify that the array length is a multiple of the vector size.
20699        if (in1.length % 2 != 0) {
20700            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20701        }
20702        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20703        ain1.setAutoPadding(true);
20704        ain1.copyFrom(in1);
20705        // Verify that "in2" is non-null.
20706        if (in2 == null) {
20707            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20708        }
20709        // Verify that input array lengths are the same.
20710        if (in1.length / 2 != in2.length) {
20711            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20712        }
20713        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
20714        ain2.setAutoPadding(true);
20715        ain2.copyFrom(in2);
20716
20717        result_int result = reduce_my_char2_short_0(ain1, ain2, null);
20718        result.mTempIns = new Allocation[]{ain1, ain2};
20719        return result;
20720    }
20721
20722    // ain1 = "char2 a"
20723    // ain2 = "short b"
20724    public result_int reduce_my_char2_short_0(Allocation ain1, Allocation ain2) {
20725        return reduce_my_char2_short_0(ain1, ain2, null);
20726    }
20727
20728    // ain1 = "char2 a"
20729    // ain2 = "short b"
20730    public result_int reduce_my_char2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20731        Type t0, t1;
20732        // check ain1
20733        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20734            throw new RSRuntimeException("Type mismatch with I8_2!");
20735        }
20736        // check ain2
20737        if (!ain2.getType().getElement().isCompatible(__I16)) {
20738            throw new RSRuntimeException("Type mismatch with I16!");
20739        }
20740        // Verify dimensions
20741        t0 = ain1.getType();
20742        t1 = ain2.getType();
20743        if ((t0.getCount() != t1.getCount()) ||
20744            (t0.getX() != t1.getX()) ||
20745            (t0.getY() != t1.getY()) ||
20746            (t0.getZ() != t1.getZ()) ||
20747            (t0.hasFaces()   != t1.hasFaces()) ||
20748            (t0.hasMipmaps() != t1.hasMipmaps())) {
20749            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20750        }
20751
20752        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20753        aout.setAutoPadding(true);
20754        reduce(mExportReduceIdx_my_char2_short_0, new Allocation[]{ain1, ain2}, aout, sc);
20755        return new result_int(aout);
20756    }
20757
20758    private final static int mExportReduceIdx_my_char2_short_1 = 313;
20759    // in1 = "a", flattened 2-vectors
20760    // in2 = "b"
20761    public result_int reduce_my_char2_short_1(byte[] in1, short[] in2) {
20762        // Verify that "in1" is non-null.
20763        if (in1 == null) {
20764            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20765        }
20766        // Verify that the array length is a multiple of the vector size.
20767        if (in1.length % 2 != 0) {
20768            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20769        }
20770        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20771        ain1.setAutoPadding(true);
20772        ain1.copyFrom(in1);
20773        // Verify that "in2" is non-null.
20774        if (in2 == null) {
20775            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20776        }
20777        // Verify that input array lengths are the same.
20778        if (in1.length / 2 != in2.length) {
20779            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20780        }
20781        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
20782        ain2.setAutoPadding(true);
20783        ain2.copyFrom(in2);
20784
20785        result_int result = reduce_my_char2_short_1(ain1, ain2, null);
20786        result.mTempIns = new Allocation[]{ain1, ain2};
20787        return result;
20788    }
20789
20790    // ain1 = "char2 a"
20791    // ain2 = "short b"
20792    public result_int reduce_my_char2_short_1(Allocation ain1, Allocation ain2) {
20793        return reduce_my_char2_short_1(ain1, ain2, null);
20794    }
20795
20796    // ain1 = "char2 a"
20797    // ain2 = "short b"
20798    public result_int reduce_my_char2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20799        Type t0, t1;
20800        // check ain1
20801        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20802            throw new RSRuntimeException("Type mismatch with I8_2!");
20803        }
20804        // check ain2
20805        if (!ain2.getType().getElement().isCompatible(__I16)) {
20806            throw new RSRuntimeException("Type mismatch with I16!");
20807        }
20808        // Verify dimensions
20809        t0 = ain1.getType();
20810        t1 = ain2.getType();
20811        if ((t0.getCount() != t1.getCount()) ||
20812            (t0.getX() != t1.getX()) ||
20813            (t0.getY() != t1.getY()) ||
20814            (t0.getZ() != t1.getZ()) ||
20815            (t0.hasFaces()   != t1.hasFaces()) ||
20816            (t0.hasMipmaps() != t1.hasMipmaps())) {
20817            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20818        }
20819
20820        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20821        aout.setAutoPadding(true);
20822        reduce(mExportReduceIdx_my_char2_short_1, new Allocation[]{ain1, ain2}, aout, sc);
20823        return new result_int(aout);
20824    }
20825
20826    private final static int mExportReduceIdx_my_char2_short2_0 = 314;
20827    // in1 = "a", flattened 2-vectors
20828    // in2 = "b", flattened 2-vectors
20829    public result_int reduce_my_char2_short2_0(byte[] in1, short[] in2) {
20830        // Verify that "in1" is non-null.
20831        if (in1 == null) {
20832            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20833        }
20834        // Verify that the array length is a multiple of the vector size.
20835        if (in1.length % 2 != 0) {
20836            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20837        }
20838        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20839        ain1.setAutoPadding(true);
20840        ain1.copyFrom(in1);
20841        // Verify that "in2" is non-null.
20842        if (in2 == null) {
20843            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20844        }
20845        // Verify that the array length is a multiple of the vector size.
20846        if (in2.length % 2 != 0) {
20847            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
20848        }
20849        // Verify that input array lengths are the same.
20850        if (in1.length / 2 != in2.length / 2) {
20851            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20852        }
20853        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
20854        ain2.setAutoPadding(true);
20855        ain2.copyFrom(in2);
20856
20857        result_int result = reduce_my_char2_short2_0(ain1, ain2, null);
20858        result.mTempIns = new Allocation[]{ain1, ain2};
20859        return result;
20860    }
20861
20862    // ain1 = "char2 a"
20863    // ain2 = "short2 b"
20864    public result_int reduce_my_char2_short2_0(Allocation ain1, Allocation ain2) {
20865        return reduce_my_char2_short2_0(ain1, ain2, null);
20866    }
20867
20868    // ain1 = "char2 a"
20869    // ain2 = "short2 b"
20870    public result_int reduce_my_char2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20871        Type t0, t1;
20872        // check ain1
20873        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20874            throw new RSRuntimeException("Type mismatch with I8_2!");
20875        }
20876        // check ain2
20877        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
20878            throw new RSRuntimeException("Type mismatch with I16_2!");
20879        }
20880        // Verify dimensions
20881        t0 = ain1.getType();
20882        t1 = ain2.getType();
20883        if ((t0.getCount() != t1.getCount()) ||
20884            (t0.getX() != t1.getX()) ||
20885            (t0.getY() != t1.getY()) ||
20886            (t0.getZ() != t1.getZ()) ||
20887            (t0.hasFaces()   != t1.hasFaces()) ||
20888            (t0.hasMipmaps() != t1.hasMipmaps())) {
20889            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20890        }
20891
20892        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20893        aout.setAutoPadding(true);
20894        reduce(mExportReduceIdx_my_char2_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
20895        return new result_int(aout);
20896    }
20897
20898    private final static int mExportReduceIdx_my_char2_short2_1 = 315;
20899    // in1 = "a", flattened 2-vectors
20900    // in2 = "b", flattened 2-vectors
20901    public result_int reduce_my_char2_short2_1(byte[] in1, short[] in2) {
20902        // Verify that "in1" is non-null.
20903        if (in1 == null) {
20904            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20905        }
20906        // Verify that the array length is a multiple of the vector size.
20907        if (in1.length % 2 != 0) {
20908            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20909        }
20910        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20911        ain1.setAutoPadding(true);
20912        ain1.copyFrom(in1);
20913        // Verify that "in2" is non-null.
20914        if (in2 == null) {
20915            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20916        }
20917        // Verify that the array length is a multiple of the vector size.
20918        if (in2.length % 2 != 0) {
20919            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
20920        }
20921        // Verify that input array lengths are the same.
20922        if (in1.length / 2 != in2.length / 2) {
20923            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20924        }
20925        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
20926        ain2.setAutoPadding(true);
20927        ain2.copyFrom(in2);
20928
20929        result_int result = reduce_my_char2_short2_1(ain1, ain2, null);
20930        result.mTempIns = new Allocation[]{ain1, ain2};
20931        return result;
20932    }
20933
20934    // ain1 = "char2 a"
20935    // ain2 = "short2 b"
20936    public result_int reduce_my_char2_short2_1(Allocation ain1, Allocation ain2) {
20937        return reduce_my_char2_short2_1(ain1, ain2, null);
20938    }
20939
20940    // ain1 = "char2 a"
20941    // ain2 = "short2 b"
20942    public result_int reduce_my_char2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
20943        Type t0, t1;
20944        // check ain1
20945        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
20946            throw new RSRuntimeException("Type mismatch with I8_2!");
20947        }
20948        // check ain2
20949        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
20950            throw new RSRuntimeException("Type mismatch with I16_2!");
20951        }
20952        // Verify dimensions
20953        t0 = ain1.getType();
20954        t1 = ain2.getType();
20955        if ((t0.getCount() != t1.getCount()) ||
20956            (t0.getX() != t1.getX()) ||
20957            (t0.getY() != t1.getY()) ||
20958            (t0.getZ() != t1.getZ()) ||
20959            (t0.hasFaces()   != t1.hasFaces()) ||
20960            (t0.hasMipmaps() != t1.hasMipmaps())) {
20961            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
20962        }
20963
20964        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
20965        aout.setAutoPadding(true);
20966        reduce(mExportReduceIdx_my_char2_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
20967        return new result_int(aout);
20968    }
20969
20970    private final static int mExportReduceIdx_my_char2_short4_0 = 316;
20971    // in1 = "a", flattened 2-vectors
20972    // in2 = "b", flattened 4-vectors
20973    public result_int reduce_my_char2_short4_0(byte[] in1, short[] in2) {
20974        // Verify that "in1" is non-null.
20975        if (in1 == null) {
20976            throw new RSIllegalArgumentException("Array \"in1\" is null!");
20977        }
20978        // Verify that the array length is a multiple of the vector size.
20979        if (in1.length % 2 != 0) {
20980            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
20981        }
20982        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
20983        ain1.setAutoPadding(true);
20984        ain1.copyFrom(in1);
20985        // Verify that "in2" is non-null.
20986        if (in2 == null) {
20987            throw new RSIllegalArgumentException("Array \"in2\" is null!");
20988        }
20989        // Verify that the array length is a multiple of the vector size.
20990        if (in2.length % 4 != 0) {
20991            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
20992        }
20993        // Verify that input array lengths are the same.
20994        if (in1.length / 2 != in2.length / 4) {
20995            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
20996        }
20997        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
20998        ain2.setAutoPadding(true);
20999        ain2.copyFrom(in2);
21000
21001        result_int result = reduce_my_char2_short4_0(ain1, ain2, null);
21002        result.mTempIns = new Allocation[]{ain1, ain2};
21003        return result;
21004    }
21005
21006    // ain1 = "char2 a"
21007    // ain2 = "short4 b"
21008    public result_int reduce_my_char2_short4_0(Allocation ain1, Allocation ain2) {
21009        return reduce_my_char2_short4_0(ain1, ain2, null);
21010    }
21011
21012    // ain1 = "char2 a"
21013    // ain2 = "short4 b"
21014    public result_int reduce_my_char2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21015        Type t0, t1;
21016        // check ain1
21017        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21018            throw new RSRuntimeException("Type mismatch with I8_2!");
21019        }
21020        // check ain2
21021        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
21022            throw new RSRuntimeException("Type mismatch with I16_4!");
21023        }
21024        // Verify dimensions
21025        t0 = ain1.getType();
21026        t1 = ain2.getType();
21027        if ((t0.getCount() != t1.getCount()) ||
21028            (t0.getX() != t1.getX()) ||
21029            (t0.getY() != t1.getY()) ||
21030            (t0.getZ() != t1.getZ()) ||
21031            (t0.hasFaces()   != t1.hasFaces()) ||
21032            (t0.hasMipmaps() != t1.hasMipmaps())) {
21033            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21034        }
21035
21036        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21037        aout.setAutoPadding(true);
21038        reduce(mExportReduceIdx_my_char2_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
21039        return new result_int(aout);
21040    }
21041
21042    private final static int mExportReduceIdx_my_char2_short4_1 = 317;
21043    // in1 = "a", flattened 2-vectors
21044    // in2 = "b", flattened 4-vectors
21045    public result_int reduce_my_char2_short4_1(byte[] in1, short[] in2) {
21046        // Verify that "in1" is non-null.
21047        if (in1 == null) {
21048            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21049        }
21050        // Verify that the array length is a multiple of the vector size.
21051        if (in1.length % 2 != 0) {
21052            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21053        }
21054        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21055        ain1.setAutoPadding(true);
21056        ain1.copyFrom(in1);
21057        // Verify that "in2" is non-null.
21058        if (in2 == null) {
21059            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21060        }
21061        // Verify that the array length is a multiple of the vector size.
21062        if (in2.length % 4 != 0) {
21063            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
21064        }
21065        // Verify that input array lengths are the same.
21066        if (in1.length / 2 != in2.length / 4) {
21067            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21068        }
21069        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
21070        ain2.setAutoPadding(true);
21071        ain2.copyFrom(in2);
21072
21073        result_int result = reduce_my_char2_short4_1(ain1, ain2, null);
21074        result.mTempIns = new Allocation[]{ain1, ain2};
21075        return result;
21076    }
21077
21078    // ain1 = "char2 a"
21079    // ain2 = "short4 b"
21080    public result_int reduce_my_char2_short4_1(Allocation ain1, Allocation ain2) {
21081        return reduce_my_char2_short4_1(ain1, ain2, null);
21082    }
21083
21084    // ain1 = "char2 a"
21085    // ain2 = "short4 b"
21086    public result_int reduce_my_char2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21087        Type t0, t1;
21088        // check ain1
21089        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21090            throw new RSRuntimeException("Type mismatch with I8_2!");
21091        }
21092        // check ain2
21093        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
21094            throw new RSRuntimeException("Type mismatch with I16_4!");
21095        }
21096        // Verify dimensions
21097        t0 = ain1.getType();
21098        t1 = ain2.getType();
21099        if ((t0.getCount() != t1.getCount()) ||
21100            (t0.getX() != t1.getX()) ||
21101            (t0.getY() != t1.getY()) ||
21102            (t0.getZ() != t1.getZ()) ||
21103            (t0.hasFaces()   != t1.hasFaces()) ||
21104            (t0.hasMipmaps() != t1.hasMipmaps())) {
21105            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21106        }
21107
21108        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21109        aout.setAutoPadding(true);
21110        reduce(mExportReduceIdx_my_char2_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
21111        return new result_int(aout);
21112    }
21113
21114    private final static int mExportReduceIdx_my_char2_uchar_0 = 318;
21115    // in1 = "a", flattened 2-vectors
21116    // in2 = "b"
21117    public result_int reduce_my_char2_uchar_0(byte[] in1, byte[] in2) {
21118        // Verify that "in1" is non-null.
21119        if (in1 == null) {
21120            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21121        }
21122        // Verify that the array length is a multiple of the vector size.
21123        if (in1.length % 2 != 0) {
21124            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21125        }
21126        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21127        ain1.setAutoPadding(true);
21128        ain1.copyFrom(in1);
21129        // Verify that "in2" is non-null.
21130        if (in2 == null) {
21131            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21132        }
21133        // Verify that input array lengths are the same.
21134        if (in1.length / 2 != in2.length) {
21135            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21136        }
21137        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
21138        ain2.setAutoPadding(true);
21139        ain2.copyFrom(in2);
21140
21141        result_int result = reduce_my_char2_uchar_0(ain1, ain2, null);
21142        result.mTempIns = new Allocation[]{ain1, ain2};
21143        return result;
21144    }
21145
21146    // ain1 = "char2 a"
21147    // ain2 = "uchar b"
21148    public result_int reduce_my_char2_uchar_0(Allocation ain1, Allocation ain2) {
21149        return reduce_my_char2_uchar_0(ain1, ain2, null);
21150    }
21151
21152    // ain1 = "char2 a"
21153    // ain2 = "uchar b"
21154    public result_int reduce_my_char2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21155        Type t0, t1;
21156        // check ain1
21157        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21158            throw new RSRuntimeException("Type mismatch with I8_2!");
21159        }
21160        // check ain2
21161        if (!ain2.getType().getElement().isCompatible(__U8)) {
21162            throw new RSRuntimeException("Type mismatch with U8!");
21163        }
21164        // Verify dimensions
21165        t0 = ain1.getType();
21166        t1 = ain2.getType();
21167        if ((t0.getCount() != t1.getCount()) ||
21168            (t0.getX() != t1.getX()) ||
21169            (t0.getY() != t1.getY()) ||
21170            (t0.getZ() != t1.getZ()) ||
21171            (t0.hasFaces()   != t1.hasFaces()) ||
21172            (t0.hasMipmaps() != t1.hasMipmaps())) {
21173            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21174        }
21175
21176        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21177        aout.setAutoPadding(true);
21178        reduce(mExportReduceIdx_my_char2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
21179        return new result_int(aout);
21180    }
21181
21182    private final static int mExportReduceIdx_my_char2_uchar_1 = 319;
21183    // in1 = "a", flattened 2-vectors
21184    // in2 = "b"
21185    public result_int reduce_my_char2_uchar_1(byte[] in1, byte[] in2) {
21186        // Verify that "in1" is non-null.
21187        if (in1 == null) {
21188            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21189        }
21190        // Verify that the array length is a multiple of the vector size.
21191        if (in1.length % 2 != 0) {
21192            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21193        }
21194        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21195        ain1.setAutoPadding(true);
21196        ain1.copyFrom(in1);
21197        // Verify that "in2" is non-null.
21198        if (in2 == null) {
21199            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21200        }
21201        // Verify that input array lengths are the same.
21202        if (in1.length / 2 != in2.length) {
21203            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21204        }
21205        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
21206        ain2.setAutoPadding(true);
21207        ain2.copyFrom(in2);
21208
21209        result_int result = reduce_my_char2_uchar_1(ain1, ain2, null);
21210        result.mTempIns = new Allocation[]{ain1, ain2};
21211        return result;
21212    }
21213
21214    // ain1 = "char2 a"
21215    // ain2 = "uchar b"
21216    public result_int reduce_my_char2_uchar_1(Allocation ain1, Allocation ain2) {
21217        return reduce_my_char2_uchar_1(ain1, ain2, null);
21218    }
21219
21220    // ain1 = "char2 a"
21221    // ain2 = "uchar b"
21222    public result_int reduce_my_char2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21223        Type t0, t1;
21224        // check ain1
21225        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21226            throw new RSRuntimeException("Type mismatch with I8_2!");
21227        }
21228        // check ain2
21229        if (!ain2.getType().getElement().isCompatible(__U8)) {
21230            throw new RSRuntimeException("Type mismatch with U8!");
21231        }
21232        // Verify dimensions
21233        t0 = ain1.getType();
21234        t1 = ain2.getType();
21235        if ((t0.getCount() != t1.getCount()) ||
21236            (t0.getX() != t1.getX()) ||
21237            (t0.getY() != t1.getY()) ||
21238            (t0.getZ() != t1.getZ()) ||
21239            (t0.hasFaces()   != t1.hasFaces()) ||
21240            (t0.hasMipmaps() != t1.hasMipmaps())) {
21241            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21242        }
21243
21244        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21245        aout.setAutoPadding(true);
21246        reduce(mExportReduceIdx_my_char2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
21247        return new result_int(aout);
21248    }
21249
21250    private final static int mExportReduceIdx_my_char2_uchar2_0 = 320;
21251    // in1 = "a", flattened 2-vectors
21252    // in2 = "b", flattened 2-vectors
21253    public result_int reduce_my_char2_uchar2_0(byte[] in1, byte[] in2) {
21254        // Verify that "in1" is non-null.
21255        if (in1 == null) {
21256            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21257        }
21258        // Verify that the array length is a multiple of the vector size.
21259        if (in1.length % 2 != 0) {
21260            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21261        }
21262        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21263        ain1.setAutoPadding(true);
21264        ain1.copyFrom(in1);
21265        // Verify that "in2" is non-null.
21266        if (in2 == null) {
21267            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21268        }
21269        // Verify that the array length is a multiple of the vector size.
21270        if (in2.length % 2 != 0) {
21271            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
21272        }
21273        // Verify that input array lengths are the same.
21274        if (in1.length / 2 != in2.length / 2) {
21275            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21276        }
21277        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
21278        ain2.setAutoPadding(true);
21279        ain2.copyFrom(in2);
21280
21281        result_int result = reduce_my_char2_uchar2_0(ain1, ain2, null);
21282        result.mTempIns = new Allocation[]{ain1, ain2};
21283        return result;
21284    }
21285
21286    // ain1 = "char2 a"
21287    // ain2 = "uchar2 b"
21288    public result_int reduce_my_char2_uchar2_0(Allocation ain1, Allocation ain2) {
21289        return reduce_my_char2_uchar2_0(ain1, ain2, null);
21290    }
21291
21292    // ain1 = "char2 a"
21293    // ain2 = "uchar2 b"
21294    public result_int reduce_my_char2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21295        Type t0, t1;
21296        // check ain1
21297        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21298            throw new RSRuntimeException("Type mismatch with I8_2!");
21299        }
21300        // check ain2
21301        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
21302            throw new RSRuntimeException("Type mismatch with U8_2!");
21303        }
21304        // Verify dimensions
21305        t0 = ain1.getType();
21306        t1 = ain2.getType();
21307        if ((t0.getCount() != t1.getCount()) ||
21308            (t0.getX() != t1.getX()) ||
21309            (t0.getY() != t1.getY()) ||
21310            (t0.getZ() != t1.getZ()) ||
21311            (t0.hasFaces()   != t1.hasFaces()) ||
21312            (t0.hasMipmaps() != t1.hasMipmaps())) {
21313            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21314        }
21315
21316        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21317        aout.setAutoPadding(true);
21318        reduce(mExportReduceIdx_my_char2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
21319        return new result_int(aout);
21320    }
21321
21322    private final static int mExportReduceIdx_my_char2_uchar2_1 = 321;
21323    // in1 = "a", flattened 2-vectors
21324    // in2 = "b", flattened 2-vectors
21325    public result_int reduce_my_char2_uchar2_1(byte[] in1, byte[] in2) {
21326        // Verify that "in1" is non-null.
21327        if (in1 == null) {
21328            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21329        }
21330        // Verify that the array length is a multiple of the vector size.
21331        if (in1.length % 2 != 0) {
21332            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21333        }
21334        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21335        ain1.setAutoPadding(true);
21336        ain1.copyFrom(in1);
21337        // Verify that "in2" is non-null.
21338        if (in2 == null) {
21339            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21340        }
21341        // Verify that the array length is a multiple of the vector size.
21342        if (in2.length % 2 != 0) {
21343            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
21344        }
21345        // Verify that input array lengths are the same.
21346        if (in1.length / 2 != in2.length / 2) {
21347            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21348        }
21349        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
21350        ain2.setAutoPadding(true);
21351        ain2.copyFrom(in2);
21352
21353        result_int result = reduce_my_char2_uchar2_1(ain1, ain2, null);
21354        result.mTempIns = new Allocation[]{ain1, ain2};
21355        return result;
21356    }
21357
21358    // ain1 = "char2 a"
21359    // ain2 = "uchar2 b"
21360    public result_int reduce_my_char2_uchar2_1(Allocation ain1, Allocation ain2) {
21361        return reduce_my_char2_uchar2_1(ain1, ain2, null);
21362    }
21363
21364    // ain1 = "char2 a"
21365    // ain2 = "uchar2 b"
21366    public result_int reduce_my_char2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21367        Type t0, t1;
21368        // check ain1
21369        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21370            throw new RSRuntimeException("Type mismatch with I8_2!");
21371        }
21372        // check ain2
21373        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
21374            throw new RSRuntimeException("Type mismatch with U8_2!");
21375        }
21376        // Verify dimensions
21377        t0 = ain1.getType();
21378        t1 = ain2.getType();
21379        if ((t0.getCount() != t1.getCount()) ||
21380            (t0.getX() != t1.getX()) ||
21381            (t0.getY() != t1.getY()) ||
21382            (t0.getZ() != t1.getZ()) ||
21383            (t0.hasFaces()   != t1.hasFaces()) ||
21384            (t0.hasMipmaps() != t1.hasMipmaps())) {
21385            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21386        }
21387
21388        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21389        aout.setAutoPadding(true);
21390        reduce(mExportReduceIdx_my_char2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
21391        return new result_int(aout);
21392    }
21393
21394    private final static int mExportReduceIdx_my_char2_uchar4_0 = 322;
21395    // in1 = "a", flattened 2-vectors
21396    // in2 = "b", flattened 4-vectors
21397    public result_int reduce_my_char2_uchar4_0(byte[] in1, byte[] in2) {
21398        // Verify that "in1" is non-null.
21399        if (in1 == null) {
21400            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21401        }
21402        // Verify that the array length is a multiple of the vector size.
21403        if (in1.length % 2 != 0) {
21404            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21405        }
21406        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21407        ain1.setAutoPadding(true);
21408        ain1.copyFrom(in1);
21409        // Verify that "in2" is non-null.
21410        if (in2 == null) {
21411            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21412        }
21413        // Verify that the array length is a multiple of the vector size.
21414        if (in2.length % 4 != 0) {
21415            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
21416        }
21417        // Verify that input array lengths are the same.
21418        if (in1.length / 2 != in2.length / 4) {
21419            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21420        }
21421        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
21422        ain2.setAutoPadding(true);
21423        ain2.copyFrom(in2);
21424
21425        result_int result = reduce_my_char2_uchar4_0(ain1, ain2, null);
21426        result.mTempIns = new Allocation[]{ain1, ain2};
21427        return result;
21428    }
21429
21430    // ain1 = "char2 a"
21431    // ain2 = "uchar4 b"
21432    public result_int reduce_my_char2_uchar4_0(Allocation ain1, Allocation ain2) {
21433        return reduce_my_char2_uchar4_0(ain1, ain2, null);
21434    }
21435
21436    // ain1 = "char2 a"
21437    // ain2 = "uchar4 b"
21438    public result_int reduce_my_char2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21439        Type t0, t1;
21440        // check ain1
21441        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21442            throw new RSRuntimeException("Type mismatch with I8_2!");
21443        }
21444        // check ain2
21445        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
21446            throw new RSRuntimeException("Type mismatch with U8_4!");
21447        }
21448        // Verify dimensions
21449        t0 = ain1.getType();
21450        t1 = ain2.getType();
21451        if ((t0.getCount() != t1.getCount()) ||
21452            (t0.getX() != t1.getX()) ||
21453            (t0.getY() != t1.getY()) ||
21454            (t0.getZ() != t1.getZ()) ||
21455            (t0.hasFaces()   != t1.hasFaces()) ||
21456            (t0.hasMipmaps() != t1.hasMipmaps())) {
21457            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21458        }
21459
21460        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21461        aout.setAutoPadding(true);
21462        reduce(mExportReduceIdx_my_char2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
21463        return new result_int(aout);
21464    }
21465
21466    private final static int mExportReduceIdx_my_char2_uchar4_1 = 323;
21467    // in1 = "a", flattened 2-vectors
21468    // in2 = "b", flattened 4-vectors
21469    public result_int reduce_my_char2_uchar4_1(byte[] in1, byte[] in2) {
21470        // Verify that "in1" is non-null.
21471        if (in1 == null) {
21472            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21473        }
21474        // Verify that the array length is a multiple of the vector size.
21475        if (in1.length % 2 != 0) {
21476            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21477        }
21478        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21479        ain1.setAutoPadding(true);
21480        ain1.copyFrom(in1);
21481        // Verify that "in2" is non-null.
21482        if (in2 == null) {
21483            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21484        }
21485        // Verify that the array length is a multiple of the vector size.
21486        if (in2.length % 4 != 0) {
21487            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
21488        }
21489        // Verify that input array lengths are the same.
21490        if (in1.length / 2 != in2.length / 4) {
21491            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21492        }
21493        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
21494        ain2.setAutoPadding(true);
21495        ain2.copyFrom(in2);
21496
21497        result_int result = reduce_my_char2_uchar4_1(ain1, ain2, null);
21498        result.mTempIns = new Allocation[]{ain1, ain2};
21499        return result;
21500    }
21501
21502    // ain1 = "char2 a"
21503    // ain2 = "uchar4 b"
21504    public result_int reduce_my_char2_uchar4_1(Allocation ain1, Allocation ain2) {
21505        return reduce_my_char2_uchar4_1(ain1, ain2, null);
21506    }
21507
21508    // ain1 = "char2 a"
21509    // ain2 = "uchar4 b"
21510    public result_int reduce_my_char2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21511        Type t0, t1;
21512        // check ain1
21513        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21514            throw new RSRuntimeException("Type mismatch with I8_2!");
21515        }
21516        // check ain2
21517        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
21518            throw new RSRuntimeException("Type mismatch with U8_4!");
21519        }
21520        // Verify dimensions
21521        t0 = ain1.getType();
21522        t1 = ain2.getType();
21523        if ((t0.getCount() != t1.getCount()) ||
21524            (t0.getX() != t1.getX()) ||
21525            (t0.getY() != t1.getY()) ||
21526            (t0.getZ() != t1.getZ()) ||
21527            (t0.hasFaces()   != t1.hasFaces()) ||
21528            (t0.hasMipmaps() != t1.hasMipmaps())) {
21529            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21530        }
21531
21532        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21533        aout.setAutoPadding(true);
21534        reduce(mExportReduceIdx_my_char2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
21535        return new result_int(aout);
21536    }
21537
21538    private final static int mExportReduceIdx_my_char2_ushort_0 = 324;
21539    // in1 = "a", flattened 2-vectors
21540    // in2 = "b"
21541    public result_int reduce_my_char2_ushort_0(byte[] in1, short[] in2) {
21542        // Verify that "in1" is non-null.
21543        if (in1 == null) {
21544            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21545        }
21546        // Verify that the array length is a multiple of the vector size.
21547        if (in1.length % 2 != 0) {
21548            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21549        }
21550        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21551        ain1.setAutoPadding(true);
21552        ain1.copyFrom(in1);
21553        // Verify that "in2" is non-null.
21554        if (in2 == null) {
21555            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21556        }
21557        // Verify that input array lengths are the same.
21558        if (in1.length / 2 != in2.length) {
21559            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21560        }
21561        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
21562        ain2.setAutoPadding(true);
21563        ain2.copyFrom(in2);
21564
21565        result_int result = reduce_my_char2_ushort_0(ain1, ain2, null);
21566        result.mTempIns = new Allocation[]{ain1, ain2};
21567        return result;
21568    }
21569
21570    // ain1 = "char2 a"
21571    // ain2 = "ushort b"
21572    public result_int reduce_my_char2_ushort_0(Allocation ain1, Allocation ain2) {
21573        return reduce_my_char2_ushort_0(ain1, ain2, null);
21574    }
21575
21576    // ain1 = "char2 a"
21577    // ain2 = "ushort b"
21578    public result_int reduce_my_char2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21579        Type t0, t1;
21580        // check ain1
21581        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21582            throw new RSRuntimeException("Type mismatch with I8_2!");
21583        }
21584        // check ain2
21585        if (!ain2.getType().getElement().isCompatible(__U16)) {
21586            throw new RSRuntimeException("Type mismatch with U16!");
21587        }
21588        // Verify dimensions
21589        t0 = ain1.getType();
21590        t1 = ain2.getType();
21591        if ((t0.getCount() != t1.getCount()) ||
21592            (t0.getX() != t1.getX()) ||
21593            (t0.getY() != t1.getY()) ||
21594            (t0.getZ() != t1.getZ()) ||
21595            (t0.hasFaces()   != t1.hasFaces()) ||
21596            (t0.hasMipmaps() != t1.hasMipmaps())) {
21597            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21598        }
21599
21600        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21601        aout.setAutoPadding(true);
21602        reduce(mExportReduceIdx_my_char2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
21603        return new result_int(aout);
21604    }
21605
21606    private final static int mExportReduceIdx_my_char2_ushort_1 = 325;
21607    // in1 = "a", flattened 2-vectors
21608    // in2 = "b"
21609    public result_int reduce_my_char2_ushort_1(byte[] in1, short[] in2) {
21610        // Verify that "in1" is non-null.
21611        if (in1 == null) {
21612            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21613        }
21614        // Verify that the array length is a multiple of the vector size.
21615        if (in1.length % 2 != 0) {
21616            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21617        }
21618        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21619        ain1.setAutoPadding(true);
21620        ain1.copyFrom(in1);
21621        // Verify that "in2" is non-null.
21622        if (in2 == null) {
21623            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21624        }
21625        // Verify that input array lengths are the same.
21626        if (in1.length / 2 != in2.length) {
21627            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21628        }
21629        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
21630        ain2.setAutoPadding(true);
21631        ain2.copyFrom(in2);
21632
21633        result_int result = reduce_my_char2_ushort_1(ain1, ain2, null);
21634        result.mTempIns = new Allocation[]{ain1, ain2};
21635        return result;
21636    }
21637
21638    // ain1 = "char2 a"
21639    // ain2 = "ushort b"
21640    public result_int reduce_my_char2_ushort_1(Allocation ain1, Allocation ain2) {
21641        return reduce_my_char2_ushort_1(ain1, ain2, null);
21642    }
21643
21644    // ain1 = "char2 a"
21645    // ain2 = "ushort b"
21646    public result_int reduce_my_char2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21647        Type t0, t1;
21648        // check ain1
21649        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21650            throw new RSRuntimeException("Type mismatch with I8_2!");
21651        }
21652        // check ain2
21653        if (!ain2.getType().getElement().isCompatible(__U16)) {
21654            throw new RSRuntimeException("Type mismatch with U16!");
21655        }
21656        // Verify dimensions
21657        t0 = ain1.getType();
21658        t1 = ain2.getType();
21659        if ((t0.getCount() != t1.getCount()) ||
21660            (t0.getX() != t1.getX()) ||
21661            (t0.getY() != t1.getY()) ||
21662            (t0.getZ() != t1.getZ()) ||
21663            (t0.hasFaces()   != t1.hasFaces()) ||
21664            (t0.hasMipmaps() != t1.hasMipmaps())) {
21665            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21666        }
21667
21668        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21669        aout.setAutoPadding(true);
21670        reduce(mExportReduceIdx_my_char2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
21671        return new result_int(aout);
21672    }
21673
21674    private final static int mExportReduceIdx_my_char2_ushort2_0 = 326;
21675    // in1 = "a", flattened 2-vectors
21676    // in2 = "b", flattened 2-vectors
21677    public result_int reduce_my_char2_ushort2_0(byte[] in1, short[] in2) {
21678        // Verify that "in1" is non-null.
21679        if (in1 == null) {
21680            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21681        }
21682        // Verify that the array length is a multiple of the vector size.
21683        if (in1.length % 2 != 0) {
21684            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21685        }
21686        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21687        ain1.setAutoPadding(true);
21688        ain1.copyFrom(in1);
21689        // Verify that "in2" is non-null.
21690        if (in2 == null) {
21691            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21692        }
21693        // Verify that the array length is a multiple of the vector size.
21694        if (in2.length % 2 != 0) {
21695            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
21696        }
21697        // Verify that input array lengths are the same.
21698        if (in1.length / 2 != in2.length / 2) {
21699            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21700        }
21701        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
21702        ain2.setAutoPadding(true);
21703        ain2.copyFrom(in2);
21704
21705        result_int result = reduce_my_char2_ushort2_0(ain1, ain2, null);
21706        result.mTempIns = new Allocation[]{ain1, ain2};
21707        return result;
21708    }
21709
21710    // ain1 = "char2 a"
21711    // ain2 = "ushort2 b"
21712    public result_int reduce_my_char2_ushort2_0(Allocation ain1, Allocation ain2) {
21713        return reduce_my_char2_ushort2_0(ain1, ain2, null);
21714    }
21715
21716    // ain1 = "char2 a"
21717    // ain2 = "ushort2 b"
21718    public result_int reduce_my_char2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21719        Type t0, t1;
21720        // check ain1
21721        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21722            throw new RSRuntimeException("Type mismatch with I8_2!");
21723        }
21724        // check ain2
21725        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
21726            throw new RSRuntimeException("Type mismatch with U16_2!");
21727        }
21728        // Verify dimensions
21729        t0 = ain1.getType();
21730        t1 = ain2.getType();
21731        if ((t0.getCount() != t1.getCount()) ||
21732            (t0.getX() != t1.getX()) ||
21733            (t0.getY() != t1.getY()) ||
21734            (t0.getZ() != t1.getZ()) ||
21735            (t0.hasFaces()   != t1.hasFaces()) ||
21736            (t0.hasMipmaps() != t1.hasMipmaps())) {
21737            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21738        }
21739
21740        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21741        aout.setAutoPadding(true);
21742        reduce(mExportReduceIdx_my_char2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
21743        return new result_int(aout);
21744    }
21745
21746    private final static int mExportReduceIdx_my_char2_ushort2_1 = 327;
21747    // in1 = "a", flattened 2-vectors
21748    // in2 = "b", flattened 2-vectors
21749    public result_int reduce_my_char2_ushort2_1(byte[] in1, short[] in2) {
21750        // Verify that "in1" is non-null.
21751        if (in1 == null) {
21752            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21753        }
21754        // Verify that the array length is a multiple of the vector size.
21755        if (in1.length % 2 != 0) {
21756            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21757        }
21758        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21759        ain1.setAutoPadding(true);
21760        ain1.copyFrom(in1);
21761        // Verify that "in2" is non-null.
21762        if (in2 == null) {
21763            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21764        }
21765        // Verify that the array length is a multiple of the vector size.
21766        if (in2.length % 2 != 0) {
21767            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
21768        }
21769        // Verify that input array lengths are the same.
21770        if (in1.length / 2 != in2.length / 2) {
21771            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21772        }
21773        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
21774        ain2.setAutoPadding(true);
21775        ain2.copyFrom(in2);
21776
21777        result_int result = reduce_my_char2_ushort2_1(ain1, ain2, null);
21778        result.mTempIns = new Allocation[]{ain1, ain2};
21779        return result;
21780    }
21781
21782    // ain1 = "char2 a"
21783    // ain2 = "ushort2 b"
21784    public result_int reduce_my_char2_ushort2_1(Allocation ain1, Allocation ain2) {
21785        return reduce_my_char2_ushort2_1(ain1, ain2, null);
21786    }
21787
21788    // ain1 = "char2 a"
21789    // ain2 = "ushort2 b"
21790    public result_int reduce_my_char2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21791        Type t0, t1;
21792        // check ain1
21793        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21794            throw new RSRuntimeException("Type mismatch with I8_2!");
21795        }
21796        // check ain2
21797        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
21798            throw new RSRuntimeException("Type mismatch with U16_2!");
21799        }
21800        // Verify dimensions
21801        t0 = ain1.getType();
21802        t1 = ain2.getType();
21803        if ((t0.getCount() != t1.getCount()) ||
21804            (t0.getX() != t1.getX()) ||
21805            (t0.getY() != t1.getY()) ||
21806            (t0.getZ() != t1.getZ()) ||
21807            (t0.hasFaces()   != t1.hasFaces()) ||
21808            (t0.hasMipmaps() != t1.hasMipmaps())) {
21809            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21810        }
21811
21812        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21813        aout.setAutoPadding(true);
21814        reduce(mExportReduceIdx_my_char2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
21815        return new result_int(aout);
21816    }
21817
21818    private final static int mExportReduceIdx_my_char2_ushort4_0 = 328;
21819    // in1 = "a", flattened 2-vectors
21820    // in2 = "b", flattened 4-vectors
21821    public result_int reduce_my_char2_ushort4_0(byte[] in1, short[] in2) {
21822        // Verify that "in1" is non-null.
21823        if (in1 == null) {
21824            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21825        }
21826        // Verify that the array length is a multiple of the vector size.
21827        if (in1.length % 2 != 0) {
21828            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21829        }
21830        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21831        ain1.setAutoPadding(true);
21832        ain1.copyFrom(in1);
21833        // Verify that "in2" is non-null.
21834        if (in2 == null) {
21835            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21836        }
21837        // Verify that the array length is a multiple of the vector size.
21838        if (in2.length % 4 != 0) {
21839            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
21840        }
21841        // Verify that input array lengths are the same.
21842        if (in1.length / 2 != in2.length / 4) {
21843            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21844        }
21845        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
21846        ain2.setAutoPadding(true);
21847        ain2.copyFrom(in2);
21848
21849        result_int result = reduce_my_char2_ushort4_0(ain1, ain2, null);
21850        result.mTempIns = new Allocation[]{ain1, ain2};
21851        return result;
21852    }
21853
21854    // ain1 = "char2 a"
21855    // ain2 = "ushort4 b"
21856    public result_int reduce_my_char2_ushort4_0(Allocation ain1, Allocation ain2) {
21857        return reduce_my_char2_ushort4_0(ain1, ain2, null);
21858    }
21859
21860    // ain1 = "char2 a"
21861    // ain2 = "ushort4 b"
21862    public result_int reduce_my_char2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21863        Type t0, t1;
21864        // check ain1
21865        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21866            throw new RSRuntimeException("Type mismatch with I8_2!");
21867        }
21868        // check ain2
21869        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
21870            throw new RSRuntimeException("Type mismatch with U16_4!");
21871        }
21872        // Verify dimensions
21873        t0 = ain1.getType();
21874        t1 = ain2.getType();
21875        if ((t0.getCount() != t1.getCount()) ||
21876            (t0.getX() != t1.getX()) ||
21877            (t0.getY() != t1.getY()) ||
21878            (t0.getZ() != t1.getZ()) ||
21879            (t0.hasFaces()   != t1.hasFaces()) ||
21880            (t0.hasMipmaps() != t1.hasMipmaps())) {
21881            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21882        }
21883
21884        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21885        aout.setAutoPadding(true);
21886        reduce(mExportReduceIdx_my_char2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
21887        return new result_int(aout);
21888    }
21889
21890    private final static int mExportReduceIdx_my_char2_ushort4_1 = 329;
21891    // in1 = "a", flattened 2-vectors
21892    // in2 = "b", flattened 4-vectors
21893    public result_int reduce_my_char2_ushort4_1(byte[] in1, short[] in2) {
21894        // Verify that "in1" is non-null.
21895        if (in1 == null) {
21896            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21897        }
21898        // Verify that the array length is a multiple of the vector size.
21899        if (in1.length % 2 != 0) {
21900            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21901        }
21902        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21903        ain1.setAutoPadding(true);
21904        ain1.copyFrom(in1);
21905        // Verify that "in2" is non-null.
21906        if (in2 == null) {
21907            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21908        }
21909        // Verify that the array length is a multiple of the vector size.
21910        if (in2.length % 4 != 0) {
21911            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
21912        }
21913        // Verify that input array lengths are the same.
21914        if (in1.length / 2 != in2.length / 4) {
21915            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21916        }
21917        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
21918        ain2.setAutoPadding(true);
21919        ain2.copyFrom(in2);
21920
21921        result_int result = reduce_my_char2_ushort4_1(ain1, ain2, null);
21922        result.mTempIns = new Allocation[]{ain1, ain2};
21923        return result;
21924    }
21925
21926    // ain1 = "char2 a"
21927    // ain2 = "ushort4 b"
21928    public result_int reduce_my_char2_ushort4_1(Allocation ain1, Allocation ain2) {
21929        return reduce_my_char2_ushort4_1(ain1, ain2, null);
21930    }
21931
21932    // ain1 = "char2 a"
21933    // ain2 = "ushort4 b"
21934    public result_int reduce_my_char2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
21935        Type t0, t1;
21936        // check ain1
21937        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
21938            throw new RSRuntimeException("Type mismatch with I8_2!");
21939        }
21940        // check ain2
21941        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
21942            throw new RSRuntimeException("Type mismatch with U16_4!");
21943        }
21944        // Verify dimensions
21945        t0 = ain1.getType();
21946        t1 = ain2.getType();
21947        if ((t0.getCount() != t1.getCount()) ||
21948            (t0.getX() != t1.getX()) ||
21949            (t0.getY() != t1.getY()) ||
21950            (t0.getZ() != t1.getZ()) ||
21951            (t0.hasFaces()   != t1.hasFaces()) ||
21952            (t0.hasMipmaps() != t1.hasMipmaps())) {
21953            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
21954        }
21955
21956        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
21957        aout.setAutoPadding(true);
21958        reduce(mExportReduceIdx_my_char2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
21959        return new result_int(aout);
21960    }
21961
21962    private final static int mExportReduceIdx_my_char2_bool_0 = 330;
21963    // in1 = "a", flattened 2-vectors
21964    // in2 = "b"
21965    public result_int reduce_my_char2_bool_0(byte[] in1, byte[] in2) {
21966        // Verify that "in1" is non-null.
21967        if (in1 == null) {
21968            throw new RSIllegalArgumentException("Array \"in1\" is null!");
21969        }
21970        // Verify that the array length is a multiple of the vector size.
21971        if (in1.length % 2 != 0) {
21972            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
21973        }
21974        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
21975        ain1.setAutoPadding(true);
21976        ain1.copyFrom(in1);
21977        // Verify that "in2" is non-null.
21978        if (in2 == null) {
21979            throw new RSIllegalArgumentException("Array \"in2\" is null!");
21980        }
21981        // Verify that input array lengths are the same.
21982        if (in1.length / 2 != in2.length) {
21983            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
21984        }
21985        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
21986        ain2.setAutoPadding(true);
21987        ain2.copyFrom(in2);
21988
21989        result_int result = reduce_my_char2_bool_0(ain1, ain2, null);
21990        result.mTempIns = new Allocation[]{ain1, ain2};
21991        return result;
21992    }
21993
21994    // ain1 = "char2 a"
21995    // ain2 = "bool b"
21996    public result_int reduce_my_char2_bool_0(Allocation ain1, Allocation ain2) {
21997        return reduce_my_char2_bool_0(ain1, ain2, null);
21998    }
21999
22000    // ain1 = "char2 a"
22001    // ain2 = "bool b"
22002    public result_int reduce_my_char2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22003        Type t0, t1;
22004        // check ain1
22005        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
22006            throw new RSRuntimeException("Type mismatch with I8_2!");
22007        }
22008        // check ain2
22009        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
22010            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
22011        }
22012        // Verify dimensions
22013        t0 = ain1.getType();
22014        t1 = ain2.getType();
22015        if ((t0.getCount() != t1.getCount()) ||
22016            (t0.getX() != t1.getX()) ||
22017            (t0.getY() != t1.getY()) ||
22018            (t0.getZ() != t1.getZ()) ||
22019            (t0.hasFaces()   != t1.hasFaces()) ||
22020            (t0.hasMipmaps() != t1.hasMipmaps())) {
22021            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22022        }
22023
22024        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22025        aout.setAutoPadding(true);
22026        reduce(mExportReduceIdx_my_char2_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
22027        return new result_int(aout);
22028    }
22029
22030    private final static int mExportReduceIdx_my_char2_bool_1 = 331;
22031    // in1 = "a", flattened 2-vectors
22032    // in2 = "b"
22033    public result_int reduce_my_char2_bool_1(byte[] in1, byte[] in2) {
22034        // Verify that "in1" is non-null.
22035        if (in1 == null) {
22036            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22037        }
22038        // Verify that the array length is a multiple of the vector size.
22039        if (in1.length % 2 != 0) {
22040            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
22041        }
22042        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2);
22043        ain1.setAutoPadding(true);
22044        ain1.copyFrom(in1);
22045        // Verify that "in2" is non-null.
22046        if (in2 == null) {
22047            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22048        }
22049        // Verify that input array lengths are the same.
22050        if (in1.length / 2 != in2.length) {
22051            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22052        }
22053        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
22054        ain2.setAutoPadding(true);
22055        ain2.copyFrom(in2);
22056
22057        result_int result = reduce_my_char2_bool_1(ain1, ain2, null);
22058        result.mTempIns = new Allocation[]{ain1, ain2};
22059        return result;
22060    }
22061
22062    // ain1 = "char2 a"
22063    // ain2 = "bool b"
22064    public result_int reduce_my_char2_bool_1(Allocation ain1, Allocation ain2) {
22065        return reduce_my_char2_bool_1(ain1, ain2, null);
22066    }
22067
22068    // ain1 = "char2 a"
22069    // ain2 = "bool b"
22070    public result_int reduce_my_char2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22071        Type t0, t1;
22072        // check ain1
22073        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
22074            throw new RSRuntimeException("Type mismatch with I8_2!");
22075        }
22076        // check ain2
22077        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
22078            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
22079        }
22080        // Verify dimensions
22081        t0 = ain1.getType();
22082        t1 = ain2.getType();
22083        if ((t0.getCount() != t1.getCount()) ||
22084            (t0.getX() != t1.getX()) ||
22085            (t0.getY() != t1.getY()) ||
22086            (t0.getZ() != t1.getZ()) ||
22087            (t0.hasFaces()   != t1.hasFaces()) ||
22088            (t0.hasMipmaps() != t1.hasMipmaps())) {
22089            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22090        }
22091
22092        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22093        aout.setAutoPadding(true);
22094        reduce(mExportReduceIdx_my_char2_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
22095        return new result_int(aout);
22096    }
22097
22098    private final static int mExportReduceIdx_my_char2_rs_matrix2x2_0 = 332;
22099    // ain1 = "char2 a"
22100    // ain2 = "rs_matrix2x2 b"
22101    public result_int reduce_my_char2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
22102        return reduce_my_char2_rs_matrix2x2_0(ain1, ain2, null);
22103    }
22104
22105    // ain1 = "char2 a"
22106    // ain2 = "rs_matrix2x2 b"
22107    public result_int reduce_my_char2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22108        Type t0, t1;
22109        // check ain1
22110        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
22111            throw new RSRuntimeException("Type mismatch with I8_2!");
22112        }
22113        // check ain2
22114        // Verify dimensions
22115        t0 = ain1.getType();
22116        t1 = ain2.getType();
22117        if ((t0.getCount() != t1.getCount()) ||
22118            (t0.getX() != t1.getX()) ||
22119            (t0.getY() != t1.getY()) ||
22120            (t0.getZ() != t1.getZ()) ||
22121            (t0.hasFaces()   != t1.hasFaces()) ||
22122            (t0.hasMipmaps() != t1.hasMipmaps())) {
22123            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22124        }
22125
22126        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22127        aout.setAutoPadding(true);
22128        reduce(mExportReduceIdx_my_char2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
22129        return new result_int(aout);
22130    }
22131
22132    private final static int mExportReduceIdx_my_char2_rs_matrix2x2_1 = 333;
22133    // ain1 = "char2 a"
22134    // ain2 = "rs_matrix2x2 b"
22135    public result_int reduce_my_char2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
22136        return reduce_my_char2_rs_matrix2x2_1(ain1, ain2, null);
22137    }
22138
22139    // ain1 = "char2 a"
22140    // ain2 = "rs_matrix2x2 b"
22141    public result_int reduce_my_char2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22142        Type t0, t1;
22143        // check ain1
22144        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
22145            throw new RSRuntimeException("Type mismatch with I8_2!");
22146        }
22147        // check ain2
22148        // Verify dimensions
22149        t0 = ain1.getType();
22150        t1 = ain2.getType();
22151        if ((t0.getCount() != t1.getCount()) ||
22152            (t0.getX() != t1.getX()) ||
22153            (t0.getY() != t1.getY()) ||
22154            (t0.getZ() != t1.getZ()) ||
22155            (t0.hasFaces()   != t1.hasFaces()) ||
22156            (t0.hasMipmaps() != t1.hasMipmaps())) {
22157            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22158        }
22159
22160        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22161        aout.setAutoPadding(true);
22162        reduce(mExportReduceIdx_my_char2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
22163        return new result_int(aout);
22164    }
22165
22166    private final static int mExportReduceIdx_my_char2_MyStruct_0 = 334;
22167    // ain1 = "char2 a"
22168    // ain2 = "/* struct <> */ b"
22169    public result_int reduce_my_char2_MyStruct_0(Allocation ain1, Allocation ain2) {
22170        return reduce_my_char2_MyStruct_0(ain1, ain2, null);
22171    }
22172
22173    // ain1 = "char2 a"
22174    // ain2 = "/* struct <> */ b"
22175    public result_int reduce_my_char2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22176        Type t0, t1;
22177        // check ain1
22178        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
22179            throw new RSRuntimeException("Type mismatch with I8_2!");
22180        }
22181        // check ain2
22182        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
22183            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
22184        }
22185        // Verify dimensions
22186        t0 = ain1.getType();
22187        t1 = ain2.getType();
22188        if ((t0.getCount() != t1.getCount()) ||
22189            (t0.getX() != t1.getX()) ||
22190            (t0.getY() != t1.getY()) ||
22191            (t0.getZ() != t1.getZ()) ||
22192            (t0.hasFaces()   != t1.hasFaces()) ||
22193            (t0.hasMipmaps() != t1.hasMipmaps())) {
22194            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22195        }
22196
22197        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22198        aout.setAutoPadding(true);
22199        reduce(mExportReduceIdx_my_char2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
22200        return new result_int(aout);
22201    }
22202
22203    private final static int mExportReduceIdx_my_char2_MyStruct_1 = 335;
22204    // ain1 = "char2 a"
22205    // ain2 = "/* struct <> */ b"
22206    public result_int reduce_my_char2_MyStruct_1(Allocation ain1, Allocation ain2) {
22207        return reduce_my_char2_MyStruct_1(ain1, ain2, null);
22208    }
22209
22210    // ain1 = "char2 a"
22211    // ain2 = "/* struct <> */ b"
22212    public result_int reduce_my_char2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22213        Type t0, t1;
22214        // check ain1
22215        if (!ain1.getType().getElement().isCompatible(__I8_2)) {
22216            throw new RSRuntimeException("Type mismatch with I8_2!");
22217        }
22218        // check ain2
22219        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
22220            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
22221        }
22222        // Verify dimensions
22223        t0 = ain1.getType();
22224        t1 = ain2.getType();
22225        if ((t0.getCount() != t1.getCount()) ||
22226            (t0.getX() != t1.getX()) ||
22227            (t0.getY() != t1.getY()) ||
22228            (t0.getZ() != t1.getZ()) ||
22229            (t0.hasFaces()   != t1.hasFaces()) ||
22230            (t0.hasMipmaps() != t1.hasMipmaps())) {
22231            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22232        }
22233
22234        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22235        aout.setAutoPadding(true);
22236        reduce(mExportReduceIdx_my_char2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
22237        return new result_int(aout);
22238    }
22239
22240    private final static int mExportReduceIdx_my_char4_half_0 = 336;
22241    // in1 = "a", flattened 4-vectors
22242    // in2 = "b"
22243    public result_int reduce_my_char4_half_0(byte[] in1, short[] in2) {
22244        // Verify that "in1" is non-null.
22245        if (in1 == null) {
22246            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22247        }
22248        // Verify that the array length is a multiple of the vector size.
22249        if (in1.length % 4 != 0) {
22250            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22251        }
22252        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22253        ain1.setAutoPadding(true);
22254        ain1.copyFrom(in1);
22255        // Verify that "in2" is non-null.
22256        if (in2 == null) {
22257            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22258        }
22259        // Verify that input array lengths are the same.
22260        if (in1.length / 4 != in2.length) {
22261            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22262        }
22263        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
22264        ain2.setAutoPadding(true);
22265        ain2.copyFrom(in2);
22266
22267        result_int result = reduce_my_char4_half_0(ain1, ain2, null);
22268        result.mTempIns = new Allocation[]{ain1, ain2};
22269        return result;
22270    }
22271
22272    // ain1 = "char4 a"
22273    // ain2 = "half b"
22274    public result_int reduce_my_char4_half_0(Allocation ain1, Allocation ain2) {
22275        return reduce_my_char4_half_0(ain1, ain2, null);
22276    }
22277
22278    // ain1 = "char4 a"
22279    // ain2 = "half b"
22280    public result_int reduce_my_char4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22281        Type t0, t1;
22282        // check ain1
22283        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22284            throw new RSRuntimeException("Type mismatch with I8_4!");
22285        }
22286        // check ain2
22287        if (!ain2.getType().getElement().isCompatible(__F16)) {
22288            throw new RSRuntimeException("Type mismatch with F16!");
22289        }
22290        // Verify dimensions
22291        t0 = ain1.getType();
22292        t1 = ain2.getType();
22293        if ((t0.getCount() != t1.getCount()) ||
22294            (t0.getX() != t1.getX()) ||
22295            (t0.getY() != t1.getY()) ||
22296            (t0.getZ() != t1.getZ()) ||
22297            (t0.hasFaces()   != t1.hasFaces()) ||
22298            (t0.hasMipmaps() != t1.hasMipmaps())) {
22299            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22300        }
22301
22302        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22303        aout.setAutoPadding(true);
22304        reduce(mExportReduceIdx_my_char4_half_0, new Allocation[]{ain1, ain2}, aout, sc);
22305        return new result_int(aout);
22306    }
22307
22308    private final static int mExportReduceIdx_my_char4_half_1 = 337;
22309    // in1 = "a", flattened 4-vectors
22310    // in2 = "b"
22311    public result_int reduce_my_char4_half_1(byte[] in1, short[] in2) {
22312        // Verify that "in1" is non-null.
22313        if (in1 == null) {
22314            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22315        }
22316        // Verify that the array length is a multiple of the vector size.
22317        if (in1.length % 4 != 0) {
22318            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22319        }
22320        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22321        ain1.setAutoPadding(true);
22322        ain1.copyFrom(in1);
22323        // Verify that "in2" is non-null.
22324        if (in2 == null) {
22325            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22326        }
22327        // Verify that input array lengths are the same.
22328        if (in1.length / 4 != in2.length) {
22329            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22330        }
22331        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
22332        ain2.setAutoPadding(true);
22333        ain2.copyFrom(in2);
22334
22335        result_int result = reduce_my_char4_half_1(ain1, ain2, null);
22336        result.mTempIns = new Allocation[]{ain1, ain2};
22337        return result;
22338    }
22339
22340    // ain1 = "char4 a"
22341    // ain2 = "half b"
22342    public result_int reduce_my_char4_half_1(Allocation ain1, Allocation ain2) {
22343        return reduce_my_char4_half_1(ain1, ain2, null);
22344    }
22345
22346    // ain1 = "char4 a"
22347    // ain2 = "half b"
22348    public result_int reduce_my_char4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22349        Type t0, t1;
22350        // check ain1
22351        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22352            throw new RSRuntimeException("Type mismatch with I8_4!");
22353        }
22354        // check ain2
22355        if (!ain2.getType().getElement().isCompatible(__F16)) {
22356            throw new RSRuntimeException("Type mismatch with F16!");
22357        }
22358        // Verify dimensions
22359        t0 = ain1.getType();
22360        t1 = ain2.getType();
22361        if ((t0.getCount() != t1.getCount()) ||
22362            (t0.getX() != t1.getX()) ||
22363            (t0.getY() != t1.getY()) ||
22364            (t0.getZ() != t1.getZ()) ||
22365            (t0.hasFaces()   != t1.hasFaces()) ||
22366            (t0.hasMipmaps() != t1.hasMipmaps())) {
22367            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22368        }
22369
22370        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22371        aout.setAutoPadding(true);
22372        reduce(mExportReduceIdx_my_char4_half_1, new Allocation[]{ain1, ain2}, aout, sc);
22373        return new result_int(aout);
22374    }
22375
22376    private final static int mExportReduceIdx_my_char4_half2_0 = 338;
22377    // in1 = "a", flattened 4-vectors
22378    // in2 = "b", flattened 2-vectors
22379    public result_int reduce_my_char4_half2_0(byte[] in1, short[] in2) {
22380        // Verify that "in1" is non-null.
22381        if (in1 == null) {
22382            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22383        }
22384        // Verify that the array length is a multiple of the vector size.
22385        if (in1.length % 4 != 0) {
22386            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22387        }
22388        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22389        ain1.setAutoPadding(true);
22390        ain1.copyFrom(in1);
22391        // Verify that "in2" is non-null.
22392        if (in2 == null) {
22393            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22394        }
22395        // Verify that the array length is a multiple of the vector size.
22396        if (in2.length % 2 != 0) {
22397            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
22398        }
22399        // Verify that input array lengths are the same.
22400        if (in1.length / 4 != in2.length / 2) {
22401            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22402        }
22403        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
22404        ain2.setAutoPadding(true);
22405        ain2.copyFrom(in2);
22406
22407        result_int result = reduce_my_char4_half2_0(ain1, ain2, null);
22408        result.mTempIns = new Allocation[]{ain1, ain2};
22409        return result;
22410    }
22411
22412    // ain1 = "char4 a"
22413    // ain2 = "half2 b"
22414    public result_int reduce_my_char4_half2_0(Allocation ain1, Allocation ain2) {
22415        return reduce_my_char4_half2_0(ain1, ain2, null);
22416    }
22417
22418    // ain1 = "char4 a"
22419    // ain2 = "half2 b"
22420    public result_int reduce_my_char4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22421        Type t0, t1;
22422        // check ain1
22423        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22424            throw new RSRuntimeException("Type mismatch with I8_4!");
22425        }
22426        // check ain2
22427        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
22428            throw new RSRuntimeException("Type mismatch with F16_2!");
22429        }
22430        // Verify dimensions
22431        t0 = ain1.getType();
22432        t1 = ain2.getType();
22433        if ((t0.getCount() != t1.getCount()) ||
22434            (t0.getX() != t1.getX()) ||
22435            (t0.getY() != t1.getY()) ||
22436            (t0.getZ() != t1.getZ()) ||
22437            (t0.hasFaces()   != t1.hasFaces()) ||
22438            (t0.hasMipmaps() != t1.hasMipmaps())) {
22439            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22440        }
22441
22442        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22443        aout.setAutoPadding(true);
22444        reduce(mExportReduceIdx_my_char4_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
22445        return new result_int(aout);
22446    }
22447
22448    private final static int mExportReduceIdx_my_char4_half2_1 = 339;
22449    // in1 = "a", flattened 4-vectors
22450    // in2 = "b", flattened 2-vectors
22451    public result_int reduce_my_char4_half2_1(byte[] in1, short[] in2) {
22452        // Verify that "in1" is non-null.
22453        if (in1 == null) {
22454            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22455        }
22456        // Verify that the array length is a multiple of the vector size.
22457        if (in1.length % 4 != 0) {
22458            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22459        }
22460        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22461        ain1.setAutoPadding(true);
22462        ain1.copyFrom(in1);
22463        // Verify that "in2" is non-null.
22464        if (in2 == null) {
22465            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22466        }
22467        // Verify that the array length is a multiple of the vector size.
22468        if (in2.length % 2 != 0) {
22469            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
22470        }
22471        // Verify that input array lengths are the same.
22472        if (in1.length / 4 != in2.length / 2) {
22473            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22474        }
22475        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
22476        ain2.setAutoPadding(true);
22477        ain2.copyFrom(in2);
22478
22479        result_int result = reduce_my_char4_half2_1(ain1, ain2, null);
22480        result.mTempIns = new Allocation[]{ain1, ain2};
22481        return result;
22482    }
22483
22484    // ain1 = "char4 a"
22485    // ain2 = "half2 b"
22486    public result_int reduce_my_char4_half2_1(Allocation ain1, Allocation ain2) {
22487        return reduce_my_char4_half2_1(ain1, ain2, null);
22488    }
22489
22490    // ain1 = "char4 a"
22491    // ain2 = "half2 b"
22492    public result_int reduce_my_char4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22493        Type t0, t1;
22494        // check ain1
22495        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22496            throw new RSRuntimeException("Type mismatch with I8_4!");
22497        }
22498        // check ain2
22499        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
22500            throw new RSRuntimeException("Type mismatch with F16_2!");
22501        }
22502        // Verify dimensions
22503        t0 = ain1.getType();
22504        t1 = ain2.getType();
22505        if ((t0.getCount() != t1.getCount()) ||
22506            (t0.getX() != t1.getX()) ||
22507            (t0.getY() != t1.getY()) ||
22508            (t0.getZ() != t1.getZ()) ||
22509            (t0.hasFaces()   != t1.hasFaces()) ||
22510            (t0.hasMipmaps() != t1.hasMipmaps())) {
22511            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22512        }
22513
22514        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22515        aout.setAutoPadding(true);
22516        reduce(mExportReduceIdx_my_char4_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
22517        return new result_int(aout);
22518    }
22519
22520    private final static int mExportReduceIdx_my_char4_half4_0 = 340;
22521    // in1 = "a", flattened 4-vectors
22522    // in2 = "b", flattened 4-vectors
22523    public result_int reduce_my_char4_half4_0(byte[] in1, short[] in2) {
22524        // Verify that "in1" is non-null.
22525        if (in1 == null) {
22526            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22527        }
22528        // Verify that the array length is a multiple of the vector size.
22529        if (in1.length % 4 != 0) {
22530            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22531        }
22532        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22533        ain1.setAutoPadding(true);
22534        ain1.copyFrom(in1);
22535        // Verify that "in2" is non-null.
22536        if (in2 == null) {
22537            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22538        }
22539        // Verify that the array length is a multiple of the vector size.
22540        if (in2.length % 4 != 0) {
22541            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
22542        }
22543        // Verify that input array lengths are the same.
22544        if (in1.length / 4 != in2.length / 4) {
22545            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22546        }
22547        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
22548        ain2.setAutoPadding(true);
22549        ain2.copyFrom(in2);
22550
22551        result_int result = reduce_my_char4_half4_0(ain1, ain2, null);
22552        result.mTempIns = new Allocation[]{ain1, ain2};
22553        return result;
22554    }
22555
22556    // ain1 = "char4 a"
22557    // ain2 = "half4 b"
22558    public result_int reduce_my_char4_half4_0(Allocation ain1, Allocation ain2) {
22559        return reduce_my_char4_half4_0(ain1, ain2, null);
22560    }
22561
22562    // ain1 = "char4 a"
22563    // ain2 = "half4 b"
22564    public result_int reduce_my_char4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22565        Type t0, t1;
22566        // check ain1
22567        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22568            throw new RSRuntimeException("Type mismatch with I8_4!");
22569        }
22570        // check ain2
22571        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
22572            throw new RSRuntimeException("Type mismatch with F16_4!");
22573        }
22574        // Verify dimensions
22575        t0 = ain1.getType();
22576        t1 = ain2.getType();
22577        if ((t0.getCount() != t1.getCount()) ||
22578            (t0.getX() != t1.getX()) ||
22579            (t0.getY() != t1.getY()) ||
22580            (t0.getZ() != t1.getZ()) ||
22581            (t0.hasFaces()   != t1.hasFaces()) ||
22582            (t0.hasMipmaps() != t1.hasMipmaps())) {
22583            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22584        }
22585
22586        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22587        aout.setAutoPadding(true);
22588        reduce(mExportReduceIdx_my_char4_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
22589        return new result_int(aout);
22590    }
22591
22592    private final static int mExportReduceIdx_my_char4_half4_1 = 341;
22593    // in1 = "a", flattened 4-vectors
22594    // in2 = "b", flattened 4-vectors
22595    public result_int reduce_my_char4_half4_1(byte[] in1, short[] in2) {
22596        // Verify that "in1" is non-null.
22597        if (in1 == null) {
22598            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22599        }
22600        // Verify that the array length is a multiple of the vector size.
22601        if (in1.length % 4 != 0) {
22602            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22603        }
22604        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22605        ain1.setAutoPadding(true);
22606        ain1.copyFrom(in1);
22607        // Verify that "in2" is non-null.
22608        if (in2 == null) {
22609            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22610        }
22611        // Verify that the array length is a multiple of the vector size.
22612        if (in2.length % 4 != 0) {
22613            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
22614        }
22615        // Verify that input array lengths are the same.
22616        if (in1.length / 4 != in2.length / 4) {
22617            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22618        }
22619        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
22620        ain2.setAutoPadding(true);
22621        ain2.copyFrom(in2);
22622
22623        result_int result = reduce_my_char4_half4_1(ain1, ain2, null);
22624        result.mTempIns = new Allocation[]{ain1, ain2};
22625        return result;
22626    }
22627
22628    // ain1 = "char4 a"
22629    // ain2 = "half4 b"
22630    public result_int reduce_my_char4_half4_1(Allocation ain1, Allocation ain2) {
22631        return reduce_my_char4_half4_1(ain1, ain2, null);
22632    }
22633
22634    // ain1 = "char4 a"
22635    // ain2 = "half4 b"
22636    public result_int reduce_my_char4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22637        Type t0, t1;
22638        // check ain1
22639        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22640            throw new RSRuntimeException("Type mismatch with I8_4!");
22641        }
22642        // check ain2
22643        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
22644            throw new RSRuntimeException("Type mismatch with F16_4!");
22645        }
22646        // Verify dimensions
22647        t0 = ain1.getType();
22648        t1 = ain2.getType();
22649        if ((t0.getCount() != t1.getCount()) ||
22650            (t0.getX() != t1.getX()) ||
22651            (t0.getY() != t1.getY()) ||
22652            (t0.getZ() != t1.getZ()) ||
22653            (t0.hasFaces()   != t1.hasFaces()) ||
22654            (t0.hasMipmaps() != t1.hasMipmaps())) {
22655            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22656        }
22657
22658        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22659        aout.setAutoPadding(true);
22660        reduce(mExportReduceIdx_my_char4_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
22661        return new result_int(aout);
22662    }
22663
22664    private final static int mExportReduceIdx_my_char4_float_0 = 342;
22665    // in1 = "a", flattened 4-vectors
22666    // in2 = "b"
22667    public result_int reduce_my_char4_float_0(byte[] in1, float[] in2) {
22668        // Verify that "in1" is non-null.
22669        if (in1 == null) {
22670            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22671        }
22672        // Verify that the array length is a multiple of the vector size.
22673        if (in1.length % 4 != 0) {
22674            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22675        }
22676        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22677        ain1.setAutoPadding(true);
22678        ain1.copyFrom(in1);
22679        // Verify that "in2" is non-null.
22680        if (in2 == null) {
22681            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22682        }
22683        // Verify that input array lengths are the same.
22684        if (in1.length / 4 != in2.length) {
22685            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22686        }
22687        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
22688        ain2.setAutoPadding(true);
22689        ain2.copyFrom(in2);
22690
22691        result_int result = reduce_my_char4_float_0(ain1, ain2, null);
22692        result.mTempIns = new Allocation[]{ain1, ain2};
22693        return result;
22694    }
22695
22696    // ain1 = "char4 a"
22697    // ain2 = "float b"
22698    public result_int reduce_my_char4_float_0(Allocation ain1, Allocation ain2) {
22699        return reduce_my_char4_float_0(ain1, ain2, null);
22700    }
22701
22702    // ain1 = "char4 a"
22703    // ain2 = "float b"
22704    public result_int reduce_my_char4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22705        Type t0, t1;
22706        // check ain1
22707        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22708            throw new RSRuntimeException("Type mismatch with I8_4!");
22709        }
22710        // check ain2
22711        if (!ain2.getType().getElement().isCompatible(__F32)) {
22712            throw new RSRuntimeException("Type mismatch with F32!");
22713        }
22714        // Verify dimensions
22715        t0 = ain1.getType();
22716        t1 = ain2.getType();
22717        if ((t0.getCount() != t1.getCount()) ||
22718            (t0.getX() != t1.getX()) ||
22719            (t0.getY() != t1.getY()) ||
22720            (t0.getZ() != t1.getZ()) ||
22721            (t0.hasFaces()   != t1.hasFaces()) ||
22722            (t0.hasMipmaps() != t1.hasMipmaps())) {
22723            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22724        }
22725
22726        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22727        aout.setAutoPadding(true);
22728        reduce(mExportReduceIdx_my_char4_float_0, new Allocation[]{ain1, ain2}, aout, sc);
22729        return new result_int(aout);
22730    }
22731
22732    private final static int mExportReduceIdx_my_char4_float_1 = 343;
22733    // in1 = "a", flattened 4-vectors
22734    // in2 = "b"
22735    public result_int reduce_my_char4_float_1(byte[] in1, float[] in2) {
22736        // Verify that "in1" is non-null.
22737        if (in1 == null) {
22738            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22739        }
22740        // Verify that the array length is a multiple of the vector size.
22741        if (in1.length % 4 != 0) {
22742            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22743        }
22744        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22745        ain1.setAutoPadding(true);
22746        ain1.copyFrom(in1);
22747        // Verify that "in2" is non-null.
22748        if (in2 == null) {
22749            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22750        }
22751        // Verify that input array lengths are the same.
22752        if (in1.length / 4 != in2.length) {
22753            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22754        }
22755        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
22756        ain2.setAutoPadding(true);
22757        ain2.copyFrom(in2);
22758
22759        result_int result = reduce_my_char4_float_1(ain1, ain2, null);
22760        result.mTempIns = new Allocation[]{ain1, ain2};
22761        return result;
22762    }
22763
22764    // ain1 = "char4 a"
22765    // ain2 = "float b"
22766    public result_int reduce_my_char4_float_1(Allocation ain1, Allocation ain2) {
22767        return reduce_my_char4_float_1(ain1, ain2, null);
22768    }
22769
22770    // ain1 = "char4 a"
22771    // ain2 = "float b"
22772    public result_int reduce_my_char4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22773        Type t0, t1;
22774        // check ain1
22775        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22776            throw new RSRuntimeException("Type mismatch with I8_4!");
22777        }
22778        // check ain2
22779        if (!ain2.getType().getElement().isCompatible(__F32)) {
22780            throw new RSRuntimeException("Type mismatch with F32!");
22781        }
22782        // Verify dimensions
22783        t0 = ain1.getType();
22784        t1 = ain2.getType();
22785        if ((t0.getCount() != t1.getCount()) ||
22786            (t0.getX() != t1.getX()) ||
22787            (t0.getY() != t1.getY()) ||
22788            (t0.getZ() != t1.getZ()) ||
22789            (t0.hasFaces()   != t1.hasFaces()) ||
22790            (t0.hasMipmaps() != t1.hasMipmaps())) {
22791            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22792        }
22793
22794        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22795        aout.setAutoPadding(true);
22796        reduce(mExportReduceIdx_my_char4_float_1, new Allocation[]{ain1, ain2}, aout, sc);
22797        return new result_int(aout);
22798    }
22799
22800    private final static int mExportReduceIdx_my_char4_float2_0 = 344;
22801    // in1 = "a", flattened 4-vectors
22802    // in2 = "b", flattened 2-vectors
22803    public result_int reduce_my_char4_float2_0(byte[] in1, float[] in2) {
22804        // Verify that "in1" is non-null.
22805        if (in1 == null) {
22806            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22807        }
22808        // Verify that the array length is a multiple of the vector size.
22809        if (in1.length % 4 != 0) {
22810            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22811        }
22812        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22813        ain1.setAutoPadding(true);
22814        ain1.copyFrom(in1);
22815        // Verify that "in2" is non-null.
22816        if (in2 == null) {
22817            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22818        }
22819        // Verify that the array length is a multiple of the vector size.
22820        if (in2.length % 2 != 0) {
22821            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
22822        }
22823        // Verify that input array lengths are the same.
22824        if (in1.length / 4 != in2.length / 2) {
22825            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22826        }
22827        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
22828        ain2.setAutoPadding(true);
22829        ain2.copyFrom(in2);
22830
22831        result_int result = reduce_my_char4_float2_0(ain1, ain2, null);
22832        result.mTempIns = new Allocation[]{ain1, ain2};
22833        return result;
22834    }
22835
22836    // ain1 = "char4 a"
22837    // ain2 = "float2 b"
22838    public result_int reduce_my_char4_float2_0(Allocation ain1, Allocation ain2) {
22839        return reduce_my_char4_float2_0(ain1, ain2, null);
22840    }
22841
22842    // ain1 = "char4 a"
22843    // ain2 = "float2 b"
22844    public result_int reduce_my_char4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22845        Type t0, t1;
22846        // check ain1
22847        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22848            throw new RSRuntimeException("Type mismatch with I8_4!");
22849        }
22850        // check ain2
22851        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
22852            throw new RSRuntimeException("Type mismatch with F32_2!");
22853        }
22854        // Verify dimensions
22855        t0 = ain1.getType();
22856        t1 = ain2.getType();
22857        if ((t0.getCount() != t1.getCount()) ||
22858            (t0.getX() != t1.getX()) ||
22859            (t0.getY() != t1.getY()) ||
22860            (t0.getZ() != t1.getZ()) ||
22861            (t0.hasFaces()   != t1.hasFaces()) ||
22862            (t0.hasMipmaps() != t1.hasMipmaps())) {
22863            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22864        }
22865
22866        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22867        aout.setAutoPadding(true);
22868        reduce(mExportReduceIdx_my_char4_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
22869        return new result_int(aout);
22870    }
22871
22872    private final static int mExportReduceIdx_my_char4_float2_1 = 345;
22873    // in1 = "a", flattened 4-vectors
22874    // in2 = "b", flattened 2-vectors
22875    public result_int reduce_my_char4_float2_1(byte[] in1, float[] in2) {
22876        // Verify that "in1" is non-null.
22877        if (in1 == null) {
22878            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22879        }
22880        // Verify that the array length is a multiple of the vector size.
22881        if (in1.length % 4 != 0) {
22882            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22883        }
22884        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22885        ain1.setAutoPadding(true);
22886        ain1.copyFrom(in1);
22887        // Verify that "in2" is non-null.
22888        if (in2 == null) {
22889            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22890        }
22891        // Verify that the array length is a multiple of the vector size.
22892        if (in2.length % 2 != 0) {
22893            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
22894        }
22895        // Verify that input array lengths are the same.
22896        if (in1.length / 4 != in2.length / 2) {
22897            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22898        }
22899        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
22900        ain2.setAutoPadding(true);
22901        ain2.copyFrom(in2);
22902
22903        result_int result = reduce_my_char4_float2_1(ain1, ain2, null);
22904        result.mTempIns = new Allocation[]{ain1, ain2};
22905        return result;
22906    }
22907
22908    // ain1 = "char4 a"
22909    // ain2 = "float2 b"
22910    public result_int reduce_my_char4_float2_1(Allocation ain1, Allocation ain2) {
22911        return reduce_my_char4_float2_1(ain1, ain2, null);
22912    }
22913
22914    // ain1 = "char4 a"
22915    // ain2 = "float2 b"
22916    public result_int reduce_my_char4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22917        Type t0, t1;
22918        // check ain1
22919        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22920            throw new RSRuntimeException("Type mismatch with I8_4!");
22921        }
22922        // check ain2
22923        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
22924            throw new RSRuntimeException("Type mismatch with F32_2!");
22925        }
22926        // Verify dimensions
22927        t0 = ain1.getType();
22928        t1 = ain2.getType();
22929        if ((t0.getCount() != t1.getCount()) ||
22930            (t0.getX() != t1.getX()) ||
22931            (t0.getY() != t1.getY()) ||
22932            (t0.getZ() != t1.getZ()) ||
22933            (t0.hasFaces()   != t1.hasFaces()) ||
22934            (t0.hasMipmaps() != t1.hasMipmaps())) {
22935            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
22936        }
22937
22938        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
22939        aout.setAutoPadding(true);
22940        reduce(mExportReduceIdx_my_char4_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
22941        return new result_int(aout);
22942    }
22943
22944    private final static int mExportReduceIdx_my_char4_float4_0 = 346;
22945    // in1 = "a", flattened 4-vectors
22946    // in2 = "b", flattened 4-vectors
22947    public result_int reduce_my_char4_float4_0(byte[] in1, float[] in2) {
22948        // Verify that "in1" is non-null.
22949        if (in1 == null) {
22950            throw new RSIllegalArgumentException("Array \"in1\" is null!");
22951        }
22952        // Verify that the array length is a multiple of the vector size.
22953        if (in1.length % 4 != 0) {
22954            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
22955        }
22956        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
22957        ain1.setAutoPadding(true);
22958        ain1.copyFrom(in1);
22959        // Verify that "in2" is non-null.
22960        if (in2 == null) {
22961            throw new RSIllegalArgumentException("Array \"in2\" is null!");
22962        }
22963        // Verify that the array length is a multiple of the vector size.
22964        if (in2.length % 4 != 0) {
22965            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
22966        }
22967        // Verify that input array lengths are the same.
22968        if (in1.length / 4 != in2.length / 4) {
22969            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
22970        }
22971        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
22972        ain2.setAutoPadding(true);
22973        ain2.copyFrom(in2);
22974
22975        result_int result = reduce_my_char4_float4_0(ain1, ain2, null);
22976        result.mTempIns = new Allocation[]{ain1, ain2};
22977        return result;
22978    }
22979
22980    // ain1 = "char4 a"
22981    // ain2 = "float4 b"
22982    public result_int reduce_my_char4_float4_0(Allocation ain1, Allocation ain2) {
22983        return reduce_my_char4_float4_0(ain1, ain2, null);
22984    }
22985
22986    // ain1 = "char4 a"
22987    // ain2 = "float4 b"
22988    public result_int reduce_my_char4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
22989        Type t0, t1;
22990        // check ain1
22991        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
22992            throw new RSRuntimeException("Type mismatch with I8_4!");
22993        }
22994        // check ain2
22995        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
22996            throw new RSRuntimeException("Type mismatch with F32_4!");
22997        }
22998        // Verify dimensions
22999        t0 = ain1.getType();
23000        t1 = ain2.getType();
23001        if ((t0.getCount() != t1.getCount()) ||
23002            (t0.getX() != t1.getX()) ||
23003            (t0.getY() != t1.getY()) ||
23004            (t0.getZ() != t1.getZ()) ||
23005            (t0.hasFaces()   != t1.hasFaces()) ||
23006            (t0.hasMipmaps() != t1.hasMipmaps())) {
23007            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23008        }
23009
23010        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23011        aout.setAutoPadding(true);
23012        reduce(mExportReduceIdx_my_char4_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
23013        return new result_int(aout);
23014    }
23015
23016    private final static int mExportReduceIdx_my_char4_float4_1 = 347;
23017    // in1 = "a", flattened 4-vectors
23018    // in2 = "b", flattened 4-vectors
23019    public result_int reduce_my_char4_float4_1(byte[] in1, float[] in2) {
23020        // Verify that "in1" is non-null.
23021        if (in1 == null) {
23022            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23023        }
23024        // Verify that the array length is a multiple of the vector size.
23025        if (in1.length % 4 != 0) {
23026            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23027        }
23028        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23029        ain1.setAutoPadding(true);
23030        ain1.copyFrom(in1);
23031        // Verify that "in2" is non-null.
23032        if (in2 == null) {
23033            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23034        }
23035        // Verify that the array length is a multiple of the vector size.
23036        if (in2.length % 4 != 0) {
23037            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
23038        }
23039        // Verify that input array lengths are the same.
23040        if (in1.length / 4 != in2.length / 4) {
23041            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23042        }
23043        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
23044        ain2.setAutoPadding(true);
23045        ain2.copyFrom(in2);
23046
23047        result_int result = reduce_my_char4_float4_1(ain1, ain2, null);
23048        result.mTempIns = new Allocation[]{ain1, ain2};
23049        return result;
23050    }
23051
23052    // ain1 = "char4 a"
23053    // ain2 = "float4 b"
23054    public result_int reduce_my_char4_float4_1(Allocation ain1, Allocation ain2) {
23055        return reduce_my_char4_float4_1(ain1, ain2, null);
23056    }
23057
23058    // ain1 = "char4 a"
23059    // ain2 = "float4 b"
23060    public result_int reduce_my_char4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23061        Type t0, t1;
23062        // check ain1
23063        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23064            throw new RSRuntimeException("Type mismatch with I8_4!");
23065        }
23066        // check ain2
23067        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
23068            throw new RSRuntimeException("Type mismatch with F32_4!");
23069        }
23070        // Verify dimensions
23071        t0 = ain1.getType();
23072        t1 = ain2.getType();
23073        if ((t0.getCount() != t1.getCount()) ||
23074            (t0.getX() != t1.getX()) ||
23075            (t0.getY() != t1.getY()) ||
23076            (t0.getZ() != t1.getZ()) ||
23077            (t0.hasFaces()   != t1.hasFaces()) ||
23078            (t0.hasMipmaps() != t1.hasMipmaps())) {
23079            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23080        }
23081
23082        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23083        aout.setAutoPadding(true);
23084        reduce(mExportReduceIdx_my_char4_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
23085        return new result_int(aout);
23086    }
23087
23088    private final static int mExportReduceIdx_my_char4_char_0 = 348;
23089    // in1 = "a", flattened 4-vectors
23090    // in2 = "b"
23091    public result_int reduce_my_char4_char_0(byte[] in1, byte[] in2) {
23092        // Verify that "in1" is non-null.
23093        if (in1 == null) {
23094            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23095        }
23096        // Verify that the array length is a multiple of the vector size.
23097        if (in1.length % 4 != 0) {
23098            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23099        }
23100        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23101        ain1.setAutoPadding(true);
23102        ain1.copyFrom(in1);
23103        // Verify that "in2" is non-null.
23104        if (in2 == null) {
23105            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23106        }
23107        // Verify that input array lengths are the same.
23108        if (in1.length / 4 != in2.length) {
23109            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23110        }
23111        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
23112        ain2.setAutoPadding(true);
23113        ain2.copyFrom(in2);
23114
23115        result_int result = reduce_my_char4_char_0(ain1, ain2, null);
23116        result.mTempIns = new Allocation[]{ain1, ain2};
23117        return result;
23118    }
23119
23120    // ain1 = "char4 a"
23121    // ain2 = "char b"
23122    public result_int reduce_my_char4_char_0(Allocation ain1, Allocation ain2) {
23123        return reduce_my_char4_char_0(ain1, ain2, null);
23124    }
23125
23126    // ain1 = "char4 a"
23127    // ain2 = "char b"
23128    public result_int reduce_my_char4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23129        Type t0, t1;
23130        // check ain1
23131        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23132            throw new RSRuntimeException("Type mismatch with I8_4!");
23133        }
23134        // check ain2
23135        if (!ain2.getType().getElement().isCompatible(__I8)) {
23136            throw new RSRuntimeException("Type mismatch with I8!");
23137        }
23138        // Verify dimensions
23139        t0 = ain1.getType();
23140        t1 = ain2.getType();
23141        if ((t0.getCount() != t1.getCount()) ||
23142            (t0.getX() != t1.getX()) ||
23143            (t0.getY() != t1.getY()) ||
23144            (t0.getZ() != t1.getZ()) ||
23145            (t0.hasFaces()   != t1.hasFaces()) ||
23146            (t0.hasMipmaps() != t1.hasMipmaps())) {
23147            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23148        }
23149
23150        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23151        aout.setAutoPadding(true);
23152        reduce(mExportReduceIdx_my_char4_char_0, new Allocation[]{ain1, ain2}, aout, sc);
23153        return new result_int(aout);
23154    }
23155
23156    private final static int mExportReduceIdx_my_char4_char_1 = 349;
23157    // in1 = "a", flattened 4-vectors
23158    // in2 = "b"
23159    public result_int reduce_my_char4_char_1(byte[] in1, byte[] in2) {
23160        // Verify that "in1" is non-null.
23161        if (in1 == null) {
23162            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23163        }
23164        // Verify that the array length is a multiple of the vector size.
23165        if (in1.length % 4 != 0) {
23166            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23167        }
23168        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23169        ain1.setAutoPadding(true);
23170        ain1.copyFrom(in1);
23171        // Verify that "in2" is non-null.
23172        if (in2 == null) {
23173            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23174        }
23175        // Verify that input array lengths are the same.
23176        if (in1.length / 4 != in2.length) {
23177            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23178        }
23179        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
23180        ain2.setAutoPadding(true);
23181        ain2.copyFrom(in2);
23182
23183        result_int result = reduce_my_char4_char_1(ain1, ain2, null);
23184        result.mTempIns = new Allocation[]{ain1, ain2};
23185        return result;
23186    }
23187
23188    // ain1 = "char4 a"
23189    // ain2 = "char b"
23190    public result_int reduce_my_char4_char_1(Allocation ain1, Allocation ain2) {
23191        return reduce_my_char4_char_1(ain1, ain2, null);
23192    }
23193
23194    // ain1 = "char4 a"
23195    // ain2 = "char b"
23196    public result_int reduce_my_char4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23197        Type t0, t1;
23198        // check ain1
23199        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23200            throw new RSRuntimeException("Type mismatch with I8_4!");
23201        }
23202        // check ain2
23203        if (!ain2.getType().getElement().isCompatible(__I8)) {
23204            throw new RSRuntimeException("Type mismatch with I8!");
23205        }
23206        // Verify dimensions
23207        t0 = ain1.getType();
23208        t1 = ain2.getType();
23209        if ((t0.getCount() != t1.getCount()) ||
23210            (t0.getX() != t1.getX()) ||
23211            (t0.getY() != t1.getY()) ||
23212            (t0.getZ() != t1.getZ()) ||
23213            (t0.hasFaces()   != t1.hasFaces()) ||
23214            (t0.hasMipmaps() != t1.hasMipmaps())) {
23215            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23216        }
23217
23218        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23219        aout.setAutoPadding(true);
23220        reduce(mExportReduceIdx_my_char4_char_1, new Allocation[]{ain1, ain2}, aout, sc);
23221        return new result_int(aout);
23222    }
23223
23224    private final static int mExportReduceIdx_my_char4_char2_0 = 350;
23225    // in1 = "a", flattened 4-vectors
23226    // in2 = "b", flattened 2-vectors
23227    public result_int reduce_my_char4_char2_0(byte[] in1, byte[] in2) {
23228        // Verify that "in1" is non-null.
23229        if (in1 == null) {
23230            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23231        }
23232        // Verify that the array length is a multiple of the vector size.
23233        if (in1.length % 4 != 0) {
23234            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23235        }
23236        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23237        ain1.setAutoPadding(true);
23238        ain1.copyFrom(in1);
23239        // Verify that "in2" is non-null.
23240        if (in2 == null) {
23241            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23242        }
23243        // Verify that the array length is a multiple of the vector size.
23244        if (in2.length % 2 != 0) {
23245            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
23246        }
23247        // Verify that input array lengths are the same.
23248        if (in1.length / 4 != in2.length / 2) {
23249            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23250        }
23251        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
23252        ain2.setAutoPadding(true);
23253        ain2.copyFrom(in2);
23254
23255        result_int result = reduce_my_char4_char2_0(ain1, ain2, null);
23256        result.mTempIns = new Allocation[]{ain1, ain2};
23257        return result;
23258    }
23259
23260    // ain1 = "char4 a"
23261    // ain2 = "char2 b"
23262    public result_int reduce_my_char4_char2_0(Allocation ain1, Allocation ain2) {
23263        return reduce_my_char4_char2_0(ain1, ain2, null);
23264    }
23265
23266    // ain1 = "char4 a"
23267    // ain2 = "char2 b"
23268    public result_int reduce_my_char4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23269        Type t0, t1;
23270        // check ain1
23271        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23272            throw new RSRuntimeException("Type mismatch with I8_4!");
23273        }
23274        // check ain2
23275        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
23276            throw new RSRuntimeException("Type mismatch with I8_2!");
23277        }
23278        // Verify dimensions
23279        t0 = ain1.getType();
23280        t1 = ain2.getType();
23281        if ((t0.getCount() != t1.getCount()) ||
23282            (t0.getX() != t1.getX()) ||
23283            (t0.getY() != t1.getY()) ||
23284            (t0.getZ() != t1.getZ()) ||
23285            (t0.hasFaces()   != t1.hasFaces()) ||
23286            (t0.hasMipmaps() != t1.hasMipmaps())) {
23287            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23288        }
23289
23290        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23291        aout.setAutoPadding(true);
23292        reduce(mExportReduceIdx_my_char4_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
23293        return new result_int(aout);
23294    }
23295
23296    private final static int mExportReduceIdx_my_char4_char2_1 = 351;
23297    // in1 = "a", flattened 4-vectors
23298    // in2 = "b", flattened 2-vectors
23299    public result_int reduce_my_char4_char2_1(byte[] in1, byte[] in2) {
23300        // Verify that "in1" is non-null.
23301        if (in1 == null) {
23302            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23303        }
23304        // Verify that the array length is a multiple of the vector size.
23305        if (in1.length % 4 != 0) {
23306            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23307        }
23308        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23309        ain1.setAutoPadding(true);
23310        ain1.copyFrom(in1);
23311        // Verify that "in2" is non-null.
23312        if (in2 == null) {
23313            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23314        }
23315        // Verify that the array length is a multiple of the vector size.
23316        if (in2.length % 2 != 0) {
23317            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
23318        }
23319        // Verify that input array lengths are the same.
23320        if (in1.length / 4 != in2.length / 2) {
23321            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23322        }
23323        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
23324        ain2.setAutoPadding(true);
23325        ain2.copyFrom(in2);
23326
23327        result_int result = reduce_my_char4_char2_1(ain1, ain2, null);
23328        result.mTempIns = new Allocation[]{ain1, ain2};
23329        return result;
23330    }
23331
23332    // ain1 = "char4 a"
23333    // ain2 = "char2 b"
23334    public result_int reduce_my_char4_char2_1(Allocation ain1, Allocation ain2) {
23335        return reduce_my_char4_char2_1(ain1, ain2, null);
23336    }
23337
23338    // ain1 = "char4 a"
23339    // ain2 = "char2 b"
23340    public result_int reduce_my_char4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23341        Type t0, t1;
23342        // check ain1
23343        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23344            throw new RSRuntimeException("Type mismatch with I8_4!");
23345        }
23346        // check ain2
23347        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
23348            throw new RSRuntimeException("Type mismatch with I8_2!");
23349        }
23350        // Verify dimensions
23351        t0 = ain1.getType();
23352        t1 = ain2.getType();
23353        if ((t0.getCount() != t1.getCount()) ||
23354            (t0.getX() != t1.getX()) ||
23355            (t0.getY() != t1.getY()) ||
23356            (t0.getZ() != t1.getZ()) ||
23357            (t0.hasFaces()   != t1.hasFaces()) ||
23358            (t0.hasMipmaps() != t1.hasMipmaps())) {
23359            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23360        }
23361
23362        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23363        aout.setAutoPadding(true);
23364        reduce(mExportReduceIdx_my_char4_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
23365        return new result_int(aout);
23366    }
23367
23368    private final static int mExportReduceIdx_my_char4_char4_0 = 352;
23369    // in1 = "a", flattened 4-vectors
23370    // in2 = "b", flattened 4-vectors
23371    public result_int reduce_my_char4_char4_0(byte[] in1, byte[] in2) {
23372        // Verify that "in1" is non-null.
23373        if (in1 == null) {
23374            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23375        }
23376        // Verify that the array length is a multiple of the vector size.
23377        if (in1.length % 4 != 0) {
23378            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23379        }
23380        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23381        ain1.setAutoPadding(true);
23382        ain1.copyFrom(in1);
23383        // Verify that "in2" is non-null.
23384        if (in2 == null) {
23385            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23386        }
23387        // Verify that the array length is a multiple of the vector size.
23388        if (in2.length % 4 != 0) {
23389            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
23390        }
23391        // Verify that input array lengths are the same.
23392        if (in1.length / 4 != in2.length / 4) {
23393            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23394        }
23395        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
23396        ain2.setAutoPadding(true);
23397        ain2.copyFrom(in2);
23398
23399        result_int result = reduce_my_char4_char4_0(ain1, ain2, null);
23400        result.mTempIns = new Allocation[]{ain1, ain2};
23401        return result;
23402    }
23403
23404    // ain1 = "char4 a"
23405    // ain2 = "char4 b"
23406    public result_int reduce_my_char4_char4_0(Allocation ain1, Allocation ain2) {
23407        return reduce_my_char4_char4_0(ain1, ain2, null);
23408    }
23409
23410    // ain1 = "char4 a"
23411    // ain2 = "char4 b"
23412    public result_int reduce_my_char4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23413        Type t0, t1;
23414        // check ain1
23415        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23416            throw new RSRuntimeException("Type mismatch with I8_4!");
23417        }
23418        // check ain2
23419        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
23420            throw new RSRuntimeException("Type mismatch with I8_4!");
23421        }
23422        // Verify dimensions
23423        t0 = ain1.getType();
23424        t1 = ain2.getType();
23425        if ((t0.getCount() != t1.getCount()) ||
23426            (t0.getX() != t1.getX()) ||
23427            (t0.getY() != t1.getY()) ||
23428            (t0.getZ() != t1.getZ()) ||
23429            (t0.hasFaces()   != t1.hasFaces()) ||
23430            (t0.hasMipmaps() != t1.hasMipmaps())) {
23431            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23432        }
23433
23434        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23435        aout.setAutoPadding(true);
23436        reduce(mExportReduceIdx_my_char4_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
23437        return new result_int(aout);
23438    }
23439
23440    private final static int mExportReduceIdx_my_char4_char4_1 = 353;
23441    // in1 = "a", flattened 4-vectors
23442    // in2 = "b", flattened 4-vectors
23443    public result_int reduce_my_char4_char4_1(byte[] in1, byte[] in2) {
23444        // Verify that "in1" is non-null.
23445        if (in1 == null) {
23446            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23447        }
23448        // Verify that the array length is a multiple of the vector size.
23449        if (in1.length % 4 != 0) {
23450            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23451        }
23452        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23453        ain1.setAutoPadding(true);
23454        ain1.copyFrom(in1);
23455        // Verify that "in2" is non-null.
23456        if (in2 == null) {
23457            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23458        }
23459        // Verify that the array length is a multiple of the vector size.
23460        if (in2.length % 4 != 0) {
23461            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
23462        }
23463        // Verify that input array lengths are the same.
23464        if (in1.length / 4 != in2.length / 4) {
23465            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23466        }
23467        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
23468        ain2.setAutoPadding(true);
23469        ain2.copyFrom(in2);
23470
23471        result_int result = reduce_my_char4_char4_1(ain1, ain2, null);
23472        result.mTempIns = new Allocation[]{ain1, ain2};
23473        return result;
23474    }
23475
23476    // ain1 = "char4 a"
23477    // ain2 = "char4 b"
23478    public result_int reduce_my_char4_char4_1(Allocation ain1, Allocation ain2) {
23479        return reduce_my_char4_char4_1(ain1, ain2, null);
23480    }
23481
23482    // ain1 = "char4 a"
23483    // ain2 = "char4 b"
23484    public result_int reduce_my_char4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23485        Type t0, t1;
23486        // check ain1
23487        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23488            throw new RSRuntimeException("Type mismatch with I8_4!");
23489        }
23490        // check ain2
23491        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
23492            throw new RSRuntimeException("Type mismatch with I8_4!");
23493        }
23494        // Verify dimensions
23495        t0 = ain1.getType();
23496        t1 = ain2.getType();
23497        if ((t0.getCount() != t1.getCount()) ||
23498            (t0.getX() != t1.getX()) ||
23499            (t0.getY() != t1.getY()) ||
23500            (t0.getZ() != t1.getZ()) ||
23501            (t0.hasFaces()   != t1.hasFaces()) ||
23502            (t0.hasMipmaps() != t1.hasMipmaps())) {
23503            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23504        }
23505
23506        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23507        aout.setAutoPadding(true);
23508        reduce(mExportReduceIdx_my_char4_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
23509        return new result_int(aout);
23510    }
23511
23512    private final static int mExportReduceIdx_my_char4_short_0 = 354;
23513    // in1 = "a", flattened 4-vectors
23514    // in2 = "b"
23515    public result_int reduce_my_char4_short_0(byte[] in1, short[] in2) {
23516        // Verify that "in1" is non-null.
23517        if (in1 == null) {
23518            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23519        }
23520        // Verify that the array length is a multiple of the vector size.
23521        if (in1.length % 4 != 0) {
23522            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23523        }
23524        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23525        ain1.setAutoPadding(true);
23526        ain1.copyFrom(in1);
23527        // Verify that "in2" is non-null.
23528        if (in2 == null) {
23529            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23530        }
23531        // Verify that input array lengths are the same.
23532        if (in1.length / 4 != in2.length) {
23533            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23534        }
23535        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
23536        ain2.setAutoPadding(true);
23537        ain2.copyFrom(in2);
23538
23539        result_int result = reduce_my_char4_short_0(ain1, ain2, null);
23540        result.mTempIns = new Allocation[]{ain1, ain2};
23541        return result;
23542    }
23543
23544    // ain1 = "char4 a"
23545    // ain2 = "short b"
23546    public result_int reduce_my_char4_short_0(Allocation ain1, Allocation ain2) {
23547        return reduce_my_char4_short_0(ain1, ain2, null);
23548    }
23549
23550    // ain1 = "char4 a"
23551    // ain2 = "short b"
23552    public result_int reduce_my_char4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23553        Type t0, t1;
23554        // check ain1
23555        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23556            throw new RSRuntimeException("Type mismatch with I8_4!");
23557        }
23558        // check ain2
23559        if (!ain2.getType().getElement().isCompatible(__I16)) {
23560            throw new RSRuntimeException("Type mismatch with I16!");
23561        }
23562        // Verify dimensions
23563        t0 = ain1.getType();
23564        t1 = ain2.getType();
23565        if ((t0.getCount() != t1.getCount()) ||
23566            (t0.getX() != t1.getX()) ||
23567            (t0.getY() != t1.getY()) ||
23568            (t0.getZ() != t1.getZ()) ||
23569            (t0.hasFaces()   != t1.hasFaces()) ||
23570            (t0.hasMipmaps() != t1.hasMipmaps())) {
23571            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23572        }
23573
23574        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23575        aout.setAutoPadding(true);
23576        reduce(mExportReduceIdx_my_char4_short_0, new Allocation[]{ain1, ain2}, aout, sc);
23577        return new result_int(aout);
23578    }
23579
23580    private final static int mExportReduceIdx_my_char4_short_1 = 355;
23581    // in1 = "a", flattened 4-vectors
23582    // in2 = "b"
23583    public result_int reduce_my_char4_short_1(byte[] in1, short[] in2) {
23584        // Verify that "in1" is non-null.
23585        if (in1 == null) {
23586            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23587        }
23588        // Verify that the array length is a multiple of the vector size.
23589        if (in1.length % 4 != 0) {
23590            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23591        }
23592        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23593        ain1.setAutoPadding(true);
23594        ain1.copyFrom(in1);
23595        // Verify that "in2" is non-null.
23596        if (in2 == null) {
23597            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23598        }
23599        // Verify that input array lengths are the same.
23600        if (in1.length / 4 != in2.length) {
23601            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23602        }
23603        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
23604        ain2.setAutoPadding(true);
23605        ain2.copyFrom(in2);
23606
23607        result_int result = reduce_my_char4_short_1(ain1, ain2, null);
23608        result.mTempIns = new Allocation[]{ain1, ain2};
23609        return result;
23610    }
23611
23612    // ain1 = "char4 a"
23613    // ain2 = "short b"
23614    public result_int reduce_my_char4_short_1(Allocation ain1, Allocation ain2) {
23615        return reduce_my_char4_short_1(ain1, ain2, null);
23616    }
23617
23618    // ain1 = "char4 a"
23619    // ain2 = "short b"
23620    public result_int reduce_my_char4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23621        Type t0, t1;
23622        // check ain1
23623        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23624            throw new RSRuntimeException("Type mismatch with I8_4!");
23625        }
23626        // check ain2
23627        if (!ain2.getType().getElement().isCompatible(__I16)) {
23628            throw new RSRuntimeException("Type mismatch with I16!");
23629        }
23630        // Verify dimensions
23631        t0 = ain1.getType();
23632        t1 = ain2.getType();
23633        if ((t0.getCount() != t1.getCount()) ||
23634            (t0.getX() != t1.getX()) ||
23635            (t0.getY() != t1.getY()) ||
23636            (t0.getZ() != t1.getZ()) ||
23637            (t0.hasFaces()   != t1.hasFaces()) ||
23638            (t0.hasMipmaps() != t1.hasMipmaps())) {
23639            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23640        }
23641
23642        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23643        aout.setAutoPadding(true);
23644        reduce(mExportReduceIdx_my_char4_short_1, new Allocation[]{ain1, ain2}, aout, sc);
23645        return new result_int(aout);
23646    }
23647
23648    private final static int mExportReduceIdx_my_char4_short2_0 = 356;
23649    // in1 = "a", flattened 4-vectors
23650    // in2 = "b", flattened 2-vectors
23651    public result_int reduce_my_char4_short2_0(byte[] in1, short[] in2) {
23652        // Verify that "in1" is non-null.
23653        if (in1 == null) {
23654            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23655        }
23656        // Verify that the array length is a multiple of the vector size.
23657        if (in1.length % 4 != 0) {
23658            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23659        }
23660        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23661        ain1.setAutoPadding(true);
23662        ain1.copyFrom(in1);
23663        // Verify that "in2" is non-null.
23664        if (in2 == null) {
23665            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23666        }
23667        // Verify that the array length is a multiple of the vector size.
23668        if (in2.length % 2 != 0) {
23669            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
23670        }
23671        // Verify that input array lengths are the same.
23672        if (in1.length / 4 != in2.length / 2) {
23673            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23674        }
23675        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
23676        ain2.setAutoPadding(true);
23677        ain2.copyFrom(in2);
23678
23679        result_int result = reduce_my_char4_short2_0(ain1, ain2, null);
23680        result.mTempIns = new Allocation[]{ain1, ain2};
23681        return result;
23682    }
23683
23684    // ain1 = "char4 a"
23685    // ain2 = "short2 b"
23686    public result_int reduce_my_char4_short2_0(Allocation ain1, Allocation ain2) {
23687        return reduce_my_char4_short2_0(ain1, ain2, null);
23688    }
23689
23690    // ain1 = "char4 a"
23691    // ain2 = "short2 b"
23692    public result_int reduce_my_char4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23693        Type t0, t1;
23694        // check ain1
23695        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23696            throw new RSRuntimeException("Type mismatch with I8_4!");
23697        }
23698        // check ain2
23699        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
23700            throw new RSRuntimeException("Type mismatch with I16_2!");
23701        }
23702        // Verify dimensions
23703        t0 = ain1.getType();
23704        t1 = ain2.getType();
23705        if ((t0.getCount() != t1.getCount()) ||
23706            (t0.getX() != t1.getX()) ||
23707            (t0.getY() != t1.getY()) ||
23708            (t0.getZ() != t1.getZ()) ||
23709            (t0.hasFaces()   != t1.hasFaces()) ||
23710            (t0.hasMipmaps() != t1.hasMipmaps())) {
23711            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23712        }
23713
23714        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23715        aout.setAutoPadding(true);
23716        reduce(mExportReduceIdx_my_char4_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
23717        return new result_int(aout);
23718    }
23719
23720    private final static int mExportReduceIdx_my_char4_short2_1 = 357;
23721    // in1 = "a", flattened 4-vectors
23722    // in2 = "b", flattened 2-vectors
23723    public result_int reduce_my_char4_short2_1(byte[] in1, short[] in2) {
23724        // Verify that "in1" is non-null.
23725        if (in1 == null) {
23726            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23727        }
23728        // Verify that the array length is a multiple of the vector size.
23729        if (in1.length % 4 != 0) {
23730            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23731        }
23732        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23733        ain1.setAutoPadding(true);
23734        ain1.copyFrom(in1);
23735        // Verify that "in2" is non-null.
23736        if (in2 == null) {
23737            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23738        }
23739        // Verify that the array length is a multiple of the vector size.
23740        if (in2.length % 2 != 0) {
23741            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
23742        }
23743        // Verify that input array lengths are the same.
23744        if (in1.length / 4 != in2.length / 2) {
23745            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23746        }
23747        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
23748        ain2.setAutoPadding(true);
23749        ain2.copyFrom(in2);
23750
23751        result_int result = reduce_my_char4_short2_1(ain1, ain2, null);
23752        result.mTempIns = new Allocation[]{ain1, ain2};
23753        return result;
23754    }
23755
23756    // ain1 = "char4 a"
23757    // ain2 = "short2 b"
23758    public result_int reduce_my_char4_short2_1(Allocation ain1, Allocation ain2) {
23759        return reduce_my_char4_short2_1(ain1, ain2, null);
23760    }
23761
23762    // ain1 = "char4 a"
23763    // ain2 = "short2 b"
23764    public result_int reduce_my_char4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23765        Type t0, t1;
23766        // check ain1
23767        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23768            throw new RSRuntimeException("Type mismatch with I8_4!");
23769        }
23770        // check ain2
23771        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
23772            throw new RSRuntimeException("Type mismatch with I16_2!");
23773        }
23774        // Verify dimensions
23775        t0 = ain1.getType();
23776        t1 = ain2.getType();
23777        if ((t0.getCount() != t1.getCount()) ||
23778            (t0.getX() != t1.getX()) ||
23779            (t0.getY() != t1.getY()) ||
23780            (t0.getZ() != t1.getZ()) ||
23781            (t0.hasFaces()   != t1.hasFaces()) ||
23782            (t0.hasMipmaps() != t1.hasMipmaps())) {
23783            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23784        }
23785
23786        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23787        aout.setAutoPadding(true);
23788        reduce(mExportReduceIdx_my_char4_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
23789        return new result_int(aout);
23790    }
23791
23792    private final static int mExportReduceIdx_my_char4_short4_0 = 358;
23793    // in1 = "a", flattened 4-vectors
23794    // in2 = "b", flattened 4-vectors
23795    public result_int reduce_my_char4_short4_0(byte[] in1, short[] in2) {
23796        // Verify that "in1" is non-null.
23797        if (in1 == null) {
23798            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23799        }
23800        // Verify that the array length is a multiple of the vector size.
23801        if (in1.length % 4 != 0) {
23802            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23803        }
23804        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23805        ain1.setAutoPadding(true);
23806        ain1.copyFrom(in1);
23807        // Verify that "in2" is non-null.
23808        if (in2 == null) {
23809            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23810        }
23811        // Verify that the array length is a multiple of the vector size.
23812        if (in2.length % 4 != 0) {
23813            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
23814        }
23815        // Verify that input array lengths are the same.
23816        if (in1.length / 4 != in2.length / 4) {
23817            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23818        }
23819        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
23820        ain2.setAutoPadding(true);
23821        ain2.copyFrom(in2);
23822
23823        result_int result = reduce_my_char4_short4_0(ain1, ain2, null);
23824        result.mTempIns = new Allocation[]{ain1, ain2};
23825        return result;
23826    }
23827
23828    // ain1 = "char4 a"
23829    // ain2 = "short4 b"
23830    public result_int reduce_my_char4_short4_0(Allocation ain1, Allocation ain2) {
23831        return reduce_my_char4_short4_0(ain1, ain2, null);
23832    }
23833
23834    // ain1 = "char4 a"
23835    // ain2 = "short4 b"
23836    public result_int reduce_my_char4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23837        Type t0, t1;
23838        // check ain1
23839        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23840            throw new RSRuntimeException("Type mismatch with I8_4!");
23841        }
23842        // check ain2
23843        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
23844            throw new RSRuntimeException("Type mismatch with I16_4!");
23845        }
23846        // Verify dimensions
23847        t0 = ain1.getType();
23848        t1 = ain2.getType();
23849        if ((t0.getCount() != t1.getCount()) ||
23850            (t0.getX() != t1.getX()) ||
23851            (t0.getY() != t1.getY()) ||
23852            (t0.getZ() != t1.getZ()) ||
23853            (t0.hasFaces()   != t1.hasFaces()) ||
23854            (t0.hasMipmaps() != t1.hasMipmaps())) {
23855            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23856        }
23857
23858        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23859        aout.setAutoPadding(true);
23860        reduce(mExportReduceIdx_my_char4_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
23861        return new result_int(aout);
23862    }
23863
23864    private final static int mExportReduceIdx_my_char4_short4_1 = 359;
23865    // in1 = "a", flattened 4-vectors
23866    // in2 = "b", flattened 4-vectors
23867    public result_int reduce_my_char4_short4_1(byte[] in1, short[] in2) {
23868        // Verify that "in1" is non-null.
23869        if (in1 == null) {
23870            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23871        }
23872        // Verify that the array length is a multiple of the vector size.
23873        if (in1.length % 4 != 0) {
23874            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23875        }
23876        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23877        ain1.setAutoPadding(true);
23878        ain1.copyFrom(in1);
23879        // Verify that "in2" is non-null.
23880        if (in2 == null) {
23881            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23882        }
23883        // Verify that the array length is a multiple of the vector size.
23884        if (in2.length % 4 != 0) {
23885            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
23886        }
23887        // Verify that input array lengths are the same.
23888        if (in1.length / 4 != in2.length / 4) {
23889            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23890        }
23891        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
23892        ain2.setAutoPadding(true);
23893        ain2.copyFrom(in2);
23894
23895        result_int result = reduce_my_char4_short4_1(ain1, ain2, null);
23896        result.mTempIns = new Allocation[]{ain1, ain2};
23897        return result;
23898    }
23899
23900    // ain1 = "char4 a"
23901    // ain2 = "short4 b"
23902    public result_int reduce_my_char4_short4_1(Allocation ain1, Allocation ain2) {
23903        return reduce_my_char4_short4_1(ain1, ain2, null);
23904    }
23905
23906    // ain1 = "char4 a"
23907    // ain2 = "short4 b"
23908    public result_int reduce_my_char4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23909        Type t0, t1;
23910        // check ain1
23911        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23912            throw new RSRuntimeException("Type mismatch with I8_4!");
23913        }
23914        // check ain2
23915        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
23916            throw new RSRuntimeException("Type mismatch with I16_4!");
23917        }
23918        // Verify dimensions
23919        t0 = ain1.getType();
23920        t1 = ain2.getType();
23921        if ((t0.getCount() != t1.getCount()) ||
23922            (t0.getX() != t1.getX()) ||
23923            (t0.getY() != t1.getY()) ||
23924            (t0.getZ() != t1.getZ()) ||
23925            (t0.hasFaces()   != t1.hasFaces()) ||
23926            (t0.hasMipmaps() != t1.hasMipmaps())) {
23927            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23928        }
23929
23930        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23931        aout.setAutoPadding(true);
23932        reduce(mExportReduceIdx_my_char4_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
23933        return new result_int(aout);
23934    }
23935
23936    private final static int mExportReduceIdx_my_char4_uchar_0 = 360;
23937    // in1 = "a", flattened 4-vectors
23938    // in2 = "b"
23939    public result_int reduce_my_char4_uchar_0(byte[] in1, byte[] in2) {
23940        // Verify that "in1" is non-null.
23941        if (in1 == null) {
23942            throw new RSIllegalArgumentException("Array \"in1\" is null!");
23943        }
23944        // Verify that the array length is a multiple of the vector size.
23945        if (in1.length % 4 != 0) {
23946            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
23947        }
23948        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
23949        ain1.setAutoPadding(true);
23950        ain1.copyFrom(in1);
23951        // Verify that "in2" is non-null.
23952        if (in2 == null) {
23953            throw new RSIllegalArgumentException("Array \"in2\" is null!");
23954        }
23955        // Verify that input array lengths are the same.
23956        if (in1.length / 4 != in2.length) {
23957            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
23958        }
23959        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
23960        ain2.setAutoPadding(true);
23961        ain2.copyFrom(in2);
23962
23963        result_int result = reduce_my_char4_uchar_0(ain1, ain2, null);
23964        result.mTempIns = new Allocation[]{ain1, ain2};
23965        return result;
23966    }
23967
23968    // ain1 = "char4 a"
23969    // ain2 = "uchar b"
23970    public result_int reduce_my_char4_uchar_0(Allocation ain1, Allocation ain2) {
23971        return reduce_my_char4_uchar_0(ain1, ain2, null);
23972    }
23973
23974    // ain1 = "char4 a"
23975    // ain2 = "uchar b"
23976    public result_int reduce_my_char4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
23977        Type t0, t1;
23978        // check ain1
23979        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
23980            throw new RSRuntimeException("Type mismatch with I8_4!");
23981        }
23982        // check ain2
23983        if (!ain2.getType().getElement().isCompatible(__U8)) {
23984            throw new RSRuntimeException("Type mismatch with U8!");
23985        }
23986        // Verify dimensions
23987        t0 = ain1.getType();
23988        t1 = ain2.getType();
23989        if ((t0.getCount() != t1.getCount()) ||
23990            (t0.getX() != t1.getX()) ||
23991            (t0.getY() != t1.getY()) ||
23992            (t0.getZ() != t1.getZ()) ||
23993            (t0.hasFaces()   != t1.hasFaces()) ||
23994            (t0.hasMipmaps() != t1.hasMipmaps())) {
23995            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
23996        }
23997
23998        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
23999        aout.setAutoPadding(true);
24000        reduce(mExportReduceIdx_my_char4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
24001        return new result_int(aout);
24002    }
24003
24004    private final static int mExportReduceIdx_my_char4_uchar_1 = 361;
24005    // in1 = "a", flattened 4-vectors
24006    // in2 = "b"
24007    public result_int reduce_my_char4_uchar_1(byte[] in1, byte[] in2) {
24008        // Verify that "in1" is non-null.
24009        if (in1 == null) {
24010            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24011        }
24012        // Verify that the array length is a multiple of the vector size.
24013        if (in1.length % 4 != 0) {
24014            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24015        }
24016        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24017        ain1.setAutoPadding(true);
24018        ain1.copyFrom(in1);
24019        // Verify that "in2" is non-null.
24020        if (in2 == null) {
24021            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24022        }
24023        // Verify that input array lengths are the same.
24024        if (in1.length / 4 != in2.length) {
24025            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24026        }
24027        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
24028        ain2.setAutoPadding(true);
24029        ain2.copyFrom(in2);
24030
24031        result_int result = reduce_my_char4_uchar_1(ain1, ain2, null);
24032        result.mTempIns = new Allocation[]{ain1, ain2};
24033        return result;
24034    }
24035
24036    // ain1 = "char4 a"
24037    // ain2 = "uchar b"
24038    public result_int reduce_my_char4_uchar_1(Allocation ain1, Allocation ain2) {
24039        return reduce_my_char4_uchar_1(ain1, ain2, null);
24040    }
24041
24042    // ain1 = "char4 a"
24043    // ain2 = "uchar b"
24044    public result_int reduce_my_char4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24045        Type t0, t1;
24046        // check ain1
24047        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24048            throw new RSRuntimeException("Type mismatch with I8_4!");
24049        }
24050        // check ain2
24051        if (!ain2.getType().getElement().isCompatible(__U8)) {
24052            throw new RSRuntimeException("Type mismatch with U8!");
24053        }
24054        // Verify dimensions
24055        t0 = ain1.getType();
24056        t1 = ain2.getType();
24057        if ((t0.getCount() != t1.getCount()) ||
24058            (t0.getX() != t1.getX()) ||
24059            (t0.getY() != t1.getY()) ||
24060            (t0.getZ() != t1.getZ()) ||
24061            (t0.hasFaces()   != t1.hasFaces()) ||
24062            (t0.hasMipmaps() != t1.hasMipmaps())) {
24063            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24064        }
24065
24066        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24067        aout.setAutoPadding(true);
24068        reduce(mExportReduceIdx_my_char4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
24069        return new result_int(aout);
24070    }
24071
24072    private final static int mExportReduceIdx_my_char4_uchar2_0 = 362;
24073    // in1 = "a", flattened 4-vectors
24074    // in2 = "b", flattened 2-vectors
24075    public result_int reduce_my_char4_uchar2_0(byte[] in1, byte[] in2) {
24076        // Verify that "in1" is non-null.
24077        if (in1 == null) {
24078            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24079        }
24080        // Verify that the array length is a multiple of the vector size.
24081        if (in1.length % 4 != 0) {
24082            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24083        }
24084        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24085        ain1.setAutoPadding(true);
24086        ain1.copyFrom(in1);
24087        // Verify that "in2" is non-null.
24088        if (in2 == null) {
24089            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24090        }
24091        // Verify that the array length is a multiple of the vector size.
24092        if (in2.length % 2 != 0) {
24093            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
24094        }
24095        // Verify that input array lengths are the same.
24096        if (in1.length / 4 != in2.length / 2) {
24097            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24098        }
24099        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
24100        ain2.setAutoPadding(true);
24101        ain2.copyFrom(in2);
24102
24103        result_int result = reduce_my_char4_uchar2_0(ain1, ain2, null);
24104        result.mTempIns = new Allocation[]{ain1, ain2};
24105        return result;
24106    }
24107
24108    // ain1 = "char4 a"
24109    // ain2 = "uchar2 b"
24110    public result_int reduce_my_char4_uchar2_0(Allocation ain1, Allocation ain2) {
24111        return reduce_my_char4_uchar2_0(ain1, ain2, null);
24112    }
24113
24114    // ain1 = "char4 a"
24115    // ain2 = "uchar2 b"
24116    public result_int reduce_my_char4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24117        Type t0, t1;
24118        // check ain1
24119        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24120            throw new RSRuntimeException("Type mismatch with I8_4!");
24121        }
24122        // check ain2
24123        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
24124            throw new RSRuntimeException("Type mismatch with U8_2!");
24125        }
24126        // Verify dimensions
24127        t0 = ain1.getType();
24128        t1 = ain2.getType();
24129        if ((t0.getCount() != t1.getCount()) ||
24130            (t0.getX() != t1.getX()) ||
24131            (t0.getY() != t1.getY()) ||
24132            (t0.getZ() != t1.getZ()) ||
24133            (t0.hasFaces()   != t1.hasFaces()) ||
24134            (t0.hasMipmaps() != t1.hasMipmaps())) {
24135            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24136        }
24137
24138        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24139        aout.setAutoPadding(true);
24140        reduce(mExportReduceIdx_my_char4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
24141        return new result_int(aout);
24142    }
24143
24144    private final static int mExportReduceIdx_my_char4_uchar2_1 = 363;
24145    // in1 = "a", flattened 4-vectors
24146    // in2 = "b", flattened 2-vectors
24147    public result_int reduce_my_char4_uchar2_1(byte[] in1, byte[] in2) {
24148        // Verify that "in1" is non-null.
24149        if (in1 == null) {
24150            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24151        }
24152        // Verify that the array length is a multiple of the vector size.
24153        if (in1.length % 4 != 0) {
24154            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24155        }
24156        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24157        ain1.setAutoPadding(true);
24158        ain1.copyFrom(in1);
24159        // Verify that "in2" is non-null.
24160        if (in2 == null) {
24161            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24162        }
24163        // Verify that the array length is a multiple of the vector size.
24164        if (in2.length % 2 != 0) {
24165            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
24166        }
24167        // Verify that input array lengths are the same.
24168        if (in1.length / 4 != in2.length / 2) {
24169            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24170        }
24171        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
24172        ain2.setAutoPadding(true);
24173        ain2.copyFrom(in2);
24174
24175        result_int result = reduce_my_char4_uchar2_1(ain1, ain2, null);
24176        result.mTempIns = new Allocation[]{ain1, ain2};
24177        return result;
24178    }
24179
24180    // ain1 = "char4 a"
24181    // ain2 = "uchar2 b"
24182    public result_int reduce_my_char4_uchar2_1(Allocation ain1, Allocation ain2) {
24183        return reduce_my_char4_uchar2_1(ain1, ain2, null);
24184    }
24185
24186    // ain1 = "char4 a"
24187    // ain2 = "uchar2 b"
24188    public result_int reduce_my_char4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24189        Type t0, t1;
24190        // check ain1
24191        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24192            throw new RSRuntimeException("Type mismatch with I8_4!");
24193        }
24194        // check ain2
24195        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
24196            throw new RSRuntimeException("Type mismatch with U8_2!");
24197        }
24198        // Verify dimensions
24199        t0 = ain1.getType();
24200        t1 = ain2.getType();
24201        if ((t0.getCount() != t1.getCount()) ||
24202            (t0.getX() != t1.getX()) ||
24203            (t0.getY() != t1.getY()) ||
24204            (t0.getZ() != t1.getZ()) ||
24205            (t0.hasFaces()   != t1.hasFaces()) ||
24206            (t0.hasMipmaps() != t1.hasMipmaps())) {
24207            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24208        }
24209
24210        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24211        aout.setAutoPadding(true);
24212        reduce(mExportReduceIdx_my_char4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
24213        return new result_int(aout);
24214    }
24215
24216    private final static int mExportReduceIdx_my_char4_uchar4_0 = 364;
24217    // in1 = "a", flattened 4-vectors
24218    // in2 = "b", flattened 4-vectors
24219    public result_int reduce_my_char4_uchar4_0(byte[] in1, byte[] in2) {
24220        // Verify that "in1" is non-null.
24221        if (in1 == null) {
24222            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24223        }
24224        // Verify that the array length is a multiple of the vector size.
24225        if (in1.length % 4 != 0) {
24226            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24227        }
24228        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24229        ain1.setAutoPadding(true);
24230        ain1.copyFrom(in1);
24231        // Verify that "in2" is non-null.
24232        if (in2 == null) {
24233            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24234        }
24235        // Verify that the array length is a multiple of the vector size.
24236        if (in2.length % 4 != 0) {
24237            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
24238        }
24239        // Verify that input array lengths are the same.
24240        if (in1.length / 4 != in2.length / 4) {
24241            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24242        }
24243        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
24244        ain2.setAutoPadding(true);
24245        ain2.copyFrom(in2);
24246
24247        result_int result = reduce_my_char4_uchar4_0(ain1, ain2, null);
24248        result.mTempIns = new Allocation[]{ain1, ain2};
24249        return result;
24250    }
24251
24252    // ain1 = "char4 a"
24253    // ain2 = "uchar4 b"
24254    public result_int reduce_my_char4_uchar4_0(Allocation ain1, Allocation ain2) {
24255        return reduce_my_char4_uchar4_0(ain1, ain2, null);
24256    }
24257
24258    // ain1 = "char4 a"
24259    // ain2 = "uchar4 b"
24260    public result_int reduce_my_char4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24261        Type t0, t1;
24262        // check ain1
24263        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24264            throw new RSRuntimeException("Type mismatch with I8_4!");
24265        }
24266        // check ain2
24267        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
24268            throw new RSRuntimeException("Type mismatch with U8_4!");
24269        }
24270        // Verify dimensions
24271        t0 = ain1.getType();
24272        t1 = ain2.getType();
24273        if ((t0.getCount() != t1.getCount()) ||
24274            (t0.getX() != t1.getX()) ||
24275            (t0.getY() != t1.getY()) ||
24276            (t0.getZ() != t1.getZ()) ||
24277            (t0.hasFaces()   != t1.hasFaces()) ||
24278            (t0.hasMipmaps() != t1.hasMipmaps())) {
24279            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24280        }
24281
24282        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24283        aout.setAutoPadding(true);
24284        reduce(mExportReduceIdx_my_char4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
24285        return new result_int(aout);
24286    }
24287
24288    private final static int mExportReduceIdx_my_char4_uchar4_1 = 365;
24289    // in1 = "a", flattened 4-vectors
24290    // in2 = "b", flattened 4-vectors
24291    public result_int reduce_my_char4_uchar4_1(byte[] in1, byte[] in2) {
24292        // Verify that "in1" is non-null.
24293        if (in1 == null) {
24294            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24295        }
24296        // Verify that the array length is a multiple of the vector size.
24297        if (in1.length % 4 != 0) {
24298            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24299        }
24300        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24301        ain1.setAutoPadding(true);
24302        ain1.copyFrom(in1);
24303        // Verify that "in2" is non-null.
24304        if (in2 == null) {
24305            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24306        }
24307        // Verify that the array length is a multiple of the vector size.
24308        if (in2.length % 4 != 0) {
24309            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
24310        }
24311        // Verify that input array lengths are the same.
24312        if (in1.length / 4 != in2.length / 4) {
24313            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24314        }
24315        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
24316        ain2.setAutoPadding(true);
24317        ain2.copyFrom(in2);
24318
24319        result_int result = reduce_my_char4_uchar4_1(ain1, ain2, null);
24320        result.mTempIns = new Allocation[]{ain1, ain2};
24321        return result;
24322    }
24323
24324    // ain1 = "char4 a"
24325    // ain2 = "uchar4 b"
24326    public result_int reduce_my_char4_uchar4_1(Allocation ain1, Allocation ain2) {
24327        return reduce_my_char4_uchar4_1(ain1, ain2, null);
24328    }
24329
24330    // ain1 = "char4 a"
24331    // ain2 = "uchar4 b"
24332    public result_int reduce_my_char4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24333        Type t0, t1;
24334        // check ain1
24335        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24336            throw new RSRuntimeException("Type mismatch with I8_4!");
24337        }
24338        // check ain2
24339        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
24340            throw new RSRuntimeException("Type mismatch with U8_4!");
24341        }
24342        // Verify dimensions
24343        t0 = ain1.getType();
24344        t1 = ain2.getType();
24345        if ((t0.getCount() != t1.getCount()) ||
24346            (t0.getX() != t1.getX()) ||
24347            (t0.getY() != t1.getY()) ||
24348            (t0.getZ() != t1.getZ()) ||
24349            (t0.hasFaces()   != t1.hasFaces()) ||
24350            (t0.hasMipmaps() != t1.hasMipmaps())) {
24351            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24352        }
24353
24354        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24355        aout.setAutoPadding(true);
24356        reduce(mExportReduceIdx_my_char4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
24357        return new result_int(aout);
24358    }
24359
24360    private final static int mExportReduceIdx_my_char4_ushort_0 = 366;
24361    // in1 = "a", flattened 4-vectors
24362    // in2 = "b"
24363    public result_int reduce_my_char4_ushort_0(byte[] in1, short[] in2) {
24364        // Verify that "in1" is non-null.
24365        if (in1 == null) {
24366            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24367        }
24368        // Verify that the array length is a multiple of the vector size.
24369        if (in1.length % 4 != 0) {
24370            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24371        }
24372        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24373        ain1.setAutoPadding(true);
24374        ain1.copyFrom(in1);
24375        // Verify that "in2" is non-null.
24376        if (in2 == null) {
24377            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24378        }
24379        // Verify that input array lengths are the same.
24380        if (in1.length / 4 != in2.length) {
24381            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24382        }
24383        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
24384        ain2.setAutoPadding(true);
24385        ain2.copyFrom(in2);
24386
24387        result_int result = reduce_my_char4_ushort_0(ain1, ain2, null);
24388        result.mTempIns = new Allocation[]{ain1, ain2};
24389        return result;
24390    }
24391
24392    // ain1 = "char4 a"
24393    // ain2 = "ushort b"
24394    public result_int reduce_my_char4_ushort_0(Allocation ain1, Allocation ain2) {
24395        return reduce_my_char4_ushort_0(ain1, ain2, null);
24396    }
24397
24398    // ain1 = "char4 a"
24399    // ain2 = "ushort b"
24400    public result_int reduce_my_char4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24401        Type t0, t1;
24402        // check ain1
24403        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24404            throw new RSRuntimeException("Type mismatch with I8_4!");
24405        }
24406        // check ain2
24407        if (!ain2.getType().getElement().isCompatible(__U16)) {
24408            throw new RSRuntimeException("Type mismatch with U16!");
24409        }
24410        // Verify dimensions
24411        t0 = ain1.getType();
24412        t1 = ain2.getType();
24413        if ((t0.getCount() != t1.getCount()) ||
24414            (t0.getX() != t1.getX()) ||
24415            (t0.getY() != t1.getY()) ||
24416            (t0.getZ() != t1.getZ()) ||
24417            (t0.hasFaces()   != t1.hasFaces()) ||
24418            (t0.hasMipmaps() != t1.hasMipmaps())) {
24419            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24420        }
24421
24422        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24423        aout.setAutoPadding(true);
24424        reduce(mExportReduceIdx_my_char4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
24425        return new result_int(aout);
24426    }
24427
24428    private final static int mExportReduceIdx_my_char4_ushort_1 = 367;
24429    // in1 = "a", flattened 4-vectors
24430    // in2 = "b"
24431    public result_int reduce_my_char4_ushort_1(byte[] in1, short[] in2) {
24432        // Verify that "in1" is non-null.
24433        if (in1 == null) {
24434            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24435        }
24436        // Verify that the array length is a multiple of the vector size.
24437        if (in1.length % 4 != 0) {
24438            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24439        }
24440        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24441        ain1.setAutoPadding(true);
24442        ain1.copyFrom(in1);
24443        // Verify that "in2" is non-null.
24444        if (in2 == null) {
24445            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24446        }
24447        // Verify that input array lengths are the same.
24448        if (in1.length / 4 != in2.length) {
24449            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24450        }
24451        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
24452        ain2.setAutoPadding(true);
24453        ain2.copyFrom(in2);
24454
24455        result_int result = reduce_my_char4_ushort_1(ain1, ain2, null);
24456        result.mTempIns = new Allocation[]{ain1, ain2};
24457        return result;
24458    }
24459
24460    // ain1 = "char4 a"
24461    // ain2 = "ushort b"
24462    public result_int reduce_my_char4_ushort_1(Allocation ain1, Allocation ain2) {
24463        return reduce_my_char4_ushort_1(ain1, ain2, null);
24464    }
24465
24466    // ain1 = "char4 a"
24467    // ain2 = "ushort b"
24468    public result_int reduce_my_char4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24469        Type t0, t1;
24470        // check ain1
24471        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24472            throw new RSRuntimeException("Type mismatch with I8_4!");
24473        }
24474        // check ain2
24475        if (!ain2.getType().getElement().isCompatible(__U16)) {
24476            throw new RSRuntimeException("Type mismatch with U16!");
24477        }
24478        // Verify dimensions
24479        t0 = ain1.getType();
24480        t1 = ain2.getType();
24481        if ((t0.getCount() != t1.getCount()) ||
24482            (t0.getX() != t1.getX()) ||
24483            (t0.getY() != t1.getY()) ||
24484            (t0.getZ() != t1.getZ()) ||
24485            (t0.hasFaces()   != t1.hasFaces()) ||
24486            (t0.hasMipmaps() != t1.hasMipmaps())) {
24487            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24488        }
24489
24490        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24491        aout.setAutoPadding(true);
24492        reduce(mExportReduceIdx_my_char4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
24493        return new result_int(aout);
24494    }
24495
24496    private final static int mExportReduceIdx_my_char4_ushort2_0 = 368;
24497    // in1 = "a", flattened 4-vectors
24498    // in2 = "b", flattened 2-vectors
24499    public result_int reduce_my_char4_ushort2_0(byte[] in1, short[] in2) {
24500        // Verify that "in1" is non-null.
24501        if (in1 == null) {
24502            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24503        }
24504        // Verify that the array length is a multiple of the vector size.
24505        if (in1.length % 4 != 0) {
24506            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24507        }
24508        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24509        ain1.setAutoPadding(true);
24510        ain1.copyFrom(in1);
24511        // Verify that "in2" is non-null.
24512        if (in2 == null) {
24513            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24514        }
24515        // Verify that the array length is a multiple of the vector size.
24516        if (in2.length % 2 != 0) {
24517            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
24518        }
24519        // Verify that input array lengths are the same.
24520        if (in1.length / 4 != in2.length / 2) {
24521            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24522        }
24523        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
24524        ain2.setAutoPadding(true);
24525        ain2.copyFrom(in2);
24526
24527        result_int result = reduce_my_char4_ushort2_0(ain1, ain2, null);
24528        result.mTempIns = new Allocation[]{ain1, ain2};
24529        return result;
24530    }
24531
24532    // ain1 = "char4 a"
24533    // ain2 = "ushort2 b"
24534    public result_int reduce_my_char4_ushort2_0(Allocation ain1, Allocation ain2) {
24535        return reduce_my_char4_ushort2_0(ain1, ain2, null);
24536    }
24537
24538    // ain1 = "char4 a"
24539    // ain2 = "ushort2 b"
24540    public result_int reduce_my_char4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24541        Type t0, t1;
24542        // check ain1
24543        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24544            throw new RSRuntimeException("Type mismatch with I8_4!");
24545        }
24546        // check ain2
24547        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
24548            throw new RSRuntimeException("Type mismatch with U16_2!");
24549        }
24550        // Verify dimensions
24551        t0 = ain1.getType();
24552        t1 = ain2.getType();
24553        if ((t0.getCount() != t1.getCount()) ||
24554            (t0.getX() != t1.getX()) ||
24555            (t0.getY() != t1.getY()) ||
24556            (t0.getZ() != t1.getZ()) ||
24557            (t0.hasFaces()   != t1.hasFaces()) ||
24558            (t0.hasMipmaps() != t1.hasMipmaps())) {
24559            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24560        }
24561
24562        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24563        aout.setAutoPadding(true);
24564        reduce(mExportReduceIdx_my_char4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
24565        return new result_int(aout);
24566    }
24567
24568    private final static int mExportReduceIdx_my_char4_ushort2_1 = 369;
24569    // in1 = "a", flattened 4-vectors
24570    // in2 = "b", flattened 2-vectors
24571    public result_int reduce_my_char4_ushort2_1(byte[] in1, short[] in2) {
24572        // Verify that "in1" is non-null.
24573        if (in1 == null) {
24574            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24575        }
24576        // Verify that the array length is a multiple of the vector size.
24577        if (in1.length % 4 != 0) {
24578            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24579        }
24580        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24581        ain1.setAutoPadding(true);
24582        ain1.copyFrom(in1);
24583        // Verify that "in2" is non-null.
24584        if (in2 == null) {
24585            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24586        }
24587        // Verify that the array length is a multiple of the vector size.
24588        if (in2.length % 2 != 0) {
24589            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
24590        }
24591        // Verify that input array lengths are the same.
24592        if (in1.length / 4 != in2.length / 2) {
24593            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24594        }
24595        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
24596        ain2.setAutoPadding(true);
24597        ain2.copyFrom(in2);
24598
24599        result_int result = reduce_my_char4_ushort2_1(ain1, ain2, null);
24600        result.mTempIns = new Allocation[]{ain1, ain2};
24601        return result;
24602    }
24603
24604    // ain1 = "char4 a"
24605    // ain2 = "ushort2 b"
24606    public result_int reduce_my_char4_ushort2_1(Allocation ain1, Allocation ain2) {
24607        return reduce_my_char4_ushort2_1(ain1, ain2, null);
24608    }
24609
24610    // ain1 = "char4 a"
24611    // ain2 = "ushort2 b"
24612    public result_int reduce_my_char4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24613        Type t0, t1;
24614        // check ain1
24615        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24616            throw new RSRuntimeException("Type mismatch with I8_4!");
24617        }
24618        // check ain2
24619        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
24620            throw new RSRuntimeException("Type mismatch with U16_2!");
24621        }
24622        // Verify dimensions
24623        t0 = ain1.getType();
24624        t1 = ain2.getType();
24625        if ((t0.getCount() != t1.getCount()) ||
24626            (t0.getX() != t1.getX()) ||
24627            (t0.getY() != t1.getY()) ||
24628            (t0.getZ() != t1.getZ()) ||
24629            (t0.hasFaces()   != t1.hasFaces()) ||
24630            (t0.hasMipmaps() != t1.hasMipmaps())) {
24631            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24632        }
24633
24634        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24635        aout.setAutoPadding(true);
24636        reduce(mExportReduceIdx_my_char4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
24637        return new result_int(aout);
24638    }
24639
24640    private final static int mExportReduceIdx_my_char4_ushort4_0 = 370;
24641    // in1 = "a", flattened 4-vectors
24642    // in2 = "b", flattened 4-vectors
24643    public result_int reduce_my_char4_ushort4_0(byte[] in1, short[] in2) {
24644        // Verify that "in1" is non-null.
24645        if (in1 == null) {
24646            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24647        }
24648        // Verify that the array length is a multiple of the vector size.
24649        if (in1.length % 4 != 0) {
24650            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24651        }
24652        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24653        ain1.setAutoPadding(true);
24654        ain1.copyFrom(in1);
24655        // Verify that "in2" is non-null.
24656        if (in2 == null) {
24657            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24658        }
24659        // Verify that the array length is a multiple of the vector size.
24660        if (in2.length % 4 != 0) {
24661            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
24662        }
24663        // Verify that input array lengths are the same.
24664        if (in1.length / 4 != in2.length / 4) {
24665            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24666        }
24667        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
24668        ain2.setAutoPadding(true);
24669        ain2.copyFrom(in2);
24670
24671        result_int result = reduce_my_char4_ushort4_0(ain1, ain2, null);
24672        result.mTempIns = new Allocation[]{ain1, ain2};
24673        return result;
24674    }
24675
24676    // ain1 = "char4 a"
24677    // ain2 = "ushort4 b"
24678    public result_int reduce_my_char4_ushort4_0(Allocation ain1, Allocation ain2) {
24679        return reduce_my_char4_ushort4_0(ain1, ain2, null);
24680    }
24681
24682    // ain1 = "char4 a"
24683    // ain2 = "ushort4 b"
24684    public result_int reduce_my_char4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24685        Type t0, t1;
24686        // check ain1
24687        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24688            throw new RSRuntimeException("Type mismatch with I8_4!");
24689        }
24690        // check ain2
24691        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
24692            throw new RSRuntimeException("Type mismatch with U16_4!");
24693        }
24694        // Verify dimensions
24695        t0 = ain1.getType();
24696        t1 = ain2.getType();
24697        if ((t0.getCount() != t1.getCount()) ||
24698            (t0.getX() != t1.getX()) ||
24699            (t0.getY() != t1.getY()) ||
24700            (t0.getZ() != t1.getZ()) ||
24701            (t0.hasFaces()   != t1.hasFaces()) ||
24702            (t0.hasMipmaps() != t1.hasMipmaps())) {
24703            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24704        }
24705
24706        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24707        aout.setAutoPadding(true);
24708        reduce(mExportReduceIdx_my_char4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
24709        return new result_int(aout);
24710    }
24711
24712    private final static int mExportReduceIdx_my_char4_ushort4_1 = 371;
24713    // in1 = "a", flattened 4-vectors
24714    // in2 = "b", flattened 4-vectors
24715    public result_int reduce_my_char4_ushort4_1(byte[] in1, short[] in2) {
24716        // Verify that "in1" is non-null.
24717        if (in1 == null) {
24718            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24719        }
24720        // Verify that the array length is a multiple of the vector size.
24721        if (in1.length % 4 != 0) {
24722            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24723        }
24724        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24725        ain1.setAutoPadding(true);
24726        ain1.copyFrom(in1);
24727        // Verify that "in2" is non-null.
24728        if (in2 == null) {
24729            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24730        }
24731        // Verify that the array length is a multiple of the vector size.
24732        if (in2.length % 4 != 0) {
24733            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
24734        }
24735        // Verify that input array lengths are the same.
24736        if (in1.length / 4 != in2.length / 4) {
24737            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24738        }
24739        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
24740        ain2.setAutoPadding(true);
24741        ain2.copyFrom(in2);
24742
24743        result_int result = reduce_my_char4_ushort4_1(ain1, ain2, null);
24744        result.mTempIns = new Allocation[]{ain1, ain2};
24745        return result;
24746    }
24747
24748    // ain1 = "char4 a"
24749    // ain2 = "ushort4 b"
24750    public result_int reduce_my_char4_ushort4_1(Allocation ain1, Allocation ain2) {
24751        return reduce_my_char4_ushort4_1(ain1, ain2, null);
24752    }
24753
24754    // ain1 = "char4 a"
24755    // ain2 = "ushort4 b"
24756    public result_int reduce_my_char4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24757        Type t0, t1;
24758        // check ain1
24759        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24760            throw new RSRuntimeException("Type mismatch with I8_4!");
24761        }
24762        // check ain2
24763        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
24764            throw new RSRuntimeException("Type mismatch with U16_4!");
24765        }
24766        // Verify dimensions
24767        t0 = ain1.getType();
24768        t1 = ain2.getType();
24769        if ((t0.getCount() != t1.getCount()) ||
24770            (t0.getX() != t1.getX()) ||
24771            (t0.getY() != t1.getY()) ||
24772            (t0.getZ() != t1.getZ()) ||
24773            (t0.hasFaces()   != t1.hasFaces()) ||
24774            (t0.hasMipmaps() != t1.hasMipmaps())) {
24775            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24776        }
24777
24778        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24779        aout.setAutoPadding(true);
24780        reduce(mExportReduceIdx_my_char4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
24781        return new result_int(aout);
24782    }
24783
24784    private final static int mExportReduceIdx_my_char4_bool_0 = 372;
24785    // in1 = "a", flattened 4-vectors
24786    // in2 = "b"
24787    public result_int reduce_my_char4_bool_0(byte[] in1, byte[] in2) {
24788        // Verify that "in1" is non-null.
24789        if (in1 == null) {
24790            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24791        }
24792        // Verify that the array length is a multiple of the vector size.
24793        if (in1.length % 4 != 0) {
24794            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24795        }
24796        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24797        ain1.setAutoPadding(true);
24798        ain1.copyFrom(in1);
24799        // Verify that "in2" is non-null.
24800        if (in2 == null) {
24801            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24802        }
24803        // Verify that input array lengths are the same.
24804        if (in1.length / 4 != in2.length) {
24805            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24806        }
24807        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
24808        ain2.setAutoPadding(true);
24809        ain2.copyFrom(in2);
24810
24811        result_int result = reduce_my_char4_bool_0(ain1, ain2, null);
24812        result.mTempIns = new Allocation[]{ain1, ain2};
24813        return result;
24814    }
24815
24816    // ain1 = "char4 a"
24817    // ain2 = "bool b"
24818    public result_int reduce_my_char4_bool_0(Allocation ain1, Allocation ain2) {
24819        return reduce_my_char4_bool_0(ain1, ain2, null);
24820    }
24821
24822    // ain1 = "char4 a"
24823    // ain2 = "bool b"
24824    public result_int reduce_my_char4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24825        Type t0, t1;
24826        // check ain1
24827        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24828            throw new RSRuntimeException("Type mismatch with I8_4!");
24829        }
24830        // check ain2
24831        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
24832            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
24833        }
24834        // Verify dimensions
24835        t0 = ain1.getType();
24836        t1 = ain2.getType();
24837        if ((t0.getCount() != t1.getCount()) ||
24838            (t0.getX() != t1.getX()) ||
24839            (t0.getY() != t1.getY()) ||
24840            (t0.getZ() != t1.getZ()) ||
24841            (t0.hasFaces()   != t1.hasFaces()) ||
24842            (t0.hasMipmaps() != t1.hasMipmaps())) {
24843            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24844        }
24845
24846        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24847        aout.setAutoPadding(true);
24848        reduce(mExportReduceIdx_my_char4_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
24849        return new result_int(aout);
24850    }
24851
24852    private final static int mExportReduceIdx_my_char4_bool_1 = 373;
24853    // in1 = "a", flattened 4-vectors
24854    // in2 = "b"
24855    public result_int reduce_my_char4_bool_1(byte[] in1, byte[] in2) {
24856        // Verify that "in1" is non-null.
24857        if (in1 == null) {
24858            throw new RSIllegalArgumentException("Array \"in1\" is null!");
24859        }
24860        // Verify that the array length is a multiple of the vector size.
24861        if (in1.length % 4 != 0) {
24862            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
24863        }
24864        Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4);
24865        ain1.setAutoPadding(true);
24866        ain1.copyFrom(in1);
24867        // Verify that "in2" is non-null.
24868        if (in2 == null) {
24869            throw new RSIllegalArgumentException("Array \"in2\" is null!");
24870        }
24871        // Verify that input array lengths are the same.
24872        if (in1.length / 4 != in2.length) {
24873            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
24874        }
24875        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
24876        ain2.setAutoPadding(true);
24877        ain2.copyFrom(in2);
24878
24879        result_int result = reduce_my_char4_bool_1(ain1, ain2, null);
24880        result.mTempIns = new Allocation[]{ain1, ain2};
24881        return result;
24882    }
24883
24884    // ain1 = "char4 a"
24885    // ain2 = "bool b"
24886    public result_int reduce_my_char4_bool_1(Allocation ain1, Allocation ain2) {
24887        return reduce_my_char4_bool_1(ain1, ain2, null);
24888    }
24889
24890    // ain1 = "char4 a"
24891    // ain2 = "bool b"
24892    public result_int reduce_my_char4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24893        Type t0, t1;
24894        // check ain1
24895        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24896            throw new RSRuntimeException("Type mismatch with I8_4!");
24897        }
24898        // check ain2
24899        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
24900            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
24901        }
24902        // Verify dimensions
24903        t0 = ain1.getType();
24904        t1 = ain2.getType();
24905        if ((t0.getCount() != t1.getCount()) ||
24906            (t0.getX() != t1.getX()) ||
24907            (t0.getY() != t1.getY()) ||
24908            (t0.getZ() != t1.getZ()) ||
24909            (t0.hasFaces()   != t1.hasFaces()) ||
24910            (t0.hasMipmaps() != t1.hasMipmaps())) {
24911            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24912        }
24913
24914        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24915        aout.setAutoPadding(true);
24916        reduce(mExportReduceIdx_my_char4_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
24917        return new result_int(aout);
24918    }
24919
24920    private final static int mExportReduceIdx_my_char4_rs_matrix2x2_0 = 374;
24921    // ain1 = "char4 a"
24922    // ain2 = "rs_matrix2x2 b"
24923    public result_int reduce_my_char4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
24924        return reduce_my_char4_rs_matrix2x2_0(ain1, ain2, null);
24925    }
24926
24927    // ain1 = "char4 a"
24928    // ain2 = "rs_matrix2x2 b"
24929    public result_int reduce_my_char4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24930        Type t0, t1;
24931        // check ain1
24932        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24933            throw new RSRuntimeException("Type mismatch with I8_4!");
24934        }
24935        // check ain2
24936        // Verify dimensions
24937        t0 = ain1.getType();
24938        t1 = ain2.getType();
24939        if ((t0.getCount() != t1.getCount()) ||
24940            (t0.getX() != t1.getX()) ||
24941            (t0.getY() != t1.getY()) ||
24942            (t0.getZ() != t1.getZ()) ||
24943            (t0.hasFaces()   != t1.hasFaces()) ||
24944            (t0.hasMipmaps() != t1.hasMipmaps())) {
24945            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24946        }
24947
24948        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24949        aout.setAutoPadding(true);
24950        reduce(mExportReduceIdx_my_char4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
24951        return new result_int(aout);
24952    }
24953
24954    private final static int mExportReduceIdx_my_char4_rs_matrix2x2_1 = 375;
24955    // ain1 = "char4 a"
24956    // ain2 = "rs_matrix2x2 b"
24957    public result_int reduce_my_char4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
24958        return reduce_my_char4_rs_matrix2x2_1(ain1, ain2, null);
24959    }
24960
24961    // ain1 = "char4 a"
24962    // ain2 = "rs_matrix2x2 b"
24963    public result_int reduce_my_char4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24964        Type t0, t1;
24965        // check ain1
24966        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
24967            throw new RSRuntimeException("Type mismatch with I8_4!");
24968        }
24969        // check ain2
24970        // Verify dimensions
24971        t0 = ain1.getType();
24972        t1 = ain2.getType();
24973        if ((t0.getCount() != t1.getCount()) ||
24974            (t0.getX() != t1.getX()) ||
24975            (t0.getY() != t1.getY()) ||
24976            (t0.getZ() != t1.getZ()) ||
24977            (t0.hasFaces()   != t1.hasFaces()) ||
24978            (t0.hasMipmaps() != t1.hasMipmaps())) {
24979            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
24980        }
24981
24982        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
24983        aout.setAutoPadding(true);
24984        reduce(mExportReduceIdx_my_char4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
24985        return new result_int(aout);
24986    }
24987
24988    private final static int mExportReduceIdx_my_char4_MyStruct_0 = 376;
24989    // ain1 = "char4 a"
24990    // ain2 = "/* struct <> */ b"
24991    public result_int reduce_my_char4_MyStruct_0(Allocation ain1, Allocation ain2) {
24992        return reduce_my_char4_MyStruct_0(ain1, ain2, null);
24993    }
24994
24995    // ain1 = "char4 a"
24996    // ain2 = "/* struct <> */ b"
24997    public result_int reduce_my_char4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
24998        Type t0, t1;
24999        // check ain1
25000        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
25001            throw new RSRuntimeException("Type mismatch with I8_4!");
25002        }
25003        // check ain2
25004        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
25005            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
25006        }
25007        // Verify dimensions
25008        t0 = ain1.getType();
25009        t1 = ain2.getType();
25010        if ((t0.getCount() != t1.getCount()) ||
25011            (t0.getX() != t1.getX()) ||
25012            (t0.getY() != t1.getY()) ||
25013            (t0.getZ() != t1.getZ()) ||
25014            (t0.hasFaces()   != t1.hasFaces()) ||
25015            (t0.hasMipmaps() != t1.hasMipmaps())) {
25016            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25017        }
25018
25019        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25020        aout.setAutoPadding(true);
25021        reduce(mExportReduceIdx_my_char4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
25022        return new result_int(aout);
25023    }
25024
25025    private final static int mExportReduceIdx_my_char4_MyStruct_1 = 377;
25026    // ain1 = "char4 a"
25027    // ain2 = "/* struct <> */ b"
25028    public result_int reduce_my_char4_MyStruct_1(Allocation ain1, Allocation ain2) {
25029        return reduce_my_char4_MyStruct_1(ain1, ain2, null);
25030    }
25031
25032    // ain1 = "char4 a"
25033    // ain2 = "/* struct <> */ b"
25034    public result_int reduce_my_char4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25035        Type t0, t1;
25036        // check ain1
25037        if (!ain1.getType().getElement().isCompatible(__I8_4)) {
25038            throw new RSRuntimeException("Type mismatch with I8_4!");
25039        }
25040        // check ain2
25041        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
25042            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
25043        }
25044        // Verify dimensions
25045        t0 = ain1.getType();
25046        t1 = ain2.getType();
25047        if ((t0.getCount() != t1.getCount()) ||
25048            (t0.getX() != t1.getX()) ||
25049            (t0.getY() != t1.getY()) ||
25050            (t0.getZ() != t1.getZ()) ||
25051            (t0.hasFaces()   != t1.hasFaces()) ||
25052            (t0.hasMipmaps() != t1.hasMipmaps())) {
25053            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25054        }
25055
25056        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25057        aout.setAutoPadding(true);
25058        reduce(mExportReduceIdx_my_char4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
25059        return new result_int(aout);
25060    }
25061
25062    private final static int mExportReduceIdx_my_short_half_0 = 378;
25063    // in1 = "a"
25064    // in2 = "b"
25065    public result_int reduce_my_short_half_0(short[] in1, short[] in2) {
25066        // Verify that "in1" is non-null.
25067        if (in1 == null) {
25068            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25069        }
25070        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25071        ain1.setAutoPadding(true);
25072        ain1.copyFrom(in1);
25073        // Verify that "in2" is non-null.
25074        if (in2 == null) {
25075            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25076        }
25077        // Verify that input array lengths are the same.
25078        if (in1.length != in2.length) {
25079            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25080        }
25081        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
25082        ain2.setAutoPadding(true);
25083        ain2.copyFrom(in2);
25084
25085        result_int result = reduce_my_short_half_0(ain1, ain2, null);
25086        result.mTempIns = new Allocation[]{ain1, ain2};
25087        return result;
25088    }
25089
25090    // ain1 = "short a"
25091    // ain2 = "half b"
25092    public result_int reduce_my_short_half_0(Allocation ain1, Allocation ain2) {
25093        return reduce_my_short_half_0(ain1, ain2, null);
25094    }
25095
25096    // ain1 = "short a"
25097    // ain2 = "half b"
25098    public result_int reduce_my_short_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25099        Type t0, t1;
25100        // check ain1
25101        if (!ain1.getType().getElement().isCompatible(__I16)) {
25102            throw new RSRuntimeException("Type mismatch with I16!");
25103        }
25104        // check ain2
25105        if (!ain2.getType().getElement().isCompatible(__F16)) {
25106            throw new RSRuntimeException("Type mismatch with F16!");
25107        }
25108        // Verify dimensions
25109        t0 = ain1.getType();
25110        t1 = ain2.getType();
25111        if ((t0.getCount() != t1.getCount()) ||
25112            (t0.getX() != t1.getX()) ||
25113            (t0.getY() != t1.getY()) ||
25114            (t0.getZ() != t1.getZ()) ||
25115            (t0.hasFaces()   != t1.hasFaces()) ||
25116            (t0.hasMipmaps() != t1.hasMipmaps())) {
25117            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25118        }
25119
25120        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25121        aout.setAutoPadding(true);
25122        reduce(mExportReduceIdx_my_short_half_0, new Allocation[]{ain1, ain2}, aout, sc);
25123        return new result_int(aout);
25124    }
25125
25126    private final static int mExportReduceIdx_my_short_half_1 = 379;
25127    // in1 = "a"
25128    // in2 = "b"
25129    public result_int reduce_my_short_half_1(short[] in1, short[] in2) {
25130        // Verify that "in1" is non-null.
25131        if (in1 == null) {
25132            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25133        }
25134        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25135        ain1.setAutoPadding(true);
25136        ain1.copyFrom(in1);
25137        // Verify that "in2" is non-null.
25138        if (in2 == null) {
25139            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25140        }
25141        // Verify that input array lengths are the same.
25142        if (in1.length != in2.length) {
25143            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25144        }
25145        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
25146        ain2.setAutoPadding(true);
25147        ain2.copyFrom(in2);
25148
25149        result_int result = reduce_my_short_half_1(ain1, ain2, null);
25150        result.mTempIns = new Allocation[]{ain1, ain2};
25151        return result;
25152    }
25153
25154    // ain1 = "short a"
25155    // ain2 = "half b"
25156    public result_int reduce_my_short_half_1(Allocation ain1, Allocation ain2) {
25157        return reduce_my_short_half_1(ain1, ain2, null);
25158    }
25159
25160    // ain1 = "short a"
25161    // ain2 = "half b"
25162    public result_int reduce_my_short_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25163        Type t0, t1;
25164        // check ain1
25165        if (!ain1.getType().getElement().isCompatible(__I16)) {
25166            throw new RSRuntimeException("Type mismatch with I16!");
25167        }
25168        // check ain2
25169        if (!ain2.getType().getElement().isCompatible(__F16)) {
25170            throw new RSRuntimeException("Type mismatch with F16!");
25171        }
25172        // Verify dimensions
25173        t0 = ain1.getType();
25174        t1 = ain2.getType();
25175        if ((t0.getCount() != t1.getCount()) ||
25176            (t0.getX() != t1.getX()) ||
25177            (t0.getY() != t1.getY()) ||
25178            (t0.getZ() != t1.getZ()) ||
25179            (t0.hasFaces()   != t1.hasFaces()) ||
25180            (t0.hasMipmaps() != t1.hasMipmaps())) {
25181            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25182        }
25183
25184        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25185        aout.setAutoPadding(true);
25186        reduce(mExportReduceIdx_my_short_half_1, new Allocation[]{ain1, ain2}, aout, sc);
25187        return new result_int(aout);
25188    }
25189
25190    private final static int mExportReduceIdx_my_short_half2_0 = 380;
25191    // in1 = "a"
25192    // in2 = "b", flattened 2-vectors
25193    public result_int reduce_my_short_half2_0(short[] in1, short[] in2) {
25194        // Verify that "in1" is non-null.
25195        if (in1 == null) {
25196            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25197        }
25198        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25199        ain1.setAutoPadding(true);
25200        ain1.copyFrom(in1);
25201        // Verify that "in2" is non-null.
25202        if (in2 == null) {
25203            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25204        }
25205        // Verify that the array length is a multiple of the vector size.
25206        if (in2.length % 2 != 0) {
25207            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
25208        }
25209        // Verify that input array lengths are the same.
25210        if (in1.length != in2.length / 2) {
25211            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25212        }
25213        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
25214        ain2.setAutoPadding(true);
25215        ain2.copyFrom(in2);
25216
25217        result_int result = reduce_my_short_half2_0(ain1, ain2, null);
25218        result.mTempIns = new Allocation[]{ain1, ain2};
25219        return result;
25220    }
25221
25222    // ain1 = "short a"
25223    // ain2 = "half2 b"
25224    public result_int reduce_my_short_half2_0(Allocation ain1, Allocation ain2) {
25225        return reduce_my_short_half2_0(ain1, ain2, null);
25226    }
25227
25228    // ain1 = "short a"
25229    // ain2 = "half2 b"
25230    public result_int reduce_my_short_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25231        Type t0, t1;
25232        // check ain1
25233        if (!ain1.getType().getElement().isCompatible(__I16)) {
25234            throw new RSRuntimeException("Type mismatch with I16!");
25235        }
25236        // check ain2
25237        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
25238            throw new RSRuntimeException("Type mismatch with F16_2!");
25239        }
25240        // Verify dimensions
25241        t0 = ain1.getType();
25242        t1 = ain2.getType();
25243        if ((t0.getCount() != t1.getCount()) ||
25244            (t0.getX() != t1.getX()) ||
25245            (t0.getY() != t1.getY()) ||
25246            (t0.getZ() != t1.getZ()) ||
25247            (t0.hasFaces()   != t1.hasFaces()) ||
25248            (t0.hasMipmaps() != t1.hasMipmaps())) {
25249            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25250        }
25251
25252        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25253        aout.setAutoPadding(true);
25254        reduce(mExportReduceIdx_my_short_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
25255        return new result_int(aout);
25256    }
25257
25258    private final static int mExportReduceIdx_my_short_half2_1 = 381;
25259    // in1 = "a"
25260    // in2 = "b", flattened 2-vectors
25261    public result_int reduce_my_short_half2_1(short[] in1, short[] in2) {
25262        // Verify that "in1" is non-null.
25263        if (in1 == null) {
25264            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25265        }
25266        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25267        ain1.setAutoPadding(true);
25268        ain1.copyFrom(in1);
25269        // Verify that "in2" is non-null.
25270        if (in2 == null) {
25271            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25272        }
25273        // Verify that the array length is a multiple of the vector size.
25274        if (in2.length % 2 != 0) {
25275            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
25276        }
25277        // Verify that input array lengths are the same.
25278        if (in1.length != in2.length / 2) {
25279            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25280        }
25281        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
25282        ain2.setAutoPadding(true);
25283        ain2.copyFrom(in2);
25284
25285        result_int result = reduce_my_short_half2_1(ain1, ain2, null);
25286        result.mTempIns = new Allocation[]{ain1, ain2};
25287        return result;
25288    }
25289
25290    // ain1 = "short a"
25291    // ain2 = "half2 b"
25292    public result_int reduce_my_short_half2_1(Allocation ain1, Allocation ain2) {
25293        return reduce_my_short_half2_1(ain1, ain2, null);
25294    }
25295
25296    // ain1 = "short a"
25297    // ain2 = "half2 b"
25298    public result_int reduce_my_short_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25299        Type t0, t1;
25300        // check ain1
25301        if (!ain1.getType().getElement().isCompatible(__I16)) {
25302            throw new RSRuntimeException("Type mismatch with I16!");
25303        }
25304        // check ain2
25305        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
25306            throw new RSRuntimeException("Type mismatch with F16_2!");
25307        }
25308        // Verify dimensions
25309        t0 = ain1.getType();
25310        t1 = ain2.getType();
25311        if ((t0.getCount() != t1.getCount()) ||
25312            (t0.getX() != t1.getX()) ||
25313            (t0.getY() != t1.getY()) ||
25314            (t0.getZ() != t1.getZ()) ||
25315            (t0.hasFaces()   != t1.hasFaces()) ||
25316            (t0.hasMipmaps() != t1.hasMipmaps())) {
25317            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25318        }
25319
25320        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25321        aout.setAutoPadding(true);
25322        reduce(mExportReduceIdx_my_short_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
25323        return new result_int(aout);
25324    }
25325
25326    private final static int mExportReduceIdx_my_short_half4_0 = 382;
25327    // in1 = "a"
25328    // in2 = "b", flattened 4-vectors
25329    public result_int reduce_my_short_half4_0(short[] in1, short[] in2) {
25330        // Verify that "in1" is non-null.
25331        if (in1 == null) {
25332            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25333        }
25334        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25335        ain1.setAutoPadding(true);
25336        ain1.copyFrom(in1);
25337        // Verify that "in2" is non-null.
25338        if (in2 == null) {
25339            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25340        }
25341        // Verify that the array length is a multiple of the vector size.
25342        if (in2.length % 4 != 0) {
25343            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
25344        }
25345        // Verify that input array lengths are the same.
25346        if (in1.length != in2.length / 4) {
25347            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25348        }
25349        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
25350        ain2.setAutoPadding(true);
25351        ain2.copyFrom(in2);
25352
25353        result_int result = reduce_my_short_half4_0(ain1, ain2, null);
25354        result.mTempIns = new Allocation[]{ain1, ain2};
25355        return result;
25356    }
25357
25358    // ain1 = "short a"
25359    // ain2 = "half4 b"
25360    public result_int reduce_my_short_half4_0(Allocation ain1, Allocation ain2) {
25361        return reduce_my_short_half4_0(ain1, ain2, null);
25362    }
25363
25364    // ain1 = "short a"
25365    // ain2 = "half4 b"
25366    public result_int reduce_my_short_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25367        Type t0, t1;
25368        // check ain1
25369        if (!ain1.getType().getElement().isCompatible(__I16)) {
25370            throw new RSRuntimeException("Type mismatch with I16!");
25371        }
25372        // check ain2
25373        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
25374            throw new RSRuntimeException("Type mismatch with F16_4!");
25375        }
25376        // Verify dimensions
25377        t0 = ain1.getType();
25378        t1 = ain2.getType();
25379        if ((t0.getCount() != t1.getCount()) ||
25380            (t0.getX() != t1.getX()) ||
25381            (t0.getY() != t1.getY()) ||
25382            (t0.getZ() != t1.getZ()) ||
25383            (t0.hasFaces()   != t1.hasFaces()) ||
25384            (t0.hasMipmaps() != t1.hasMipmaps())) {
25385            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25386        }
25387
25388        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25389        aout.setAutoPadding(true);
25390        reduce(mExportReduceIdx_my_short_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
25391        return new result_int(aout);
25392    }
25393
25394    private final static int mExportReduceIdx_my_short_half4_1 = 383;
25395    // in1 = "a"
25396    // in2 = "b", flattened 4-vectors
25397    public result_int reduce_my_short_half4_1(short[] in1, short[] in2) {
25398        // Verify that "in1" is non-null.
25399        if (in1 == null) {
25400            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25401        }
25402        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25403        ain1.setAutoPadding(true);
25404        ain1.copyFrom(in1);
25405        // Verify that "in2" is non-null.
25406        if (in2 == null) {
25407            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25408        }
25409        // Verify that the array length is a multiple of the vector size.
25410        if (in2.length % 4 != 0) {
25411            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
25412        }
25413        // Verify that input array lengths are the same.
25414        if (in1.length != in2.length / 4) {
25415            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25416        }
25417        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
25418        ain2.setAutoPadding(true);
25419        ain2.copyFrom(in2);
25420
25421        result_int result = reduce_my_short_half4_1(ain1, ain2, null);
25422        result.mTempIns = new Allocation[]{ain1, ain2};
25423        return result;
25424    }
25425
25426    // ain1 = "short a"
25427    // ain2 = "half4 b"
25428    public result_int reduce_my_short_half4_1(Allocation ain1, Allocation ain2) {
25429        return reduce_my_short_half4_1(ain1, ain2, null);
25430    }
25431
25432    // ain1 = "short a"
25433    // ain2 = "half4 b"
25434    public result_int reduce_my_short_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25435        Type t0, t1;
25436        // check ain1
25437        if (!ain1.getType().getElement().isCompatible(__I16)) {
25438            throw new RSRuntimeException("Type mismatch with I16!");
25439        }
25440        // check ain2
25441        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
25442            throw new RSRuntimeException("Type mismatch with F16_4!");
25443        }
25444        // Verify dimensions
25445        t0 = ain1.getType();
25446        t1 = ain2.getType();
25447        if ((t0.getCount() != t1.getCount()) ||
25448            (t0.getX() != t1.getX()) ||
25449            (t0.getY() != t1.getY()) ||
25450            (t0.getZ() != t1.getZ()) ||
25451            (t0.hasFaces()   != t1.hasFaces()) ||
25452            (t0.hasMipmaps() != t1.hasMipmaps())) {
25453            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25454        }
25455
25456        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25457        aout.setAutoPadding(true);
25458        reduce(mExportReduceIdx_my_short_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
25459        return new result_int(aout);
25460    }
25461
25462    private final static int mExportReduceIdx_my_short_float_0 = 384;
25463    // in1 = "a"
25464    // in2 = "b"
25465    public result_int reduce_my_short_float_0(short[] in1, float[] in2) {
25466        // Verify that "in1" is non-null.
25467        if (in1 == null) {
25468            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25469        }
25470        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25471        ain1.setAutoPadding(true);
25472        ain1.copyFrom(in1);
25473        // Verify that "in2" is non-null.
25474        if (in2 == null) {
25475            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25476        }
25477        // Verify that input array lengths are the same.
25478        if (in1.length != in2.length) {
25479            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25480        }
25481        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
25482        ain2.setAutoPadding(true);
25483        ain2.copyFrom(in2);
25484
25485        result_int result = reduce_my_short_float_0(ain1, ain2, null);
25486        result.mTempIns = new Allocation[]{ain1, ain2};
25487        return result;
25488    }
25489
25490    // ain1 = "short a"
25491    // ain2 = "float b"
25492    public result_int reduce_my_short_float_0(Allocation ain1, Allocation ain2) {
25493        return reduce_my_short_float_0(ain1, ain2, null);
25494    }
25495
25496    // ain1 = "short a"
25497    // ain2 = "float b"
25498    public result_int reduce_my_short_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25499        Type t0, t1;
25500        // check ain1
25501        if (!ain1.getType().getElement().isCompatible(__I16)) {
25502            throw new RSRuntimeException("Type mismatch with I16!");
25503        }
25504        // check ain2
25505        if (!ain2.getType().getElement().isCompatible(__F32)) {
25506            throw new RSRuntimeException("Type mismatch with F32!");
25507        }
25508        // Verify dimensions
25509        t0 = ain1.getType();
25510        t1 = ain2.getType();
25511        if ((t0.getCount() != t1.getCount()) ||
25512            (t0.getX() != t1.getX()) ||
25513            (t0.getY() != t1.getY()) ||
25514            (t0.getZ() != t1.getZ()) ||
25515            (t0.hasFaces()   != t1.hasFaces()) ||
25516            (t0.hasMipmaps() != t1.hasMipmaps())) {
25517            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25518        }
25519
25520        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25521        aout.setAutoPadding(true);
25522        reduce(mExportReduceIdx_my_short_float_0, new Allocation[]{ain1, ain2}, aout, sc);
25523        return new result_int(aout);
25524    }
25525
25526    private final static int mExportReduceIdx_my_short_float_1 = 385;
25527    // in1 = "a"
25528    // in2 = "b"
25529    public result_int reduce_my_short_float_1(short[] in1, float[] in2) {
25530        // Verify that "in1" is non-null.
25531        if (in1 == null) {
25532            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25533        }
25534        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25535        ain1.setAutoPadding(true);
25536        ain1.copyFrom(in1);
25537        // Verify that "in2" is non-null.
25538        if (in2 == null) {
25539            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25540        }
25541        // Verify that input array lengths are the same.
25542        if (in1.length != in2.length) {
25543            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25544        }
25545        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
25546        ain2.setAutoPadding(true);
25547        ain2.copyFrom(in2);
25548
25549        result_int result = reduce_my_short_float_1(ain1, ain2, null);
25550        result.mTempIns = new Allocation[]{ain1, ain2};
25551        return result;
25552    }
25553
25554    // ain1 = "short a"
25555    // ain2 = "float b"
25556    public result_int reduce_my_short_float_1(Allocation ain1, Allocation ain2) {
25557        return reduce_my_short_float_1(ain1, ain2, null);
25558    }
25559
25560    // ain1 = "short a"
25561    // ain2 = "float b"
25562    public result_int reduce_my_short_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25563        Type t0, t1;
25564        // check ain1
25565        if (!ain1.getType().getElement().isCompatible(__I16)) {
25566            throw new RSRuntimeException("Type mismatch with I16!");
25567        }
25568        // check ain2
25569        if (!ain2.getType().getElement().isCompatible(__F32)) {
25570            throw new RSRuntimeException("Type mismatch with F32!");
25571        }
25572        // Verify dimensions
25573        t0 = ain1.getType();
25574        t1 = ain2.getType();
25575        if ((t0.getCount() != t1.getCount()) ||
25576            (t0.getX() != t1.getX()) ||
25577            (t0.getY() != t1.getY()) ||
25578            (t0.getZ() != t1.getZ()) ||
25579            (t0.hasFaces()   != t1.hasFaces()) ||
25580            (t0.hasMipmaps() != t1.hasMipmaps())) {
25581            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25582        }
25583
25584        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25585        aout.setAutoPadding(true);
25586        reduce(mExportReduceIdx_my_short_float_1, new Allocation[]{ain1, ain2}, aout, sc);
25587        return new result_int(aout);
25588    }
25589
25590    private final static int mExportReduceIdx_my_short_float2_0 = 386;
25591    // in1 = "a"
25592    // in2 = "b", flattened 2-vectors
25593    public result_int reduce_my_short_float2_0(short[] in1, float[] in2) {
25594        // Verify that "in1" is non-null.
25595        if (in1 == null) {
25596            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25597        }
25598        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25599        ain1.setAutoPadding(true);
25600        ain1.copyFrom(in1);
25601        // Verify that "in2" is non-null.
25602        if (in2 == null) {
25603            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25604        }
25605        // Verify that the array length is a multiple of the vector size.
25606        if (in2.length % 2 != 0) {
25607            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
25608        }
25609        // Verify that input array lengths are the same.
25610        if (in1.length != in2.length / 2) {
25611            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25612        }
25613        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
25614        ain2.setAutoPadding(true);
25615        ain2.copyFrom(in2);
25616
25617        result_int result = reduce_my_short_float2_0(ain1, ain2, null);
25618        result.mTempIns = new Allocation[]{ain1, ain2};
25619        return result;
25620    }
25621
25622    // ain1 = "short a"
25623    // ain2 = "float2 b"
25624    public result_int reduce_my_short_float2_0(Allocation ain1, Allocation ain2) {
25625        return reduce_my_short_float2_0(ain1, ain2, null);
25626    }
25627
25628    // ain1 = "short a"
25629    // ain2 = "float2 b"
25630    public result_int reduce_my_short_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25631        Type t0, t1;
25632        // check ain1
25633        if (!ain1.getType().getElement().isCompatible(__I16)) {
25634            throw new RSRuntimeException("Type mismatch with I16!");
25635        }
25636        // check ain2
25637        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
25638            throw new RSRuntimeException("Type mismatch with F32_2!");
25639        }
25640        // Verify dimensions
25641        t0 = ain1.getType();
25642        t1 = ain2.getType();
25643        if ((t0.getCount() != t1.getCount()) ||
25644            (t0.getX() != t1.getX()) ||
25645            (t0.getY() != t1.getY()) ||
25646            (t0.getZ() != t1.getZ()) ||
25647            (t0.hasFaces()   != t1.hasFaces()) ||
25648            (t0.hasMipmaps() != t1.hasMipmaps())) {
25649            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25650        }
25651
25652        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25653        aout.setAutoPadding(true);
25654        reduce(mExportReduceIdx_my_short_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
25655        return new result_int(aout);
25656    }
25657
25658    private final static int mExportReduceIdx_my_short_float2_1 = 387;
25659    // in1 = "a"
25660    // in2 = "b", flattened 2-vectors
25661    public result_int reduce_my_short_float2_1(short[] in1, float[] in2) {
25662        // Verify that "in1" is non-null.
25663        if (in1 == null) {
25664            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25665        }
25666        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25667        ain1.setAutoPadding(true);
25668        ain1.copyFrom(in1);
25669        // Verify that "in2" is non-null.
25670        if (in2 == null) {
25671            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25672        }
25673        // Verify that the array length is a multiple of the vector size.
25674        if (in2.length % 2 != 0) {
25675            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
25676        }
25677        // Verify that input array lengths are the same.
25678        if (in1.length != in2.length / 2) {
25679            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25680        }
25681        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
25682        ain2.setAutoPadding(true);
25683        ain2.copyFrom(in2);
25684
25685        result_int result = reduce_my_short_float2_1(ain1, ain2, null);
25686        result.mTempIns = new Allocation[]{ain1, ain2};
25687        return result;
25688    }
25689
25690    // ain1 = "short a"
25691    // ain2 = "float2 b"
25692    public result_int reduce_my_short_float2_1(Allocation ain1, Allocation ain2) {
25693        return reduce_my_short_float2_1(ain1, ain2, null);
25694    }
25695
25696    // ain1 = "short a"
25697    // ain2 = "float2 b"
25698    public result_int reduce_my_short_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25699        Type t0, t1;
25700        // check ain1
25701        if (!ain1.getType().getElement().isCompatible(__I16)) {
25702            throw new RSRuntimeException("Type mismatch with I16!");
25703        }
25704        // check ain2
25705        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
25706            throw new RSRuntimeException("Type mismatch with F32_2!");
25707        }
25708        // Verify dimensions
25709        t0 = ain1.getType();
25710        t1 = ain2.getType();
25711        if ((t0.getCount() != t1.getCount()) ||
25712            (t0.getX() != t1.getX()) ||
25713            (t0.getY() != t1.getY()) ||
25714            (t0.getZ() != t1.getZ()) ||
25715            (t0.hasFaces()   != t1.hasFaces()) ||
25716            (t0.hasMipmaps() != t1.hasMipmaps())) {
25717            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25718        }
25719
25720        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25721        aout.setAutoPadding(true);
25722        reduce(mExportReduceIdx_my_short_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
25723        return new result_int(aout);
25724    }
25725
25726    private final static int mExportReduceIdx_my_short_float4_0 = 388;
25727    // in1 = "a"
25728    // in2 = "b", flattened 4-vectors
25729    public result_int reduce_my_short_float4_0(short[] in1, float[] in2) {
25730        // Verify that "in1" is non-null.
25731        if (in1 == null) {
25732            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25733        }
25734        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25735        ain1.setAutoPadding(true);
25736        ain1.copyFrom(in1);
25737        // Verify that "in2" is non-null.
25738        if (in2 == null) {
25739            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25740        }
25741        // Verify that the array length is a multiple of the vector size.
25742        if (in2.length % 4 != 0) {
25743            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
25744        }
25745        // Verify that input array lengths are the same.
25746        if (in1.length != in2.length / 4) {
25747            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25748        }
25749        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
25750        ain2.setAutoPadding(true);
25751        ain2.copyFrom(in2);
25752
25753        result_int result = reduce_my_short_float4_0(ain1, ain2, null);
25754        result.mTempIns = new Allocation[]{ain1, ain2};
25755        return result;
25756    }
25757
25758    // ain1 = "short a"
25759    // ain2 = "float4 b"
25760    public result_int reduce_my_short_float4_0(Allocation ain1, Allocation ain2) {
25761        return reduce_my_short_float4_0(ain1, ain2, null);
25762    }
25763
25764    // ain1 = "short a"
25765    // ain2 = "float4 b"
25766    public result_int reduce_my_short_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25767        Type t0, t1;
25768        // check ain1
25769        if (!ain1.getType().getElement().isCompatible(__I16)) {
25770            throw new RSRuntimeException("Type mismatch with I16!");
25771        }
25772        // check ain2
25773        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
25774            throw new RSRuntimeException("Type mismatch with F32_4!");
25775        }
25776        // Verify dimensions
25777        t0 = ain1.getType();
25778        t1 = ain2.getType();
25779        if ((t0.getCount() != t1.getCount()) ||
25780            (t0.getX() != t1.getX()) ||
25781            (t0.getY() != t1.getY()) ||
25782            (t0.getZ() != t1.getZ()) ||
25783            (t0.hasFaces()   != t1.hasFaces()) ||
25784            (t0.hasMipmaps() != t1.hasMipmaps())) {
25785            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25786        }
25787
25788        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25789        aout.setAutoPadding(true);
25790        reduce(mExportReduceIdx_my_short_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
25791        return new result_int(aout);
25792    }
25793
25794    private final static int mExportReduceIdx_my_short_float4_1 = 389;
25795    // in1 = "a"
25796    // in2 = "b", flattened 4-vectors
25797    public result_int reduce_my_short_float4_1(short[] in1, float[] in2) {
25798        // Verify that "in1" is non-null.
25799        if (in1 == null) {
25800            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25801        }
25802        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25803        ain1.setAutoPadding(true);
25804        ain1.copyFrom(in1);
25805        // Verify that "in2" is non-null.
25806        if (in2 == null) {
25807            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25808        }
25809        // Verify that the array length is a multiple of the vector size.
25810        if (in2.length % 4 != 0) {
25811            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
25812        }
25813        // Verify that input array lengths are the same.
25814        if (in1.length != in2.length / 4) {
25815            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25816        }
25817        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
25818        ain2.setAutoPadding(true);
25819        ain2.copyFrom(in2);
25820
25821        result_int result = reduce_my_short_float4_1(ain1, ain2, null);
25822        result.mTempIns = new Allocation[]{ain1, ain2};
25823        return result;
25824    }
25825
25826    // ain1 = "short a"
25827    // ain2 = "float4 b"
25828    public result_int reduce_my_short_float4_1(Allocation ain1, Allocation ain2) {
25829        return reduce_my_short_float4_1(ain1, ain2, null);
25830    }
25831
25832    // ain1 = "short a"
25833    // ain2 = "float4 b"
25834    public result_int reduce_my_short_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25835        Type t0, t1;
25836        // check ain1
25837        if (!ain1.getType().getElement().isCompatible(__I16)) {
25838            throw new RSRuntimeException("Type mismatch with I16!");
25839        }
25840        // check ain2
25841        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
25842            throw new RSRuntimeException("Type mismatch with F32_4!");
25843        }
25844        // Verify dimensions
25845        t0 = ain1.getType();
25846        t1 = ain2.getType();
25847        if ((t0.getCount() != t1.getCount()) ||
25848            (t0.getX() != t1.getX()) ||
25849            (t0.getY() != t1.getY()) ||
25850            (t0.getZ() != t1.getZ()) ||
25851            (t0.hasFaces()   != t1.hasFaces()) ||
25852            (t0.hasMipmaps() != t1.hasMipmaps())) {
25853            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25854        }
25855
25856        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25857        aout.setAutoPadding(true);
25858        reduce(mExportReduceIdx_my_short_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
25859        return new result_int(aout);
25860    }
25861
25862    private final static int mExportReduceIdx_my_short_char_0 = 390;
25863    // in1 = "a"
25864    // in2 = "b"
25865    public result_int reduce_my_short_char_0(short[] in1, byte[] in2) {
25866        // Verify that "in1" is non-null.
25867        if (in1 == null) {
25868            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25869        }
25870        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25871        ain1.setAutoPadding(true);
25872        ain1.copyFrom(in1);
25873        // Verify that "in2" is non-null.
25874        if (in2 == null) {
25875            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25876        }
25877        // Verify that input array lengths are the same.
25878        if (in1.length != in2.length) {
25879            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25880        }
25881        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
25882        ain2.setAutoPadding(true);
25883        ain2.copyFrom(in2);
25884
25885        result_int result = reduce_my_short_char_0(ain1, ain2, null);
25886        result.mTempIns = new Allocation[]{ain1, ain2};
25887        return result;
25888    }
25889
25890    // ain1 = "short a"
25891    // ain2 = "char b"
25892    public result_int reduce_my_short_char_0(Allocation ain1, Allocation ain2) {
25893        return reduce_my_short_char_0(ain1, ain2, null);
25894    }
25895
25896    // ain1 = "short a"
25897    // ain2 = "char b"
25898    public result_int reduce_my_short_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25899        Type t0, t1;
25900        // check ain1
25901        if (!ain1.getType().getElement().isCompatible(__I16)) {
25902            throw new RSRuntimeException("Type mismatch with I16!");
25903        }
25904        // check ain2
25905        if (!ain2.getType().getElement().isCompatible(__I8)) {
25906            throw new RSRuntimeException("Type mismatch with I8!");
25907        }
25908        // Verify dimensions
25909        t0 = ain1.getType();
25910        t1 = ain2.getType();
25911        if ((t0.getCount() != t1.getCount()) ||
25912            (t0.getX() != t1.getX()) ||
25913            (t0.getY() != t1.getY()) ||
25914            (t0.getZ() != t1.getZ()) ||
25915            (t0.hasFaces()   != t1.hasFaces()) ||
25916            (t0.hasMipmaps() != t1.hasMipmaps())) {
25917            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25918        }
25919
25920        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25921        aout.setAutoPadding(true);
25922        reduce(mExportReduceIdx_my_short_char_0, new Allocation[]{ain1, ain2}, aout, sc);
25923        return new result_int(aout);
25924    }
25925
25926    private final static int mExportReduceIdx_my_short_char_1 = 391;
25927    // in1 = "a"
25928    // in2 = "b"
25929    public result_int reduce_my_short_char_1(short[] in1, byte[] in2) {
25930        // Verify that "in1" is non-null.
25931        if (in1 == null) {
25932            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25933        }
25934        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25935        ain1.setAutoPadding(true);
25936        ain1.copyFrom(in1);
25937        // Verify that "in2" is non-null.
25938        if (in2 == null) {
25939            throw new RSIllegalArgumentException("Array \"in2\" is null!");
25940        }
25941        // Verify that input array lengths are the same.
25942        if (in1.length != in2.length) {
25943            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
25944        }
25945        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
25946        ain2.setAutoPadding(true);
25947        ain2.copyFrom(in2);
25948
25949        result_int result = reduce_my_short_char_1(ain1, ain2, null);
25950        result.mTempIns = new Allocation[]{ain1, ain2};
25951        return result;
25952    }
25953
25954    // ain1 = "short a"
25955    // ain2 = "char b"
25956    public result_int reduce_my_short_char_1(Allocation ain1, Allocation ain2) {
25957        return reduce_my_short_char_1(ain1, ain2, null);
25958    }
25959
25960    // ain1 = "short a"
25961    // ain2 = "char b"
25962    public result_int reduce_my_short_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
25963        Type t0, t1;
25964        // check ain1
25965        if (!ain1.getType().getElement().isCompatible(__I16)) {
25966            throw new RSRuntimeException("Type mismatch with I16!");
25967        }
25968        // check ain2
25969        if (!ain2.getType().getElement().isCompatible(__I8)) {
25970            throw new RSRuntimeException("Type mismatch with I8!");
25971        }
25972        // Verify dimensions
25973        t0 = ain1.getType();
25974        t1 = ain2.getType();
25975        if ((t0.getCount() != t1.getCount()) ||
25976            (t0.getX() != t1.getX()) ||
25977            (t0.getY() != t1.getY()) ||
25978            (t0.getZ() != t1.getZ()) ||
25979            (t0.hasFaces()   != t1.hasFaces()) ||
25980            (t0.hasMipmaps() != t1.hasMipmaps())) {
25981            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
25982        }
25983
25984        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
25985        aout.setAutoPadding(true);
25986        reduce(mExportReduceIdx_my_short_char_1, new Allocation[]{ain1, ain2}, aout, sc);
25987        return new result_int(aout);
25988    }
25989
25990    private final static int mExportReduceIdx_my_short_char2_0 = 392;
25991    // in1 = "a"
25992    // in2 = "b", flattened 2-vectors
25993    public result_int reduce_my_short_char2_0(short[] in1, byte[] in2) {
25994        // Verify that "in1" is non-null.
25995        if (in1 == null) {
25996            throw new RSIllegalArgumentException("Array \"in1\" is null!");
25997        }
25998        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
25999        ain1.setAutoPadding(true);
26000        ain1.copyFrom(in1);
26001        // Verify that "in2" is non-null.
26002        if (in2 == null) {
26003            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26004        }
26005        // Verify that the array length is a multiple of the vector size.
26006        if (in2.length % 2 != 0) {
26007            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
26008        }
26009        // Verify that input array lengths are the same.
26010        if (in1.length != in2.length / 2) {
26011            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26012        }
26013        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
26014        ain2.setAutoPadding(true);
26015        ain2.copyFrom(in2);
26016
26017        result_int result = reduce_my_short_char2_0(ain1, ain2, null);
26018        result.mTempIns = new Allocation[]{ain1, ain2};
26019        return result;
26020    }
26021
26022    // ain1 = "short a"
26023    // ain2 = "char2 b"
26024    public result_int reduce_my_short_char2_0(Allocation ain1, Allocation ain2) {
26025        return reduce_my_short_char2_0(ain1, ain2, null);
26026    }
26027
26028    // ain1 = "short a"
26029    // ain2 = "char2 b"
26030    public result_int reduce_my_short_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26031        Type t0, t1;
26032        // check ain1
26033        if (!ain1.getType().getElement().isCompatible(__I16)) {
26034            throw new RSRuntimeException("Type mismatch with I16!");
26035        }
26036        // check ain2
26037        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
26038            throw new RSRuntimeException("Type mismatch with I8_2!");
26039        }
26040        // Verify dimensions
26041        t0 = ain1.getType();
26042        t1 = ain2.getType();
26043        if ((t0.getCount() != t1.getCount()) ||
26044            (t0.getX() != t1.getX()) ||
26045            (t0.getY() != t1.getY()) ||
26046            (t0.getZ() != t1.getZ()) ||
26047            (t0.hasFaces()   != t1.hasFaces()) ||
26048            (t0.hasMipmaps() != t1.hasMipmaps())) {
26049            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26050        }
26051
26052        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26053        aout.setAutoPadding(true);
26054        reduce(mExportReduceIdx_my_short_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
26055        return new result_int(aout);
26056    }
26057
26058    private final static int mExportReduceIdx_my_short_char2_1 = 393;
26059    // in1 = "a"
26060    // in2 = "b", flattened 2-vectors
26061    public result_int reduce_my_short_char2_1(short[] in1, byte[] in2) {
26062        // Verify that "in1" is non-null.
26063        if (in1 == null) {
26064            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26065        }
26066        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26067        ain1.setAutoPadding(true);
26068        ain1.copyFrom(in1);
26069        // Verify that "in2" is non-null.
26070        if (in2 == null) {
26071            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26072        }
26073        // Verify that the array length is a multiple of the vector size.
26074        if (in2.length % 2 != 0) {
26075            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
26076        }
26077        // Verify that input array lengths are the same.
26078        if (in1.length != in2.length / 2) {
26079            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26080        }
26081        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
26082        ain2.setAutoPadding(true);
26083        ain2.copyFrom(in2);
26084
26085        result_int result = reduce_my_short_char2_1(ain1, ain2, null);
26086        result.mTempIns = new Allocation[]{ain1, ain2};
26087        return result;
26088    }
26089
26090    // ain1 = "short a"
26091    // ain2 = "char2 b"
26092    public result_int reduce_my_short_char2_1(Allocation ain1, Allocation ain2) {
26093        return reduce_my_short_char2_1(ain1, ain2, null);
26094    }
26095
26096    // ain1 = "short a"
26097    // ain2 = "char2 b"
26098    public result_int reduce_my_short_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26099        Type t0, t1;
26100        // check ain1
26101        if (!ain1.getType().getElement().isCompatible(__I16)) {
26102            throw new RSRuntimeException("Type mismatch with I16!");
26103        }
26104        // check ain2
26105        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
26106            throw new RSRuntimeException("Type mismatch with I8_2!");
26107        }
26108        // Verify dimensions
26109        t0 = ain1.getType();
26110        t1 = ain2.getType();
26111        if ((t0.getCount() != t1.getCount()) ||
26112            (t0.getX() != t1.getX()) ||
26113            (t0.getY() != t1.getY()) ||
26114            (t0.getZ() != t1.getZ()) ||
26115            (t0.hasFaces()   != t1.hasFaces()) ||
26116            (t0.hasMipmaps() != t1.hasMipmaps())) {
26117            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26118        }
26119
26120        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26121        aout.setAutoPadding(true);
26122        reduce(mExportReduceIdx_my_short_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
26123        return new result_int(aout);
26124    }
26125
26126    private final static int mExportReduceIdx_my_short_char4_0 = 394;
26127    // in1 = "a"
26128    // in2 = "b", flattened 4-vectors
26129    public result_int reduce_my_short_char4_0(short[] in1, byte[] in2) {
26130        // Verify that "in1" is non-null.
26131        if (in1 == null) {
26132            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26133        }
26134        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26135        ain1.setAutoPadding(true);
26136        ain1.copyFrom(in1);
26137        // Verify that "in2" is non-null.
26138        if (in2 == null) {
26139            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26140        }
26141        // Verify that the array length is a multiple of the vector size.
26142        if (in2.length % 4 != 0) {
26143            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
26144        }
26145        // Verify that input array lengths are the same.
26146        if (in1.length != in2.length / 4) {
26147            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26148        }
26149        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
26150        ain2.setAutoPadding(true);
26151        ain2.copyFrom(in2);
26152
26153        result_int result = reduce_my_short_char4_0(ain1, ain2, null);
26154        result.mTempIns = new Allocation[]{ain1, ain2};
26155        return result;
26156    }
26157
26158    // ain1 = "short a"
26159    // ain2 = "char4 b"
26160    public result_int reduce_my_short_char4_0(Allocation ain1, Allocation ain2) {
26161        return reduce_my_short_char4_0(ain1, ain2, null);
26162    }
26163
26164    // ain1 = "short a"
26165    // ain2 = "char4 b"
26166    public result_int reduce_my_short_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26167        Type t0, t1;
26168        // check ain1
26169        if (!ain1.getType().getElement().isCompatible(__I16)) {
26170            throw new RSRuntimeException("Type mismatch with I16!");
26171        }
26172        // check ain2
26173        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
26174            throw new RSRuntimeException("Type mismatch with I8_4!");
26175        }
26176        // Verify dimensions
26177        t0 = ain1.getType();
26178        t1 = ain2.getType();
26179        if ((t0.getCount() != t1.getCount()) ||
26180            (t0.getX() != t1.getX()) ||
26181            (t0.getY() != t1.getY()) ||
26182            (t0.getZ() != t1.getZ()) ||
26183            (t0.hasFaces()   != t1.hasFaces()) ||
26184            (t0.hasMipmaps() != t1.hasMipmaps())) {
26185            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26186        }
26187
26188        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26189        aout.setAutoPadding(true);
26190        reduce(mExportReduceIdx_my_short_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
26191        return new result_int(aout);
26192    }
26193
26194    private final static int mExportReduceIdx_my_short_char4_1 = 395;
26195    // in1 = "a"
26196    // in2 = "b", flattened 4-vectors
26197    public result_int reduce_my_short_char4_1(short[] in1, byte[] in2) {
26198        // Verify that "in1" is non-null.
26199        if (in1 == null) {
26200            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26201        }
26202        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26203        ain1.setAutoPadding(true);
26204        ain1.copyFrom(in1);
26205        // Verify that "in2" is non-null.
26206        if (in2 == null) {
26207            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26208        }
26209        // Verify that the array length is a multiple of the vector size.
26210        if (in2.length % 4 != 0) {
26211            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
26212        }
26213        // Verify that input array lengths are the same.
26214        if (in1.length != in2.length / 4) {
26215            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26216        }
26217        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
26218        ain2.setAutoPadding(true);
26219        ain2.copyFrom(in2);
26220
26221        result_int result = reduce_my_short_char4_1(ain1, ain2, null);
26222        result.mTempIns = new Allocation[]{ain1, ain2};
26223        return result;
26224    }
26225
26226    // ain1 = "short a"
26227    // ain2 = "char4 b"
26228    public result_int reduce_my_short_char4_1(Allocation ain1, Allocation ain2) {
26229        return reduce_my_short_char4_1(ain1, ain2, null);
26230    }
26231
26232    // ain1 = "short a"
26233    // ain2 = "char4 b"
26234    public result_int reduce_my_short_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26235        Type t0, t1;
26236        // check ain1
26237        if (!ain1.getType().getElement().isCompatible(__I16)) {
26238            throw new RSRuntimeException("Type mismatch with I16!");
26239        }
26240        // check ain2
26241        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
26242            throw new RSRuntimeException("Type mismatch with I8_4!");
26243        }
26244        // Verify dimensions
26245        t0 = ain1.getType();
26246        t1 = ain2.getType();
26247        if ((t0.getCount() != t1.getCount()) ||
26248            (t0.getX() != t1.getX()) ||
26249            (t0.getY() != t1.getY()) ||
26250            (t0.getZ() != t1.getZ()) ||
26251            (t0.hasFaces()   != t1.hasFaces()) ||
26252            (t0.hasMipmaps() != t1.hasMipmaps())) {
26253            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26254        }
26255
26256        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26257        aout.setAutoPadding(true);
26258        reduce(mExportReduceIdx_my_short_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
26259        return new result_int(aout);
26260    }
26261
26262    private final static int mExportReduceIdx_my_short_short_0 = 396;
26263    // in1 = "a"
26264    // in2 = "b"
26265    public result_int reduce_my_short_short_0(short[] in1, short[] in2) {
26266        // Verify that "in1" is non-null.
26267        if (in1 == null) {
26268            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26269        }
26270        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26271        ain1.setAutoPadding(true);
26272        ain1.copyFrom(in1);
26273        // Verify that "in2" is non-null.
26274        if (in2 == null) {
26275            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26276        }
26277        // Verify that input array lengths are the same.
26278        if (in1.length != in2.length) {
26279            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26280        }
26281        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
26282        ain2.setAutoPadding(true);
26283        ain2.copyFrom(in2);
26284
26285        result_int result = reduce_my_short_short_0(ain1, ain2, null);
26286        result.mTempIns = new Allocation[]{ain1, ain2};
26287        return result;
26288    }
26289
26290    // ain1 = "short a"
26291    // ain2 = "short b"
26292    public result_int reduce_my_short_short_0(Allocation ain1, Allocation ain2) {
26293        return reduce_my_short_short_0(ain1, ain2, null);
26294    }
26295
26296    // ain1 = "short a"
26297    // ain2 = "short b"
26298    public result_int reduce_my_short_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26299        Type t0, t1;
26300        // check ain1
26301        if (!ain1.getType().getElement().isCompatible(__I16)) {
26302            throw new RSRuntimeException("Type mismatch with I16!");
26303        }
26304        // check ain2
26305        if (!ain2.getType().getElement().isCompatible(__I16)) {
26306            throw new RSRuntimeException("Type mismatch with I16!");
26307        }
26308        // Verify dimensions
26309        t0 = ain1.getType();
26310        t1 = ain2.getType();
26311        if ((t0.getCount() != t1.getCount()) ||
26312            (t0.getX() != t1.getX()) ||
26313            (t0.getY() != t1.getY()) ||
26314            (t0.getZ() != t1.getZ()) ||
26315            (t0.hasFaces()   != t1.hasFaces()) ||
26316            (t0.hasMipmaps() != t1.hasMipmaps())) {
26317            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26318        }
26319
26320        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26321        aout.setAutoPadding(true);
26322        reduce(mExportReduceIdx_my_short_short_0, new Allocation[]{ain1, ain2}, aout, sc);
26323        return new result_int(aout);
26324    }
26325
26326    private final static int mExportReduceIdx_my_short_short_1 = 397;
26327    // in1 = "a"
26328    // in2 = "b"
26329    public result_int reduce_my_short_short_1(short[] in1, short[] in2) {
26330        // Verify that "in1" is non-null.
26331        if (in1 == null) {
26332            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26333        }
26334        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26335        ain1.setAutoPadding(true);
26336        ain1.copyFrom(in1);
26337        // Verify that "in2" is non-null.
26338        if (in2 == null) {
26339            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26340        }
26341        // Verify that input array lengths are the same.
26342        if (in1.length != in2.length) {
26343            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26344        }
26345        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
26346        ain2.setAutoPadding(true);
26347        ain2.copyFrom(in2);
26348
26349        result_int result = reduce_my_short_short_1(ain1, ain2, null);
26350        result.mTempIns = new Allocation[]{ain1, ain2};
26351        return result;
26352    }
26353
26354    // ain1 = "short a"
26355    // ain2 = "short b"
26356    public result_int reduce_my_short_short_1(Allocation ain1, Allocation ain2) {
26357        return reduce_my_short_short_1(ain1, ain2, null);
26358    }
26359
26360    // ain1 = "short a"
26361    // ain2 = "short b"
26362    public result_int reduce_my_short_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26363        Type t0, t1;
26364        // check ain1
26365        if (!ain1.getType().getElement().isCompatible(__I16)) {
26366            throw new RSRuntimeException("Type mismatch with I16!");
26367        }
26368        // check ain2
26369        if (!ain2.getType().getElement().isCompatible(__I16)) {
26370            throw new RSRuntimeException("Type mismatch with I16!");
26371        }
26372        // Verify dimensions
26373        t0 = ain1.getType();
26374        t1 = ain2.getType();
26375        if ((t0.getCount() != t1.getCount()) ||
26376            (t0.getX() != t1.getX()) ||
26377            (t0.getY() != t1.getY()) ||
26378            (t0.getZ() != t1.getZ()) ||
26379            (t0.hasFaces()   != t1.hasFaces()) ||
26380            (t0.hasMipmaps() != t1.hasMipmaps())) {
26381            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26382        }
26383
26384        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26385        aout.setAutoPadding(true);
26386        reduce(mExportReduceIdx_my_short_short_1, new Allocation[]{ain1, ain2}, aout, sc);
26387        return new result_int(aout);
26388    }
26389
26390    private final static int mExportReduceIdx_my_short_short2_0 = 398;
26391    // in1 = "a"
26392    // in2 = "b", flattened 2-vectors
26393    public result_int reduce_my_short_short2_0(short[] in1, short[] in2) {
26394        // Verify that "in1" is non-null.
26395        if (in1 == null) {
26396            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26397        }
26398        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26399        ain1.setAutoPadding(true);
26400        ain1.copyFrom(in1);
26401        // Verify that "in2" is non-null.
26402        if (in2 == null) {
26403            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26404        }
26405        // Verify that the array length is a multiple of the vector size.
26406        if (in2.length % 2 != 0) {
26407            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
26408        }
26409        // Verify that input array lengths are the same.
26410        if (in1.length != in2.length / 2) {
26411            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26412        }
26413        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
26414        ain2.setAutoPadding(true);
26415        ain2.copyFrom(in2);
26416
26417        result_int result = reduce_my_short_short2_0(ain1, ain2, null);
26418        result.mTempIns = new Allocation[]{ain1, ain2};
26419        return result;
26420    }
26421
26422    // ain1 = "short a"
26423    // ain2 = "short2 b"
26424    public result_int reduce_my_short_short2_0(Allocation ain1, Allocation ain2) {
26425        return reduce_my_short_short2_0(ain1, ain2, null);
26426    }
26427
26428    // ain1 = "short a"
26429    // ain2 = "short2 b"
26430    public result_int reduce_my_short_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26431        Type t0, t1;
26432        // check ain1
26433        if (!ain1.getType().getElement().isCompatible(__I16)) {
26434            throw new RSRuntimeException("Type mismatch with I16!");
26435        }
26436        // check ain2
26437        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
26438            throw new RSRuntimeException("Type mismatch with I16_2!");
26439        }
26440        // Verify dimensions
26441        t0 = ain1.getType();
26442        t1 = ain2.getType();
26443        if ((t0.getCount() != t1.getCount()) ||
26444            (t0.getX() != t1.getX()) ||
26445            (t0.getY() != t1.getY()) ||
26446            (t0.getZ() != t1.getZ()) ||
26447            (t0.hasFaces()   != t1.hasFaces()) ||
26448            (t0.hasMipmaps() != t1.hasMipmaps())) {
26449            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26450        }
26451
26452        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26453        aout.setAutoPadding(true);
26454        reduce(mExportReduceIdx_my_short_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
26455        return new result_int(aout);
26456    }
26457
26458    private final static int mExportReduceIdx_my_short_short2_1 = 399;
26459    // in1 = "a"
26460    // in2 = "b", flattened 2-vectors
26461    public result_int reduce_my_short_short2_1(short[] in1, short[] in2) {
26462        // Verify that "in1" is non-null.
26463        if (in1 == null) {
26464            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26465        }
26466        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26467        ain1.setAutoPadding(true);
26468        ain1.copyFrom(in1);
26469        // Verify that "in2" is non-null.
26470        if (in2 == null) {
26471            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26472        }
26473        // Verify that the array length is a multiple of the vector size.
26474        if (in2.length % 2 != 0) {
26475            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
26476        }
26477        // Verify that input array lengths are the same.
26478        if (in1.length != in2.length / 2) {
26479            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26480        }
26481        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
26482        ain2.setAutoPadding(true);
26483        ain2.copyFrom(in2);
26484
26485        result_int result = reduce_my_short_short2_1(ain1, ain2, null);
26486        result.mTempIns = new Allocation[]{ain1, ain2};
26487        return result;
26488    }
26489
26490    // ain1 = "short a"
26491    // ain2 = "short2 b"
26492    public result_int reduce_my_short_short2_1(Allocation ain1, Allocation ain2) {
26493        return reduce_my_short_short2_1(ain1, ain2, null);
26494    }
26495
26496    // ain1 = "short a"
26497    // ain2 = "short2 b"
26498    public result_int reduce_my_short_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26499        Type t0, t1;
26500        // check ain1
26501        if (!ain1.getType().getElement().isCompatible(__I16)) {
26502            throw new RSRuntimeException("Type mismatch with I16!");
26503        }
26504        // check ain2
26505        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
26506            throw new RSRuntimeException("Type mismatch with I16_2!");
26507        }
26508        // Verify dimensions
26509        t0 = ain1.getType();
26510        t1 = ain2.getType();
26511        if ((t0.getCount() != t1.getCount()) ||
26512            (t0.getX() != t1.getX()) ||
26513            (t0.getY() != t1.getY()) ||
26514            (t0.getZ() != t1.getZ()) ||
26515            (t0.hasFaces()   != t1.hasFaces()) ||
26516            (t0.hasMipmaps() != t1.hasMipmaps())) {
26517            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26518        }
26519
26520        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26521        aout.setAutoPadding(true);
26522        reduce(mExportReduceIdx_my_short_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
26523        return new result_int(aout);
26524    }
26525
26526    private final static int mExportReduceIdx_my_short_short4_0 = 400;
26527    // in1 = "a"
26528    // in2 = "b", flattened 4-vectors
26529    public result_int reduce_my_short_short4_0(short[] in1, short[] in2) {
26530        // Verify that "in1" is non-null.
26531        if (in1 == null) {
26532            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26533        }
26534        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26535        ain1.setAutoPadding(true);
26536        ain1.copyFrom(in1);
26537        // Verify that "in2" is non-null.
26538        if (in2 == null) {
26539            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26540        }
26541        // Verify that the array length is a multiple of the vector size.
26542        if (in2.length % 4 != 0) {
26543            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
26544        }
26545        // Verify that input array lengths are the same.
26546        if (in1.length != in2.length / 4) {
26547            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26548        }
26549        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
26550        ain2.setAutoPadding(true);
26551        ain2.copyFrom(in2);
26552
26553        result_int result = reduce_my_short_short4_0(ain1, ain2, null);
26554        result.mTempIns = new Allocation[]{ain1, ain2};
26555        return result;
26556    }
26557
26558    // ain1 = "short a"
26559    // ain2 = "short4 b"
26560    public result_int reduce_my_short_short4_0(Allocation ain1, Allocation ain2) {
26561        return reduce_my_short_short4_0(ain1, ain2, null);
26562    }
26563
26564    // ain1 = "short a"
26565    // ain2 = "short4 b"
26566    public result_int reduce_my_short_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26567        Type t0, t1;
26568        // check ain1
26569        if (!ain1.getType().getElement().isCompatible(__I16)) {
26570            throw new RSRuntimeException("Type mismatch with I16!");
26571        }
26572        // check ain2
26573        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
26574            throw new RSRuntimeException("Type mismatch with I16_4!");
26575        }
26576        // Verify dimensions
26577        t0 = ain1.getType();
26578        t1 = ain2.getType();
26579        if ((t0.getCount() != t1.getCount()) ||
26580            (t0.getX() != t1.getX()) ||
26581            (t0.getY() != t1.getY()) ||
26582            (t0.getZ() != t1.getZ()) ||
26583            (t0.hasFaces()   != t1.hasFaces()) ||
26584            (t0.hasMipmaps() != t1.hasMipmaps())) {
26585            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26586        }
26587
26588        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26589        aout.setAutoPadding(true);
26590        reduce(mExportReduceIdx_my_short_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
26591        return new result_int(aout);
26592    }
26593
26594    private final static int mExportReduceIdx_my_short_short4_1 = 401;
26595    // in1 = "a"
26596    // in2 = "b", flattened 4-vectors
26597    public result_int reduce_my_short_short4_1(short[] in1, short[] in2) {
26598        // Verify that "in1" is non-null.
26599        if (in1 == null) {
26600            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26601        }
26602        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26603        ain1.setAutoPadding(true);
26604        ain1.copyFrom(in1);
26605        // Verify that "in2" is non-null.
26606        if (in2 == null) {
26607            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26608        }
26609        // Verify that the array length is a multiple of the vector size.
26610        if (in2.length % 4 != 0) {
26611            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
26612        }
26613        // Verify that input array lengths are the same.
26614        if (in1.length != in2.length / 4) {
26615            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26616        }
26617        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
26618        ain2.setAutoPadding(true);
26619        ain2.copyFrom(in2);
26620
26621        result_int result = reduce_my_short_short4_1(ain1, ain2, null);
26622        result.mTempIns = new Allocation[]{ain1, ain2};
26623        return result;
26624    }
26625
26626    // ain1 = "short a"
26627    // ain2 = "short4 b"
26628    public result_int reduce_my_short_short4_1(Allocation ain1, Allocation ain2) {
26629        return reduce_my_short_short4_1(ain1, ain2, null);
26630    }
26631
26632    // ain1 = "short a"
26633    // ain2 = "short4 b"
26634    public result_int reduce_my_short_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26635        Type t0, t1;
26636        // check ain1
26637        if (!ain1.getType().getElement().isCompatible(__I16)) {
26638            throw new RSRuntimeException("Type mismatch with I16!");
26639        }
26640        // check ain2
26641        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
26642            throw new RSRuntimeException("Type mismatch with I16_4!");
26643        }
26644        // Verify dimensions
26645        t0 = ain1.getType();
26646        t1 = ain2.getType();
26647        if ((t0.getCount() != t1.getCount()) ||
26648            (t0.getX() != t1.getX()) ||
26649            (t0.getY() != t1.getY()) ||
26650            (t0.getZ() != t1.getZ()) ||
26651            (t0.hasFaces()   != t1.hasFaces()) ||
26652            (t0.hasMipmaps() != t1.hasMipmaps())) {
26653            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26654        }
26655
26656        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26657        aout.setAutoPadding(true);
26658        reduce(mExportReduceIdx_my_short_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
26659        return new result_int(aout);
26660    }
26661
26662    private final static int mExportReduceIdx_my_short_uchar_0 = 402;
26663    // in1 = "a"
26664    // in2 = "b"
26665    public result_int reduce_my_short_uchar_0(short[] in1, byte[] in2) {
26666        // Verify that "in1" is non-null.
26667        if (in1 == null) {
26668            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26669        }
26670        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26671        ain1.setAutoPadding(true);
26672        ain1.copyFrom(in1);
26673        // Verify that "in2" is non-null.
26674        if (in2 == null) {
26675            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26676        }
26677        // Verify that input array lengths are the same.
26678        if (in1.length != in2.length) {
26679            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26680        }
26681        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
26682        ain2.setAutoPadding(true);
26683        ain2.copyFrom(in2);
26684
26685        result_int result = reduce_my_short_uchar_0(ain1, ain2, null);
26686        result.mTempIns = new Allocation[]{ain1, ain2};
26687        return result;
26688    }
26689
26690    // ain1 = "short a"
26691    // ain2 = "uchar b"
26692    public result_int reduce_my_short_uchar_0(Allocation ain1, Allocation ain2) {
26693        return reduce_my_short_uchar_0(ain1, ain2, null);
26694    }
26695
26696    // ain1 = "short a"
26697    // ain2 = "uchar b"
26698    public result_int reduce_my_short_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26699        Type t0, t1;
26700        // check ain1
26701        if (!ain1.getType().getElement().isCompatible(__I16)) {
26702            throw new RSRuntimeException("Type mismatch with I16!");
26703        }
26704        // check ain2
26705        if (!ain2.getType().getElement().isCompatible(__U8)) {
26706            throw new RSRuntimeException("Type mismatch with U8!");
26707        }
26708        // Verify dimensions
26709        t0 = ain1.getType();
26710        t1 = ain2.getType();
26711        if ((t0.getCount() != t1.getCount()) ||
26712            (t0.getX() != t1.getX()) ||
26713            (t0.getY() != t1.getY()) ||
26714            (t0.getZ() != t1.getZ()) ||
26715            (t0.hasFaces()   != t1.hasFaces()) ||
26716            (t0.hasMipmaps() != t1.hasMipmaps())) {
26717            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26718        }
26719
26720        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26721        aout.setAutoPadding(true);
26722        reduce(mExportReduceIdx_my_short_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
26723        return new result_int(aout);
26724    }
26725
26726    private final static int mExportReduceIdx_my_short_uchar_1 = 403;
26727    // in1 = "a"
26728    // in2 = "b"
26729    public result_int reduce_my_short_uchar_1(short[] in1, byte[] in2) {
26730        // Verify that "in1" is non-null.
26731        if (in1 == null) {
26732            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26733        }
26734        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26735        ain1.setAutoPadding(true);
26736        ain1.copyFrom(in1);
26737        // Verify that "in2" is non-null.
26738        if (in2 == null) {
26739            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26740        }
26741        // Verify that input array lengths are the same.
26742        if (in1.length != in2.length) {
26743            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26744        }
26745        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
26746        ain2.setAutoPadding(true);
26747        ain2.copyFrom(in2);
26748
26749        result_int result = reduce_my_short_uchar_1(ain1, ain2, null);
26750        result.mTempIns = new Allocation[]{ain1, ain2};
26751        return result;
26752    }
26753
26754    // ain1 = "short a"
26755    // ain2 = "uchar b"
26756    public result_int reduce_my_short_uchar_1(Allocation ain1, Allocation ain2) {
26757        return reduce_my_short_uchar_1(ain1, ain2, null);
26758    }
26759
26760    // ain1 = "short a"
26761    // ain2 = "uchar b"
26762    public result_int reduce_my_short_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26763        Type t0, t1;
26764        // check ain1
26765        if (!ain1.getType().getElement().isCompatible(__I16)) {
26766            throw new RSRuntimeException("Type mismatch with I16!");
26767        }
26768        // check ain2
26769        if (!ain2.getType().getElement().isCompatible(__U8)) {
26770            throw new RSRuntimeException("Type mismatch with U8!");
26771        }
26772        // Verify dimensions
26773        t0 = ain1.getType();
26774        t1 = ain2.getType();
26775        if ((t0.getCount() != t1.getCount()) ||
26776            (t0.getX() != t1.getX()) ||
26777            (t0.getY() != t1.getY()) ||
26778            (t0.getZ() != t1.getZ()) ||
26779            (t0.hasFaces()   != t1.hasFaces()) ||
26780            (t0.hasMipmaps() != t1.hasMipmaps())) {
26781            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26782        }
26783
26784        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26785        aout.setAutoPadding(true);
26786        reduce(mExportReduceIdx_my_short_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
26787        return new result_int(aout);
26788    }
26789
26790    private final static int mExportReduceIdx_my_short_uchar2_0 = 404;
26791    // in1 = "a"
26792    // in2 = "b", flattened 2-vectors
26793    public result_int reduce_my_short_uchar2_0(short[] in1, byte[] in2) {
26794        // Verify that "in1" is non-null.
26795        if (in1 == null) {
26796            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26797        }
26798        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26799        ain1.setAutoPadding(true);
26800        ain1.copyFrom(in1);
26801        // Verify that "in2" is non-null.
26802        if (in2 == null) {
26803            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26804        }
26805        // Verify that the array length is a multiple of the vector size.
26806        if (in2.length % 2 != 0) {
26807            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
26808        }
26809        // Verify that input array lengths are the same.
26810        if (in1.length != in2.length / 2) {
26811            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26812        }
26813        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
26814        ain2.setAutoPadding(true);
26815        ain2.copyFrom(in2);
26816
26817        result_int result = reduce_my_short_uchar2_0(ain1, ain2, null);
26818        result.mTempIns = new Allocation[]{ain1, ain2};
26819        return result;
26820    }
26821
26822    // ain1 = "short a"
26823    // ain2 = "uchar2 b"
26824    public result_int reduce_my_short_uchar2_0(Allocation ain1, Allocation ain2) {
26825        return reduce_my_short_uchar2_0(ain1, ain2, null);
26826    }
26827
26828    // ain1 = "short a"
26829    // ain2 = "uchar2 b"
26830    public result_int reduce_my_short_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26831        Type t0, t1;
26832        // check ain1
26833        if (!ain1.getType().getElement().isCompatible(__I16)) {
26834            throw new RSRuntimeException("Type mismatch with I16!");
26835        }
26836        // check ain2
26837        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
26838            throw new RSRuntimeException("Type mismatch with U8_2!");
26839        }
26840        // Verify dimensions
26841        t0 = ain1.getType();
26842        t1 = ain2.getType();
26843        if ((t0.getCount() != t1.getCount()) ||
26844            (t0.getX() != t1.getX()) ||
26845            (t0.getY() != t1.getY()) ||
26846            (t0.getZ() != t1.getZ()) ||
26847            (t0.hasFaces()   != t1.hasFaces()) ||
26848            (t0.hasMipmaps() != t1.hasMipmaps())) {
26849            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26850        }
26851
26852        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26853        aout.setAutoPadding(true);
26854        reduce(mExportReduceIdx_my_short_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
26855        return new result_int(aout);
26856    }
26857
26858    private final static int mExportReduceIdx_my_short_uchar2_1 = 405;
26859    // in1 = "a"
26860    // in2 = "b", flattened 2-vectors
26861    public result_int reduce_my_short_uchar2_1(short[] in1, byte[] in2) {
26862        // Verify that "in1" is non-null.
26863        if (in1 == null) {
26864            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26865        }
26866        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26867        ain1.setAutoPadding(true);
26868        ain1.copyFrom(in1);
26869        // Verify that "in2" is non-null.
26870        if (in2 == null) {
26871            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26872        }
26873        // Verify that the array length is a multiple of the vector size.
26874        if (in2.length % 2 != 0) {
26875            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
26876        }
26877        // Verify that input array lengths are the same.
26878        if (in1.length != in2.length / 2) {
26879            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26880        }
26881        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
26882        ain2.setAutoPadding(true);
26883        ain2.copyFrom(in2);
26884
26885        result_int result = reduce_my_short_uchar2_1(ain1, ain2, null);
26886        result.mTempIns = new Allocation[]{ain1, ain2};
26887        return result;
26888    }
26889
26890    // ain1 = "short a"
26891    // ain2 = "uchar2 b"
26892    public result_int reduce_my_short_uchar2_1(Allocation ain1, Allocation ain2) {
26893        return reduce_my_short_uchar2_1(ain1, ain2, null);
26894    }
26895
26896    // ain1 = "short a"
26897    // ain2 = "uchar2 b"
26898    public result_int reduce_my_short_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26899        Type t0, t1;
26900        // check ain1
26901        if (!ain1.getType().getElement().isCompatible(__I16)) {
26902            throw new RSRuntimeException("Type mismatch with I16!");
26903        }
26904        // check ain2
26905        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
26906            throw new RSRuntimeException("Type mismatch with U8_2!");
26907        }
26908        // Verify dimensions
26909        t0 = ain1.getType();
26910        t1 = ain2.getType();
26911        if ((t0.getCount() != t1.getCount()) ||
26912            (t0.getX() != t1.getX()) ||
26913            (t0.getY() != t1.getY()) ||
26914            (t0.getZ() != t1.getZ()) ||
26915            (t0.hasFaces()   != t1.hasFaces()) ||
26916            (t0.hasMipmaps() != t1.hasMipmaps())) {
26917            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26918        }
26919
26920        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26921        aout.setAutoPadding(true);
26922        reduce(mExportReduceIdx_my_short_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
26923        return new result_int(aout);
26924    }
26925
26926    private final static int mExportReduceIdx_my_short_uchar4_0 = 406;
26927    // in1 = "a"
26928    // in2 = "b", flattened 4-vectors
26929    public result_int reduce_my_short_uchar4_0(short[] in1, byte[] in2) {
26930        // Verify that "in1" is non-null.
26931        if (in1 == null) {
26932            throw new RSIllegalArgumentException("Array \"in1\" is null!");
26933        }
26934        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
26935        ain1.setAutoPadding(true);
26936        ain1.copyFrom(in1);
26937        // Verify that "in2" is non-null.
26938        if (in2 == null) {
26939            throw new RSIllegalArgumentException("Array \"in2\" is null!");
26940        }
26941        // Verify that the array length is a multiple of the vector size.
26942        if (in2.length % 4 != 0) {
26943            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
26944        }
26945        // Verify that input array lengths are the same.
26946        if (in1.length != in2.length / 4) {
26947            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
26948        }
26949        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
26950        ain2.setAutoPadding(true);
26951        ain2.copyFrom(in2);
26952
26953        result_int result = reduce_my_short_uchar4_0(ain1, ain2, null);
26954        result.mTempIns = new Allocation[]{ain1, ain2};
26955        return result;
26956    }
26957
26958    // ain1 = "short a"
26959    // ain2 = "uchar4 b"
26960    public result_int reduce_my_short_uchar4_0(Allocation ain1, Allocation ain2) {
26961        return reduce_my_short_uchar4_0(ain1, ain2, null);
26962    }
26963
26964    // ain1 = "short a"
26965    // ain2 = "uchar4 b"
26966    public result_int reduce_my_short_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
26967        Type t0, t1;
26968        // check ain1
26969        if (!ain1.getType().getElement().isCompatible(__I16)) {
26970            throw new RSRuntimeException("Type mismatch with I16!");
26971        }
26972        // check ain2
26973        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
26974            throw new RSRuntimeException("Type mismatch with U8_4!");
26975        }
26976        // Verify dimensions
26977        t0 = ain1.getType();
26978        t1 = ain2.getType();
26979        if ((t0.getCount() != t1.getCount()) ||
26980            (t0.getX() != t1.getX()) ||
26981            (t0.getY() != t1.getY()) ||
26982            (t0.getZ() != t1.getZ()) ||
26983            (t0.hasFaces()   != t1.hasFaces()) ||
26984            (t0.hasMipmaps() != t1.hasMipmaps())) {
26985            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
26986        }
26987
26988        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
26989        aout.setAutoPadding(true);
26990        reduce(mExportReduceIdx_my_short_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
26991        return new result_int(aout);
26992    }
26993
26994    private final static int mExportReduceIdx_my_short_uchar4_1 = 407;
26995    // in1 = "a"
26996    // in2 = "b", flattened 4-vectors
26997    public result_int reduce_my_short_uchar4_1(short[] in1, byte[] in2) {
26998        // Verify that "in1" is non-null.
26999        if (in1 == null) {
27000            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27001        }
27002        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27003        ain1.setAutoPadding(true);
27004        ain1.copyFrom(in1);
27005        // Verify that "in2" is non-null.
27006        if (in2 == null) {
27007            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27008        }
27009        // Verify that the array length is a multiple of the vector size.
27010        if (in2.length % 4 != 0) {
27011            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
27012        }
27013        // Verify that input array lengths are the same.
27014        if (in1.length != in2.length / 4) {
27015            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27016        }
27017        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
27018        ain2.setAutoPadding(true);
27019        ain2.copyFrom(in2);
27020
27021        result_int result = reduce_my_short_uchar4_1(ain1, ain2, null);
27022        result.mTempIns = new Allocation[]{ain1, ain2};
27023        return result;
27024    }
27025
27026    // ain1 = "short a"
27027    // ain2 = "uchar4 b"
27028    public result_int reduce_my_short_uchar4_1(Allocation ain1, Allocation ain2) {
27029        return reduce_my_short_uchar4_1(ain1, ain2, null);
27030    }
27031
27032    // ain1 = "short a"
27033    // ain2 = "uchar4 b"
27034    public result_int reduce_my_short_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27035        Type t0, t1;
27036        // check ain1
27037        if (!ain1.getType().getElement().isCompatible(__I16)) {
27038            throw new RSRuntimeException("Type mismatch with I16!");
27039        }
27040        // check ain2
27041        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
27042            throw new RSRuntimeException("Type mismatch with U8_4!");
27043        }
27044        // Verify dimensions
27045        t0 = ain1.getType();
27046        t1 = ain2.getType();
27047        if ((t0.getCount() != t1.getCount()) ||
27048            (t0.getX() != t1.getX()) ||
27049            (t0.getY() != t1.getY()) ||
27050            (t0.getZ() != t1.getZ()) ||
27051            (t0.hasFaces()   != t1.hasFaces()) ||
27052            (t0.hasMipmaps() != t1.hasMipmaps())) {
27053            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27054        }
27055
27056        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27057        aout.setAutoPadding(true);
27058        reduce(mExportReduceIdx_my_short_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
27059        return new result_int(aout);
27060    }
27061
27062    private final static int mExportReduceIdx_my_short_ushort_0 = 408;
27063    // in1 = "a"
27064    // in2 = "b"
27065    public result_int reduce_my_short_ushort_0(short[] in1, short[] in2) {
27066        // Verify that "in1" is non-null.
27067        if (in1 == null) {
27068            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27069        }
27070        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27071        ain1.setAutoPadding(true);
27072        ain1.copyFrom(in1);
27073        // Verify that "in2" is non-null.
27074        if (in2 == null) {
27075            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27076        }
27077        // Verify that input array lengths are the same.
27078        if (in1.length != in2.length) {
27079            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27080        }
27081        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
27082        ain2.setAutoPadding(true);
27083        ain2.copyFrom(in2);
27084
27085        result_int result = reduce_my_short_ushort_0(ain1, ain2, null);
27086        result.mTempIns = new Allocation[]{ain1, ain2};
27087        return result;
27088    }
27089
27090    // ain1 = "short a"
27091    // ain2 = "ushort b"
27092    public result_int reduce_my_short_ushort_0(Allocation ain1, Allocation ain2) {
27093        return reduce_my_short_ushort_0(ain1, ain2, null);
27094    }
27095
27096    // ain1 = "short a"
27097    // ain2 = "ushort b"
27098    public result_int reduce_my_short_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27099        Type t0, t1;
27100        // check ain1
27101        if (!ain1.getType().getElement().isCompatible(__I16)) {
27102            throw new RSRuntimeException("Type mismatch with I16!");
27103        }
27104        // check ain2
27105        if (!ain2.getType().getElement().isCompatible(__U16)) {
27106            throw new RSRuntimeException("Type mismatch with U16!");
27107        }
27108        // Verify dimensions
27109        t0 = ain1.getType();
27110        t1 = ain2.getType();
27111        if ((t0.getCount() != t1.getCount()) ||
27112            (t0.getX() != t1.getX()) ||
27113            (t0.getY() != t1.getY()) ||
27114            (t0.getZ() != t1.getZ()) ||
27115            (t0.hasFaces()   != t1.hasFaces()) ||
27116            (t0.hasMipmaps() != t1.hasMipmaps())) {
27117            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27118        }
27119
27120        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27121        aout.setAutoPadding(true);
27122        reduce(mExportReduceIdx_my_short_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
27123        return new result_int(aout);
27124    }
27125
27126    private final static int mExportReduceIdx_my_short_ushort_1 = 409;
27127    // in1 = "a"
27128    // in2 = "b"
27129    public result_int reduce_my_short_ushort_1(short[] in1, short[] in2) {
27130        // Verify that "in1" is non-null.
27131        if (in1 == null) {
27132            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27133        }
27134        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27135        ain1.setAutoPadding(true);
27136        ain1.copyFrom(in1);
27137        // Verify that "in2" is non-null.
27138        if (in2 == null) {
27139            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27140        }
27141        // Verify that input array lengths are the same.
27142        if (in1.length != in2.length) {
27143            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27144        }
27145        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
27146        ain2.setAutoPadding(true);
27147        ain2.copyFrom(in2);
27148
27149        result_int result = reduce_my_short_ushort_1(ain1, ain2, null);
27150        result.mTempIns = new Allocation[]{ain1, ain2};
27151        return result;
27152    }
27153
27154    // ain1 = "short a"
27155    // ain2 = "ushort b"
27156    public result_int reduce_my_short_ushort_1(Allocation ain1, Allocation ain2) {
27157        return reduce_my_short_ushort_1(ain1, ain2, null);
27158    }
27159
27160    // ain1 = "short a"
27161    // ain2 = "ushort b"
27162    public result_int reduce_my_short_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27163        Type t0, t1;
27164        // check ain1
27165        if (!ain1.getType().getElement().isCompatible(__I16)) {
27166            throw new RSRuntimeException("Type mismatch with I16!");
27167        }
27168        // check ain2
27169        if (!ain2.getType().getElement().isCompatible(__U16)) {
27170            throw new RSRuntimeException("Type mismatch with U16!");
27171        }
27172        // Verify dimensions
27173        t0 = ain1.getType();
27174        t1 = ain2.getType();
27175        if ((t0.getCount() != t1.getCount()) ||
27176            (t0.getX() != t1.getX()) ||
27177            (t0.getY() != t1.getY()) ||
27178            (t0.getZ() != t1.getZ()) ||
27179            (t0.hasFaces()   != t1.hasFaces()) ||
27180            (t0.hasMipmaps() != t1.hasMipmaps())) {
27181            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27182        }
27183
27184        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27185        aout.setAutoPadding(true);
27186        reduce(mExportReduceIdx_my_short_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
27187        return new result_int(aout);
27188    }
27189
27190    private final static int mExportReduceIdx_my_short_ushort2_0 = 410;
27191    // in1 = "a"
27192    // in2 = "b", flattened 2-vectors
27193    public result_int reduce_my_short_ushort2_0(short[] in1, short[] in2) {
27194        // Verify that "in1" is non-null.
27195        if (in1 == null) {
27196            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27197        }
27198        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27199        ain1.setAutoPadding(true);
27200        ain1.copyFrom(in1);
27201        // Verify that "in2" is non-null.
27202        if (in2 == null) {
27203            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27204        }
27205        // Verify that the array length is a multiple of the vector size.
27206        if (in2.length % 2 != 0) {
27207            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
27208        }
27209        // Verify that input array lengths are the same.
27210        if (in1.length != in2.length / 2) {
27211            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27212        }
27213        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
27214        ain2.setAutoPadding(true);
27215        ain2.copyFrom(in2);
27216
27217        result_int result = reduce_my_short_ushort2_0(ain1, ain2, null);
27218        result.mTempIns = new Allocation[]{ain1, ain2};
27219        return result;
27220    }
27221
27222    // ain1 = "short a"
27223    // ain2 = "ushort2 b"
27224    public result_int reduce_my_short_ushort2_0(Allocation ain1, Allocation ain2) {
27225        return reduce_my_short_ushort2_0(ain1, ain2, null);
27226    }
27227
27228    // ain1 = "short a"
27229    // ain2 = "ushort2 b"
27230    public result_int reduce_my_short_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27231        Type t0, t1;
27232        // check ain1
27233        if (!ain1.getType().getElement().isCompatible(__I16)) {
27234            throw new RSRuntimeException("Type mismatch with I16!");
27235        }
27236        // check ain2
27237        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
27238            throw new RSRuntimeException("Type mismatch with U16_2!");
27239        }
27240        // Verify dimensions
27241        t0 = ain1.getType();
27242        t1 = ain2.getType();
27243        if ((t0.getCount() != t1.getCount()) ||
27244            (t0.getX() != t1.getX()) ||
27245            (t0.getY() != t1.getY()) ||
27246            (t0.getZ() != t1.getZ()) ||
27247            (t0.hasFaces()   != t1.hasFaces()) ||
27248            (t0.hasMipmaps() != t1.hasMipmaps())) {
27249            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27250        }
27251
27252        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27253        aout.setAutoPadding(true);
27254        reduce(mExportReduceIdx_my_short_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
27255        return new result_int(aout);
27256    }
27257
27258    private final static int mExportReduceIdx_my_short_ushort2_1 = 411;
27259    // in1 = "a"
27260    // in2 = "b", flattened 2-vectors
27261    public result_int reduce_my_short_ushort2_1(short[] in1, short[] in2) {
27262        // Verify that "in1" is non-null.
27263        if (in1 == null) {
27264            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27265        }
27266        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27267        ain1.setAutoPadding(true);
27268        ain1.copyFrom(in1);
27269        // Verify that "in2" is non-null.
27270        if (in2 == null) {
27271            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27272        }
27273        // Verify that the array length is a multiple of the vector size.
27274        if (in2.length % 2 != 0) {
27275            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
27276        }
27277        // Verify that input array lengths are the same.
27278        if (in1.length != in2.length / 2) {
27279            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27280        }
27281        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
27282        ain2.setAutoPadding(true);
27283        ain2.copyFrom(in2);
27284
27285        result_int result = reduce_my_short_ushort2_1(ain1, ain2, null);
27286        result.mTempIns = new Allocation[]{ain1, ain2};
27287        return result;
27288    }
27289
27290    // ain1 = "short a"
27291    // ain2 = "ushort2 b"
27292    public result_int reduce_my_short_ushort2_1(Allocation ain1, Allocation ain2) {
27293        return reduce_my_short_ushort2_1(ain1, ain2, null);
27294    }
27295
27296    // ain1 = "short a"
27297    // ain2 = "ushort2 b"
27298    public result_int reduce_my_short_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27299        Type t0, t1;
27300        // check ain1
27301        if (!ain1.getType().getElement().isCompatible(__I16)) {
27302            throw new RSRuntimeException("Type mismatch with I16!");
27303        }
27304        // check ain2
27305        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
27306            throw new RSRuntimeException("Type mismatch with U16_2!");
27307        }
27308        // Verify dimensions
27309        t0 = ain1.getType();
27310        t1 = ain2.getType();
27311        if ((t0.getCount() != t1.getCount()) ||
27312            (t0.getX() != t1.getX()) ||
27313            (t0.getY() != t1.getY()) ||
27314            (t0.getZ() != t1.getZ()) ||
27315            (t0.hasFaces()   != t1.hasFaces()) ||
27316            (t0.hasMipmaps() != t1.hasMipmaps())) {
27317            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27318        }
27319
27320        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27321        aout.setAutoPadding(true);
27322        reduce(mExportReduceIdx_my_short_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
27323        return new result_int(aout);
27324    }
27325
27326    private final static int mExportReduceIdx_my_short_ushort4_0 = 412;
27327    // in1 = "a"
27328    // in2 = "b", flattened 4-vectors
27329    public result_int reduce_my_short_ushort4_0(short[] in1, short[] in2) {
27330        // Verify that "in1" is non-null.
27331        if (in1 == null) {
27332            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27333        }
27334        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27335        ain1.setAutoPadding(true);
27336        ain1.copyFrom(in1);
27337        // Verify that "in2" is non-null.
27338        if (in2 == null) {
27339            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27340        }
27341        // Verify that the array length is a multiple of the vector size.
27342        if (in2.length % 4 != 0) {
27343            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
27344        }
27345        // Verify that input array lengths are the same.
27346        if (in1.length != in2.length / 4) {
27347            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27348        }
27349        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
27350        ain2.setAutoPadding(true);
27351        ain2.copyFrom(in2);
27352
27353        result_int result = reduce_my_short_ushort4_0(ain1, ain2, null);
27354        result.mTempIns = new Allocation[]{ain1, ain2};
27355        return result;
27356    }
27357
27358    // ain1 = "short a"
27359    // ain2 = "ushort4 b"
27360    public result_int reduce_my_short_ushort4_0(Allocation ain1, Allocation ain2) {
27361        return reduce_my_short_ushort4_0(ain1, ain2, null);
27362    }
27363
27364    // ain1 = "short a"
27365    // ain2 = "ushort4 b"
27366    public result_int reduce_my_short_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27367        Type t0, t1;
27368        // check ain1
27369        if (!ain1.getType().getElement().isCompatible(__I16)) {
27370            throw new RSRuntimeException("Type mismatch with I16!");
27371        }
27372        // check ain2
27373        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
27374            throw new RSRuntimeException("Type mismatch with U16_4!");
27375        }
27376        // Verify dimensions
27377        t0 = ain1.getType();
27378        t1 = ain2.getType();
27379        if ((t0.getCount() != t1.getCount()) ||
27380            (t0.getX() != t1.getX()) ||
27381            (t0.getY() != t1.getY()) ||
27382            (t0.getZ() != t1.getZ()) ||
27383            (t0.hasFaces()   != t1.hasFaces()) ||
27384            (t0.hasMipmaps() != t1.hasMipmaps())) {
27385            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27386        }
27387
27388        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27389        aout.setAutoPadding(true);
27390        reduce(mExportReduceIdx_my_short_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
27391        return new result_int(aout);
27392    }
27393
27394    private final static int mExportReduceIdx_my_short_ushort4_1 = 413;
27395    // in1 = "a"
27396    // in2 = "b", flattened 4-vectors
27397    public result_int reduce_my_short_ushort4_1(short[] in1, short[] in2) {
27398        // Verify that "in1" is non-null.
27399        if (in1 == null) {
27400            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27401        }
27402        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27403        ain1.setAutoPadding(true);
27404        ain1.copyFrom(in1);
27405        // Verify that "in2" is non-null.
27406        if (in2 == null) {
27407            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27408        }
27409        // Verify that the array length is a multiple of the vector size.
27410        if (in2.length % 4 != 0) {
27411            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
27412        }
27413        // Verify that input array lengths are the same.
27414        if (in1.length != in2.length / 4) {
27415            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27416        }
27417        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
27418        ain2.setAutoPadding(true);
27419        ain2.copyFrom(in2);
27420
27421        result_int result = reduce_my_short_ushort4_1(ain1, ain2, null);
27422        result.mTempIns = new Allocation[]{ain1, ain2};
27423        return result;
27424    }
27425
27426    // ain1 = "short a"
27427    // ain2 = "ushort4 b"
27428    public result_int reduce_my_short_ushort4_1(Allocation ain1, Allocation ain2) {
27429        return reduce_my_short_ushort4_1(ain1, ain2, null);
27430    }
27431
27432    // ain1 = "short a"
27433    // ain2 = "ushort4 b"
27434    public result_int reduce_my_short_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27435        Type t0, t1;
27436        // check ain1
27437        if (!ain1.getType().getElement().isCompatible(__I16)) {
27438            throw new RSRuntimeException("Type mismatch with I16!");
27439        }
27440        // check ain2
27441        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
27442            throw new RSRuntimeException("Type mismatch with U16_4!");
27443        }
27444        // Verify dimensions
27445        t0 = ain1.getType();
27446        t1 = ain2.getType();
27447        if ((t0.getCount() != t1.getCount()) ||
27448            (t0.getX() != t1.getX()) ||
27449            (t0.getY() != t1.getY()) ||
27450            (t0.getZ() != t1.getZ()) ||
27451            (t0.hasFaces()   != t1.hasFaces()) ||
27452            (t0.hasMipmaps() != t1.hasMipmaps())) {
27453            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27454        }
27455
27456        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27457        aout.setAutoPadding(true);
27458        reduce(mExportReduceIdx_my_short_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
27459        return new result_int(aout);
27460    }
27461
27462    private final static int mExportReduceIdx_my_short_bool_0 = 414;
27463    // in1 = "a"
27464    // in2 = "b"
27465    public result_int reduce_my_short_bool_0(short[] in1, byte[] in2) {
27466        // Verify that "in1" is non-null.
27467        if (in1 == null) {
27468            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27469        }
27470        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27471        ain1.setAutoPadding(true);
27472        ain1.copyFrom(in1);
27473        // Verify that "in2" is non-null.
27474        if (in2 == null) {
27475            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27476        }
27477        // Verify that input array lengths are the same.
27478        if (in1.length != in2.length) {
27479            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27480        }
27481        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
27482        ain2.setAutoPadding(true);
27483        ain2.copyFrom(in2);
27484
27485        result_int result = reduce_my_short_bool_0(ain1, ain2, null);
27486        result.mTempIns = new Allocation[]{ain1, ain2};
27487        return result;
27488    }
27489
27490    // ain1 = "short a"
27491    // ain2 = "bool b"
27492    public result_int reduce_my_short_bool_0(Allocation ain1, Allocation ain2) {
27493        return reduce_my_short_bool_0(ain1, ain2, null);
27494    }
27495
27496    // ain1 = "short a"
27497    // ain2 = "bool b"
27498    public result_int reduce_my_short_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27499        Type t0, t1;
27500        // check ain1
27501        if (!ain1.getType().getElement().isCompatible(__I16)) {
27502            throw new RSRuntimeException("Type mismatch with I16!");
27503        }
27504        // check ain2
27505        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
27506            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
27507        }
27508        // Verify dimensions
27509        t0 = ain1.getType();
27510        t1 = ain2.getType();
27511        if ((t0.getCount() != t1.getCount()) ||
27512            (t0.getX() != t1.getX()) ||
27513            (t0.getY() != t1.getY()) ||
27514            (t0.getZ() != t1.getZ()) ||
27515            (t0.hasFaces()   != t1.hasFaces()) ||
27516            (t0.hasMipmaps() != t1.hasMipmaps())) {
27517            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27518        }
27519
27520        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27521        aout.setAutoPadding(true);
27522        reduce(mExportReduceIdx_my_short_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
27523        return new result_int(aout);
27524    }
27525
27526    private final static int mExportReduceIdx_my_short_bool_1 = 415;
27527    // in1 = "a"
27528    // in2 = "b"
27529    public result_int reduce_my_short_bool_1(short[] in1, byte[] in2) {
27530        // Verify that "in1" is non-null.
27531        if (in1 == null) {
27532            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27533        }
27534        Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length);
27535        ain1.setAutoPadding(true);
27536        ain1.copyFrom(in1);
27537        // Verify that "in2" is non-null.
27538        if (in2 == null) {
27539            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27540        }
27541        // Verify that input array lengths are the same.
27542        if (in1.length != in2.length) {
27543            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27544        }
27545        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
27546        ain2.setAutoPadding(true);
27547        ain2.copyFrom(in2);
27548
27549        result_int result = reduce_my_short_bool_1(ain1, ain2, null);
27550        result.mTempIns = new Allocation[]{ain1, ain2};
27551        return result;
27552    }
27553
27554    // ain1 = "short a"
27555    // ain2 = "bool b"
27556    public result_int reduce_my_short_bool_1(Allocation ain1, Allocation ain2) {
27557        return reduce_my_short_bool_1(ain1, ain2, null);
27558    }
27559
27560    // ain1 = "short a"
27561    // ain2 = "bool b"
27562    public result_int reduce_my_short_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27563        Type t0, t1;
27564        // check ain1
27565        if (!ain1.getType().getElement().isCompatible(__I16)) {
27566            throw new RSRuntimeException("Type mismatch with I16!");
27567        }
27568        // check ain2
27569        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
27570            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
27571        }
27572        // Verify dimensions
27573        t0 = ain1.getType();
27574        t1 = ain2.getType();
27575        if ((t0.getCount() != t1.getCount()) ||
27576            (t0.getX() != t1.getX()) ||
27577            (t0.getY() != t1.getY()) ||
27578            (t0.getZ() != t1.getZ()) ||
27579            (t0.hasFaces()   != t1.hasFaces()) ||
27580            (t0.hasMipmaps() != t1.hasMipmaps())) {
27581            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27582        }
27583
27584        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27585        aout.setAutoPadding(true);
27586        reduce(mExportReduceIdx_my_short_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
27587        return new result_int(aout);
27588    }
27589
27590    private final static int mExportReduceIdx_my_short_rs_matrix2x2_0 = 416;
27591    // ain1 = "short a"
27592    // ain2 = "rs_matrix2x2 b"
27593    public result_int reduce_my_short_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
27594        return reduce_my_short_rs_matrix2x2_0(ain1, ain2, null);
27595    }
27596
27597    // ain1 = "short a"
27598    // ain2 = "rs_matrix2x2 b"
27599    public result_int reduce_my_short_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27600        Type t0, t1;
27601        // check ain1
27602        if (!ain1.getType().getElement().isCompatible(__I16)) {
27603            throw new RSRuntimeException("Type mismatch with I16!");
27604        }
27605        // check ain2
27606        // Verify dimensions
27607        t0 = ain1.getType();
27608        t1 = ain2.getType();
27609        if ((t0.getCount() != t1.getCount()) ||
27610            (t0.getX() != t1.getX()) ||
27611            (t0.getY() != t1.getY()) ||
27612            (t0.getZ() != t1.getZ()) ||
27613            (t0.hasFaces()   != t1.hasFaces()) ||
27614            (t0.hasMipmaps() != t1.hasMipmaps())) {
27615            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27616        }
27617
27618        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27619        aout.setAutoPadding(true);
27620        reduce(mExportReduceIdx_my_short_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
27621        return new result_int(aout);
27622    }
27623
27624    private final static int mExportReduceIdx_my_short_rs_matrix2x2_1 = 417;
27625    // ain1 = "short a"
27626    // ain2 = "rs_matrix2x2 b"
27627    public result_int reduce_my_short_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
27628        return reduce_my_short_rs_matrix2x2_1(ain1, ain2, null);
27629    }
27630
27631    // ain1 = "short a"
27632    // ain2 = "rs_matrix2x2 b"
27633    public result_int reduce_my_short_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27634        Type t0, t1;
27635        // check ain1
27636        if (!ain1.getType().getElement().isCompatible(__I16)) {
27637            throw new RSRuntimeException("Type mismatch with I16!");
27638        }
27639        // check ain2
27640        // Verify dimensions
27641        t0 = ain1.getType();
27642        t1 = ain2.getType();
27643        if ((t0.getCount() != t1.getCount()) ||
27644            (t0.getX() != t1.getX()) ||
27645            (t0.getY() != t1.getY()) ||
27646            (t0.getZ() != t1.getZ()) ||
27647            (t0.hasFaces()   != t1.hasFaces()) ||
27648            (t0.hasMipmaps() != t1.hasMipmaps())) {
27649            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27650        }
27651
27652        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27653        aout.setAutoPadding(true);
27654        reduce(mExportReduceIdx_my_short_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
27655        return new result_int(aout);
27656    }
27657
27658    private final static int mExportReduceIdx_my_short_MyStruct_0 = 418;
27659    // ain1 = "short a"
27660    // ain2 = "/* struct <> */ b"
27661    public result_int reduce_my_short_MyStruct_0(Allocation ain1, Allocation ain2) {
27662        return reduce_my_short_MyStruct_0(ain1, ain2, null);
27663    }
27664
27665    // ain1 = "short a"
27666    // ain2 = "/* struct <> */ b"
27667    public result_int reduce_my_short_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27668        Type t0, t1;
27669        // check ain1
27670        if (!ain1.getType().getElement().isCompatible(__I16)) {
27671            throw new RSRuntimeException("Type mismatch with I16!");
27672        }
27673        // check ain2
27674        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
27675            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
27676        }
27677        // Verify dimensions
27678        t0 = ain1.getType();
27679        t1 = ain2.getType();
27680        if ((t0.getCount() != t1.getCount()) ||
27681            (t0.getX() != t1.getX()) ||
27682            (t0.getY() != t1.getY()) ||
27683            (t0.getZ() != t1.getZ()) ||
27684            (t0.hasFaces()   != t1.hasFaces()) ||
27685            (t0.hasMipmaps() != t1.hasMipmaps())) {
27686            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27687        }
27688
27689        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27690        aout.setAutoPadding(true);
27691        reduce(mExportReduceIdx_my_short_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
27692        return new result_int(aout);
27693    }
27694
27695    private final static int mExportReduceIdx_my_short_MyStruct_1 = 419;
27696    // ain1 = "short a"
27697    // ain2 = "/* struct <> */ b"
27698    public result_int reduce_my_short_MyStruct_1(Allocation ain1, Allocation ain2) {
27699        return reduce_my_short_MyStruct_1(ain1, ain2, null);
27700    }
27701
27702    // ain1 = "short a"
27703    // ain2 = "/* struct <> */ b"
27704    public result_int reduce_my_short_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27705        Type t0, t1;
27706        // check ain1
27707        if (!ain1.getType().getElement().isCompatible(__I16)) {
27708            throw new RSRuntimeException("Type mismatch with I16!");
27709        }
27710        // check ain2
27711        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
27712            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
27713        }
27714        // Verify dimensions
27715        t0 = ain1.getType();
27716        t1 = ain2.getType();
27717        if ((t0.getCount() != t1.getCount()) ||
27718            (t0.getX() != t1.getX()) ||
27719            (t0.getY() != t1.getY()) ||
27720            (t0.getZ() != t1.getZ()) ||
27721            (t0.hasFaces()   != t1.hasFaces()) ||
27722            (t0.hasMipmaps() != t1.hasMipmaps())) {
27723            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27724        }
27725
27726        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27727        aout.setAutoPadding(true);
27728        reduce(mExportReduceIdx_my_short_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
27729        return new result_int(aout);
27730    }
27731
27732    private final static int mExportReduceIdx_my_short2_half_0 = 420;
27733    // in1 = "a", flattened 2-vectors
27734    // in2 = "b"
27735    public result_int reduce_my_short2_half_0(short[] in1, short[] in2) {
27736        // Verify that "in1" is non-null.
27737        if (in1 == null) {
27738            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27739        }
27740        // Verify that the array length is a multiple of the vector size.
27741        if (in1.length % 2 != 0) {
27742            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
27743        }
27744        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
27745        ain1.setAutoPadding(true);
27746        ain1.copyFrom(in1);
27747        // Verify that "in2" is non-null.
27748        if (in2 == null) {
27749            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27750        }
27751        // Verify that input array lengths are the same.
27752        if (in1.length / 2 != in2.length) {
27753            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27754        }
27755        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
27756        ain2.setAutoPadding(true);
27757        ain2.copyFrom(in2);
27758
27759        result_int result = reduce_my_short2_half_0(ain1, ain2, null);
27760        result.mTempIns = new Allocation[]{ain1, ain2};
27761        return result;
27762    }
27763
27764    // ain1 = "short2 a"
27765    // ain2 = "half b"
27766    public result_int reduce_my_short2_half_0(Allocation ain1, Allocation ain2) {
27767        return reduce_my_short2_half_0(ain1, ain2, null);
27768    }
27769
27770    // ain1 = "short2 a"
27771    // ain2 = "half b"
27772    public result_int reduce_my_short2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27773        Type t0, t1;
27774        // check ain1
27775        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
27776            throw new RSRuntimeException("Type mismatch with I16_2!");
27777        }
27778        // check ain2
27779        if (!ain2.getType().getElement().isCompatible(__F16)) {
27780            throw new RSRuntimeException("Type mismatch with F16!");
27781        }
27782        // Verify dimensions
27783        t0 = ain1.getType();
27784        t1 = ain2.getType();
27785        if ((t0.getCount() != t1.getCount()) ||
27786            (t0.getX() != t1.getX()) ||
27787            (t0.getY() != t1.getY()) ||
27788            (t0.getZ() != t1.getZ()) ||
27789            (t0.hasFaces()   != t1.hasFaces()) ||
27790            (t0.hasMipmaps() != t1.hasMipmaps())) {
27791            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27792        }
27793
27794        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27795        aout.setAutoPadding(true);
27796        reduce(mExportReduceIdx_my_short2_half_0, new Allocation[]{ain1, ain2}, aout, sc);
27797        return new result_int(aout);
27798    }
27799
27800    private final static int mExportReduceIdx_my_short2_half_1 = 421;
27801    // in1 = "a", flattened 2-vectors
27802    // in2 = "b"
27803    public result_int reduce_my_short2_half_1(short[] in1, short[] in2) {
27804        // Verify that "in1" is non-null.
27805        if (in1 == null) {
27806            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27807        }
27808        // Verify that the array length is a multiple of the vector size.
27809        if (in1.length % 2 != 0) {
27810            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
27811        }
27812        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
27813        ain1.setAutoPadding(true);
27814        ain1.copyFrom(in1);
27815        // Verify that "in2" is non-null.
27816        if (in2 == null) {
27817            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27818        }
27819        // Verify that input array lengths are the same.
27820        if (in1.length / 2 != in2.length) {
27821            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27822        }
27823        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
27824        ain2.setAutoPadding(true);
27825        ain2.copyFrom(in2);
27826
27827        result_int result = reduce_my_short2_half_1(ain1, ain2, null);
27828        result.mTempIns = new Allocation[]{ain1, ain2};
27829        return result;
27830    }
27831
27832    // ain1 = "short2 a"
27833    // ain2 = "half b"
27834    public result_int reduce_my_short2_half_1(Allocation ain1, Allocation ain2) {
27835        return reduce_my_short2_half_1(ain1, ain2, null);
27836    }
27837
27838    // ain1 = "short2 a"
27839    // ain2 = "half b"
27840    public result_int reduce_my_short2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27841        Type t0, t1;
27842        // check ain1
27843        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
27844            throw new RSRuntimeException("Type mismatch with I16_2!");
27845        }
27846        // check ain2
27847        if (!ain2.getType().getElement().isCompatible(__F16)) {
27848            throw new RSRuntimeException("Type mismatch with F16!");
27849        }
27850        // Verify dimensions
27851        t0 = ain1.getType();
27852        t1 = ain2.getType();
27853        if ((t0.getCount() != t1.getCount()) ||
27854            (t0.getX() != t1.getX()) ||
27855            (t0.getY() != t1.getY()) ||
27856            (t0.getZ() != t1.getZ()) ||
27857            (t0.hasFaces()   != t1.hasFaces()) ||
27858            (t0.hasMipmaps() != t1.hasMipmaps())) {
27859            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27860        }
27861
27862        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27863        aout.setAutoPadding(true);
27864        reduce(mExportReduceIdx_my_short2_half_1, new Allocation[]{ain1, ain2}, aout, sc);
27865        return new result_int(aout);
27866    }
27867
27868    private final static int mExportReduceIdx_my_short2_half2_0 = 422;
27869    // in1 = "a", flattened 2-vectors
27870    // in2 = "b", flattened 2-vectors
27871    public result_int reduce_my_short2_half2_0(short[] in1, short[] in2) {
27872        // Verify that "in1" is non-null.
27873        if (in1 == null) {
27874            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27875        }
27876        // Verify that the array length is a multiple of the vector size.
27877        if (in1.length % 2 != 0) {
27878            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
27879        }
27880        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
27881        ain1.setAutoPadding(true);
27882        ain1.copyFrom(in1);
27883        // Verify that "in2" is non-null.
27884        if (in2 == null) {
27885            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27886        }
27887        // Verify that the array length is a multiple of the vector size.
27888        if (in2.length % 2 != 0) {
27889            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
27890        }
27891        // Verify that input array lengths are the same.
27892        if (in1.length / 2 != in2.length / 2) {
27893            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27894        }
27895        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
27896        ain2.setAutoPadding(true);
27897        ain2.copyFrom(in2);
27898
27899        result_int result = reduce_my_short2_half2_0(ain1, ain2, null);
27900        result.mTempIns = new Allocation[]{ain1, ain2};
27901        return result;
27902    }
27903
27904    // ain1 = "short2 a"
27905    // ain2 = "half2 b"
27906    public result_int reduce_my_short2_half2_0(Allocation ain1, Allocation ain2) {
27907        return reduce_my_short2_half2_0(ain1, ain2, null);
27908    }
27909
27910    // ain1 = "short2 a"
27911    // ain2 = "half2 b"
27912    public result_int reduce_my_short2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27913        Type t0, t1;
27914        // check ain1
27915        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
27916            throw new RSRuntimeException("Type mismatch with I16_2!");
27917        }
27918        // check ain2
27919        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
27920            throw new RSRuntimeException("Type mismatch with F16_2!");
27921        }
27922        // Verify dimensions
27923        t0 = ain1.getType();
27924        t1 = ain2.getType();
27925        if ((t0.getCount() != t1.getCount()) ||
27926            (t0.getX() != t1.getX()) ||
27927            (t0.getY() != t1.getY()) ||
27928            (t0.getZ() != t1.getZ()) ||
27929            (t0.hasFaces()   != t1.hasFaces()) ||
27930            (t0.hasMipmaps() != t1.hasMipmaps())) {
27931            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
27932        }
27933
27934        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
27935        aout.setAutoPadding(true);
27936        reduce(mExportReduceIdx_my_short2_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
27937        return new result_int(aout);
27938    }
27939
27940    private final static int mExportReduceIdx_my_short2_half2_1 = 423;
27941    // in1 = "a", flattened 2-vectors
27942    // in2 = "b", flattened 2-vectors
27943    public result_int reduce_my_short2_half2_1(short[] in1, short[] in2) {
27944        // Verify that "in1" is non-null.
27945        if (in1 == null) {
27946            throw new RSIllegalArgumentException("Array \"in1\" is null!");
27947        }
27948        // Verify that the array length is a multiple of the vector size.
27949        if (in1.length % 2 != 0) {
27950            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
27951        }
27952        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
27953        ain1.setAutoPadding(true);
27954        ain1.copyFrom(in1);
27955        // Verify that "in2" is non-null.
27956        if (in2 == null) {
27957            throw new RSIllegalArgumentException("Array \"in2\" is null!");
27958        }
27959        // Verify that the array length is a multiple of the vector size.
27960        if (in2.length % 2 != 0) {
27961            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
27962        }
27963        // Verify that input array lengths are the same.
27964        if (in1.length / 2 != in2.length / 2) {
27965            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
27966        }
27967        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
27968        ain2.setAutoPadding(true);
27969        ain2.copyFrom(in2);
27970
27971        result_int result = reduce_my_short2_half2_1(ain1, ain2, null);
27972        result.mTempIns = new Allocation[]{ain1, ain2};
27973        return result;
27974    }
27975
27976    // ain1 = "short2 a"
27977    // ain2 = "half2 b"
27978    public result_int reduce_my_short2_half2_1(Allocation ain1, Allocation ain2) {
27979        return reduce_my_short2_half2_1(ain1, ain2, null);
27980    }
27981
27982    // ain1 = "short2 a"
27983    // ain2 = "half2 b"
27984    public result_int reduce_my_short2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
27985        Type t0, t1;
27986        // check ain1
27987        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
27988            throw new RSRuntimeException("Type mismatch with I16_2!");
27989        }
27990        // check ain2
27991        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
27992            throw new RSRuntimeException("Type mismatch with F16_2!");
27993        }
27994        // Verify dimensions
27995        t0 = ain1.getType();
27996        t1 = ain2.getType();
27997        if ((t0.getCount() != t1.getCount()) ||
27998            (t0.getX() != t1.getX()) ||
27999            (t0.getY() != t1.getY()) ||
28000            (t0.getZ() != t1.getZ()) ||
28001            (t0.hasFaces()   != t1.hasFaces()) ||
28002            (t0.hasMipmaps() != t1.hasMipmaps())) {
28003            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28004        }
28005
28006        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28007        aout.setAutoPadding(true);
28008        reduce(mExportReduceIdx_my_short2_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
28009        return new result_int(aout);
28010    }
28011
28012    private final static int mExportReduceIdx_my_short2_half4_0 = 424;
28013    // in1 = "a", flattened 2-vectors
28014    // in2 = "b", flattened 4-vectors
28015    public result_int reduce_my_short2_half4_0(short[] in1, short[] in2) {
28016        // Verify that "in1" is non-null.
28017        if (in1 == null) {
28018            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28019        }
28020        // Verify that the array length is a multiple of the vector size.
28021        if (in1.length % 2 != 0) {
28022            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28023        }
28024        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28025        ain1.setAutoPadding(true);
28026        ain1.copyFrom(in1);
28027        // Verify that "in2" is non-null.
28028        if (in2 == null) {
28029            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28030        }
28031        // Verify that the array length is a multiple of the vector size.
28032        if (in2.length % 4 != 0) {
28033            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
28034        }
28035        // Verify that input array lengths are the same.
28036        if (in1.length / 2 != in2.length / 4) {
28037            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28038        }
28039        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
28040        ain2.setAutoPadding(true);
28041        ain2.copyFrom(in2);
28042
28043        result_int result = reduce_my_short2_half4_0(ain1, ain2, null);
28044        result.mTempIns = new Allocation[]{ain1, ain2};
28045        return result;
28046    }
28047
28048    // ain1 = "short2 a"
28049    // ain2 = "half4 b"
28050    public result_int reduce_my_short2_half4_0(Allocation ain1, Allocation ain2) {
28051        return reduce_my_short2_half4_0(ain1, ain2, null);
28052    }
28053
28054    // ain1 = "short2 a"
28055    // ain2 = "half4 b"
28056    public result_int reduce_my_short2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28057        Type t0, t1;
28058        // check ain1
28059        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28060            throw new RSRuntimeException("Type mismatch with I16_2!");
28061        }
28062        // check ain2
28063        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
28064            throw new RSRuntimeException("Type mismatch with F16_4!");
28065        }
28066        // Verify dimensions
28067        t0 = ain1.getType();
28068        t1 = ain2.getType();
28069        if ((t0.getCount() != t1.getCount()) ||
28070            (t0.getX() != t1.getX()) ||
28071            (t0.getY() != t1.getY()) ||
28072            (t0.getZ() != t1.getZ()) ||
28073            (t0.hasFaces()   != t1.hasFaces()) ||
28074            (t0.hasMipmaps() != t1.hasMipmaps())) {
28075            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28076        }
28077
28078        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28079        aout.setAutoPadding(true);
28080        reduce(mExportReduceIdx_my_short2_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
28081        return new result_int(aout);
28082    }
28083
28084    private final static int mExportReduceIdx_my_short2_half4_1 = 425;
28085    // in1 = "a", flattened 2-vectors
28086    // in2 = "b", flattened 4-vectors
28087    public result_int reduce_my_short2_half4_1(short[] in1, short[] in2) {
28088        // Verify that "in1" is non-null.
28089        if (in1 == null) {
28090            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28091        }
28092        // Verify that the array length is a multiple of the vector size.
28093        if (in1.length % 2 != 0) {
28094            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28095        }
28096        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28097        ain1.setAutoPadding(true);
28098        ain1.copyFrom(in1);
28099        // Verify that "in2" is non-null.
28100        if (in2 == null) {
28101            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28102        }
28103        // Verify that the array length is a multiple of the vector size.
28104        if (in2.length % 4 != 0) {
28105            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
28106        }
28107        // Verify that input array lengths are the same.
28108        if (in1.length / 2 != in2.length / 4) {
28109            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28110        }
28111        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
28112        ain2.setAutoPadding(true);
28113        ain2.copyFrom(in2);
28114
28115        result_int result = reduce_my_short2_half4_1(ain1, ain2, null);
28116        result.mTempIns = new Allocation[]{ain1, ain2};
28117        return result;
28118    }
28119
28120    // ain1 = "short2 a"
28121    // ain2 = "half4 b"
28122    public result_int reduce_my_short2_half4_1(Allocation ain1, Allocation ain2) {
28123        return reduce_my_short2_half4_1(ain1, ain2, null);
28124    }
28125
28126    // ain1 = "short2 a"
28127    // ain2 = "half4 b"
28128    public result_int reduce_my_short2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28129        Type t0, t1;
28130        // check ain1
28131        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28132            throw new RSRuntimeException("Type mismatch with I16_2!");
28133        }
28134        // check ain2
28135        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
28136            throw new RSRuntimeException("Type mismatch with F16_4!");
28137        }
28138        // Verify dimensions
28139        t0 = ain1.getType();
28140        t1 = ain2.getType();
28141        if ((t0.getCount() != t1.getCount()) ||
28142            (t0.getX() != t1.getX()) ||
28143            (t0.getY() != t1.getY()) ||
28144            (t0.getZ() != t1.getZ()) ||
28145            (t0.hasFaces()   != t1.hasFaces()) ||
28146            (t0.hasMipmaps() != t1.hasMipmaps())) {
28147            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28148        }
28149
28150        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28151        aout.setAutoPadding(true);
28152        reduce(mExportReduceIdx_my_short2_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
28153        return new result_int(aout);
28154    }
28155
28156    private final static int mExportReduceIdx_my_short2_float_0 = 426;
28157    // in1 = "a", flattened 2-vectors
28158    // in2 = "b"
28159    public result_int reduce_my_short2_float_0(short[] in1, float[] in2) {
28160        // Verify that "in1" is non-null.
28161        if (in1 == null) {
28162            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28163        }
28164        // Verify that the array length is a multiple of the vector size.
28165        if (in1.length % 2 != 0) {
28166            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28167        }
28168        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28169        ain1.setAutoPadding(true);
28170        ain1.copyFrom(in1);
28171        // Verify that "in2" is non-null.
28172        if (in2 == null) {
28173            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28174        }
28175        // Verify that input array lengths are the same.
28176        if (in1.length / 2 != in2.length) {
28177            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28178        }
28179        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
28180        ain2.setAutoPadding(true);
28181        ain2.copyFrom(in2);
28182
28183        result_int result = reduce_my_short2_float_0(ain1, ain2, null);
28184        result.mTempIns = new Allocation[]{ain1, ain2};
28185        return result;
28186    }
28187
28188    // ain1 = "short2 a"
28189    // ain2 = "float b"
28190    public result_int reduce_my_short2_float_0(Allocation ain1, Allocation ain2) {
28191        return reduce_my_short2_float_0(ain1, ain2, null);
28192    }
28193
28194    // ain1 = "short2 a"
28195    // ain2 = "float b"
28196    public result_int reduce_my_short2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28197        Type t0, t1;
28198        // check ain1
28199        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28200            throw new RSRuntimeException("Type mismatch with I16_2!");
28201        }
28202        // check ain2
28203        if (!ain2.getType().getElement().isCompatible(__F32)) {
28204            throw new RSRuntimeException("Type mismatch with F32!");
28205        }
28206        // Verify dimensions
28207        t0 = ain1.getType();
28208        t1 = ain2.getType();
28209        if ((t0.getCount() != t1.getCount()) ||
28210            (t0.getX() != t1.getX()) ||
28211            (t0.getY() != t1.getY()) ||
28212            (t0.getZ() != t1.getZ()) ||
28213            (t0.hasFaces()   != t1.hasFaces()) ||
28214            (t0.hasMipmaps() != t1.hasMipmaps())) {
28215            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28216        }
28217
28218        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28219        aout.setAutoPadding(true);
28220        reduce(mExportReduceIdx_my_short2_float_0, new Allocation[]{ain1, ain2}, aout, sc);
28221        return new result_int(aout);
28222    }
28223
28224    private final static int mExportReduceIdx_my_short2_float_1 = 427;
28225    // in1 = "a", flattened 2-vectors
28226    // in2 = "b"
28227    public result_int reduce_my_short2_float_1(short[] in1, float[] in2) {
28228        // Verify that "in1" is non-null.
28229        if (in1 == null) {
28230            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28231        }
28232        // Verify that the array length is a multiple of the vector size.
28233        if (in1.length % 2 != 0) {
28234            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28235        }
28236        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28237        ain1.setAutoPadding(true);
28238        ain1.copyFrom(in1);
28239        // Verify that "in2" is non-null.
28240        if (in2 == null) {
28241            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28242        }
28243        // Verify that input array lengths are the same.
28244        if (in1.length / 2 != in2.length) {
28245            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28246        }
28247        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
28248        ain2.setAutoPadding(true);
28249        ain2.copyFrom(in2);
28250
28251        result_int result = reduce_my_short2_float_1(ain1, ain2, null);
28252        result.mTempIns = new Allocation[]{ain1, ain2};
28253        return result;
28254    }
28255
28256    // ain1 = "short2 a"
28257    // ain2 = "float b"
28258    public result_int reduce_my_short2_float_1(Allocation ain1, Allocation ain2) {
28259        return reduce_my_short2_float_1(ain1, ain2, null);
28260    }
28261
28262    // ain1 = "short2 a"
28263    // ain2 = "float b"
28264    public result_int reduce_my_short2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28265        Type t0, t1;
28266        // check ain1
28267        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28268            throw new RSRuntimeException("Type mismatch with I16_2!");
28269        }
28270        // check ain2
28271        if (!ain2.getType().getElement().isCompatible(__F32)) {
28272            throw new RSRuntimeException("Type mismatch with F32!");
28273        }
28274        // Verify dimensions
28275        t0 = ain1.getType();
28276        t1 = ain2.getType();
28277        if ((t0.getCount() != t1.getCount()) ||
28278            (t0.getX() != t1.getX()) ||
28279            (t0.getY() != t1.getY()) ||
28280            (t0.getZ() != t1.getZ()) ||
28281            (t0.hasFaces()   != t1.hasFaces()) ||
28282            (t0.hasMipmaps() != t1.hasMipmaps())) {
28283            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28284        }
28285
28286        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28287        aout.setAutoPadding(true);
28288        reduce(mExportReduceIdx_my_short2_float_1, new Allocation[]{ain1, ain2}, aout, sc);
28289        return new result_int(aout);
28290    }
28291
28292    private final static int mExportReduceIdx_my_short2_float2_0 = 428;
28293    // in1 = "a", flattened 2-vectors
28294    // in2 = "b", flattened 2-vectors
28295    public result_int reduce_my_short2_float2_0(short[] in1, float[] in2) {
28296        // Verify that "in1" is non-null.
28297        if (in1 == null) {
28298            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28299        }
28300        // Verify that the array length is a multiple of the vector size.
28301        if (in1.length % 2 != 0) {
28302            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28303        }
28304        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28305        ain1.setAutoPadding(true);
28306        ain1.copyFrom(in1);
28307        // Verify that "in2" is non-null.
28308        if (in2 == null) {
28309            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28310        }
28311        // Verify that the array length is a multiple of the vector size.
28312        if (in2.length % 2 != 0) {
28313            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
28314        }
28315        // Verify that input array lengths are the same.
28316        if (in1.length / 2 != in2.length / 2) {
28317            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28318        }
28319        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
28320        ain2.setAutoPadding(true);
28321        ain2.copyFrom(in2);
28322
28323        result_int result = reduce_my_short2_float2_0(ain1, ain2, null);
28324        result.mTempIns = new Allocation[]{ain1, ain2};
28325        return result;
28326    }
28327
28328    // ain1 = "short2 a"
28329    // ain2 = "float2 b"
28330    public result_int reduce_my_short2_float2_0(Allocation ain1, Allocation ain2) {
28331        return reduce_my_short2_float2_0(ain1, ain2, null);
28332    }
28333
28334    // ain1 = "short2 a"
28335    // ain2 = "float2 b"
28336    public result_int reduce_my_short2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28337        Type t0, t1;
28338        // check ain1
28339        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28340            throw new RSRuntimeException("Type mismatch with I16_2!");
28341        }
28342        // check ain2
28343        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
28344            throw new RSRuntimeException("Type mismatch with F32_2!");
28345        }
28346        // Verify dimensions
28347        t0 = ain1.getType();
28348        t1 = ain2.getType();
28349        if ((t0.getCount() != t1.getCount()) ||
28350            (t0.getX() != t1.getX()) ||
28351            (t0.getY() != t1.getY()) ||
28352            (t0.getZ() != t1.getZ()) ||
28353            (t0.hasFaces()   != t1.hasFaces()) ||
28354            (t0.hasMipmaps() != t1.hasMipmaps())) {
28355            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28356        }
28357
28358        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28359        aout.setAutoPadding(true);
28360        reduce(mExportReduceIdx_my_short2_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
28361        return new result_int(aout);
28362    }
28363
28364    private final static int mExportReduceIdx_my_short2_float2_1 = 429;
28365    // in1 = "a", flattened 2-vectors
28366    // in2 = "b", flattened 2-vectors
28367    public result_int reduce_my_short2_float2_1(short[] in1, float[] in2) {
28368        // Verify that "in1" is non-null.
28369        if (in1 == null) {
28370            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28371        }
28372        // Verify that the array length is a multiple of the vector size.
28373        if (in1.length % 2 != 0) {
28374            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28375        }
28376        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28377        ain1.setAutoPadding(true);
28378        ain1.copyFrom(in1);
28379        // Verify that "in2" is non-null.
28380        if (in2 == null) {
28381            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28382        }
28383        // Verify that the array length is a multiple of the vector size.
28384        if (in2.length % 2 != 0) {
28385            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
28386        }
28387        // Verify that input array lengths are the same.
28388        if (in1.length / 2 != in2.length / 2) {
28389            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28390        }
28391        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
28392        ain2.setAutoPadding(true);
28393        ain2.copyFrom(in2);
28394
28395        result_int result = reduce_my_short2_float2_1(ain1, ain2, null);
28396        result.mTempIns = new Allocation[]{ain1, ain2};
28397        return result;
28398    }
28399
28400    // ain1 = "short2 a"
28401    // ain2 = "float2 b"
28402    public result_int reduce_my_short2_float2_1(Allocation ain1, Allocation ain2) {
28403        return reduce_my_short2_float2_1(ain1, ain2, null);
28404    }
28405
28406    // ain1 = "short2 a"
28407    // ain2 = "float2 b"
28408    public result_int reduce_my_short2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28409        Type t0, t1;
28410        // check ain1
28411        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28412            throw new RSRuntimeException("Type mismatch with I16_2!");
28413        }
28414        // check ain2
28415        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
28416            throw new RSRuntimeException("Type mismatch with F32_2!");
28417        }
28418        // Verify dimensions
28419        t0 = ain1.getType();
28420        t1 = ain2.getType();
28421        if ((t0.getCount() != t1.getCount()) ||
28422            (t0.getX() != t1.getX()) ||
28423            (t0.getY() != t1.getY()) ||
28424            (t0.getZ() != t1.getZ()) ||
28425            (t0.hasFaces()   != t1.hasFaces()) ||
28426            (t0.hasMipmaps() != t1.hasMipmaps())) {
28427            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28428        }
28429
28430        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28431        aout.setAutoPadding(true);
28432        reduce(mExportReduceIdx_my_short2_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
28433        return new result_int(aout);
28434    }
28435
28436    private final static int mExportReduceIdx_my_short2_float4_0 = 430;
28437    // in1 = "a", flattened 2-vectors
28438    // in2 = "b", flattened 4-vectors
28439    public result_int reduce_my_short2_float4_0(short[] in1, float[] in2) {
28440        // Verify that "in1" is non-null.
28441        if (in1 == null) {
28442            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28443        }
28444        // Verify that the array length is a multiple of the vector size.
28445        if (in1.length % 2 != 0) {
28446            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28447        }
28448        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28449        ain1.setAutoPadding(true);
28450        ain1.copyFrom(in1);
28451        // Verify that "in2" is non-null.
28452        if (in2 == null) {
28453            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28454        }
28455        // Verify that the array length is a multiple of the vector size.
28456        if (in2.length % 4 != 0) {
28457            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
28458        }
28459        // Verify that input array lengths are the same.
28460        if (in1.length / 2 != in2.length / 4) {
28461            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28462        }
28463        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
28464        ain2.setAutoPadding(true);
28465        ain2.copyFrom(in2);
28466
28467        result_int result = reduce_my_short2_float4_0(ain1, ain2, null);
28468        result.mTempIns = new Allocation[]{ain1, ain2};
28469        return result;
28470    }
28471
28472    // ain1 = "short2 a"
28473    // ain2 = "float4 b"
28474    public result_int reduce_my_short2_float4_0(Allocation ain1, Allocation ain2) {
28475        return reduce_my_short2_float4_0(ain1, ain2, null);
28476    }
28477
28478    // ain1 = "short2 a"
28479    // ain2 = "float4 b"
28480    public result_int reduce_my_short2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28481        Type t0, t1;
28482        // check ain1
28483        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28484            throw new RSRuntimeException("Type mismatch with I16_2!");
28485        }
28486        // check ain2
28487        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
28488            throw new RSRuntimeException("Type mismatch with F32_4!");
28489        }
28490        // Verify dimensions
28491        t0 = ain1.getType();
28492        t1 = ain2.getType();
28493        if ((t0.getCount() != t1.getCount()) ||
28494            (t0.getX() != t1.getX()) ||
28495            (t0.getY() != t1.getY()) ||
28496            (t0.getZ() != t1.getZ()) ||
28497            (t0.hasFaces()   != t1.hasFaces()) ||
28498            (t0.hasMipmaps() != t1.hasMipmaps())) {
28499            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28500        }
28501
28502        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28503        aout.setAutoPadding(true);
28504        reduce(mExportReduceIdx_my_short2_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
28505        return new result_int(aout);
28506    }
28507
28508    private final static int mExportReduceIdx_my_short2_float4_1 = 431;
28509    // in1 = "a", flattened 2-vectors
28510    // in2 = "b", flattened 4-vectors
28511    public result_int reduce_my_short2_float4_1(short[] in1, float[] in2) {
28512        // Verify that "in1" is non-null.
28513        if (in1 == null) {
28514            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28515        }
28516        // Verify that the array length is a multiple of the vector size.
28517        if (in1.length % 2 != 0) {
28518            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28519        }
28520        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28521        ain1.setAutoPadding(true);
28522        ain1.copyFrom(in1);
28523        // Verify that "in2" is non-null.
28524        if (in2 == null) {
28525            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28526        }
28527        // Verify that the array length is a multiple of the vector size.
28528        if (in2.length % 4 != 0) {
28529            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
28530        }
28531        // Verify that input array lengths are the same.
28532        if (in1.length / 2 != in2.length / 4) {
28533            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28534        }
28535        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
28536        ain2.setAutoPadding(true);
28537        ain2.copyFrom(in2);
28538
28539        result_int result = reduce_my_short2_float4_1(ain1, ain2, null);
28540        result.mTempIns = new Allocation[]{ain1, ain2};
28541        return result;
28542    }
28543
28544    // ain1 = "short2 a"
28545    // ain2 = "float4 b"
28546    public result_int reduce_my_short2_float4_1(Allocation ain1, Allocation ain2) {
28547        return reduce_my_short2_float4_1(ain1, ain2, null);
28548    }
28549
28550    // ain1 = "short2 a"
28551    // ain2 = "float4 b"
28552    public result_int reduce_my_short2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28553        Type t0, t1;
28554        // check ain1
28555        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28556            throw new RSRuntimeException("Type mismatch with I16_2!");
28557        }
28558        // check ain2
28559        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
28560            throw new RSRuntimeException("Type mismatch with F32_4!");
28561        }
28562        // Verify dimensions
28563        t0 = ain1.getType();
28564        t1 = ain2.getType();
28565        if ((t0.getCount() != t1.getCount()) ||
28566            (t0.getX() != t1.getX()) ||
28567            (t0.getY() != t1.getY()) ||
28568            (t0.getZ() != t1.getZ()) ||
28569            (t0.hasFaces()   != t1.hasFaces()) ||
28570            (t0.hasMipmaps() != t1.hasMipmaps())) {
28571            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28572        }
28573
28574        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28575        aout.setAutoPadding(true);
28576        reduce(mExportReduceIdx_my_short2_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
28577        return new result_int(aout);
28578    }
28579
28580    private final static int mExportReduceIdx_my_short2_char_0 = 432;
28581    // in1 = "a", flattened 2-vectors
28582    // in2 = "b"
28583    public result_int reduce_my_short2_char_0(short[] in1, byte[] in2) {
28584        // Verify that "in1" is non-null.
28585        if (in1 == null) {
28586            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28587        }
28588        // Verify that the array length is a multiple of the vector size.
28589        if (in1.length % 2 != 0) {
28590            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28591        }
28592        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28593        ain1.setAutoPadding(true);
28594        ain1.copyFrom(in1);
28595        // Verify that "in2" is non-null.
28596        if (in2 == null) {
28597            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28598        }
28599        // Verify that input array lengths are the same.
28600        if (in1.length / 2 != in2.length) {
28601            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28602        }
28603        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
28604        ain2.setAutoPadding(true);
28605        ain2.copyFrom(in2);
28606
28607        result_int result = reduce_my_short2_char_0(ain1, ain2, null);
28608        result.mTempIns = new Allocation[]{ain1, ain2};
28609        return result;
28610    }
28611
28612    // ain1 = "short2 a"
28613    // ain2 = "char b"
28614    public result_int reduce_my_short2_char_0(Allocation ain1, Allocation ain2) {
28615        return reduce_my_short2_char_0(ain1, ain2, null);
28616    }
28617
28618    // ain1 = "short2 a"
28619    // ain2 = "char b"
28620    public result_int reduce_my_short2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28621        Type t0, t1;
28622        // check ain1
28623        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28624            throw new RSRuntimeException("Type mismatch with I16_2!");
28625        }
28626        // check ain2
28627        if (!ain2.getType().getElement().isCompatible(__I8)) {
28628            throw new RSRuntimeException("Type mismatch with I8!");
28629        }
28630        // Verify dimensions
28631        t0 = ain1.getType();
28632        t1 = ain2.getType();
28633        if ((t0.getCount() != t1.getCount()) ||
28634            (t0.getX() != t1.getX()) ||
28635            (t0.getY() != t1.getY()) ||
28636            (t0.getZ() != t1.getZ()) ||
28637            (t0.hasFaces()   != t1.hasFaces()) ||
28638            (t0.hasMipmaps() != t1.hasMipmaps())) {
28639            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28640        }
28641
28642        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28643        aout.setAutoPadding(true);
28644        reduce(mExportReduceIdx_my_short2_char_0, new Allocation[]{ain1, ain2}, aout, sc);
28645        return new result_int(aout);
28646    }
28647
28648    private final static int mExportReduceIdx_my_short2_char_1 = 433;
28649    // in1 = "a", flattened 2-vectors
28650    // in2 = "b"
28651    public result_int reduce_my_short2_char_1(short[] in1, byte[] in2) {
28652        // Verify that "in1" is non-null.
28653        if (in1 == null) {
28654            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28655        }
28656        // Verify that the array length is a multiple of the vector size.
28657        if (in1.length % 2 != 0) {
28658            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28659        }
28660        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28661        ain1.setAutoPadding(true);
28662        ain1.copyFrom(in1);
28663        // Verify that "in2" is non-null.
28664        if (in2 == null) {
28665            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28666        }
28667        // Verify that input array lengths are the same.
28668        if (in1.length / 2 != in2.length) {
28669            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28670        }
28671        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
28672        ain2.setAutoPadding(true);
28673        ain2.copyFrom(in2);
28674
28675        result_int result = reduce_my_short2_char_1(ain1, ain2, null);
28676        result.mTempIns = new Allocation[]{ain1, ain2};
28677        return result;
28678    }
28679
28680    // ain1 = "short2 a"
28681    // ain2 = "char b"
28682    public result_int reduce_my_short2_char_1(Allocation ain1, Allocation ain2) {
28683        return reduce_my_short2_char_1(ain1, ain2, null);
28684    }
28685
28686    // ain1 = "short2 a"
28687    // ain2 = "char b"
28688    public result_int reduce_my_short2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28689        Type t0, t1;
28690        // check ain1
28691        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28692            throw new RSRuntimeException("Type mismatch with I16_2!");
28693        }
28694        // check ain2
28695        if (!ain2.getType().getElement().isCompatible(__I8)) {
28696            throw new RSRuntimeException("Type mismatch with I8!");
28697        }
28698        // Verify dimensions
28699        t0 = ain1.getType();
28700        t1 = ain2.getType();
28701        if ((t0.getCount() != t1.getCount()) ||
28702            (t0.getX() != t1.getX()) ||
28703            (t0.getY() != t1.getY()) ||
28704            (t0.getZ() != t1.getZ()) ||
28705            (t0.hasFaces()   != t1.hasFaces()) ||
28706            (t0.hasMipmaps() != t1.hasMipmaps())) {
28707            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28708        }
28709
28710        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28711        aout.setAutoPadding(true);
28712        reduce(mExportReduceIdx_my_short2_char_1, new Allocation[]{ain1, ain2}, aout, sc);
28713        return new result_int(aout);
28714    }
28715
28716    private final static int mExportReduceIdx_my_short2_char2_0 = 434;
28717    // in1 = "a", flattened 2-vectors
28718    // in2 = "b", flattened 2-vectors
28719    public result_int reduce_my_short2_char2_0(short[] in1, byte[] in2) {
28720        // Verify that "in1" is non-null.
28721        if (in1 == null) {
28722            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28723        }
28724        // Verify that the array length is a multiple of the vector size.
28725        if (in1.length % 2 != 0) {
28726            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28727        }
28728        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28729        ain1.setAutoPadding(true);
28730        ain1.copyFrom(in1);
28731        // Verify that "in2" is non-null.
28732        if (in2 == null) {
28733            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28734        }
28735        // Verify that the array length is a multiple of the vector size.
28736        if (in2.length % 2 != 0) {
28737            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
28738        }
28739        // Verify that input array lengths are the same.
28740        if (in1.length / 2 != in2.length / 2) {
28741            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28742        }
28743        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
28744        ain2.setAutoPadding(true);
28745        ain2.copyFrom(in2);
28746
28747        result_int result = reduce_my_short2_char2_0(ain1, ain2, null);
28748        result.mTempIns = new Allocation[]{ain1, ain2};
28749        return result;
28750    }
28751
28752    // ain1 = "short2 a"
28753    // ain2 = "char2 b"
28754    public result_int reduce_my_short2_char2_0(Allocation ain1, Allocation ain2) {
28755        return reduce_my_short2_char2_0(ain1, ain2, null);
28756    }
28757
28758    // ain1 = "short2 a"
28759    // ain2 = "char2 b"
28760    public result_int reduce_my_short2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28761        Type t0, t1;
28762        // check ain1
28763        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28764            throw new RSRuntimeException("Type mismatch with I16_2!");
28765        }
28766        // check ain2
28767        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
28768            throw new RSRuntimeException("Type mismatch with I8_2!");
28769        }
28770        // Verify dimensions
28771        t0 = ain1.getType();
28772        t1 = ain2.getType();
28773        if ((t0.getCount() != t1.getCount()) ||
28774            (t0.getX() != t1.getX()) ||
28775            (t0.getY() != t1.getY()) ||
28776            (t0.getZ() != t1.getZ()) ||
28777            (t0.hasFaces()   != t1.hasFaces()) ||
28778            (t0.hasMipmaps() != t1.hasMipmaps())) {
28779            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28780        }
28781
28782        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28783        aout.setAutoPadding(true);
28784        reduce(mExportReduceIdx_my_short2_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
28785        return new result_int(aout);
28786    }
28787
28788    private final static int mExportReduceIdx_my_short2_char2_1 = 435;
28789    // in1 = "a", flattened 2-vectors
28790    // in2 = "b", flattened 2-vectors
28791    public result_int reduce_my_short2_char2_1(short[] in1, byte[] in2) {
28792        // Verify that "in1" is non-null.
28793        if (in1 == null) {
28794            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28795        }
28796        // Verify that the array length is a multiple of the vector size.
28797        if (in1.length % 2 != 0) {
28798            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28799        }
28800        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28801        ain1.setAutoPadding(true);
28802        ain1.copyFrom(in1);
28803        // Verify that "in2" is non-null.
28804        if (in2 == null) {
28805            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28806        }
28807        // Verify that the array length is a multiple of the vector size.
28808        if (in2.length % 2 != 0) {
28809            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
28810        }
28811        // Verify that input array lengths are the same.
28812        if (in1.length / 2 != in2.length / 2) {
28813            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28814        }
28815        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
28816        ain2.setAutoPadding(true);
28817        ain2.copyFrom(in2);
28818
28819        result_int result = reduce_my_short2_char2_1(ain1, ain2, null);
28820        result.mTempIns = new Allocation[]{ain1, ain2};
28821        return result;
28822    }
28823
28824    // ain1 = "short2 a"
28825    // ain2 = "char2 b"
28826    public result_int reduce_my_short2_char2_1(Allocation ain1, Allocation ain2) {
28827        return reduce_my_short2_char2_1(ain1, ain2, null);
28828    }
28829
28830    // ain1 = "short2 a"
28831    // ain2 = "char2 b"
28832    public result_int reduce_my_short2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28833        Type t0, t1;
28834        // check ain1
28835        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28836            throw new RSRuntimeException("Type mismatch with I16_2!");
28837        }
28838        // check ain2
28839        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
28840            throw new RSRuntimeException("Type mismatch with I8_2!");
28841        }
28842        // Verify dimensions
28843        t0 = ain1.getType();
28844        t1 = ain2.getType();
28845        if ((t0.getCount() != t1.getCount()) ||
28846            (t0.getX() != t1.getX()) ||
28847            (t0.getY() != t1.getY()) ||
28848            (t0.getZ() != t1.getZ()) ||
28849            (t0.hasFaces()   != t1.hasFaces()) ||
28850            (t0.hasMipmaps() != t1.hasMipmaps())) {
28851            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28852        }
28853
28854        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28855        aout.setAutoPadding(true);
28856        reduce(mExportReduceIdx_my_short2_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
28857        return new result_int(aout);
28858    }
28859
28860    private final static int mExportReduceIdx_my_short2_char4_0 = 436;
28861    // in1 = "a", flattened 2-vectors
28862    // in2 = "b", flattened 4-vectors
28863    public result_int reduce_my_short2_char4_0(short[] in1, byte[] in2) {
28864        // Verify that "in1" is non-null.
28865        if (in1 == null) {
28866            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28867        }
28868        // Verify that the array length is a multiple of the vector size.
28869        if (in1.length % 2 != 0) {
28870            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28871        }
28872        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28873        ain1.setAutoPadding(true);
28874        ain1.copyFrom(in1);
28875        // Verify that "in2" is non-null.
28876        if (in2 == null) {
28877            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28878        }
28879        // Verify that the array length is a multiple of the vector size.
28880        if (in2.length % 4 != 0) {
28881            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
28882        }
28883        // Verify that input array lengths are the same.
28884        if (in1.length / 2 != in2.length / 4) {
28885            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28886        }
28887        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
28888        ain2.setAutoPadding(true);
28889        ain2.copyFrom(in2);
28890
28891        result_int result = reduce_my_short2_char4_0(ain1, ain2, null);
28892        result.mTempIns = new Allocation[]{ain1, ain2};
28893        return result;
28894    }
28895
28896    // ain1 = "short2 a"
28897    // ain2 = "char4 b"
28898    public result_int reduce_my_short2_char4_0(Allocation ain1, Allocation ain2) {
28899        return reduce_my_short2_char4_0(ain1, ain2, null);
28900    }
28901
28902    // ain1 = "short2 a"
28903    // ain2 = "char4 b"
28904    public result_int reduce_my_short2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28905        Type t0, t1;
28906        // check ain1
28907        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28908            throw new RSRuntimeException("Type mismatch with I16_2!");
28909        }
28910        // check ain2
28911        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
28912            throw new RSRuntimeException("Type mismatch with I8_4!");
28913        }
28914        // Verify dimensions
28915        t0 = ain1.getType();
28916        t1 = ain2.getType();
28917        if ((t0.getCount() != t1.getCount()) ||
28918            (t0.getX() != t1.getX()) ||
28919            (t0.getY() != t1.getY()) ||
28920            (t0.getZ() != t1.getZ()) ||
28921            (t0.hasFaces()   != t1.hasFaces()) ||
28922            (t0.hasMipmaps() != t1.hasMipmaps())) {
28923            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28924        }
28925
28926        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28927        aout.setAutoPadding(true);
28928        reduce(mExportReduceIdx_my_short2_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
28929        return new result_int(aout);
28930    }
28931
28932    private final static int mExportReduceIdx_my_short2_char4_1 = 437;
28933    // in1 = "a", flattened 2-vectors
28934    // in2 = "b", flattened 4-vectors
28935    public result_int reduce_my_short2_char4_1(short[] in1, byte[] in2) {
28936        // Verify that "in1" is non-null.
28937        if (in1 == null) {
28938            throw new RSIllegalArgumentException("Array \"in1\" is null!");
28939        }
28940        // Verify that the array length is a multiple of the vector size.
28941        if (in1.length % 2 != 0) {
28942            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
28943        }
28944        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
28945        ain1.setAutoPadding(true);
28946        ain1.copyFrom(in1);
28947        // Verify that "in2" is non-null.
28948        if (in2 == null) {
28949            throw new RSIllegalArgumentException("Array \"in2\" is null!");
28950        }
28951        // Verify that the array length is a multiple of the vector size.
28952        if (in2.length % 4 != 0) {
28953            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
28954        }
28955        // Verify that input array lengths are the same.
28956        if (in1.length / 2 != in2.length / 4) {
28957            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
28958        }
28959        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
28960        ain2.setAutoPadding(true);
28961        ain2.copyFrom(in2);
28962
28963        result_int result = reduce_my_short2_char4_1(ain1, ain2, null);
28964        result.mTempIns = new Allocation[]{ain1, ain2};
28965        return result;
28966    }
28967
28968    // ain1 = "short2 a"
28969    // ain2 = "char4 b"
28970    public result_int reduce_my_short2_char4_1(Allocation ain1, Allocation ain2) {
28971        return reduce_my_short2_char4_1(ain1, ain2, null);
28972    }
28973
28974    // ain1 = "short2 a"
28975    // ain2 = "char4 b"
28976    public result_int reduce_my_short2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
28977        Type t0, t1;
28978        // check ain1
28979        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
28980            throw new RSRuntimeException("Type mismatch with I16_2!");
28981        }
28982        // check ain2
28983        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
28984            throw new RSRuntimeException("Type mismatch with I8_4!");
28985        }
28986        // Verify dimensions
28987        t0 = ain1.getType();
28988        t1 = ain2.getType();
28989        if ((t0.getCount() != t1.getCount()) ||
28990            (t0.getX() != t1.getX()) ||
28991            (t0.getY() != t1.getY()) ||
28992            (t0.getZ() != t1.getZ()) ||
28993            (t0.hasFaces()   != t1.hasFaces()) ||
28994            (t0.hasMipmaps() != t1.hasMipmaps())) {
28995            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
28996        }
28997
28998        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
28999        aout.setAutoPadding(true);
29000        reduce(mExportReduceIdx_my_short2_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
29001        return new result_int(aout);
29002    }
29003
29004    private final static int mExportReduceIdx_my_short2_short_0 = 438;
29005    // in1 = "a", flattened 2-vectors
29006    // in2 = "b"
29007    public result_int reduce_my_short2_short_0(short[] in1, short[] in2) {
29008        // Verify that "in1" is non-null.
29009        if (in1 == null) {
29010            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29011        }
29012        // Verify that the array length is a multiple of the vector size.
29013        if (in1.length % 2 != 0) {
29014            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29015        }
29016        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29017        ain1.setAutoPadding(true);
29018        ain1.copyFrom(in1);
29019        // Verify that "in2" is non-null.
29020        if (in2 == null) {
29021            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29022        }
29023        // Verify that input array lengths are the same.
29024        if (in1.length / 2 != in2.length) {
29025            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29026        }
29027        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
29028        ain2.setAutoPadding(true);
29029        ain2.copyFrom(in2);
29030
29031        result_int result = reduce_my_short2_short_0(ain1, ain2, null);
29032        result.mTempIns = new Allocation[]{ain1, ain2};
29033        return result;
29034    }
29035
29036    // ain1 = "short2 a"
29037    // ain2 = "short b"
29038    public result_int reduce_my_short2_short_0(Allocation ain1, Allocation ain2) {
29039        return reduce_my_short2_short_0(ain1, ain2, null);
29040    }
29041
29042    // ain1 = "short2 a"
29043    // ain2 = "short b"
29044    public result_int reduce_my_short2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29045        Type t0, t1;
29046        // check ain1
29047        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29048            throw new RSRuntimeException("Type mismatch with I16_2!");
29049        }
29050        // check ain2
29051        if (!ain2.getType().getElement().isCompatible(__I16)) {
29052            throw new RSRuntimeException("Type mismatch with I16!");
29053        }
29054        // Verify dimensions
29055        t0 = ain1.getType();
29056        t1 = ain2.getType();
29057        if ((t0.getCount() != t1.getCount()) ||
29058            (t0.getX() != t1.getX()) ||
29059            (t0.getY() != t1.getY()) ||
29060            (t0.getZ() != t1.getZ()) ||
29061            (t0.hasFaces()   != t1.hasFaces()) ||
29062            (t0.hasMipmaps() != t1.hasMipmaps())) {
29063            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29064        }
29065
29066        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29067        aout.setAutoPadding(true);
29068        reduce(mExportReduceIdx_my_short2_short_0, new Allocation[]{ain1, ain2}, aout, sc);
29069        return new result_int(aout);
29070    }
29071
29072    private final static int mExportReduceIdx_my_short2_short_1 = 439;
29073    // in1 = "a", flattened 2-vectors
29074    // in2 = "b"
29075    public result_int reduce_my_short2_short_1(short[] in1, short[] in2) {
29076        // Verify that "in1" is non-null.
29077        if (in1 == null) {
29078            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29079        }
29080        // Verify that the array length is a multiple of the vector size.
29081        if (in1.length % 2 != 0) {
29082            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29083        }
29084        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29085        ain1.setAutoPadding(true);
29086        ain1.copyFrom(in1);
29087        // Verify that "in2" is non-null.
29088        if (in2 == null) {
29089            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29090        }
29091        // Verify that input array lengths are the same.
29092        if (in1.length / 2 != in2.length) {
29093            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29094        }
29095        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
29096        ain2.setAutoPadding(true);
29097        ain2.copyFrom(in2);
29098
29099        result_int result = reduce_my_short2_short_1(ain1, ain2, null);
29100        result.mTempIns = new Allocation[]{ain1, ain2};
29101        return result;
29102    }
29103
29104    // ain1 = "short2 a"
29105    // ain2 = "short b"
29106    public result_int reduce_my_short2_short_1(Allocation ain1, Allocation ain2) {
29107        return reduce_my_short2_short_1(ain1, ain2, null);
29108    }
29109
29110    // ain1 = "short2 a"
29111    // ain2 = "short b"
29112    public result_int reduce_my_short2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29113        Type t0, t1;
29114        // check ain1
29115        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29116            throw new RSRuntimeException("Type mismatch with I16_2!");
29117        }
29118        // check ain2
29119        if (!ain2.getType().getElement().isCompatible(__I16)) {
29120            throw new RSRuntimeException("Type mismatch with I16!");
29121        }
29122        // Verify dimensions
29123        t0 = ain1.getType();
29124        t1 = ain2.getType();
29125        if ((t0.getCount() != t1.getCount()) ||
29126            (t0.getX() != t1.getX()) ||
29127            (t0.getY() != t1.getY()) ||
29128            (t0.getZ() != t1.getZ()) ||
29129            (t0.hasFaces()   != t1.hasFaces()) ||
29130            (t0.hasMipmaps() != t1.hasMipmaps())) {
29131            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29132        }
29133
29134        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29135        aout.setAutoPadding(true);
29136        reduce(mExportReduceIdx_my_short2_short_1, new Allocation[]{ain1, ain2}, aout, sc);
29137        return new result_int(aout);
29138    }
29139
29140    private final static int mExportReduceIdx_my_short2_short2_0 = 440;
29141    // in1 = "a", flattened 2-vectors
29142    // in2 = "b", flattened 2-vectors
29143    public result_int reduce_my_short2_short2_0(short[] in1, short[] in2) {
29144        // Verify that "in1" is non-null.
29145        if (in1 == null) {
29146            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29147        }
29148        // Verify that the array length is a multiple of the vector size.
29149        if (in1.length % 2 != 0) {
29150            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29151        }
29152        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29153        ain1.setAutoPadding(true);
29154        ain1.copyFrom(in1);
29155        // Verify that "in2" is non-null.
29156        if (in2 == null) {
29157            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29158        }
29159        // Verify that the array length is a multiple of the vector size.
29160        if (in2.length % 2 != 0) {
29161            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
29162        }
29163        // Verify that input array lengths are the same.
29164        if (in1.length / 2 != in2.length / 2) {
29165            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29166        }
29167        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
29168        ain2.setAutoPadding(true);
29169        ain2.copyFrom(in2);
29170
29171        result_int result = reduce_my_short2_short2_0(ain1, ain2, null);
29172        result.mTempIns = new Allocation[]{ain1, ain2};
29173        return result;
29174    }
29175
29176    // ain1 = "short2 a"
29177    // ain2 = "short2 b"
29178    public result_int reduce_my_short2_short2_0(Allocation ain1, Allocation ain2) {
29179        return reduce_my_short2_short2_0(ain1, ain2, null);
29180    }
29181
29182    // ain1 = "short2 a"
29183    // ain2 = "short2 b"
29184    public result_int reduce_my_short2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29185        Type t0, t1;
29186        // check ain1
29187        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29188            throw new RSRuntimeException("Type mismatch with I16_2!");
29189        }
29190        // check ain2
29191        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
29192            throw new RSRuntimeException("Type mismatch with I16_2!");
29193        }
29194        // Verify dimensions
29195        t0 = ain1.getType();
29196        t1 = ain2.getType();
29197        if ((t0.getCount() != t1.getCount()) ||
29198            (t0.getX() != t1.getX()) ||
29199            (t0.getY() != t1.getY()) ||
29200            (t0.getZ() != t1.getZ()) ||
29201            (t0.hasFaces()   != t1.hasFaces()) ||
29202            (t0.hasMipmaps() != t1.hasMipmaps())) {
29203            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29204        }
29205
29206        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29207        aout.setAutoPadding(true);
29208        reduce(mExportReduceIdx_my_short2_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
29209        return new result_int(aout);
29210    }
29211
29212    private final static int mExportReduceIdx_my_short2_short2_1 = 441;
29213    // in1 = "a", flattened 2-vectors
29214    // in2 = "b", flattened 2-vectors
29215    public result_int reduce_my_short2_short2_1(short[] in1, short[] in2) {
29216        // Verify that "in1" is non-null.
29217        if (in1 == null) {
29218            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29219        }
29220        // Verify that the array length is a multiple of the vector size.
29221        if (in1.length % 2 != 0) {
29222            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29223        }
29224        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29225        ain1.setAutoPadding(true);
29226        ain1.copyFrom(in1);
29227        // Verify that "in2" is non-null.
29228        if (in2 == null) {
29229            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29230        }
29231        // Verify that the array length is a multiple of the vector size.
29232        if (in2.length % 2 != 0) {
29233            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
29234        }
29235        // Verify that input array lengths are the same.
29236        if (in1.length / 2 != in2.length / 2) {
29237            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29238        }
29239        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
29240        ain2.setAutoPadding(true);
29241        ain2.copyFrom(in2);
29242
29243        result_int result = reduce_my_short2_short2_1(ain1, ain2, null);
29244        result.mTempIns = new Allocation[]{ain1, ain2};
29245        return result;
29246    }
29247
29248    // ain1 = "short2 a"
29249    // ain2 = "short2 b"
29250    public result_int reduce_my_short2_short2_1(Allocation ain1, Allocation ain2) {
29251        return reduce_my_short2_short2_1(ain1, ain2, null);
29252    }
29253
29254    // ain1 = "short2 a"
29255    // ain2 = "short2 b"
29256    public result_int reduce_my_short2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29257        Type t0, t1;
29258        // check ain1
29259        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29260            throw new RSRuntimeException("Type mismatch with I16_2!");
29261        }
29262        // check ain2
29263        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
29264            throw new RSRuntimeException("Type mismatch with I16_2!");
29265        }
29266        // Verify dimensions
29267        t0 = ain1.getType();
29268        t1 = ain2.getType();
29269        if ((t0.getCount() != t1.getCount()) ||
29270            (t0.getX() != t1.getX()) ||
29271            (t0.getY() != t1.getY()) ||
29272            (t0.getZ() != t1.getZ()) ||
29273            (t0.hasFaces()   != t1.hasFaces()) ||
29274            (t0.hasMipmaps() != t1.hasMipmaps())) {
29275            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29276        }
29277
29278        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29279        aout.setAutoPadding(true);
29280        reduce(mExportReduceIdx_my_short2_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
29281        return new result_int(aout);
29282    }
29283
29284    private final static int mExportReduceIdx_my_short2_short4_0 = 442;
29285    // in1 = "a", flattened 2-vectors
29286    // in2 = "b", flattened 4-vectors
29287    public result_int reduce_my_short2_short4_0(short[] in1, short[] in2) {
29288        // Verify that "in1" is non-null.
29289        if (in1 == null) {
29290            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29291        }
29292        // Verify that the array length is a multiple of the vector size.
29293        if (in1.length % 2 != 0) {
29294            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29295        }
29296        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29297        ain1.setAutoPadding(true);
29298        ain1.copyFrom(in1);
29299        // Verify that "in2" is non-null.
29300        if (in2 == null) {
29301            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29302        }
29303        // Verify that the array length is a multiple of the vector size.
29304        if (in2.length % 4 != 0) {
29305            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
29306        }
29307        // Verify that input array lengths are the same.
29308        if (in1.length / 2 != in2.length / 4) {
29309            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29310        }
29311        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
29312        ain2.setAutoPadding(true);
29313        ain2.copyFrom(in2);
29314
29315        result_int result = reduce_my_short2_short4_0(ain1, ain2, null);
29316        result.mTempIns = new Allocation[]{ain1, ain2};
29317        return result;
29318    }
29319
29320    // ain1 = "short2 a"
29321    // ain2 = "short4 b"
29322    public result_int reduce_my_short2_short4_0(Allocation ain1, Allocation ain2) {
29323        return reduce_my_short2_short4_0(ain1, ain2, null);
29324    }
29325
29326    // ain1 = "short2 a"
29327    // ain2 = "short4 b"
29328    public result_int reduce_my_short2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29329        Type t0, t1;
29330        // check ain1
29331        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29332            throw new RSRuntimeException("Type mismatch with I16_2!");
29333        }
29334        // check ain2
29335        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
29336            throw new RSRuntimeException("Type mismatch with I16_4!");
29337        }
29338        // Verify dimensions
29339        t0 = ain1.getType();
29340        t1 = ain2.getType();
29341        if ((t0.getCount() != t1.getCount()) ||
29342            (t0.getX() != t1.getX()) ||
29343            (t0.getY() != t1.getY()) ||
29344            (t0.getZ() != t1.getZ()) ||
29345            (t0.hasFaces()   != t1.hasFaces()) ||
29346            (t0.hasMipmaps() != t1.hasMipmaps())) {
29347            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29348        }
29349
29350        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29351        aout.setAutoPadding(true);
29352        reduce(mExportReduceIdx_my_short2_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
29353        return new result_int(aout);
29354    }
29355
29356    private final static int mExportReduceIdx_my_short2_short4_1 = 443;
29357    // in1 = "a", flattened 2-vectors
29358    // in2 = "b", flattened 4-vectors
29359    public result_int reduce_my_short2_short4_1(short[] in1, short[] in2) {
29360        // Verify that "in1" is non-null.
29361        if (in1 == null) {
29362            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29363        }
29364        // Verify that the array length is a multiple of the vector size.
29365        if (in1.length % 2 != 0) {
29366            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29367        }
29368        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29369        ain1.setAutoPadding(true);
29370        ain1.copyFrom(in1);
29371        // Verify that "in2" is non-null.
29372        if (in2 == null) {
29373            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29374        }
29375        // Verify that the array length is a multiple of the vector size.
29376        if (in2.length % 4 != 0) {
29377            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
29378        }
29379        // Verify that input array lengths are the same.
29380        if (in1.length / 2 != in2.length / 4) {
29381            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29382        }
29383        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
29384        ain2.setAutoPadding(true);
29385        ain2.copyFrom(in2);
29386
29387        result_int result = reduce_my_short2_short4_1(ain1, ain2, null);
29388        result.mTempIns = new Allocation[]{ain1, ain2};
29389        return result;
29390    }
29391
29392    // ain1 = "short2 a"
29393    // ain2 = "short4 b"
29394    public result_int reduce_my_short2_short4_1(Allocation ain1, Allocation ain2) {
29395        return reduce_my_short2_short4_1(ain1, ain2, null);
29396    }
29397
29398    // ain1 = "short2 a"
29399    // ain2 = "short4 b"
29400    public result_int reduce_my_short2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29401        Type t0, t1;
29402        // check ain1
29403        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29404            throw new RSRuntimeException("Type mismatch with I16_2!");
29405        }
29406        // check ain2
29407        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
29408            throw new RSRuntimeException("Type mismatch with I16_4!");
29409        }
29410        // Verify dimensions
29411        t0 = ain1.getType();
29412        t1 = ain2.getType();
29413        if ((t0.getCount() != t1.getCount()) ||
29414            (t0.getX() != t1.getX()) ||
29415            (t0.getY() != t1.getY()) ||
29416            (t0.getZ() != t1.getZ()) ||
29417            (t0.hasFaces()   != t1.hasFaces()) ||
29418            (t0.hasMipmaps() != t1.hasMipmaps())) {
29419            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29420        }
29421
29422        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29423        aout.setAutoPadding(true);
29424        reduce(mExportReduceIdx_my_short2_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
29425        return new result_int(aout);
29426    }
29427
29428    private final static int mExportReduceIdx_my_short2_uchar_0 = 444;
29429    // in1 = "a", flattened 2-vectors
29430    // in2 = "b"
29431    public result_int reduce_my_short2_uchar_0(short[] in1, byte[] in2) {
29432        // Verify that "in1" is non-null.
29433        if (in1 == null) {
29434            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29435        }
29436        // Verify that the array length is a multiple of the vector size.
29437        if (in1.length % 2 != 0) {
29438            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29439        }
29440        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29441        ain1.setAutoPadding(true);
29442        ain1.copyFrom(in1);
29443        // Verify that "in2" is non-null.
29444        if (in2 == null) {
29445            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29446        }
29447        // Verify that input array lengths are the same.
29448        if (in1.length / 2 != in2.length) {
29449            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29450        }
29451        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
29452        ain2.setAutoPadding(true);
29453        ain2.copyFrom(in2);
29454
29455        result_int result = reduce_my_short2_uchar_0(ain1, ain2, null);
29456        result.mTempIns = new Allocation[]{ain1, ain2};
29457        return result;
29458    }
29459
29460    // ain1 = "short2 a"
29461    // ain2 = "uchar b"
29462    public result_int reduce_my_short2_uchar_0(Allocation ain1, Allocation ain2) {
29463        return reduce_my_short2_uchar_0(ain1, ain2, null);
29464    }
29465
29466    // ain1 = "short2 a"
29467    // ain2 = "uchar b"
29468    public result_int reduce_my_short2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29469        Type t0, t1;
29470        // check ain1
29471        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29472            throw new RSRuntimeException("Type mismatch with I16_2!");
29473        }
29474        // check ain2
29475        if (!ain2.getType().getElement().isCompatible(__U8)) {
29476            throw new RSRuntimeException("Type mismatch with U8!");
29477        }
29478        // Verify dimensions
29479        t0 = ain1.getType();
29480        t1 = ain2.getType();
29481        if ((t0.getCount() != t1.getCount()) ||
29482            (t0.getX() != t1.getX()) ||
29483            (t0.getY() != t1.getY()) ||
29484            (t0.getZ() != t1.getZ()) ||
29485            (t0.hasFaces()   != t1.hasFaces()) ||
29486            (t0.hasMipmaps() != t1.hasMipmaps())) {
29487            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29488        }
29489
29490        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29491        aout.setAutoPadding(true);
29492        reduce(mExportReduceIdx_my_short2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
29493        return new result_int(aout);
29494    }
29495
29496    private final static int mExportReduceIdx_my_short2_uchar_1 = 445;
29497    // in1 = "a", flattened 2-vectors
29498    // in2 = "b"
29499    public result_int reduce_my_short2_uchar_1(short[] in1, byte[] in2) {
29500        // Verify that "in1" is non-null.
29501        if (in1 == null) {
29502            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29503        }
29504        // Verify that the array length is a multiple of the vector size.
29505        if (in1.length % 2 != 0) {
29506            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29507        }
29508        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29509        ain1.setAutoPadding(true);
29510        ain1.copyFrom(in1);
29511        // Verify that "in2" is non-null.
29512        if (in2 == null) {
29513            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29514        }
29515        // Verify that input array lengths are the same.
29516        if (in1.length / 2 != in2.length) {
29517            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29518        }
29519        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
29520        ain2.setAutoPadding(true);
29521        ain2.copyFrom(in2);
29522
29523        result_int result = reduce_my_short2_uchar_1(ain1, ain2, null);
29524        result.mTempIns = new Allocation[]{ain1, ain2};
29525        return result;
29526    }
29527
29528    // ain1 = "short2 a"
29529    // ain2 = "uchar b"
29530    public result_int reduce_my_short2_uchar_1(Allocation ain1, Allocation ain2) {
29531        return reduce_my_short2_uchar_1(ain1, ain2, null);
29532    }
29533
29534    // ain1 = "short2 a"
29535    // ain2 = "uchar b"
29536    public result_int reduce_my_short2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29537        Type t0, t1;
29538        // check ain1
29539        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29540            throw new RSRuntimeException("Type mismatch with I16_2!");
29541        }
29542        // check ain2
29543        if (!ain2.getType().getElement().isCompatible(__U8)) {
29544            throw new RSRuntimeException("Type mismatch with U8!");
29545        }
29546        // Verify dimensions
29547        t0 = ain1.getType();
29548        t1 = ain2.getType();
29549        if ((t0.getCount() != t1.getCount()) ||
29550            (t0.getX() != t1.getX()) ||
29551            (t0.getY() != t1.getY()) ||
29552            (t0.getZ() != t1.getZ()) ||
29553            (t0.hasFaces()   != t1.hasFaces()) ||
29554            (t0.hasMipmaps() != t1.hasMipmaps())) {
29555            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29556        }
29557
29558        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29559        aout.setAutoPadding(true);
29560        reduce(mExportReduceIdx_my_short2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
29561        return new result_int(aout);
29562    }
29563
29564    private final static int mExportReduceIdx_my_short2_uchar2_0 = 446;
29565    // in1 = "a", flattened 2-vectors
29566    // in2 = "b", flattened 2-vectors
29567    public result_int reduce_my_short2_uchar2_0(short[] in1, byte[] in2) {
29568        // Verify that "in1" is non-null.
29569        if (in1 == null) {
29570            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29571        }
29572        // Verify that the array length is a multiple of the vector size.
29573        if (in1.length % 2 != 0) {
29574            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29575        }
29576        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29577        ain1.setAutoPadding(true);
29578        ain1.copyFrom(in1);
29579        // Verify that "in2" is non-null.
29580        if (in2 == null) {
29581            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29582        }
29583        // Verify that the array length is a multiple of the vector size.
29584        if (in2.length % 2 != 0) {
29585            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
29586        }
29587        // Verify that input array lengths are the same.
29588        if (in1.length / 2 != in2.length / 2) {
29589            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29590        }
29591        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
29592        ain2.setAutoPadding(true);
29593        ain2.copyFrom(in2);
29594
29595        result_int result = reduce_my_short2_uchar2_0(ain1, ain2, null);
29596        result.mTempIns = new Allocation[]{ain1, ain2};
29597        return result;
29598    }
29599
29600    // ain1 = "short2 a"
29601    // ain2 = "uchar2 b"
29602    public result_int reduce_my_short2_uchar2_0(Allocation ain1, Allocation ain2) {
29603        return reduce_my_short2_uchar2_0(ain1, ain2, null);
29604    }
29605
29606    // ain1 = "short2 a"
29607    // ain2 = "uchar2 b"
29608    public result_int reduce_my_short2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29609        Type t0, t1;
29610        // check ain1
29611        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29612            throw new RSRuntimeException("Type mismatch with I16_2!");
29613        }
29614        // check ain2
29615        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
29616            throw new RSRuntimeException("Type mismatch with U8_2!");
29617        }
29618        // Verify dimensions
29619        t0 = ain1.getType();
29620        t1 = ain2.getType();
29621        if ((t0.getCount() != t1.getCount()) ||
29622            (t0.getX() != t1.getX()) ||
29623            (t0.getY() != t1.getY()) ||
29624            (t0.getZ() != t1.getZ()) ||
29625            (t0.hasFaces()   != t1.hasFaces()) ||
29626            (t0.hasMipmaps() != t1.hasMipmaps())) {
29627            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29628        }
29629
29630        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29631        aout.setAutoPadding(true);
29632        reduce(mExportReduceIdx_my_short2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
29633        return new result_int(aout);
29634    }
29635
29636    private final static int mExportReduceIdx_my_short2_uchar2_1 = 447;
29637    // in1 = "a", flattened 2-vectors
29638    // in2 = "b", flattened 2-vectors
29639    public result_int reduce_my_short2_uchar2_1(short[] in1, byte[] in2) {
29640        // Verify that "in1" is non-null.
29641        if (in1 == null) {
29642            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29643        }
29644        // Verify that the array length is a multiple of the vector size.
29645        if (in1.length % 2 != 0) {
29646            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29647        }
29648        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29649        ain1.setAutoPadding(true);
29650        ain1.copyFrom(in1);
29651        // Verify that "in2" is non-null.
29652        if (in2 == null) {
29653            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29654        }
29655        // Verify that the array length is a multiple of the vector size.
29656        if (in2.length % 2 != 0) {
29657            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
29658        }
29659        // Verify that input array lengths are the same.
29660        if (in1.length / 2 != in2.length / 2) {
29661            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29662        }
29663        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
29664        ain2.setAutoPadding(true);
29665        ain2.copyFrom(in2);
29666
29667        result_int result = reduce_my_short2_uchar2_1(ain1, ain2, null);
29668        result.mTempIns = new Allocation[]{ain1, ain2};
29669        return result;
29670    }
29671
29672    // ain1 = "short2 a"
29673    // ain2 = "uchar2 b"
29674    public result_int reduce_my_short2_uchar2_1(Allocation ain1, Allocation ain2) {
29675        return reduce_my_short2_uchar2_1(ain1, ain2, null);
29676    }
29677
29678    // ain1 = "short2 a"
29679    // ain2 = "uchar2 b"
29680    public result_int reduce_my_short2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29681        Type t0, t1;
29682        // check ain1
29683        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29684            throw new RSRuntimeException("Type mismatch with I16_2!");
29685        }
29686        // check ain2
29687        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
29688            throw new RSRuntimeException("Type mismatch with U8_2!");
29689        }
29690        // Verify dimensions
29691        t0 = ain1.getType();
29692        t1 = ain2.getType();
29693        if ((t0.getCount() != t1.getCount()) ||
29694            (t0.getX() != t1.getX()) ||
29695            (t0.getY() != t1.getY()) ||
29696            (t0.getZ() != t1.getZ()) ||
29697            (t0.hasFaces()   != t1.hasFaces()) ||
29698            (t0.hasMipmaps() != t1.hasMipmaps())) {
29699            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29700        }
29701
29702        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29703        aout.setAutoPadding(true);
29704        reduce(mExportReduceIdx_my_short2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
29705        return new result_int(aout);
29706    }
29707
29708    private final static int mExportReduceIdx_my_short2_uchar4_0 = 448;
29709    // in1 = "a", flattened 2-vectors
29710    // in2 = "b", flattened 4-vectors
29711    public result_int reduce_my_short2_uchar4_0(short[] in1, byte[] in2) {
29712        // Verify that "in1" is non-null.
29713        if (in1 == null) {
29714            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29715        }
29716        // Verify that the array length is a multiple of the vector size.
29717        if (in1.length % 2 != 0) {
29718            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29719        }
29720        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29721        ain1.setAutoPadding(true);
29722        ain1.copyFrom(in1);
29723        // Verify that "in2" is non-null.
29724        if (in2 == null) {
29725            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29726        }
29727        // Verify that the array length is a multiple of the vector size.
29728        if (in2.length % 4 != 0) {
29729            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
29730        }
29731        // Verify that input array lengths are the same.
29732        if (in1.length / 2 != in2.length / 4) {
29733            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29734        }
29735        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
29736        ain2.setAutoPadding(true);
29737        ain2.copyFrom(in2);
29738
29739        result_int result = reduce_my_short2_uchar4_0(ain1, ain2, null);
29740        result.mTempIns = new Allocation[]{ain1, ain2};
29741        return result;
29742    }
29743
29744    // ain1 = "short2 a"
29745    // ain2 = "uchar4 b"
29746    public result_int reduce_my_short2_uchar4_0(Allocation ain1, Allocation ain2) {
29747        return reduce_my_short2_uchar4_0(ain1, ain2, null);
29748    }
29749
29750    // ain1 = "short2 a"
29751    // ain2 = "uchar4 b"
29752    public result_int reduce_my_short2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29753        Type t0, t1;
29754        // check ain1
29755        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29756            throw new RSRuntimeException("Type mismatch with I16_2!");
29757        }
29758        // check ain2
29759        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
29760            throw new RSRuntimeException("Type mismatch with U8_4!");
29761        }
29762        // Verify dimensions
29763        t0 = ain1.getType();
29764        t1 = ain2.getType();
29765        if ((t0.getCount() != t1.getCount()) ||
29766            (t0.getX() != t1.getX()) ||
29767            (t0.getY() != t1.getY()) ||
29768            (t0.getZ() != t1.getZ()) ||
29769            (t0.hasFaces()   != t1.hasFaces()) ||
29770            (t0.hasMipmaps() != t1.hasMipmaps())) {
29771            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29772        }
29773
29774        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29775        aout.setAutoPadding(true);
29776        reduce(mExportReduceIdx_my_short2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
29777        return new result_int(aout);
29778    }
29779
29780    private final static int mExportReduceIdx_my_short2_uchar4_1 = 449;
29781    // in1 = "a", flattened 2-vectors
29782    // in2 = "b", flattened 4-vectors
29783    public result_int reduce_my_short2_uchar4_1(short[] in1, byte[] in2) {
29784        // Verify that "in1" is non-null.
29785        if (in1 == null) {
29786            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29787        }
29788        // Verify that the array length is a multiple of the vector size.
29789        if (in1.length % 2 != 0) {
29790            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29791        }
29792        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29793        ain1.setAutoPadding(true);
29794        ain1.copyFrom(in1);
29795        // Verify that "in2" is non-null.
29796        if (in2 == null) {
29797            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29798        }
29799        // Verify that the array length is a multiple of the vector size.
29800        if (in2.length % 4 != 0) {
29801            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
29802        }
29803        // Verify that input array lengths are the same.
29804        if (in1.length / 2 != in2.length / 4) {
29805            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29806        }
29807        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
29808        ain2.setAutoPadding(true);
29809        ain2.copyFrom(in2);
29810
29811        result_int result = reduce_my_short2_uchar4_1(ain1, ain2, null);
29812        result.mTempIns = new Allocation[]{ain1, ain2};
29813        return result;
29814    }
29815
29816    // ain1 = "short2 a"
29817    // ain2 = "uchar4 b"
29818    public result_int reduce_my_short2_uchar4_1(Allocation ain1, Allocation ain2) {
29819        return reduce_my_short2_uchar4_1(ain1, ain2, null);
29820    }
29821
29822    // ain1 = "short2 a"
29823    // ain2 = "uchar4 b"
29824    public result_int reduce_my_short2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29825        Type t0, t1;
29826        // check ain1
29827        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29828            throw new RSRuntimeException("Type mismatch with I16_2!");
29829        }
29830        // check ain2
29831        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
29832            throw new RSRuntimeException("Type mismatch with U8_4!");
29833        }
29834        // Verify dimensions
29835        t0 = ain1.getType();
29836        t1 = ain2.getType();
29837        if ((t0.getCount() != t1.getCount()) ||
29838            (t0.getX() != t1.getX()) ||
29839            (t0.getY() != t1.getY()) ||
29840            (t0.getZ() != t1.getZ()) ||
29841            (t0.hasFaces()   != t1.hasFaces()) ||
29842            (t0.hasMipmaps() != t1.hasMipmaps())) {
29843            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29844        }
29845
29846        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29847        aout.setAutoPadding(true);
29848        reduce(mExportReduceIdx_my_short2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
29849        return new result_int(aout);
29850    }
29851
29852    private final static int mExportReduceIdx_my_short2_ushort_0 = 450;
29853    // in1 = "a", flattened 2-vectors
29854    // in2 = "b"
29855    public result_int reduce_my_short2_ushort_0(short[] in1, short[] in2) {
29856        // Verify that "in1" is non-null.
29857        if (in1 == null) {
29858            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29859        }
29860        // Verify that the array length is a multiple of the vector size.
29861        if (in1.length % 2 != 0) {
29862            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29863        }
29864        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29865        ain1.setAutoPadding(true);
29866        ain1.copyFrom(in1);
29867        // Verify that "in2" is non-null.
29868        if (in2 == null) {
29869            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29870        }
29871        // Verify that input array lengths are the same.
29872        if (in1.length / 2 != in2.length) {
29873            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29874        }
29875        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
29876        ain2.setAutoPadding(true);
29877        ain2.copyFrom(in2);
29878
29879        result_int result = reduce_my_short2_ushort_0(ain1, ain2, null);
29880        result.mTempIns = new Allocation[]{ain1, ain2};
29881        return result;
29882    }
29883
29884    // ain1 = "short2 a"
29885    // ain2 = "ushort b"
29886    public result_int reduce_my_short2_ushort_0(Allocation ain1, Allocation ain2) {
29887        return reduce_my_short2_ushort_0(ain1, ain2, null);
29888    }
29889
29890    // ain1 = "short2 a"
29891    // ain2 = "ushort b"
29892    public result_int reduce_my_short2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29893        Type t0, t1;
29894        // check ain1
29895        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29896            throw new RSRuntimeException("Type mismatch with I16_2!");
29897        }
29898        // check ain2
29899        if (!ain2.getType().getElement().isCompatible(__U16)) {
29900            throw new RSRuntimeException("Type mismatch with U16!");
29901        }
29902        // Verify dimensions
29903        t0 = ain1.getType();
29904        t1 = ain2.getType();
29905        if ((t0.getCount() != t1.getCount()) ||
29906            (t0.getX() != t1.getX()) ||
29907            (t0.getY() != t1.getY()) ||
29908            (t0.getZ() != t1.getZ()) ||
29909            (t0.hasFaces()   != t1.hasFaces()) ||
29910            (t0.hasMipmaps() != t1.hasMipmaps())) {
29911            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29912        }
29913
29914        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29915        aout.setAutoPadding(true);
29916        reduce(mExportReduceIdx_my_short2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
29917        return new result_int(aout);
29918    }
29919
29920    private final static int mExportReduceIdx_my_short2_ushort_1 = 451;
29921    // in1 = "a", flattened 2-vectors
29922    // in2 = "b"
29923    public result_int reduce_my_short2_ushort_1(short[] in1, short[] in2) {
29924        // Verify that "in1" is non-null.
29925        if (in1 == null) {
29926            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29927        }
29928        // Verify that the array length is a multiple of the vector size.
29929        if (in1.length % 2 != 0) {
29930            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29931        }
29932        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
29933        ain1.setAutoPadding(true);
29934        ain1.copyFrom(in1);
29935        // Verify that "in2" is non-null.
29936        if (in2 == null) {
29937            throw new RSIllegalArgumentException("Array \"in2\" is null!");
29938        }
29939        // Verify that input array lengths are the same.
29940        if (in1.length / 2 != in2.length) {
29941            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
29942        }
29943        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
29944        ain2.setAutoPadding(true);
29945        ain2.copyFrom(in2);
29946
29947        result_int result = reduce_my_short2_ushort_1(ain1, ain2, null);
29948        result.mTempIns = new Allocation[]{ain1, ain2};
29949        return result;
29950    }
29951
29952    // ain1 = "short2 a"
29953    // ain2 = "ushort b"
29954    public result_int reduce_my_short2_ushort_1(Allocation ain1, Allocation ain2) {
29955        return reduce_my_short2_ushort_1(ain1, ain2, null);
29956    }
29957
29958    // ain1 = "short2 a"
29959    // ain2 = "ushort b"
29960    public result_int reduce_my_short2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
29961        Type t0, t1;
29962        // check ain1
29963        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
29964            throw new RSRuntimeException("Type mismatch with I16_2!");
29965        }
29966        // check ain2
29967        if (!ain2.getType().getElement().isCompatible(__U16)) {
29968            throw new RSRuntimeException("Type mismatch with U16!");
29969        }
29970        // Verify dimensions
29971        t0 = ain1.getType();
29972        t1 = ain2.getType();
29973        if ((t0.getCount() != t1.getCount()) ||
29974            (t0.getX() != t1.getX()) ||
29975            (t0.getY() != t1.getY()) ||
29976            (t0.getZ() != t1.getZ()) ||
29977            (t0.hasFaces()   != t1.hasFaces()) ||
29978            (t0.hasMipmaps() != t1.hasMipmaps())) {
29979            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
29980        }
29981
29982        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
29983        aout.setAutoPadding(true);
29984        reduce(mExportReduceIdx_my_short2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
29985        return new result_int(aout);
29986    }
29987
29988    private final static int mExportReduceIdx_my_short2_ushort2_0 = 452;
29989    // in1 = "a", flattened 2-vectors
29990    // in2 = "b", flattened 2-vectors
29991    public result_int reduce_my_short2_ushort2_0(short[] in1, short[] in2) {
29992        // Verify that "in1" is non-null.
29993        if (in1 == null) {
29994            throw new RSIllegalArgumentException("Array \"in1\" is null!");
29995        }
29996        // Verify that the array length is a multiple of the vector size.
29997        if (in1.length % 2 != 0) {
29998            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
29999        }
30000        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
30001        ain1.setAutoPadding(true);
30002        ain1.copyFrom(in1);
30003        // Verify that "in2" is non-null.
30004        if (in2 == null) {
30005            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30006        }
30007        // Verify that the array length is a multiple of the vector size.
30008        if (in2.length % 2 != 0) {
30009            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
30010        }
30011        // Verify that input array lengths are the same.
30012        if (in1.length / 2 != in2.length / 2) {
30013            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30014        }
30015        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
30016        ain2.setAutoPadding(true);
30017        ain2.copyFrom(in2);
30018
30019        result_int result = reduce_my_short2_ushort2_0(ain1, ain2, null);
30020        result.mTempIns = new Allocation[]{ain1, ain2};
30021        return result;
30022    }
30023
30024    // ain1 = "short2 a"
30025    // ain2 = "ushort2 b"
30026    public result_int reduce_my_short2_ushort2_0(Allocation ain1, Allocation ain2) {
30027        return reduce_my_short2_ushort2_0(ain1, ain2, null);
30028    }
30029
30030    // ain1 = "short2 a"
30031    // ain2 = "ushort2 b"
30032    public result_int reduce_my_short2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30033        Type t0, t1;
30034        // check ain1
30035        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30036            throw new RSRuntimeException("Type mismatch with I16_2!");
30037        }
30038        // check ain2
30039        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
30040            throw new RSRuntimeException("Type mismatch with U16_2!");
30041        }
30042        // Verify dimensions
30043        t0 = ain1.getType();
30044        t1 = ain2.getType();
30045        if ((t0.getCount() != t1.getCount()) ||
30046            (t0.getX() != t1.getX()) ||
30047            (t0.getY() != t1.getY()) ||
30048            (t0.getZ() != t1.getZ()) ||
30049            (t0.hasFaces()   != t1.hasFaces()) ||
30050            (t0.hasMipmaps() != t1.hasMipmaps())) {
30051            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30052        }
30053
30054        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30055        aout.setAutoPadding(true);
30056        reduce(mExportReduceIdx_my_short2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
30057        return new result_int(aout);
30058    }
30059
30060    private final static int mExportReduceIdx_my_short2_ushort2_1 = 453;
30061    // in1 = "a", flattened 2-vectors
30062    // in2 = "b", flattened 2-vectors
30063    public result_int reduce_my_short2_ushort2_1(short[] in1, short[] in2) {
30064        // Verify that "in1" is non-null.
30065        if (in1 == null) {
30066            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30067        }
30068        // Verify that the array length is a multiple of the vector size.
30069        if (in1.length % 2 != 0) {
30070            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
30071        }
30072        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
30073        ain1.setAutoPadding(true);
30074        ain1.copyFrom(in1);
30075        // Verify that "in2" is non-null.
30076        if (in2 == null) {
30077            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30078        }
30079        // Verify that the array length is a multiple of the vector size.
30080        if (in2.length % 2 != 0) {
30081            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
30082        }
30083        // Verify that input array lengths are the same.
30084        if (in1.length / 2 != in2.length / 2) {
30085            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30086        }
30087        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
30088        ain2.setAutoPadding(true);
30089        ain2.copyFrom(in2);
30090
30091        result_int result = reduce_my_short2_ushort2_1(ain1, ain2, null);
30092        result.mTempIns = new Allocation[]{ain1, ain2};
30093        return result;
30094    }
30095
30096    // ain1 = "short2 a"
30097    // ain2 = "ushort2 b"
30098    public result_int reduce_my_short2_ushort2_1(Allocation ain1, Allocation ain2) {
30099        return reduce_my_short2_ushort2_1(ain1, ain2, null);
30100    }
30101
30102    // ain1 = "short2 a"
30103    // ain2 = "ushort2 b"
30104    public result_int reduce_my_short2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30105        Type t0, t1;
30106        // check ain1
30107        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30108            throw new RSRuntimeException("Type mismatch with I16_2!");
30109        }
30110        // check ain2
30111        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
30112            throw new RSRuntimeException("Type mismatch with U16_2!");
30113        }
30114        // Verify dimensions
30115        t0 = ain1.getType();
30116        t1 = ain2.getType();
30117        if ((t0.getCount() != t1.getCount()) ||
30118            (t0.getX() != t1.getX()) ||
30119            (t0.getY() != t1.getY()) ||
30120            (t0.getZ() != t1.getZ()) ||
30121            (t0.hasFaces()   != t1.hasFaces()) ||
30122            (t0.hasMipmaps() != t1.hasMipmaps())) {
30123            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30124        }
30125
30126        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30127        aout.setAutoPadding(true);
30128        reduce(mExportReduceIdx_my_short2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
30129        return new result_int(aout);
30130    }
30131
30132    private final static int mExportReduceIdx_my_short2_ushort4_0 = 454;
30133    // in1 = "a", flattened 2-vectors
30134    // in2 = "b", flattened 4-vectors
30135    public result_int reduce_my_short2_ushort4_0(short[] in1, short[] in2) {
30136        // Verify that "in1" is non-null.
30137        if (in1 == null) {
30138            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30139        }
30140        // Verify that the array length is a multiple of the vector size.
30141        if (in1.length % 2 != 0) {
30142            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
30143        }
30144        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
30145        ain1.setAutoPadding(true);
30146        ain1.copyFrom(in1);
30147        // Verify that "in2" is non-null.
30148        if (in2 == null) {
30149            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30150        }
30151        // Verify that the array length is a multiple of the vector size.
30152        if (in2.length % 4 != 0) {
30153            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
30154        }
30155        // Verify that input array lengths are the same.
30156        if (in1.length / 2 != in2.length / 4) {
30157            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30158        }
30159        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
30160        ain2.setAutoPadding(true);
30161        ain2.copyFrom(in2);
30162
30163        result_int result = reduce_my_short2_ushort4_0(ain1, ain2, null);
30164        result.mTempIns = new Allocation[]{ain1, ain2};
30165        return result;
30166    }
30167
30168    // ain1 = "short2 a"
30169    // ain2 = "ushort4 b"
30170    public result_int reduce_my_short2_ushort4_0(Allocation ain1, Allocation ain2) {
30171        return reduce_my_short2_ushort4_0(ain1, ain2, null);
30172    }
30173
30174    // ain1 = "short2 a"
30175    // ain2 = "ushort4 b"
30176    public result_int reduce_my_short2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30177        Type t0, t1;
30178        // check ain1
30179        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30180            throw new RSRuntimeException("Type mismatch with I16_2!");
30181        }
30182        // check ain2
30183        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
30184            throw new RSRuntimeException("Type mismatch with U16_4!");
30185        }
30186        // Verify dimensions
30187        t0 = ain1.getType();
30188        t1 = ain2.getType();
30189        if ((t0.getCount() != t1.getCount()) ||
30190            (t0.getX() != t1.getX()) ||
30191            (t0.getY() != t1.getY()) ||
30192            (t0.getZ() != t1.getZ()) ||
30193            (t0.hasFaces()   != t1.hasFaces()) ||
30194            (t0.hasMipmaps() != t1.hasMipmaps())) {
30195            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30196        }
30197
30198        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30199        aout.setAutoPadding(true);
30200        reduce(mExportReduceIdx_my_short2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
30201        return new result_int(aout);
30202    }
30203
30204    private final static int mExportReduceIdx_my_short2_ushort4_1 = 455;
30205    // in1 = "a", flattened 2-vectors
30206    // in2 = "b", flattened 4-vectors
30207    public result_int reduce_my_short2_ushort4_1(short[] in1, short[] in2) {
30208        // Verify that "in1" is non-null.
30209        if (in1 == null) {
30210            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30211        }
30212        // Verify that the array length is a multiple of the vector size.
30213        if (in1.length % 2 != 0) {
30214            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
30215        }
30216        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
30217        ain1.setAutoPadding(true);
30218        ain1.copyFrom(in1);
30219        // Verify that "in2" is non-null.
30220        if (in2 == null) {
30221            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30222        }
30223        // Verify that the array length is a multiple of the vector size.
30224        if (in2.length % 4 != 0) {
30225            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
30226        }
30227        // Verify that input array lengths are the same.
30228        if (in1.length / 2 != in2.length / 4) {
30229            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30230        }
30231        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
30232        ain2.setAutoPadding(true);
30233        ain2.copyFrom(in2);
30234
30235        result_int result = reduce_my_short2_ushort4_1(ain1, ain2, null);
30236        result.mTempIns = new Allocation[]{ain1, ain2};
30237        return result;
30238    }
30239
30240    // ain1 = "short2 a"
30241    // ain2 = "ushort4 b"
30242    public result_int reduce_my_short2_ushort4_1(Allocation ain1, Allocation ain2) {
30243        return reduce_my_short2_ushort4_1(ain1, ain2, null);
30244    }
30245
30246    // ain1 = "short2 a"
30247    // ain2 = "ushort4 b"
30248    public result_int reduce_my_short2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30249        Type t0, t1;
30250        // check ain1
30251        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30252            throw new RSRuntimeException("Type mismatch with I16_2!");
30253        }
30254        // check ain2
30255        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
30256            throw new RSRuntimeException("Type mismatch with U16_4!");
30257        }
30258        // Verify dimensions
30259        t0 = ain1.getType();
30260        t1 = ain2.getType();
30261        if ((t0.getCount() != t1.getCount()) ||
30262            (t0.getX() != t1.getX()) ||
30263            (t0.getY() != t1.getY()) ||
30264            (t0.getZ() != t1.getZ()) ||
30265            (t0.hasFaces()   != t1.hasFaces()) ||
30266            (t0.hasMipmaps() != t1.hasMipmaps())) {
30267            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30268        }
30269
30270        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30271        aout.setAutoPadding(true);
30272        reduce(mExportReduceIdx_my_short2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
30273        return new result_int(aout);
30274    }
30275
30276    private final static int mExportReduceIdx_my_short2_bool_0 = 456;
30277    // in1 = "a", flattened 2-vectors
30278    // in2 = "b"
30279    public result_int reduce_my_short2_bool_0(short[] in1, byte[] in2) {
30280        // Verify that "in1" is non-null.
30281        if (in1 == null) {
30282            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30283        }
30284        // Verify that the array length is a multiple of the vector size.
30285        if (in1.length % 2 != 0) {
30286            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
30287        }
30288        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
30289        ain1.setAutoPadding(true);
30290        ain1.copyFrom(in1);
30291        // Verify that "in2" is non-null.
30292        if (in2 == null) {
30293            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30294        }
30295        // Verify that input array lengths are the same.
30296        if (in1.length / 2 != in2.length) {
30297            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30298        }
30299        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
30300        ain2.setAutoPadding(true);
30301        ain2.copyFrom(in2);
30302
30303        result_int result = reduce_my_short2_bool_0(ain1, ain2, null);
30304        result.mTempIns = new Allocation[]{ain1, ain2};
30305        return result;
30306    }
30307
30308    // ain1 = "short2 a"
30309    // ain2 = "bool b"
30310    public result_int reduce_my_short2_bool_0(Allocation ain1, Allocation ain2) {
30311        return reduce_my_short2_bool_0(ain1, ain2, null);
30312    }
30313
30314    // ain1 = "short2 a"
30315    // ain2 = "bool b"
30316    public result_int reduce_my_short2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30317        Type t0, t1;
30318        // check ain1
30319        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30320            throw new RSRuntimeException("Type mismatch with I16_2!");
30321        }
30322        // check ain2
30323        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
30324            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
30325        }
30326        // Verify dimensions
30327        t0 = ain1.getType();
30328        t1 = ain2.getType();
30329        if ((t0.getCount() != t1.getCount()) ||
30330            (t0.getX() != t1.getX()) ||
30331            (t0.getY() != t1.getY()) ||
30332            (t0.getZ() != t1.getZ()) ||
30333            (t0.hasFaces()   != t1.hasFaces()) ||
30334            (t0.hasMipmaps() != t1.hasMipmaps())) {
30335            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30336        }
30337
30338        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30339        aout.setAutoPadding(true);
30340        reduce(mExportReduceIdx_my_short2_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
30341        return new result_int(aout);
30342    }
30343
30344    private final static int mExportReduceIdx_my_short2_bool_1 = 457;
30345    // in1 = "a", flattened 2-vectors
30346    // in2 = "b"
30347    public result_int reduce_my_short2_bool_1(short[] in1, byte[] in2) {
30348        // Verify that "in1" is non-null.
30349        if (in1 == null) {
30350            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30351        }
30352        // Verify that the array length is a multiple of the vector size.
30353        if (in1.length % 2 != 0) {
30354            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
30355        }
30356        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2);
30357        ain1.setAutoPadding(true);
30358        ain1.copyFrom(in1);
30359        // Verify that "in2" is non-null.
30360        if (in2 == null) {
30361            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30362        }
30363        // Verify that input array lengths are the same.
30364        if (in1.length / 2 != in2.length) {
30365            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30366        }
30367        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
30368        ain2.setAutoPadding(true);
30369        ain2.copyFrom(in2);
30370
30371        result_int result = reduce_my_short2_bool_1(ain1, ain2, null);
30372        result.mTempIns = new Allocation[]{ain1, ain2};
30373        return result;
30374    }
30375
30376    // ain1 = "short2 a"
30377    // ain2 = "bool b"
30378    public result_int reduce_my_short2_bool_1(Allocation ain1, Allocation ain2) {
30379        return reduce_my_short2_bool_1(ain1, ain2, null);
30380    }
30381
30382    // ain1 = "short2 a"
30383    // ain2 = "bool b"
30384    public result_int reduce_my_short2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30385        Type t0, t1;
30386        // check ain1
30387        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30388            throw new RSRuntimeException("Type mismatch with I16_2!");
30389        }
30390        // check ain2
30391        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
30392            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
30393        }
30394        // Verify dimensions
30395        t0 = ain1.getType();
30396        t1 = ain2.getType();
30397        if ((t0.getCount() != t1.getCount()) ||
30398            (t0.getX() != t1.getX()) ||
30399            (t0.getY() != t1.getY()) ||
30400            (t0.getZ() != t1.getZ()) ||
30401            (t0.hasFaces()   != t1.hasFaces()) ||
30402            (t0.hasMipmaps() != t1.hasMipmaps())) {
30403            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30404        }
30405
30406        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30407        aout.setAutoPadding(true);
30408        reduce(mExportReduceIdx_my_short2_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
30409        return new result_int(aout);
30410    }
30411
30412    private final static int mExportReduceIdx_my_short2_rs_matrix2x2_0 = 458;
30413    // ain1 = "short2 a"
30414    // ain2 = "rs_matrix2x2 b"
30415    public result_int reduce_my_short2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
30416        return reduce_my_short2_rs_matrix2x2_0(ain1, ain2, null);
30417    }
30418
30419    // ain1 = "short2 a"
30420    // ain2 = "rs_matrix2x2 b"
30421    public result_int reduce_my_short2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30422        Type t0, t1;
30423        // check ain1
30424        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30425            throw new RSRuntimeException("Type mismatch with I16_2!");
30426        }
30427        // check ain2
30428        // Verify dimensions
30429        t0 = ain1.getType();
30430        t1 = ain2.getType();
30431        if ((t0.getCount() != t1.getCount()) ||
30432            (t0.getX() != t1.getX()) ||
30433            (t0.getY() != t1.getY()) ||
30434            (t0.getZ() != t1.getZ()) ||
30435            (t0.hasFaces()   != t1.hasFaces()) ||
30436            (t0.hasMipmaps() != t1.hasMipmaps())) {
30437            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30438        }
30439
30440        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30441        aout.setAutoPadding(true);
30442        reduce(mExportReduceIdx_my_short2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
30443        return new result_int(aout);
30444    }
30445
30446    private final static int mExportReduceIdx_my_short2_rs_matrix2x2_1 = 459;
30447    // ain1 = "short2 a"
30448    // ain2 = "rs_matrix2x2 b"
30449    public result_int reduce_my_short2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
30450        return reduce_my_short2_rs_matrix2x2_1(ain1, ain2, null);
30451    }
30452
30453    // ain1 = "short2 a"
30454    // ain2 = "rs_matrix2x2 b"
30455    public result_int reduce_my_short2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30456        Type t0, t1;
30457        // check ain1
30458        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30459            throw new RSRuntimeException("Type mismatch with I16_2!");
30460        }
30461        // check ain2
30462        // Verify dimensions
30463        t0 = ain1.getType();
30464        t1 = ain2.getType();
30465        if ((t0.getCount() != t1.getCount()) ||
30466            (t0.getX() != t1.getX()) ||
30467            (t0.getY() != t1.getY()) ||
30468            (t0.getZ() != t1.getZ()) ||
30469            (t0.hasFaces()   != t1.hasFaces()) ||
30470            (t0.hasMipmaps() != t1.hasMipmaps())) {
30471            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30472        }
30473
30474        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30475        aout.setAutoPadding(true);
30476        reduce(mExportReduceIdx_my_short2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
30477        return new result_int(aout);
30478    }
30479
30480    private final static int mExportReduceIdx_my_short2_MyStruct_0 = 460;
30481    // ain1 = "short2 a"
30482    // ain2 = "/* struct <> */ b"
30483    public result_int reduce_my_short2_MyStruct_0(Allocation ain1, Allocation ain2) {
30484        return reduce_my_short2_MyStruct_0(ain1, ain2, null);
30485    }
30486
30487    // ain1 = "short2 a"
30488    // ain2 = "/* struct <> */ b"
30489    public result_int reduce_my_short2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30490        Type t0, t1;
30491        // check ain1
30492        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30493            throw new RSRuntimeException("Type mismatch with I16_2!");
30494        }
30495        // check ain2
30496        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
30497            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
30498        }
30499        // Verify dimensions
30500        t0 = ain1.getType();
30501        t1 = ain2.getType();
30502        if ((t0.getCount() != t1.getCount()) ||
30503            (t0.getX() != t1.getX()) ||
30504            (t0.getY() != t1.getY()) ||
30505            (t0.getZ() != t1.getZ()) ||
30506            (t0.hasFaces()   != t1.hasFaces()) ||
30507            (t0.hasMipmaps() != t1.hasMipmaps())) {
30508            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30509        }
30510
30511        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30512        aout.setAutoPadding(true);
30513        reduce(mExportReduceIdx_my_short2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
30514        return new result_int(aout);
30515    }
30516
30517    private final static int mExportReduceIdx_my_short2_MyStruct_1 = 461;
30518    // ain1 = "short2 a"
30519    // ain2 = "/* struct <> */ b"
30520    public result_int reduce_my_short2_MyStruct_1(Allocation ain1, Allocation ain2) {
30521        return reduce_my_short2_MyStruct_1(ain1, ain2, null);
30522    }
30523
30524    // ain1 = "short2 a"
30525    // ain2 = "/* struct <> */ b"
30526    public result_int reduce_my_short2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30527        Type t0, t1;
30528        // check ain1
30529        if (!ain1.getType().getElement().isCompatible(__I16_2)) {
30530            throw new RSRuntimeException("Type mismatch with I16_2!");
30531        }
30532        // check ain2
30533        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
30534            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
30535        }
30536        // Verify dimensions
30537        t0 = ain1.getType();
30538        t1 = ain2.getType();
30539        if ((t0.getCount() != t1.getCount()) ||
30540            (t0.getX() != t1.getX()) ||
30541            (t0.getY() != t1.getY()) ||
30542            (t0.getZ() != t1.getZ()) ||
30543            (t0.hasFaces()   != t1.hasFaces()) ||
30544            (t0.hasMipmaps() != t1.hasMipmaps())) {
30545            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30546        }
30547
30548        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30549        aout.setAutoPadding(true);
30550        reduce(mExportReduceIdx_my_short2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
30551        return new result_int(aout);
30552    }
30553
30554    private final static int mExportReduceIdx_my_short4_half_0 = 462;
30555    // in1 = "a", flattened 4-vectors
30556    // in2 = "b"
30557    public result_int reduce_my_short4_half_0(short[] in1, short[] in2) {
30558        // Verify that "in1" is non-null.
30559        if (in1 == null) {
30560            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30561        }
30562        // Verify that the array length is a multiple of the vector size.
30563        if (in1.length % 4 != 0) {
30564            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
30565        }
30566        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
30567        ain1.setAutoPadding(true);
30568        ain1.copyFrom(in1);
30569        // Verify that "in2" is non-null.
30570        if (in2 == null) {
30571            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30572        }
30573        // Verify that input array lengths are the same.
30574        if (in1.length / 4 != in2.length) {
30575            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30576        }
30577        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
30578        ain2.setAutoPadding(true);
30579        ain2.copyFrom(in2);
30580
30581        result_int result = reduce_my_short4_half_0(ain1, ain2, null);
30582        result.mTempIns = new Allocation[]{ain1, ain2};
30583        return result;
30584    }
30585
30586    // ain1 = "short4 a"
30587    // ain2 = "half b"
30588    public result_int reduce_my_short4_half_0(Allocation ain1, Allocation ain2) {
30589        return reduce_my_short4_half_0(ain1, ain2, null);
30590    }
30591
30592    // ain1 = "short4 a"
30593    // ain2 = "half b"
30594    public result_int reduce_my_short4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30595        Type t0, t1;
30596        // check ain1
30597        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
30598            throw new RSRuntimeException("Type mismatch with I16_4!");
30599        }
30600        // check ain2
30601        if (!ain2.getType().getElement().isCompatible(__F16)) {
30602            throw new RSRuntimeException("Type mismatch with F16!");
30603        }
30604        // Verify dimensions
30605        t0 = ain1.getType();
30606        t1 = ain2.getType();
30607        if ((t0.getCount() != t1.getCount()) ||
30608            (t0.getX() != t1.getX()) ||
30609            (t0.getY() != t1.getY()) ||
30610            (t0.getZ() != t1.getZ()) ||
30611            (t0.hasFaces()   != t1.hasFaces()) ||
30612            (t0.hasMipmaps() != t1.hasMipmaps())) {
30613            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30614        }
30615
30616        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30617        aout.setAutoPadding(true);
30618        reduce(mExportReduceIdx_my_short4_half_0, new Allocation[]{ain1, ain2}, aout, sc);
30619        return new result_int(aout);
30620    }
30621
30622    private final static int mExportReduceIdx_my_short4_half_1 = 463;
30623    // in1 = "a", flattened 4-vectors
30624    // in2 = "b"
30625    public result_int reduce_my_short4_half_1(short[] in1, short[] in2) {
30626        // Verify that "in1" is non-null.
30627        if (in1 == null) {
30628            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30629        }
30630        // Verify that the array length is a multiple of the vector size.
30631        if (in1.length % 4 != 0) {
30632            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
30633        }
30634        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
30635        ain1.setAutoPadding(true);
30636        ain1.copyFrom(in1);
30637        // Verify that "in2" is non-null.
30638        if (in2 == null) {
30639            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30640        }
30641        // Verify that input array lengths are the same.
30642        if (in1.length / 4 != in2.length) {
30643            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30644        }
30645        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
30646        ain2.setAutoPadding(true);
30647        ain2.copyFrom(in2);
30648
30649        result_int result = reduce_my_short4_half_1(ain1, ain2, null);
30650        result.mTempIns = new Allocation[]{ain1, ain2};
30651        return result;
30652    }
30653
30654    // ain1 = "short4 a"
30655    // ain2 = "half b"
30656    public result_int reduce_my_short4_half_1(Allocation ain1, Allocation ain2) {
30657        return reduce_my_short4_half_1(ain1, ain2, null);
30658    }
30659
30660    // ain1 = "short4 a"
30661    // ain2 = "half b"
30662    public result_int reduce_my_short4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30663        Type t0, t1;
30664        // check ain1
30665        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
30666            throw new RSRuntimeException("Type mismatch with I16_4!");
30667        }
30668        // check ain2
30669        if (!ain2.getType().getElement().isCompatible(__F16)) {
30670            throw new RSRuntimeException("Type mismatch with F16!");
30671        }
30672        // Verify dimensions
30673        t0 = ain1.getType();
30674        t1 = ain2.getType();
30675        if ((t0.getCount() != t1.getCount()) ||
30676            (t0.getX() != t1.getX()) ||
30677            (t0.getY() != t1.getY()) ||
30678            (t0.getZ() != t1.getZ()) ||
30679            (t0.hasFaces()   != t1.hasFaces()) ||
30680            (t0.hasMipmaps() != t1.hasMipmaps())) {
30681            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30682        }
30683
30684        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30685        aout.setAutoPadding(true);
30686        reduce(mExportReduceIdx_my_short4_half_1, new Allocation[]{ain1, ain2}, aout, sc);
30687        return new result_int(aout);
30688    }
30689
30690    private final static int mExportReduceIdx_my_short4_half2_0 = 464;
30691    // in1 = "a", flattened 4-vectors
30692    // in2 = "b", flattened 2-vectors
30693    public result_int reduce_my_short4_half2_0(short[] in1, short[] in2) {
30694        // Verify that "in1" is non-null.
30695        if (in1 == null) {
30696            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30697        }
30698        // Verify that the array length is a multiple of the vector size.
30699        if (in1.length % 4 != 0) {
30700            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
30701        }
30702        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
30703        ain1.setAutoPadding(true);
30704        ain1.copyFrom(in1);
30705        // Verify that "in2" is non-null.
30706        if (in2 == null) {
30707            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30708        }
30709        // Verify that the array length is a multiple of the vector size.
30710        if (in2.length % 2 != 0) {
30711            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
30712        }
30713        // Verify that input array lengths are the same.
30714        if (in1.length / 4 != in2.length / 2) {
30715            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30716        }
30717        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
30718        ain2.setAutoPadding(true);
30719        ain2.copyFrom(in2);
30720
30721        result_int result = reduce_my_short4_half2_0(ain1, ain2, null);
30722        result.mTempIns = new Allocation[]{ain1, ain2};
30723        return result;
30724    }
30725
30726    // ain1 = "short4 a"
30727    // ain2 = "half2 b"
30728    public result_int reduce_my_short4_half2_0(Allocation ain1, Allocation ain2) {
30729        return reduce_my_short4_half2_0(ain1, ain2, null);
30730    }
30731
30732    // ain1 = "short4 a"
30733    // ain2 = "half2 b"
30734    public result_int reduce_my_short4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30735        Type t0, t1;
30736        // check ain1
30737        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
30738            throw new RSRuntimeException("Type mismatch with I16_4!");
30739        }
30740        // check ain2
30741        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
30742            throw new RSRuntimeException("Type mismatch with F16_2!");
30743        }
30744        // Verify dimensions
30745        t0 = ain1.getType();
30746        t1 = ain2.getType();
30747        if ((t0.getCount() != t1.getCount()) ||
30748            (t0.getX() != t1.getX()) ||
30749            (t0.getY() != t1.getY()) ||
30750            (t0.getZ() != t1.getZ()) ||
30751            (t0.hasFaces()   != t1.hasFaces()) ||
30752            (t0.hasMipmaps() != t1.hasMipmaps())) {
30753            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30754        }
30755
30756        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30757        aout.setAutoPadding(true);
30758        reduce(mExportReduceIdx_my_short4_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
30759        return new result_int(aout);
30760    }
30761
30762    private final static int mExportReduceIdx_my_short4_half2_1 = 465;
30763    // in1 = "a", flattened 4-vectors
30764    // in2 = "b", flattened 2-vectors
30765    public result_int reduce_my_short4_half2_1(short[] in1, short[] in2) {
30766        // Verify that "in1" is non-null.
30767        if (in1 == null) {
30768            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30769        }
30770        // Verify that the array length is a multiple of the vector size.
30771        if (in1.length % 4 != 0) {
30772            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
30773        }
30774        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
30775        ain1.setAutoPadding(true);
30776        ain1.copyFrom(in1);
30777        // Verify that "in2" is non-null.
30778        if (in2 == null) {
30779            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30780        }
30781        // Verify that the array length is a multiple of the vector size.
30782        if (in2.length % 2 != 0) {
30783            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
30784        }
30785        // Verify that input array lengths are the same.
30786        if (in1.length / 4 != in2.length / 2) {
30787            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30788        }
30789        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
30790        ain2.setAutoPadding(true);
30791        ain2.copyFrom(in2);
30792
30793        result_int result = reduce_my_short4_half2_1(ain1, ain2, null);
30794        result.mTempIns = new Allocation[]{ain1, ain2};
30795        return result;
30796    }
30797
30798    // ain1 = "short4 a"
30799    // ain2 = "half2 b"
30800    public result_int reduce_my_short4_half2_1(Allocation ain1, Allocation ain2) {
30801        return reduce_my_short4_half2_1(ain1, ain2, null);
30802    }
30803
30804    // ain1 = "short4 a"
30805    // ain2 = "half2 b"
30806    public result_int reduce_my_short4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30807        Type t0, t1;
30808        // check ain1
30809        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
30810            throw new RSRuntimeException("Type mismatch with I16_4!");
30811        }
30812        // check ain2
30813        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
30814            throw new RSRuntimeException("Type mismatch with F16_2!");
30815        }
30816        // Verify dimensions
30817        t0 = ain1.getType();
30818        t1 = ain2.getType();
30819        if ((t0.getCount() != t1.getCount()) ||
30820            (t0.getX() != t1.getX()) ||
30821            (t0.getY() != t1.getY()) ||
30822            (t0.getZ() != t1.getZ()) ||
30823            (t0.hasFaces()   != t1.hasFaces()) ||
30824            (t0.hasMipmaps() != t1.hasMipmaps())) {
30825            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30826        }
30827
30828        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30829        aout.setAutoPadding(true);
30830        reduce(mExportReduceIdx_my_short4_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
30831        return new result_int(aout);
30832    }
30833
30834    private final static int mExportReduceIdx_my_short4_half4_0 = 466;
30835    // in1 = "a", flattened 4-vectors
30836    // in2 = "b", flattened 4-vectors
30837    public result_int reduce_my_short4_half4_0(short[] in1, short[] in2) {
30838        // Verify that "in1" is non-null.
30839        if (in1 == null) {
30840            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30841        }
30842        // Verify that the array length is a multiple of the vector size.
30843        if (in1.length % 4 != 0) {
30844            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
30845        }
30846        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
30847        ain1.setAutoPadding(true);
30848        ain1.copyFrom(in1);
30849        // Verify that "in2" is non-null.
30850        if (in2 == null) {
30851            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30852        }
30853        // Verify that the array length is a multiple of the vector size.
30854        if (in2.length % 4 != 0) {
30855            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
30856        }
30857        // Verify that input array lengths are the same.
30858        if (in1.length / 4 != in2.length / 4) {
30859            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30860        }
30861        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
30862        ain2.setAutoPadding(true);
30863        ain2.copyFrom(in2);
30864
30865        result_int result = reduce_my_short4_half4_0(ain1, ain2, null);
30866        result.mTempIns = new Allocation[]{ain1, ain2};
30867        return result;
30868    }
30869
30870    // ain1 = "short4 a"
30871    // ain2 = "half4 b"
30872    public result_int reduce_my_short4_half4_0(Allocation ain1, Allocation ain2) {
30873        return reduce_my_short4_half4_0(ain1, ain2, null);
30874    }
30875
30876    // ain1 = "short4 a"
30877    // ain2 = "half4 b"
30878    public result_int reduce_my_short4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30879        Type t0, t1;
30880        // check ain1
30881        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
30882            throw new RSRuntimeException("Type mismatch with I16_4!");
30883        }
30884        // check ain2
30885        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
30886            throw new RSRuntimeException("Type mismatch with F16_4!");
30887        }
30888        // Verify dimensions
30889        t0 = ain1.getType();
30890        t1 = ain2.getType();
30891        if ((t0.getCount() != t1.getCount()) ||
30892            (t0.getX() != t1.getX()) ||
30893            (t0.getY() != t1.getY()) ||
30894            (t0.getZ() != t1.getZ()) ||
30895            (t0.hasFaces()   != t1.hasFaces()) ||
30896            (t0.hasMipmaps() != t1.hasMipmaps())) {
30897            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30898        }
30899
30900        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30901        aout.setAutoPadding(true);
30902        reduce(mExportReduceIdx_my_short4_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
30903        return new result_int(aout);
30904    }
30905
30906    private final static int mExportReduceIdx_my_short4_half4_1 = 467;
30907    // in1 = "a", flattened 4-vectors
30908    // in2 = "b", flattened 4-vectors
30909    public result_int reduce_my_short4_half4_1(short[] in1, short[] in2) {
30910        // Verify that "in1" is non-null.
30911        if (in1 == null) {
30912            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30913        }
30914        // Verify that the array length is a multiple of the vector size.
30915        if (in1.length % 4 != 0) {
30916            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
30917        }
30918        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
30919        ain1.setAutoPadding(true);
30920        ain1.copyFrom(in1);
30921        // Verify that "in2" is non-null.
30922        if (in2 == null) {
30923            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30924        }
30925        // Verify that the array length is a multiple of the vector size.
30926        if (in2.length % 4 != 0) {
30927            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
30928        }
30929        // Verify that input array lengths are the same.
30930        if (in1.length / 4 != in2.length / 4) {
30931            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
30932        }
30933        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
30934        ain2.setAutoPadding(true);
30935        ain2.copyFrom(in2);
30936
30937        result_int result = reduce_my_short4_half4_1(ain1, ain2, null);
30938        result.mTempIns = new Allocation[]{ain1, ain2};
30939        return result;
30940    }
30941
30942    // ain1 = "short4 a"
30943    // ain2 = "half4 b"
30944    public result_int reduce_my_short4_half4_1(Allocation ain1, Allocation ain2) {
30945        return reduce_my_short4_half4_1(ain1, ain2, null);
30946    }
30947
30948    // ain1 = "short4 a"
30949    // ain2 = "half4 b"
30950    public result_int reduce_my_short4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
30951        Type t0, t1;
30952        // check ain1
30953        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
30954            throw new RSRuntimeException("Type mismatch with I16_4!");
30955        }
30956        // check ain2
30957        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
30958            throw new RSRuntimeException("Type mismatch with F16_4!");
30959        }
30960        // Verify dimensions
30961        t0 = ain1.getType();
30962        t1 = ain2.getType();
30963        if ((t0.getCount() != t1.getCount()) ||
30964            (t0.getX() != t1.getX()) ||
30965            (t0.getY() != t1.getY()) ||
30966            (t0.getZ() != t1.getZ()) ||
30967            (t0.hasFaces()   != t1.hasFaces()) ||
30968            (t0.hasMipmaps() != t1.hasMipmaps())) {
30969            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
30970        }
30971
30972        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
30973        aout.setAutoPadding(true);
30974        reduce(mExportReduceIdx_my_short4_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
30975        return new result_int(aout);
30976    }
30977
30978    private final static int mExportReduceIdx_my_short4_float_0 = 468;
30979    // in1 = "a", flattened 4-vectors
30980    // in2 = "b"
30981    public result_int reduce_my_short4_float_0(short[] in1, float[] in2) {
30982        // Verify that "in1" is non-null.
30983        if (in1 == null) {
30984            throw new RSIllegalArgumentException("Array \"in1\" is null!");
30985        }
30986        // Verify that the array length is a multiple of the vector size.
30987        if (in1.length % 4 != 0) {
30988            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
30989        }
30990        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
30991        ain1.setAutoPadding(true);
30992        ain1.copyFrom(in1);
30993        // Verify that "in2" is non-null.
30994        if (in2 == null) {
30995            throw new RSIllegalArgumentException("Array \"in2\" is null!");
30996        }
30997        // Verify that input array lengths are the same.
30998        if (in1.length / 4 != in2.length) {
30999            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31000        }
31001        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
31002        ain2.setAutoPadding(true);
31003        ain2.copyFrom(in2);
31004
31005        result_int result = reduce_my_short4_float_0(ain1, ain2, null);
31006        result.mTempIns = new Allocation[]{ain1, ain2};
31007        return result;
31008    }
31009
31010    // ain1 = "short4 a"
31011    // ain2 = "float b"
31012    public result_int reduce_my_short4_float_0(Allocation ain1, Allocation ain2) {
31013        return reduce_my_short4_float_0(ain1, ain2, null);
31014    }
31015
31016    // ain1 = "short4 a"
31017    // ain2 = "float b"
31018    public result_int reduce_my_short4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31019        Type t0, t1;
31020        // check ain1
31021        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31022            throw new RSRuntimeException("Type mismatch with I16_4!");
31023        }
31024        // check ain2
31025        if (!ain2.getType().getElement().isCompatible(__F32)) {
31026            throw new RSRuntimeException("Type mismatch with F32!");
31027        }
31028        // Verify dimensions
31029        t0 = ain1.getType();
31030        t1 = ain2.getType();
31031        if ((t0.getCount() != t1.getCount()) ||
31032            (t0.getX() != t1.getX()) ||
31033            (t0.getY() != t1.getY()) ||
31034            (t0.getZ() != t1.getZ()) ||
31035            (t0.hasFaces()   != t1.hasFaces()) ||
31036            (t0.hasMipmaps() != t1.hasMipmaps())) {
31037            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31038        }
31039
31040        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31041        aout.setAutoPadding(true);
31042        reduce(mExportReduceIdx_my_short4_float_0, new Allocation[]{ain1, ain2}, aout, sc);
31043        return new result_int(aout);
31044    }
31045
31046    private final static int mExportReduceIdx_my_short4_float_1 = 469;
31047    // in1 = "a", flattened 4-vectors
31048    // in2 = "b"
31049    public result_int reduce_my_short4_float_1(short[] in1, float[] in2) {
31050        // Verify that "in1" is non-null.
31051        if (in1 == null) {
31052            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31053        }
31054        // Verify that the array length is a multiple of the vector size.
31055        if (in1.length % 4 != 0) {
31056            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31057        }
31058        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31059        ain1.setAutoPadding(true);
31060        ain1.copyFrom(in1);
31061        // Verify that "in2" is non-null.
31062        if (in2 == null) {
31063            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31064        }
31065        // Verify that input array lengths are the same.
31066        if (in1.length / 4 != in2.length) {
31067            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31068        }
31069        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
31070        ain2.setAutoPadding(true);
31071        ain2.copyFrom(in2);
31072
31073        result_int result = reduce_my_short4_float_1(ain1, ain2, null);
31074        result.mTempIns = new Allocation[]{ain1, ain2};
31075        return result;
31076    }
31077
31078    // ain1 = "short4 a"
31079    // ain2 = "float b"
31080    public result_int reduce_my_short4_float_1(Allocation ain1, Allocation ain2) {
31081        return reduce_my_short4_float_1(ain1, ain2, null);
31082    }
31083
31084    // ain1 = "short4 a"
31085    // ain2 = "float b"
31086    public result_int reduce_my_short4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31087        Type t0, t1;
31088        // check ain1
31089        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31090            throw new RSRuntimeException("Type mismatch with I16_4!");
31091        }
31092        // check ain2
31093        if (!ain2.getType().getElement().isCompatible(__F32)) {
31094            throw new RSRuntimeException("Type mismatch with F32!");
31095        }
31096        // Verify dimensions
31097        t0 = ain1.getType();
31098        t1 = ain2.getType();
31099        if ((t0.getCount() != t1.getCount()) ||
31100            (t0.getX() != t1.getX()) ||
31101            (t0.getY() != t1.getY()) ||
31102            (t0.getZ() != t1.getZ()) ||
31103            (t0.hasFaces()   != t1.hasFaces()) ||
31104            (t0.hasMipmaps() != t1.hasMipmaps())) {
31105            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31106        }
31107
31108        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31109        aout.setAutoPadding(true);
31110        reduce(mExportReduceIdx_my_short4_float_1, new Allocation[]{ain1, ain2}, aout, sc);
31111        return new result_int(aout);
31112    }
31113
31114    private final static int mExportReduceIdx_my_short4_float2_0 = 470;
31115    // in1 = "a", flattened 4-vectors
31116    // in2 = "b", flattened 2-vectors
31117    public result_int reduce_my_short4_float2_0(short[] in1, float[] in2) {
31118        // Verify that "in1" is non-null.
31119        if (in1 == null) {
31120            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31121        }
31122        // Verify that the array length is a multiple of the vector size.
31123        if (in1.length % 4 != 0) {
31124            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31125        }
31126        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31127        ain1.setAutoPadding(true);
31128        ain1.copyFrom(in1);
31129        // Verify that "in2" is non-null.
31130        if (in2 == null) {
31131            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31132        }
31133        // Verify that the array length is a multiple of the vector size.
31134        if (in2.length % 2 != 0) {
31135            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
31136        }
31137        // Verify that input array lengths are the same.
31138        if (in1.length / 4 != in2.length / 2) {
31139            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31140        }
31141        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
31142        ain2.setAutoPadding(true);
31143        ain2.copyFrom(in2);
31144
31145        result_int result = reduce_my_short4_float2_0(ain1, ain2, null);
31146        result.mTempIns = new Allocation[]{ain1, ain2};
31147        return result;
31148    }
31149
31150    // ain1 = "short4 a"
31151    // ain2 = "float2 b"
31152    public result_int reduce_my_short4_float2_0(Allocation ain1, Allocation ain2) {
31153        return reduce_my_short4_float2_0(ain1, ain2, null);
31154    }
31155
31156    // ain1 = "short4 a"
31157    // ain2 = "float2 b"
31158    public result_int reduce_my_short4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31159        Type t0, t1;
31160        // check ain1
31161        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31162            throw new RSRuntimeException("Type mismatch with I16_4!");
31163        }
31164        // check ain2
31165        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
31166            throw new RSRuntimeException("Type mismatch with F32_2!");
31167        }
31168        // Verify dimensions
31169        t0 = ain1.getType();
31170        t1 = ain2.getType();
31171        if ((t0.getCount() != t1.getCount()) ||
31172            (t0.getX() != t1.getX()) ||
31173            (t0.getY() != t1.getY()) ||
31174            (t0.getZ() != t1.getZ()) ||
31175            (t0.hasFaces()   != t1.hasFaces()) ||
31176            (t0.hasMipmaps() != t1.hasMipmaps())) {
31177            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31178        }
31179
31180        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31181        aout.setAutoPadding(true);
31182        reduce(mExportReduceIdx_my_short4_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
31183        return new result_int(aout);
31184    }
31185
31186    private final static int mExportReduceIdx_my_short4_float2_1 = 471;
31187    // in1 = "a", flattened 4-vectors
31188    // in2 = "b", flattened 2-vectors
31189    public result_int reduce_my_short4_float2_1(short[] in1, float[] in2) {
31190        // Verify that "in1" is non-null.
31191        if (in1 == null) {
31192            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31193        }
31194        // Verify that the array length is a multiple of the vector size.
31195        if (in1.length % 4 != 0) {
31196            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31197        }
31198        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31199        ain1.setAutoPadding(true);
31200        ain1.copyFrom(in1);
31201        // Verify that "in2" is non-null.
31202        if (in2 == null) {
31203            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31204        }
31205        // Verify that the array length is a multiple of the vector size.
31206        if (in2.length % 2 != 0) {
31207            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
31208        }
31209        // Verify that input array lengths are the same.
31210        if (in1.length / 4 != in2.length / 2) {
31211            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31212        }
31213        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
31214        ain2.setAutoPadding(true);
31215        ain2.copyFrom(in2);
31216
31217        result_int result = reduce_my_short4_float2_1(ain1, ain2, null);
31218        result.mTempIns = new Allocation[]{ain1, ain2};
31219        return result;
31220    }
31221
31222    // ain1 = "short4 a"
31223    // ain2 = "float2 b"
31224    public result_int reduce_my_short4_float2_1(Allocation ain1, Allocation ain2) {
31225        return reduce_my_short4_float2_1(ain1, ain2, null);
31226    }
31227
31228    // ain1 = "short4 a"
31229    // ain2 = "float2 b"
31230    public result_int reduce_my_short4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31231        Type t0, t1;
31232        // check ain1
31233        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31234            throw new RSRuntimeException("Type mismatch with I16_4!");
31235        }
31236        // check ain2
31237        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
31238            throw new RSRuntimeException("Type mismatch with F32_2!");
31239        }
31240        // Verify dimensions
31241        t0 = ain1.getType();
31242        t1 = ain2.getType();
31243        if ((t0.getCount() != t1.getCount()) ||
31244            (t0.getX() != t1.getX()) ||
31245            (t0.getY() != t1.getY()) ||
31246            (t0.getZ() != t1.getZ()) ||
31247            (t0.hasFaces()   != t1.hasFaces()) ||
31248            (t0.hasMipmaps() != t1.hasMipmaps())) {
31249            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31250        }
31251
31252        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31253        aout.setAutoPadding(true);
31254        reduce(mExportReduceIdx_my_short4_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
31255        return new result_int(aout);
31256    }
31257
31258    private final static int mExportReduceIdx_my_short4_float4_0 = 472;
31259    // in1 = "a", flattened 4-vectors
31260    // in2 = "b", flattened 4-vectors
31261    public result_int reduce_my_short4_float4_0(short[] in1, float[] in2) {
31262        // Verify that "in1" is non-null.
31263        if (in1 == null) {
31264            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31265        }
31266        // Verify that the array length is a multiple of the vector size.
31267        if (in1.length % 4 != 0) {
31268            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31269        }
31270        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31271        ain1.setAutoPadding(true);
31272        ain1.copyFrom(in1);
31273        // Verify that "in2" is non-null.
31274        if (in2 == null) {
31275            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31276        }
31277        // Verify that the array length is a multiple of the vector size.
31278        if (in2.length % 4 != 0) {
31279            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
31280        }
31281        // Verify that input array lengths are the same.
31282        if (in1.length / 4 != in2.length / 4) {
31283            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31284        }
31285        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
31286        ain2.setAutoPadding(true);
31287        ain2.copyFrom(in2);
31288
31289        result_int result = reduce_my_short4_float4_0(ain1, ain2, null);
31290        result.mTempIns = new Allocation[]{ain1, ain2};
31291        return result;
31292    }
31293
31294    // ain1 = "short4 a"
31295    // ain2 = "float4 b"
31296    public result_int reduce_my_short4_float4_0(Allocation ain1, Allocation ain2) {
31297        return reduce_my_short4_float4_0(ain1, ain2, null);
31298    }
31299
31300    // ain1 = "short4 a"
31301    // ain2 = "float4 b"
31302    public result_int reduce_my_short4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31303        Type t0, t1;
31304        // check ain1
31305        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31306            throw new RSRuntimeException("Type mismatch with I16_4!");
31307        }
31308        // check ain2
31309        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
31310            throw new RSRuntimeException("Type mismatch with F32_4!");
31311        }
31312        // Verify dimensions
31313        t0 = ain1.getType();
31314        t1 = ain2.getType();
31315        if ((t0.getCount() != t1.getCount()) ||
31316            (t0.getX() != t1.getX()) ||
31317            (t0.getY() != t1.getY()) ||
31318            (t0.getZ() != t1.getZ()) ||
31319            (t0.hasFaces()   != t1.hasFaces()) ||
31320            (t0.hasMipmaps() != t1.hasMipmaps())) {
31321            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31322        }
31323
31324        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31325        aout.setAutoPadding(true);
31326        reduce(mExportReduceIdx_my_short4_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
31327        return new result_int(aout);
31328    }
31329
31330    private final static int mExportReduceIdx_my_short4_float4_1 = 473;
31331    // in1 = "a", flattened 4-vectors
31332    // in2 = "b", flattened 4-vectors
31333    public result_int reduce_my_short4_float4_1(short[] in1, float[] in2) {
31334        // Verify that "in1" is non-null.
31335        if (in1 == null) {
31336            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31337        }
31338        // Verify that the array length is a multiple of the vector size.
31339        if (in1.length % 4 != 0) {
31340            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31341        }
31342        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31343        ain1.setAutoPadding(true);
31344        ain1.copyFrom(in1);
31345        // Verify that "in2" is non-null.
31346        if (in2 == null) {
31347            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31348        }
31349        // Verify that the array length is a multiple of the vector size.
31350        if (in2.length % 4 != 0) {
31351            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
31352        }
31353        // Verify that input array lengths are the same.
31354        if (in1.length / 4 != in2.length / 4) {
31355            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31356        }
31357        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
31358        ain2.setAutoPadding(true);
31359        ain2.copyFrom(in2);
31360
31361        result_int result = reduce_my_short4_float4_1(ain1, ain2, null);
31362        result.mTempIns = new Allocation[]{ain1, ain2};
31363        return result;
31364    }
31365
31366    // ain1 = "short4 a"
31367    // ain2 = "float4 b"
31368    public result_int reduce_my_short4_float4_1(Allocation ain1, Allocation ain2) {
31369        return reduce_my_short4_float4_1(ain1, ain2, null);
31370    }
31371
31372    // ain1 = "short4 a"
31373    // ain2 = "float4 b"
31374    public result_int reduce_my_short4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31375        Type t0, t1;
31376        // check ain1
31377        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31378            throw new RSRuntimeException("Type mismatch with I16_4!");
31379        }
31380        // check ain2
31381        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
31382            throw new RSRuntimeException("Type mismatch with F32_4!");
31383        }
31384        // Verify dimensions
31385        t0 = ain1.getType();
31386        t1 = ain2.getType();
31387        if ((t0.getCount() != t1.getCount()) ||
31388            (t0.getX() != t1.getX()) ||
31389            (t0.getY() != t1.getY()) ||
31390            (t0.getZ() != t1.getZ()) ||
31391            (t0.hasFaces()   != t1.hasFaces()) ||
31392            (t0.hasMipmaps() != t1.hasMipmaps())) {
31393            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31394        }
31395
31396        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31397        aout.setAutoPadding(true);
31398        reduce(mExportReduceIdx_my_short4_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
31399        return new result_int(aout);
31400    }
31401
31402    private final static int mExportReduceIdx_my_short4_char_0 = 474;
31403    // in1 = "a", flattened 4-vectors
31404    // in2 = "b"
31405    public result_int reduce_my_short4_char_0(short[] in1, byte[] in2) {
31406        // Verify that "in1" is non-null.
31407        if (in1 == null) {
31408            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31409        }
31410        // Verify that the array length is a multiple of the vector size.
31411        if (in1.length % 4 != 0) {
31412            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31413        }
31414        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31415        ain1.setAutoPadding(true);
31416        ain1.copyFrom(in1);
31417        // Verify that "in2" is non-null.
31418        if (in2 == null) {
31419            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31420        }
31421        // Verify that input array lengths are the same.
31422        if (in1.length / 4 != in2.length) {
31423            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31424        }
31425        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
31426        ain2.setAutoPadding(true);
31427        ain2.copyFrom(in2);
31428
31429        result_int result = reduce_my_short4_char_0(ain1, ain2, null);
31430        result.mTempIns = new Allocation[]{ain1, ain2};
31431        return result;
31432    }
31433
31434    // ain1 = "short4 a"
31435    // ain2 = "char b"
31436    public result_int reduce_my_short4_char_0(Allocation ain1, Allocation ain2) {
31437        return reduce_my_short4_char_0(ain1, ain2, null);
31438    }
31439
31440    // ain1 = "short4 a"
31441    // ain2 = "char b"
31442    public result_int reduce_my_short4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31443        Type t0, t1;
31444        // check ain1
31445        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31446            throw new RSRuntimeException("Type mismatch with I16_4!");
31447        }
31448        // check ain2
31449        if (!ain2.getType().getElement().isCompatible(__I8)) {
31450            throw new RSRuntimeException("Type mismatch with I8!");
31451        }
31452        // Verify dimensions
31453        t0 = ain1.getType();
31454        t1 = ain2.getType();
31455        if ((t0.getCount() != t1.getCount()) ||
31456            (t0.getX() != t1.getX()) ||
31457            (t0.getY() != t1.getY()) ||
31458            (t0.getZ() != t1.getZ()) ||
31459            (t0.hasFaces()   != t1.hasFaces()) ||
31460            (t0.hasMipmaps() != t1.hasMipmaps())) {
31461            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31462        }
31463
31464        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31465        aout.setAutoPadding(true);
31466        reduce(mExportReduceIdx_my_short4_char_0, new Allocation[]{ain1, ain2}, aout, sc);
31467        return new result_int(aout);
31468    }
31469
31470    private final static int mExportReduceIdx_my_short4_char_1 = 475;
31471    // in1 = "a", flattened 4-vectors
31472    // in2 = "b"
31473    public result_int reduce_my_short4_char_1(short[] in1, byte[] in2) {
31474        // Verify that "in1" is non-null.
31475        if (in1 == null) {
31476            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31477        }
31478        // Verify that the array length is a multiple of the vector size.
31479        if (in1.length % 4 != 0) {
31480            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31481        }
31482        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31483        ain1.setAutoPadding(true);
31484        ain1.copyFrom(in1);
31485        // Verify that "in2" is non-null.
31486        if (in2 == null) {
31487            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31488        }
31489        // Verify that input array lengths are the same.
31490        if (in1.length / 4 != in2.length) {
31491            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31492        }
31493        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
31494        ain2.setAutoPadding(true);
31495        ain2.copyFrom(in2);
31496
31497        result_int result = reduce_my_short4_char_1(ain1, ain2, null);
31498        result.mTempIns = new Allocation[]{ain1, ain2};
31499        return result;
31500    }
31501
31502    // ain1 = "short4 a"
31503    // ain2 = "char b"
31504    public result_int reduce_my_short4_char_1(Allocation ain1, Allocation ain2) {
31505        return reduce_my_short4_char_1(ain1, ain2, null);
31506    }
31507
31508    // ain1 = "short4 a"
31509    // ain2 = "char b"
31510    public result_int reduce_my_short4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31511        Type t0, t1;
31512        // check ain1
31513        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31514            throw new RSRuntimeException("Type mismatch with I16_4!");
31515        }
31516        // check ain2
31517        if (!ain2.getType().getElement().isCompatible(__I8)) {
31518            throw new RSRuntimeException("Type mismatch with I8!");
31519        }
31520        // Verify dimensions
31521        t0 = ain1.getType();
31522        t1 = ain2.getType();
31523        if ((t0.getCount() != t1.getCount()) ||
31524            (t0.getX() != t1.getX()) ||
31525            (t0.getY() != t1.getY()) ||
31526            (t0.getZ() != t1.getZ()) ||
31527            (t0.hasFaces()   != t1.hasFaces()) ||
31528            (t0.hasMipmaps() != t1.hasMipmaps())) {
31529            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31530        }
31531
31532        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31533        aout.setAutoPadding(true);
31534        reduce(mExportReduceIdx_my_short4_char_1, new Allocation[]{ain1, ain2}, aout, sc);
31535        return new result_int(aout);
31536    }
31537
31538    private final static int mExportReduceIdx_my_short4_char2_0 = 476;
31539    // in1 = "a", flattened 4-vectors
31540    // in2 = "b", flattened 2-vectors
31541    public result_int reduce_my_short4_char2_0(short[] in1, byte[] in2) {
31542        // Verify that "in1" is non-null.
31543        if (in1 == null) {
31544            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31545        }
31546        // Verify that the array length is a multiple of the vector size.
31547        if (in1.length % 4 != 0) {
31548            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31549        }
31550        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31551        ain1.setAutoPadding(true);
31552        ain1.copyFrom(in1);
31553        // Verify that "in2" is non-null.
31554        if (in2 == null) {
31555            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31556        }
31557        // Verify that the array length is a multiple of the vector size.
31558        if (in2.length % 2 != 0) {
31559            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
31560        }
31561        // Verify that input array lengths are the same.
31562        if (in1.length / 4 != in2.length / 2) {
31563            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31564        }
31565        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
31566        ain2.setAutoPadding(true);
31567        ain2.copyFrom(in2);
31568
31569        result_int result = reduce_my_short4_char2_0(ain1, ain2, null);
31570        result.mTempIns = new Allocation[]{ain1, ain2};
31571        return result;
31572    }
31573
31574    // ain1 = "short4 a"
31575    // ain2 = "char2 b"
31576    public result_int reduce_my_short4_char2_0(Allocation ain1, Allocation ain2) {
31577        return reduce_my_short4_char2_0(ain1, ain2, null);
31578    }
31579
31580    // ain1 = "short4 a"
31581    // ain2 = "char2 b"
31582    public result_int reduce_my_short4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31583        Type t0, t1;
31584        // check ain1
31585        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31586            throw new RSRuntimeException("Type mismatch with I16_4!");
31587        }
31588        // check ain2
31589        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
31590            throw new RSRuntimeException("Type mismatch with I8_2!");
31591        }
31592        // Verify dimensions
31593        t0 = ain1.getType();
31594        t1 = ain2.getType();
31595        if ((t0.getCount() != t1.getCount()) ||
31596            (t0.getX() != t1.getX()) ||
31597            (t0.getY() != t1.getY()) ||
31598            (t0.getZ() != t1.getZ()) ||
31599            (t0.hasFaces()   != t1.hasFaces()) ||
31600            (t0.hasMipmaps() != t1.hasMipmaps())) {
31601            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31602        }
31603
31604        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31605        aout.setAutoPadding(true);
31606        reduce(mExportReduceIdx_my_short4_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
31607        return new result_int(aout);
31608    }
31609
31610    private final static int mExportReduceIdx_my_short4_char2_1 = 477;
31611    // in1 = "a", flattened 4-vectors
31612    // in2 = "b", flattened 2-vectors
31613    public result_int reduce_my_short4_char2_1(short[] in1, byte[] in2) {
31614        // Verify that "in1" is non-null.
31615        if (in1 == null) {
31616            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31617        }
31618        // Verify that the array length is a multiple of the vector size.
31619        if (in1.length % 4 != 0) {
31620            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31621        }
31622        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31623        ain1.setAutoPadding(true);
31624        ain1.copyFrom(in1);
31625        // Verify that "in2" is non-null.
31626        if (in2 == null) {
31627            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31628        }
31629        // Verify that the array length is a multiple of the vector size.
31630        if (in2.length % 2 != 0) {
31631            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
31632        }
31633        // Verify that input array lengths are the same.
31634        if (in1.length / 4 != in2.length / 2) {
31635            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31636        }
31637        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
31638        ain2.setAutoPadding(true);
31639        ain2.copyFrom(in2);
31640
31641        result_int result = reduce_my_short4_char2_1(ain1, ain2, null);
31642        result.mTempIns = new Allocation[]{ain1, ain2};
31643        return result;
31644    }
31645
31646    // ain1 = "short4 a"
31647    // ain2 = "char2 b"
31648    public result_int reduce_my_short4_char2_1(Allocation ain1, Allocation ain2) {
31649        return reduce_my_short4_char2_1(ain1, ain2, null);
31650    }
31651
31652    // ain1 = "short4 a"
31653    // ain2 = "char2 b"
31654    public result_int reduce_my_short4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31655        Type t0, t1;
31656        // check ain1
31657        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31658            throw new RSRuntimeException("Type mismatch with I16_4!");
31659        }
31660        // check ain2
31661        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
31662            throw new RSRuntimeException("Type mismatch with I8_2!");
31663        }
31664        // Verify dimensions
31665        t0 = ain1.getType();
31666        t1 = ain2.getType();
31667        if ((t0.getCount() != t1.getCount()) ||
31668            (t0.getX() != t1.getX()) ||
31669            (t0.getY() != t1.getY()) ||
31670            (t0.getZ() != t1.getZ()) ||
31671            (t0.hasFaces()   != t1.hasFaces()) ||
31672            (t0.hasMipmaps() != t1.hasMipmaps())) {
31673            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31674        }
31675
31676        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31677        aout.setAutoPadding(true);
31678        reduce(mExportReduceIdx_my_short4_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
31679        return new result_int(aout);
31680    }
31681
31682    private final static int mExportReduceIdx_my_short4_char4_0 = 478;
31683    // in1 = "a", flattened 4-vectors
31684    // in2 = "b", flattened 4-vectors
31685    public result_int reduce_my_short4_char4_0(short[] in1, byte[] in2) {
31686        // Verify that "in1" is non-null.
31687        if (in1 == null) {
31688            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31689        }
31690        // Verify that the array length is a multiple of the vector size.
31691        if (in1.length % 4 != 0) {
31692            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31693        }
31694        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31695        ain1.setAutoPadding(true);
31696        ain1.copyFrom(in1);
31697        // Verify that "in2" is non-null.
31698        if (in2 == null) {
31699            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31700        }
31701        // Verify that the array length is a multiple of the vector size.
31702        if (in2.length % 4 != 0) {
31703            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
31704        }
31705        // Verify that input array lengths are the same.
31706        if (in1.length / 4 != in2.length / 4) {
31707            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31708        }
31709        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
31710        ain2.setAutoPadding(true);
31711        ain2.copyFrom(in2);
31712
31713        result_int result = reduce_my_short4_char4_0(ain1, ain2, null);
31714        result.mTempIns = new Allocation[]{ain1, ain2};
31715        return result;
31716    }
31717
31718    // ain1 = "short4 a"
31719    // ain2 = "char4 b"
31720    public result_int reduce_my_short4_char4_0(Allocation ain1, Allocation ain2) {
31721        return reduce_my_short4_char4_0(ain1, ain2, null);
31722    }
31723
31724    // ain1 = "short4 a"
31725    // ain2 = "char4 b"
31726    public result_int reduce_my_short4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31727        Type t0, t1;
31728        // check ain1
31729        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31730            throw new RSRuntimeException("Type mismatch with I16_4!");
31731        }
31732        // check ain2
31733        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
31734            throw new RSRuntimeException("Type mismatch with I8_4!");
31735        }
31736        // Verify dimensions
31737        t0 = ain1.getType();
31738        t1 = ain2.getType();
31739        if ((t0.getCount() != t1.getCount()) ||
31740            (t0.getX() != t1.getX()) ||
31741            (t0.getY() != t1.getY()) ||
31742            (t0.getZ() != t1.getZ()) ||
31743            (t0.hasFaces()   != t1.hasFaces()) ||
31744            (t0.hasMipmaps() != t1.hasMipmaps())) {
31745            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31746        }
31747
31748        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31749        aout.setAutoPadding(true);
31750        reduce(mExportReduceIdx_my_short4_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
31751        return new result_int(aout);
31752    }
31753
31754    private final static int mExportReduceIdx_my_short4_char4_1 = 479;
31755    // in1 = "a", flattened 4-vectors
31756    // in2 = "b", flattened 4-vectors
31757    public result_int reduce_my_short4_char4_1(short[] in1, byte[] in2) {
31758        // Verify that "in1" is non-null.
31759        if (in1 == null) {
31760            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31761        }
31762        // Verify that the array length is a multiple of the vector size.
31763        if (in1.length % 4 != 0) {
31764            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31765        }
31766        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31767        ain1.setAutoPadding(true);
31768        ain1.copyFrom(in1);
31769        // Verify that "in2" is non-null.
31770        if (in2 == null) {
31771            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31772        }
31773        // Verify that the array length is a multiple of the vector size.
31774        if (in2.length % 4 != 0) {
31775            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
31776        }
31777        // Verify that input array lengths are the same.
31778        if (in1.length / 4 != in2.length / 4) {
31779            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31780        }
31781        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
31782        ain2.setAutoPadding(true);
31783        ain2.copyFrom(in2);
31784
31785        result_int result = reduce_my_short4_char4_1(ain1, ain2, null);
31786        result.mTempIns = new Allocation[]{ain1, ain2};
31787        return result;
31788    }
31789
31790    // ain1 = "short4 a"
31791    // ain2 = "char4 b"
31792    public result_int reduce_my_short4_char4_1(Allocation ain1, Allocation ain2) {
31793        return reduce_my_short4_char4_1(ain1, ain2, null);
31794    }
31795
31796    // ain1 = "short4 a"
31797    // ain2 = "char4 b"
31798    public result_int reduce_my_short4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31799        Type t0, t1;
31800        // check ain1
31801        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31802            throw new RSRuntimeException("Type mismatch with I16_4!");
31803        }
31804        // check ain2
31805        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
31806            throw new RSRuntimeException("Type mismatch with I8_4!");
31807        }
31808        // Verify dimensions
31809        t0 = ain1.getType();
31810        t1 = ain2.getType();
31811        if ((t0.getCount() != t1.getCount()) ||
31812            (t0.getX() != t1.getX()) ||
31813            (t0.getY() != t1.getY()) ||
31814            (t0.getZ() != t1.getZ()) ||
31815            (t0.hasFaces()   != t1.hasFaces()) ||
31816            (t0.hasMipmaps() != t1.hasMipmaps())) {
31817            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31818        }
31819
31820        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31821        aout.setAutoPadding(true);
31822        reduce(mExportReduceIdx_my_short4_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
31823        return new result_int(aout);
31824    }
31825
31826    private final static int mExportReduceIdx_my_short4_short_0 = 480;
31827    // in1 = "a", flattened 4-vectors
31828    // in2 = "b"
31829    public result_int reduce_my_short4_short_0(short[] in1, short[] in2) {
31830        // Verify that "in1" is non-null.
31831        if (in1 == null) {
31832            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31833        }
31834        // Verify that the array length is a multiple of the vector size.
31835        if (in1.length % 4 != 0) {
31836            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31837        }
31838        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31839        ain1.setAutoPadding(true);
31840        ain1.copyFrom(in1);
31841        // Verify that "in2" is non-null.
31842        if (in2 == null) {
31843            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31844        }
31845        // Verify that input array lengths are the same.
31846        if (in1.length / 4 != in2.length) {
31847            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31848        }
31849        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
31850        ain2.setAutoPadding(true);
31851        ain2.copyFrom(in2);
31852
31853        result_int result = reduce_my_short4_short_0(ain1, ain2, null);
31854        result.mTempIns = new Allocation[]{ain1, ain2};
31855        return result;
31856    }
31857
31858    // ain1 = "short4 a"
31859    // ain2 = "short b"
31860    public result_int reduce_my_short4_short_0(Allocation ain1, Allocation ain2) {
31861        return reduce_my_short4_short_0(ain1, ain2, null);
31862    }
31863
31864    // ain1 = "short4 a"
31865    // ain2 = "short b"
31866    public result_int reduce_my_short4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31867        Type t0, t1;
31868        // check ain1
31869        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31870            throw new RSRuntimeException("Type mismatch with I16_4!");
31871        }
31872        // check ain2
31873        if (!ain2.getType().getElement().isCompatible(__I16)) {
31874            throw new RSRuntimeException("Type mismatch with I16!");
31875        }
31876        // Verify dimensions
31877        t0 = ain1.getType();
31878        t1 = ain2.getType();
31879        if ((t0.getCount() != t1.getCount()) ||
31880            (t0.getX() != t1.getX()) ||
31881            (t0.getY() != t1.getY()) ||
31882            (t0.getZ() != t1.getZ()) ||
31883            (t0.hasFaces()   != t1.hasFaces()) ||
31884            (t0.hasMipmaps() != t1.hasMipmaps())) {
31885            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31886        }
31887
31888        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31889        aout.setAutoPadding(true);
31890        reduce(mExportReduceIdx_my_short4_short_0, new Allocation[]{ain1, ain2}, aout, sc);
31891        return new result_int(aout);
31892    }
31893
31894    private final static int mExportReduceIdx_my_short4_short_1 = 481;
31895    // in1 = "a", flattened 4-vectors
31896    // in2 = "b"
31897    public result_int reduce_my_short4_short_1(short[] in1, short[] in2) {
31898        // Verify that "in1" is non-null.
31899        if (in1 == null) {
31900            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31901        }
31902        // Verify that the array length is a multiple of the vector size.
31903        if (in1.length % 4 != 0) {
31904            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31905        }
31906        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31907        ain1.setAutoPadding(true);
31908        ain1.copyFrom(in1);
31909        // Verify that "in2" is non-null.
31910        if (in2 == null) {
31911            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31912        }
31913        // Verify that input array lengths are the same.
31914        if (in1.length / 4 != in2.length) {
31915            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31916        }
31917        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
31918        ain2.setAutoPadding(true);
31919        ain2.copyFrom(in2);
31920
31921        result_int result = reduce_my_short4_short_1(ain1, ain2, null);
31922        result.mTempIns = new Allocation[]{ain1, ain2};
31923        return result;
31924    }
31925
31926    // ain1 = "short4 a"
31927    // ain2 = "short b"
31928    public result_int reduce_my_short4_short_1(Allocation ain1, Allocation ain2) {
31929        return reduce_my_short4_short_1(ain1, ain2, null);
31930    }
31931
31932    // ain1 = "short4 a"
31933    // ain2 = "short b"
31934    public result_int reduce_my_short4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
31935        Type t0, t1;
31936        // check ain1
31937        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
31938            throw new RSRuntimeException("Type mismatch with I16_4!");
31939        }
31940        // check ain2
31941        if (!ain2.getType().getElement().isCompatible(__I16)) {
31942            throw new RSRuntimeException("Type mismatch with I16!");
31943        }
31944        // Verify dimensions
31945        t0 = ain1.getType();
31946        t1 = ain2.getType();
31947        if ((t0.getCount() != t1.getCount()) ||
31948            (t0.getX() != t1.getX()) ||
31949            (t0.getY() != t1.getY()) ||
31950            (t0.getZ() != t1.getZ()) ||
31951            (t0.hasFaces()   != t1.hasFaces()) ||
31952            (t0.hasMipmaps() != t1.hasMipmaps())) {
31953            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
31954        }
31955
31956        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
31957        aout.setAutoPadding(true);
31958        reduce(mExportReduceIdx_my_short4_short_1, new Allocation[]{ain1, ain2}, aout, sc);
31959        return new result_int(aout);
31960    }
31961
31962    private final static int mExportReduceIdx_my_short4_short2_0 = 482;
31963    // in1 = "a", flattened 4-vectors
31964    // in2 = "b", flattened 2-vectors
31965    public result_int reduce_my_short4_short2_0(short[] in1, short[] in2) {
31966        // Verify that "in1" is non-null.
31967        if (in1 == null) {
31968            throw new RSIllegalArgumentException("Array \"in1\" is null!");
31969        }
31970        // Verify that the array length is a multiple of the vector size.
31971        if (in1.length % 4 != 0) {
31972            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
31973        }
31974        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
31975        ain1.setAutoPadding(true);
31976        ain1.copyFrom(in1);
31977        // Verify that "in2" is non-null.
31978        if (in2 == null) {
31979            throw new RSIllegalArgumentException("Array \"in2\" is null!");
31980        }
31981        // Verify that the array length is a multiple of the vector size.
31982        if (in2.length % 2 != 0) {
31983            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
31984        }
31985        // Verify that input array lengths are the same.
31986        if (in1.length / 4 != in2.length / 2) {
31987            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
31988        }
31989        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
31990        ain2.setAutoPadding(true);
31991        ain2.copyFrom(in2);
31992
31993        result_int result = reduce_my_short4_short2_0(ain1, ain2, null);
31994        result.mTempIns = new Allocation[]{ain1, ain2};
31995        return result;
31996    }
31997
31998    // ain1 = "short4 a"
31999    // ain2 = "short2 b"
32000    public result_int reduce_my_short4_short2_0(Allocation ain1, Allocation ain2) {
32001        return reduce_my_short4_short2_0(ain1, ain2, null);
32002    }
32003
32004    // ain1 = "short4 a"
32005    // ain2 = "short2 b"
32006    public result_int reduce_my_short4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32007        Type t0, t1;
32008        // check ain1
32009        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32010            throw new RSRuntimeException("Type mismatch with I16_4!");
32011        }
32012        // check ain2
32013        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
32014            throw new RSRuntimeException("Type mismatch with I16_2!");
32015        }
32016        // Verify dimensions
32017        t0 = ain1.getType();
32018        t1 = ain2.getType();
32019        if ((t0.getCount() != t1.getCount()) ||
32020            (t0.getX() != t1.getX()) ||
32021            (t0.getY() != t1.getY()) ||
32022            (t0.getZ() != t1.getZ()) ||
32023            (t0.hasFaces()   != t1.hasFaces()) ||
32024            (t0.hasMipmaps() != t1.hasMipmaps())) {
32025            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32026        }
32027
32028        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32029        aout.setAutoPadding(true);
32030        reduce(mExportReduceIdx_my_short4_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
32031        return new result_int(aout);
32032    }
32033
32034    private final static int mExportReduceIdx_my_short4_short2_1 = 483;
32035    // in1 = "a", flattened 4-vectors
32036    // in2 = "b", flattened 2-vectors
32037    public result_int reduce_my_short4_short2_1(short[] in1, short[] in2) {
32038        // Verify that "in1" is non-null.
32039        if (in1 == null) {
32040            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32041        }
32042        // Verify that the array length is a multiple of the vector size.
32043        if (in1.length % 4 != 0) {
32044            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32045        }
32046        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32047        ain1.setAutoPadding(true);
32048        ain1.copyFrom(in1);
32049        // Verify that "in2" is non-null.
32050        if (in2 == null) {
32051            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32052        }
32053        // Verify that the array length is a multiple of the vector size.
32054        if (in2.length % 2 != 0) {
32055            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
32056        }
32057        // Verify that input array lengths are the same.
32058        if (in1.length / 4 != in2.length / 2) {
32059            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32060        }
32061        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
32062        ain2.setAutoPadding(true);
32063        ain2.copyFrom(in2);
32064
32065        result_int result = reduce_my_short4_short2_1(ain1, ain2, null);
32066        result.mTempIns = new Allocation[]{ain1, ain2};
32067        return result;
32068    }
32069
32070    // ain1 = "short4 a"
32071    // ain2 = "short2 b"
32072    public result_int reduce_my_short4_short2_1(Allocation ain1, Allocation ain2) {
32073        return reduce_my_short4_short2_1(ain1, ain2, null);
32074    }
32075
32076    // ain1 = "short4 a"
32077    // ain2 = "short2 b"
32078    public result_int reduce_my_short4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32079        Type t0, t1;
32080        // check ain1
32081        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32082            throw new RSRuntimeException("Type mismatch with I16_4!");
32083        }
32084        // check ain2
32085        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
32086            throw new RSRuntimeException("Type mismatch with I16_2!");
32087        }
32088        // Verify dimensions
32089        t0 = ain1.getType();
32090        t1 = ain2.getType();
32091        if ((t0.getCount() != t1.getCount()) ||
32092            (t0.getX() != t1.getX()) ||
32093            (t0.getY() != t1.getY()) ||
32094            (t0.getZ() != t1.getZ()) ||
32095            (t0.hasFaces()   != t1.hasFaces()) ||
32096            (t0.hasMipmaps() != t1.hasMipmaps())) {
32097            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32098        }
32099
32100        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32101        aout.setAutoPadding(true);
32102        reduce(mExportReduceIdx_my_short4_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
32103        return new result_int(aout);
32104    }
32105
32106    private final static int mExportReduceIdx_my_short4_short4_0 = 484;
32107    // in1 = "a", flattened 4-vectors
32108    // in2 = "b", flattened 4-vectors
32109    public result_int reduce_my_short4_short4_0(short[] in1, short[] in2) {
32110        // Verify that "in1" is non-null.
32111        if (in1 == null) {
32112            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32113        }
32114        // Verify that the array length is a multiple of the vector size.
32115        if (in1.length % 4 != 0) {
32116            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32117        }
32118        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32119        ain1.setAutoPadding(true);
32120        ain1.copyFrom(in1);
32121        // Verify that "in2" is non-null.
32122        if (in2 == null) {
32123            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32124        }
32125        // Verify that the array length is a multiple of the vector size.
32126        if (in2.length % 4 != 0) {
32127            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
32128        }
32129        // Verify that input array lengths are the same.
32130        if (in1.length / 4 != in2.length / 4) {
32131            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32132        }
32133        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
32134        ain2.setAutoPadding(true);
32135        ain2.copyFrom(in2);
32136
32137        result_int result = reduce_my_short4_short4_0(ain1, ain2, null);
32138        result.mTempIns = new Allocation[]{ain1, ain2};
32139        return result;
32140    }
32141
32142    // ain1 = "short4 a"
32143    // ain2 = "short4 b"
32144    public result_int reduce_my_short4_short4_0(Allocation ain1, Allocation ain2) {
32145        return reduce_my_short4_short4_0(ain1, ain2, null);
32146    }
32147
32148    // ain1 = "short4 a"
32149    // ain2 = "short4 b"
32150    public result_int reduce_my_short4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32151        Type t0, t1;
32152        // check ain1
32153        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32154            throw new RSRuntimeException("Type mismatch with I16_4!");
32155        }
32156        // check ain2
32157        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
32158            throw new RSRuntimeException("Type mismatch with I16_4!");
32159        }
32160        // Verify dimensions
32161        t0 = ain1.getType();
32162        t1 = ain2.getType();
32163        if ((t0.getCount() != t1.getCount()) ||
32164            (t0.getX() != t1.getX()) ||
32165            (t0.getY() != t1.getY()) ||
32166            (t0.getZ() != t1.getZ()) ||
32167            (t0.hasFaces()   != t1.hasFaces()) ||
32168            (t0.hasMipmaps() != t1.hasMipmaps())) {
32169            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32170        }
32171
32172        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32173        aout.setAutoPadding(true);
32174        reduce(mExportReduceIdx_my_short4_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
32175        return new result_int(aout);
32176    }
32177
32178    private final static int mExportReduceIdx_my_short4_short4_1 = 485;
32179    // in1 = "a", flattened 4-vectors
32180    // in2 = "b", flattened 4-vectors
32181    public result_int reduce_my_short4_short4_1(short[] in1, short[] in2) {
32182        // Verify that "in1" is non-null.
32183        if (in1 == null) {
32184            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32185        }
32186        // Verify that the array length is a multiple of the vector size.
32187        if (in1.length % 4 != 0) {
32188            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32189        }
32190        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32191        ain1.setAutoPadding(true);
32192        ain1.copyFrom(in1);
32193        // Verify that "in2" is non-null.
32194        if (in2 == null) {
32195            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32196        }
32197        // Verify that the array length is a multiple of the vector size.
32198        if (in2.length % 4 != 0) {
32199            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
32200        }
32201        // Verify that input array lengths are the same.
32202        if (in1.length / 4 != in2.length / 4) {
32203            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32204        }
32205        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
32206        ain2.setAutoPadding(true);
32207        ain2.copyFrom(in2);
32208
32209        result_int result = reduce_my_short4_short4_1(ain1, ain2, null);
32210        result.mTempIns = new Allocation[]{ain1, ain2};
32211        return result;
32212    }
32213
32214    // ain1 = "short4 a"
32215    // ain2 = "short4 b"
32216    public result_int reduce_my_short4_short4_1(Allocation ain1, Allocation ain2) {
32217        return reduce_my_short4_short4_1(ain1, ain2, null);
32218    }
32219
32220    // ain1 = "short4 a"
32221    // ain2 = "short4 b"
32222    public result_int reduce_my_short4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32223        Type t0, t1;
32224        // check ain1
32225        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32226            throw new RSRuntimeException("Type mismatch with I16_4!");
32227        }
32228        // check ain2
32229        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
32230            throw new RSRuntimeException("Type mismatch with I16_4!");
32231        }
32232        // Verify dimensions
32233        t0 = ain1.getType();
32234        t1 = ain2.getType();
32235        if ((t0.getCount() != t1.getCount()) ||
32236            (t0.getX() != t1.getX()) ||
32237            (t0.getY() != t1.getY()) ||
32238            (t0.getZ() != t1.getZ()) ||
32239            (t0.hasFaces()   != t1.hasFaces()) ||
32240            (t0.hasMipmaps() != t1.hasMipmaps())) {
32241            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32242        }
32243
32244        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32245        aout.setAutoPadding(true);
32246        reduce(mExportReduceIdx_my_short4_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
32247        return new result_int(aout);
32248    }
32249
32250    private final static int mExportReduceIdx_my_short4_uchar_0 = 486;
32251    // in1 = "a", flattened 4-vectors
32252    // in2 = "b"
32253    public result_int reduce_my_short4_uchar_0(short[] in1, byte[] in2) {
32254        // Verify that "in1" is non-null.
32255        if (in1 == null) {
32256            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32257        }
32258        // Verify that the array length is a multiple of the vector size.
32259        if (in1.length % 4 != 0) {
32260            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32261        }
32262        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32263        ain1.setAutoPadding(true);
32264        ain1.copyFrom(in1);
32265        // Verify that "in2" is non-null.
32266        if (in2 == null) {
32267            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32268        }
32269        // Verify that input array lengths are the same.
32270        if (in1.length / 4 != in2.length) {
32271            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32272        }
32273        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
32274        ain2.setAutoPadding(true);
32275        ain2.copyFrom(in2);
32276
32277        result_int result = reduce_my_short4_uchar_0(ain1, ain2, null);
32278        result.mTempIns = new Allocation[]{ain1, ain2};
32279        return result;
32280    }
32281
32282    // ain1 = "short4 a"
32283    // ain2 = "uchar b"
32284    public result_int reduce_my_short4_uchar_0(Allocation ain1, Allocation ain2) {
32285        return reduce_my_short4_uchar_0(ain1, ain2, null);
32286    }
32287
32288    // ain1 = "short4 a"
32289    // ain2 = "uchar b"
32290    public result_int reduce_my_short4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32291        Type t0, t1;
32292        // check ain1
32293        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32294            throw new RSRuntimeException("Type mismatch with I16_4!");
32295        }
32296        // check ain2
32297        if (!ain2.getType().getElement().isCompatible(__U8)) {
32298            throw new RSRuntimeException("Type mismatch with U8!");
32299        }
32300        // Verify dimensions
32301        t0 = ain1.getType();
32302        t1 = ain2.getType();
32303        if ((t0.getCount() != t1.getCount()) ||
32304            (t0.getX() != t1.getX()) ||
32305            (t0.getY() != t1.getY()) ||
32306            (t0.getZ() != t1.getZ()) ||
32307            (t0.hasFaces()   != t1.hasFaces()) ||
32308            (t0.hasMipmaps() != t1.hasMipmaps())) {
32309            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32310        }
32311
32312        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32313        aout.setAutoPadding(true);
32314        reduce(mExportReduceIdx_my_short4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
32315        return new result_int(aout);
32316    }
32317
32318    private final static int mExportReduceIdx_my_short4_uchar_1 = 487;
32319    // in1 = "a", flattened 4-vectors
32320    // in2 = "b"
32321    public result_int reduce_my_short4_uchar_1(short[] in1, byte[] in2) {
32322        // Verify that "in1" is non-null.
32323        if (in1 == null) {
32324            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32325        }
32326        // Verify that the array length is a multiple of the vector size.
32327        if (in1.length % 4 != 0) {
32328            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32329        }
32330        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32331        ain1.setAutoPadding(true);
32332        ain1.copyFrom(in1);
32333        // Verify that "in2" is non-null.
32334        if (in2 == null) {
32335            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32336        }
32337        // Verify that input array lengths are the same.
32338        if (in1.length / 4 != in2.length) {
32339            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32340        }
32341        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
32342        ain2.setAutoPadding(true);
32343        ain2.copyFrom(in2);
32344
32345        result_int result = reduce_my_short4_uchar_1(ain1, ain2, null);
32346        result.mTempIns = new Allocation[]{ain1, ain2};
32347        return result;
32348    }
32349
32350    // ain1 = "short4 a"
32351    // ain2 = "uchar b"
32352    public result_int reduce_my_short4_uchar_1(Allocation ain1, Allocation ain2) {
32353        return reduce_my_short4_uchar_1(ain1, ain2, null);
32354    }
32355
32356    // ain1 = "short4 a"
32357    // ain2 = "uchar b"
32358    public result_int reduce_my_short4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32359        Type t0, t1;
32360        // check ain1
32361        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32362            throw new RSRuntimeException("Type mismatch with I16_4!");
32363        }
32364        // check ain2
32365        if (!ain2.getType().getElement().isCompatible(__U8)) {
32366            throw new RSRuntimeException("Type mismatch with U8!");
32367        }
32368        // Verify dimensions
32369        t0 = ain1.getType();
32370        t1 = ain2.getType();
32371        if ((t0.getCount() != t1.getCount()) ||
32372            (t0.getX() != t1.getX()) ||
32373            (t0.getY() != t1.getY()) ||
32374            (t0.getZ() != t1.getZ()) ||
32375            (t0.hasFaces()   != t1.hasFaces()) ||
32376            (t0.hasMipmaps() != t1.hasMipmaps())) {
32377            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32378        }
32379
32380        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32381        aout.setAutoPadding(true);
32382        reduce(mExportReduceIdx_my_short4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
32383        return new result_int(aout);
32384    }
32385
32386    private final static int mExportReduceIdx_my_short4_uchar2_0 = 488;
32387    // in1 = "a", flattened 4-vectors
32388    // in2 = "b", flattened 2-vectors
32389    public result_int reduce_my_short4_uchar2_0(short[] in1, byte[] in2) {
32390        // Verify that "in1" is non-null.
32391        if (in1 == null) {
32392            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32393        }
32394        // Verify that the array length is a multiple of the vector size.
32395        if (in1.length % 4 != 0) {
32396            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32397        }
32398        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32399        ain1.setAutoPadding(true);
32400        ain1.copyFrom(in1);
32401        // Verify that "in2" is non-null.
32402        if (in2 == null) {
32403            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32404        }
32405        // Verify that the array length is a multiple of the vector size.
32406        if (in2.length % 2 != 0) {
32407            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
32408        }
32409        // Verify that input array lengths are the same.
32410        if (in1.length / 4 != in2.length / 2) {
32411            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32412        }
32413        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
32414        ain2.setAutoPadding(true);
32415        ain2.copyFrom(in2);
32416
32417        result_int result = reduce_my_short4_uchar2_0(ain1, ain2, null);
32418        result.mTempIns = new Allocation[]{ain1, ain2};
32419        return result;
32420    }
32421
32422    // ain1 = "short4 a"
32423    // ain2 = "uchar2 b"
32424    public result_int reduce_my_short4_uchar2_0(Allocation ain1, Allocation ain2) {
32425        return reduce_my_short4_uchar2_0(ain1, ain2, null);
32426    }
32427
32428    // ain1 = "short4 a"
32429    // ain2 = "uchar2 b"
32430    public result_int reduce_my_short4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32431        Type t0, t1;
32432        // check ain1
32433        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32434            throw new RSRuntimeException("Type mismatch with I16_4!");
32435        }
32436        // check ain2
32437        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
32438            throw new RSRuntimeException("Type mismatch with U8_2!");
32439        }
32440        // Verify dimensions
32441        t0 = ain1.getType();
32442        t1 = ain2.getType();
32443        if ((t0.getCount() != t1.getCount()) ||
32444            (t0.getX() != t1.getX()) ||
32445            (t0.getY() != t1.getY()) ||
32446            (t0.getZ() != t1.getZ()) ||
32447            (t0.hasFaces()   != t1.hasFaces()) ||
32448            (t0.hasMipmaps() != t1.hasMipmaps())) {
32449            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32450        }
32451
32452        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32453        aout.setAutoPadding(true);
32454        reduce(mExportReduceIdx_my_short4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
32455        return new result_int(aout);
32456    }
32457
32458    private final static int mExportReduceIdx_my_short4_uchar2_1 = 489;
32459    // in1 = "a", flattened 4-vectors
32460    // in2 = "b", flattened 2-vectors
32461    public result_int reduce_my_short4_uchar2_1(short[] in1, byte[] in2) {
32462        // Verify that "in1" is non-null.
32463        if (in1 == null) {
32464            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32465        }
32466        // Verify that the array length is a multiple of the vector size.
32467        if (in1.length % 4 != 0) {
32468            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32469        }
32470        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32471        ain1.setAutoPadding(true);
32472        ain1.copyFrom(in1);
32473        // Verify that "in2" is non-null.
32474        if (in2 == null) {
32475            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32476        }
32477        // Verify that the array length is a multiple of the vector size.
32478        if (in2.length % 2 != 0) {
32479            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
32480        }
32481        // Verify that input array lengths are the same.
32482        if (in1.length / 4 != in2.length / 2) {
32483            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32484        }
32485        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
32486        ain2.setAutoPadding(true);
32487        ain2.copyFrom(in2);
32488
32489        result_int result = reduce_my_short4_uchar2_1(ain1, ain2, null);
32490        result.mTempIns = new Allocation[]{ain1, ain2};
32491        return result;
32492    }
32493
32494    // ain1 = "short4 a"
32495    // ain2 = "uchar2 b"
32496    public result_int reduce_my_short4_uchar2_1(Allocation ain1, Allocation ain2) {
32497        return reduce_my_short4_uchar2_1(ain1, ain2, null);
32498    }
32499
32500    // ain1 = "short4 a"
32501    // ain2 = "uchar2 b"
32502    public result_int reduce_my_short4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32503        Type t0, t1;
32504        // check ain1
32505        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32506            throw new RSRuntimeException("Type mismatch with I16_4!");
32507        }
32508        // check ain2
32509        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
32510            throw new RSRuntimeException("Type mismatch with U8_2!");
32511        }
32512        // Verify dimensions
32513        t0 = ain1.getType();
32514        t1 = ain2.getType();
32515        if ((t0.getCount() != t1.getCount()) ||
32516            (t0.getX() != t1.getX()) ||
32517            (t0.getY() != t1.getY()) ||
32518            (t0.getZ() != t1.getZ()) ||
32519            (t0.hasFaces()   != t1.hasFaces()) ||
32520            (t0.hasMipmaps() != t1.hasMipmaps())) {
32521            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32522        }
32523
32524        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32525        aout.setAutoPadding(true);
32526        reduce(mExportReduceIdx_my_short4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
32527        return new result_int(aout);
32528    }
32529
32530    private final static int mExportReduceIdx_my_short4_uchar4_0 = 490;
32531    // in1 = "a", flattened 4-vectors
32532    // in2 = "b", flattened 4-vectors
32533    public result_int reduce_my_short4_uchar4_0(short[] in1, byte[] in2) {
32534        // Verify that "in1" is non-null.
32535        if (in1 == null) {
32536            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32537        }
32538        // Verify that the array length is a multiple of the vector size.
32539        if (in1.length % 4 != 0) {
32540            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32541        }
32542        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32543        ain1.setAutoPadding(true);
32544        ain1.copyFrom(in1);
32545        // Verify that "in2" is non-null.
32546        if (in2 == null) {
32547            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32548        }
32549        // Verify that the array length is a multiple of the vector size.
32550        if (in2.length % 4 != 0) {
32551            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
32552        }
32553        // Verify that input array lengths are the same.
32554        if (in1.length / 4 != in2.length / 4) {
32555            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32556        }
32557        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
32558        ain2.setAutoPadding(true);
32559        ain2.copyFrom(in2);
32560
32561        result_int result = reduce_my_short4_uchar4_0(ain1, ain2, null);
32562        result.mTempIns = new Allocation[]{ain1, ain2};
32563        return result;
32564    }
32565
32566    // ain1 = "short4 a"
32567    // ain2 = "uchar4 b"
32568    public result_int reduce_my_short4_uchar4_0(Allocation ain1, Allocation ain2) {
32569        return reduce_my_short4_uchar4_0(ain1, ain2, null);
32570    }
32571
32572    // ain1 = "short4 a"
32573    // ain2 = "uchar4 b"
32574    public result_int reduce_my_short4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32575        Type t0, t1;
32576        // check ain1
32577        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32578            throw new RSRuntimeException("Type mismatch with I16_4!");
32579        }
32580        // check ain2
32581        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
32582            throw new RSRuntimeException("Type mismatch with U8_4!");
32583        }
32584        // Verify dimensions
32585        t0 = ain1.getType();
32586        t1 = ain2.getType();
32587        if ((t0.getCount() != t1.getCount()) ||
32588            (t0.getX() != t1.getX()) ||
32589            (t0.getY() != t1.getY()) ||
32590            (t0.getZ() != t1.getZ()) ||
32591            (t0.hasFaces()   != t1.hasFaces()) ||
32592            (t0.hasMipmaps() != t1.hasMipmaps())) {
32593            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32594        }
32595
32596        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32597        aout.setAutoPadding(true);
32598        reduce(mExportReduceIdx_my_short4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
32599        return new result_int(aout);
32600    }
32601
32602    private final static int mExportReduceIdx_my_short4_uchar4_1 = 491;
32603    // in1 = "a", flattened 4-vectors
32604    // in2 = "b", flattened 4-vectors
32605    public result_int reduce_my_short4_uchar4_1(short[] in1, byte[] in2) {
32606        // Verify that "in1" is non-null.
32607        if (in1 == null) {
32608            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32609        }
32610        // Verify that the array length is a multiple of the vector size.
32611        if (in1.length % 4 != 0) {
32612            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32613        }
32614        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32615        ain1.setAutoPadding(true);
32616        ain1.copyFrom(in1);
32617        // Verify that "in2" is non-null.
32618        if (in2 == null) {
32619            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32620        }
32621        // Verify that the array length is a multiple of the vector size.
32622        if (in2.length % 4 != 0) {
32623            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
32624        }
32625        // Verify that input array lengths are the same.
32626        if (in1.length / 4 != in2.length / 4) {
32627            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32628        }
32629        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
32630        ain2.setAutoPadding(true);
32631        ain2.copyFrom(in2);
32632
32633        result_int result = reduce_my_short4_uchar4_1(ain1, ain2, null);
32634        result.mTempIns = new Allocation[]{ain1, ain2};
32635        return result;
32636    }
32637
32638    // ain1 = "short4 a"
32639    // ain2 = "uchar4 b"
32640    public result_int reduce_my_short4_uchar4_1(Allocation ain1, Allocation ain2) {
32641        return reduce_my_short4_uchar4_1(ain1, ain2, null);
32642    }
32643
32644    // ain1 = "short4 a"
32645    // ain2 = "uchar4 b"
32646    public result_int reduce_my_short4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32647        Type t0, t1;
32648        // check ain1
32649        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32650            throw new RSRuntimeException("Type mismatch with I16_4!");
32651        }
32652        // check ain2
32653        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
32654            throw new RSRuntimeException("Type mismatch with U8_4!");
32655        }
32656        // Verify dimensions
32657        t0 = ain1.getType();
32658        t1 = ain2.getType();
32659        if ((t0.getCount() != t1.getCount()) ||
32660            (t0.getX() != t1.getX()) ||
32661            (t0.getY() != t1.getY()) ||
32662            (t0.getZ() != t1.getZ()) ||
32663            (t0.hasFaces()   != t1.hasFaces()) ||
32664            (t0.hasMipmaps() != t1.hasMipmaps())) {
32665            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32666        }
32667
32668        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32669        aout.setAutoPadding(true);
32670        reduce(mExportReduceIdx_my_short4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
32671        return new result_int(aout);
32672    }
32673
32674    private final static int mExportReduceIdx_my_short4_ushort_0 = 492;
32675    // in1 = "a", flattened 4-vectors
32676    // in2 = "b"
32677    public result_int reduce_my_short4_ushort_0(short[] in1, short[] in2) {
32678        // Verify that "in1" is non-null.
32679        if (in1 == null) {
32680            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32681        }
32682        // Verify that the array length is a multiple of the vector size.
32683        if (in1.length % 4 != 0) {
32684            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32685        }
32686        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32687        ain1.setAutoPadding(true);
32688        ain1.copyFrom(in1);
32689        // Verify that "in2" is non-null.
32690        if (in2 == null) {
32691            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32692        }
32693        // Verify that input array lengths are the same.
32694        if (in1.length / 4 != in2.length) {
32695            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32696        }
32697        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
32698        ain2.setAutoPadding(true);
32699        ain2.copyFrom(in2);
32700
32701        result_int result = reduce_my_short4_ushort_0(ain1, ain2, null);
32702        result.mTempIns = new Allocation[]{ain1, ain2};
32703        return result;
32704    }
32705
32706    // ain1 = "short4 a"
32707    // ain2 = "ushort b"
32708    public result_int reduce_my_short4_ushort_0(Allocation ain1, Allocation ain2) {
32709        return reduce_my_short4_ushort_0(ain1, ain2, null);
32710    }
32711
32712    // ain1 = "short4 a"
32713    // ain2 = "ushort b"
32714    public result_int reduce_my_short4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32715        Type t0, t1;
32716        // check ain1
32717        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32718            throw new RSRuntimeException("Type mismatch with I16_4!");
32719        }
32720        // check ain2
32721        if (!ain2.getType().getElement().isCompatible(__U16)) {
32722            throw new RSRuntimeException("Type mismatch with U16!");
32723        }
32724        // Verify dimensions
32725        t0 = ain1.getType();
32726        t1 = ain2.getType();
32727        if ((t0.getCount() != t1.getCount()) ||
32728            (t0.getX() != t1.getX()) ||
32729            (t0.getY() != t1.getY()) ||
32730            (t0.getZ() != t1.getZ()) ||
32731            (t0.hasFaces()   != t1.hasFaces()) ||
32732            (t0.hasMipmaps() != t1.hasMipmaps())) {
32733            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32734        }
32735
32736        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32737        aout.setAutoPadding(true);
32738        reduce(mExportReduceIdx_my_short4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
32739        return new result_int(aout);
32740    }
32741
32742    private final static int mExportReduceIdx_my_short4_ushort_1 = 493;
32743    // in1 = "a", flattened 4-vectors
32744    // in2 = "b"
32745    public result_int reduce_my_short4_ushort_1(short[] in1, short[] in2) {
32746        // Verify that "in1" is non-null.
32747        if (in1 == null) {
32748            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32749        }
32750        // Verify that the array length is a multiple of the vector size.
32751        if (in1.length % 4 != 0) {
32752            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32753        }
32754        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32755        ain1.setAutoPadding(true);
32756        ain1.copyFrom(in1);
32757        // Verify that "in2" is non-null.
32758        if (in2 == null) {
32759            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32760        }
32761        // Verify that input array lengths are the same.
32762        if (in1.length / 4 != in2.length) {
32763            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32764        }
32765        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
32766        ain2.setAutoPadding(true);
32767        ain2.copyFrom(in2);
32768
32769        result_int result = reduce_my_short4_ushort_1(ain1, ain2, null);
32770        result.mTempIns = new Allocation[]{ain1, ain2};
32771        return result;
32772    }
32773
32774    // ain1 = "short4 a"
32775    // ain2 = "ushort b"
32776    public result_int reduce_my_short4_ushort_1(Allocation ain1, Allocation ain2) {
32777        return reduce_my_short4_ushort_1(ain1, ain2, null);
32778    }
32779
32780    // ain1 = "short4 a"
32781    // ain2 = "ushort b"
32782    public result_int reduce_my_short4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32783        Type t0, t1;
32784        // check ain1
32785        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32786            throw new RSRuntimeException("Type mismatch with I16_4!");
32787        }
32788        // check ain2
32789        if (!ain2.getType().getElement().isCompatible(__U16)) {
32790            throw new RSRuntimeException("Type mismatch with U16!");
32791        }
32792        // Verify dimensions
32793        t0 = ain1.getType();
32794        t1 = ain2.getType();
32795        if ((t0.getCount() != t1.getCount()) ||
32796            (t0.getX() != t1.getX()) ||
32797            (t0.getY() != t1.getY()) ||
32798            (t0.getZ() != t1.getZ()) ||
32799            (t0.hasFaces()   != t1.hasFaces()) ||
32800            (t0.hasMipmaps() != t1.hasMipmaps())) {
32801            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32802        }
32803
32804        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32805        aout.setAutoPadding(true);
32806        reduce(mExportReduceIdx_my_short4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
32807        return new result_int(aout);
32808    }
32809
32810    private final static int mExportReduceIdx_my_short4_ushort2_0 = 494;
32811    // in1 = "a", flattened 4-vectors
32812    // in2 = "b", flattened 2-vectors
32813    public result_int reduce_my_short4_ushort2_0(short[] in1, short[] in2) {
32814        // Verify that "in1" is non-null.
32815        if (in1 == null) {
32816            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32817        }
32818        // Verify that the array length is a multiple of the vector size.
32819        if (in1.length % 4 != 0) {
32820            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32821        }
32822        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32823        ain1.setAutoPadding(true);
32824        ain1.copyFrom(in1);
32825        // Verify that "in2" is non-null.
32826        if (in2 == null) {
32827            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32828        }
32829        // Verify that the array length is a multiple of the vector size.
32830        if (in2.length % 2 != 0) {
32831            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
32832        }
32833        // Verify that input array lengths are the same.
32834        if (in1.length / 4 != in2.length / 2) {
32835            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32836        }
32837        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
32838        ain2.setAutoPadding(true);
32839        ain2.copyFrom(in2);
32840
32841        result_int result = reduce_my_short4_ushort2_0(ain1, ain2, null);
32842        result.mTempIns = new Allocation[]{ain1, ain2};
32843        return result;
32844    }
32845
32846    // ain1 = "short4 a"
32847    // ain2 = "ushort2 b"
32848    public result_int reduce_my_short4_ushort2_0(Allocation ain1, Allocation ain2) {
32849        return reduce_my_short4_ushort2_0(ain1, ain2, null);
32850    }
32851
32852    // ain1 = "short4 a"
32853    // ain2 = "ushort2 b"
32854    public result_int reduce_my_short4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32855        Type t0, t1;
32856        // check ain1
32857        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32858            throw new RSRuntimeException("Type mismatch with I16_4!");
32859        }
32860        // check ain2
32861        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
32862            throw new RSRuntimeException("Type mismatch with U16_2!");
32863        }
32864        // Verify dimensions
32865        t0 = ain1.getType();
32866        t1 = ain2.getType();
32867        if ((t0.getCount() != t1.getCount()) ||
32868            (t0.getX() != t1.getX()) ||
32869            (t0.getY() != t1.getY()) ||
32870            (t0.getZ() != t1.getZ()) ||
32871            (t0.hasFaces()   != t1.hasFaces()) ||
32872            (t0.hasMipmaps() != t1.hasMipmaps())) {
32873            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32874        }
32875
32876        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32877        aout.setAutoPadding(true);
32878        reduce(mExportReduceIdx_my_short4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
32879        return new result_int(aout);
32880    }
32881
32882    private final static int mExportReduceIdx_my_short4_ushort2_1 = 495;
32883    // in1 = "a", flattened 4-vectors
32884    // in2 = "b", flattened 2-vectors
32885    public result_int reduce_my_short4_ushort2_1(short[] in1, short[] in2) {
32886        // Verify that "in1" is non-null.
32887        if (in1 == null) {
32888            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32889        }
32890        // Verify that the array length is a multiple of the vector size.
32891        if (in1.length % 4 != 0) {
32892            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32893        }
32894        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32895        ain1.setAutoPadding(true);
32896        ain1.copyFrom(in1);
32897        // Verify that "in2" is non-null.
32898        if (in2 == null) {
32899            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32900        }
32901        // Verify that the array length is a multiple of the vector size.
32902        if (in2.length % 2 != 0) {
32903            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
32904        }
32905        // Verify that input array lengths are the same.
32906        if (in1.length / 4 != in2.length / 2) {
32907            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32908        }
32909        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
32910        ain2.setAutoPadding(true);
32911        ain2.copyFrom(in2);
32912
32913        result_int result = reduce_my_short4_ushort2_1(ain1, ain2, null);
32914        result.mTempIns = new Allocation[]{ain1, ain2};
32915        return result;
32916    }
32917
32918    // ain1 = "short4 a"
32919    // ain2 = "ushort2 b"
32920    public result_int reduce_my_short4_ushort2_1(Allocation ain1, Allocation ain2) {
32921        return reduce_my_short4_ushort2_1(ain1, ain2, null);
32922    }
32923
32924    // ain1 = "short4 a"
32925    // ain2 = "ushort2 b"
32926    public result_int reduce_my_short4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32927        Type t0, t1;
32928        // check ain1
32929        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
32930            throw new RSRuntimeException("Type mismatch with I16_4!");
32931        }
32932        // check ain2
32933        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
32934            throw new RSRuntimeException("Type mismatch with U16_2!");
32935        }
32936        // Verify dimensions
32937        t0 = ain1.getType();
32938        t1 = ain2.getType();
32939        if ((t0.getCount() != t1.getCount()) ||
32940            (t0.getX() != t1.getX()) ||
32941            (t0.getY() != t1.getY()) ||
32942            (t0.getZ() != t1.getZ()) ||
32943            (t0.hasFaces()   != t1.hasFaces()) ||
32944            (t0.hasMipmaps() != t1.hasMipmaps())) {
32945            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
32946        }
32947
32948        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
32949        aout.setAutoPadding(true);
32950        reduce(mExportReduceIdx_my_short4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
32951        return new result_int(aout);
32952    }
32953
32954    private final static int mExportReduceIdx_my_short4_ushort4_0 = 496;
32955    // in1 = "a", flattened 4-vectors
32956    // in2 = "b", flattened 4-vectors
32957    public result_int reduce_my_short4_ushort4_0(short[] in1, short[] in2) {
32958        // Verify that "in1" is non-null.
32959        if (in1 == null) {
32960            throw new RSIllegalArgumentException("Array \"in1\" is null!");
32961        }
32962        // Verify that the array length is a multiple of the vector size.
32963        if (in1.length % 4 != 0) {
32964            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
32965        }
32966        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
32967        ain1.setAutoPadding(true);
32968        ain1.copyFrom(in1);
32969        // Verify that "in2" is non-null.
32970        if (in2 == null) {
32971            throw new RSIllegalArgumentException("Array \"in2\" is null!");
32972        }
32973        // Verify that the array length is a multiple of the vector size.
32974        if (in2.length % 4 != 0) {
32975            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
32976        }
32977        // Verify that input array lengths are the same.
32978        if (in1.length / 4 != in2.length / 4) {
32979            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
32980        }
32981        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
32982        ain2.setAutoPadding(true);
32983        ain2.copyFrom(in2);
32984
32985        result_int result = reduce_my_short4_ushort4_0(ain1, ain2, null);
32986        result.mTempIns = new Allocation[]{ain1, ain2};
32987        return result;
32988    }
32989
32990    // ain1 = "short4 a"
32991    // ain2 = "ushort4 b"
32992    public result_int reduce_my_short4_ushort4_0(Allocation ain1, Allocation ain2) {
32993        return reduce_my_short4_ushort4_0(ain1, ain2, null);
32994    }
32995
32996    // ain1 = "short4 a"
32997    // ain2 = "ushort4 b"
32998    public result_int reduce_my_short4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
32999        Type t0, t1;
33000        // check ain1
33001        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
33002            throw new RSRuntimeException("Type mismatch with I16_4!");
33003        }
33004        // check ain2
33005        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
33006            throw new RSRuntimeException("Type mismatch with U16_4!");
33007        }
33008        // Verify dimensions
33009        t0 = ain1.getType();
33010        t1 = ain2.getType();
33011        if ((t0.getCount() != t1.getCount()) ||
33012            (t0.getX() != t1.getX()) ||
33013            (t0.getY() != t1.getY()) ||
33014            (t0.getZ() != t1.getZ()) ||
33015            (t0.hasFaces()   != t1.hasFaces()) ||
33016            (t0.hasMipmaps() != t1.hasMipmaps())) {
33017            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33018        }
33019
33020        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33021        aout.setAutoPadding(true);
33022        reduce(mExportReduceIdx_my_short4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
33023        return new result_int(aout);
33024    }
33025
33026    private final static int mExportReduceIdx_my_short4_ushort4_1 = 497;
33027    // in1 = "a", flattened 4-vectors
33028    // in2 = "b", flattened 4-vectors
33029    public result_int reduce_my_short4_ushort4_1(short[] in1, short[] in2) {
33030        // Verify that "in1" is non-null.
33031        if (in1 == null) {
33032            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33033        }
33034        // Verify that the array length is a multiple of the vector size.
33035        if (in1.length % 4 != 0) {
33036            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
33037        }
33038        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
33039        ain1.setAutoPadding(true);
33040        ain1.copyFrom(in1);
33041        // Verify that "in2" is non-null.
33042        if (in2 == null) {
33043            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33044        }
33045        // Verify that the array length is a multiple of the vector size.
33046        if (in2.length % 4 != 0) {
33047            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
33048        }
33049        // Verify that input array lengths are the same.
33050        if (in1.length / 4 != in2.length / 4) {
33051            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33052        }
33053        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
33054        ain2.setAutoPadding(true);
33055        ain2.copyFrom(in2);
33056
33057        result_int result = reduce_my_short4_ushort4_1(ain1, ain2, null);
33058        result.mTempIns = new Allocation[]{ain1, ain2};
33059        return result;
33060    }
33061
33062    // ain1 = "short4 a"
33063    // ain2 = "ushort4 b"
33064    public result_int reduce_my_short4_ushort4_1(Allocation ain1, Allocation ain2) {
33065        return reduce_my_short4_ushort4_1(ain1, ain2, null);
33066    }
33067
33068    // ain1 = "short4 a"
33069    // ain2 = "ushort4 b"
33070    public result_int reduce_my_short4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33071        Type t0, t1;
33072        // check ain1
33073        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
33074            throw new RSRuntimeException("Type mismatch with I16_4!");
33075        }
33076        // check ain2
33077        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
33078            throw new RSRuntimeException("Type mismatch with U16_4!");
33079        }
33080        // Verify dimensions
33081        t0 = ain1.getType();
33082        t1 = ain2.getType();
33083        if ((t0.getCount() != t1.getCount()) ||
33084            (t0.getX() != t1.getX()) ||
33085            (t0.getY() != t1.getY()) ||
33086            (t0.getZ() != t1.getZ()) ||
33087            (t0.hasFaces()   != t1.hasFaces()) ||
33088            (t0.hasMipmaps() != t1.hasMipmaps())) {
33089            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33090        }
33091
33092        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33093        aout.setAutoPadding(true);
33094        reduce(mExportReduceIdx_my_short4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
33095        return new result_int(aout);
33096    }
33097
33098    private final static int mExportReduceIdx_my_short4_bool_0 = 498;
33099    // in1 = "a", flattened 4-vectors
33100    // in2 = "b"
33101    public result_int reduce_my_short4_bool_0(short[] in1, byte[] in2) {
33102        // Verify that "in1" is non-null.
33103        if (in1 == null) {
33104            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33105        }
33106        // Verify that the array length is a multiple of the vector size.
33107        if (in1.length % 4 != 0) {
33108            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
33109        }
33110        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
33111        ain1.setAutoPadding(true);
33112        ain1.copyFrom(in1);
33113        // Verify that "in2" is non-null.
33114        if (in2 == null) {
33115            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33116        }
33117        // Verify that input array lengths are the same.
33118        if (in1.length / 4 != in2.length) {
33119            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33120        }
33121        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
33122        ain2.setAutoPadding(true);
33123        ain2.copyFrom(in2);
33124
33125        result_int result = reduce_my_short4_bool_0(ain1, ain2, null);
33126        result.mTempIns = new Allocation[]{ain1, ain2};
33127        return result;
33128    }
33129
33130    // ain1 = "short4 a"
33131    // ain2 = "bool b"
33132    public result_int reduce_my_short4_bool_0(Allocation ain1, Allocation ain2) {
33133        return reduce_my_short4_bool_0(ain1, ain2, null);
33134    }
33135
33136    // ain1 = "short4 a"
33137    // ain2 = "bool b"
33138    public result_int reduce_my_short4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33139        Type t0, t1;
33140        // check ain1
33141        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
33142            throw new RSRuntimeException("Type mismatch with I16_4!");
33143        }
33144        // check ain2
33145        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
33146            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
33147        }
33148        // Verify dimensions
33149        t0 = ain1.getType();
33150        t1 = ain2.getType();
33151        if ((t0.getCount() != t1.getCount()) ||
33152            (t0.getX() != t1.getX()) ||
33153            (t0.getY() != t1.getY()) ||
33154            (t0.getZ() != t1.getZ()) ||
33155            (t0.hasFaces()   != t1.hasFaces()) ||
33156            (t0.hasMipmaps() != t1.hasMipmaps())) {
33157            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33158        }
33159
33160        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33161        aout.setAutoPadding(true);
33162        reduce(mExportReduceIdx_my_short4_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
33163        return new result_int(aout);
33164    }
33165
33166    private final static int mExportReduceIdx_my_short4_bool_1 = 499;
33167    // in1 = "a", flattened 4-vectors
33168    // in2 = "b"
33169    public result_int reduce_my_short4_bool_1(short[] in1, byte[] in2) {
33170        // Verify that "in1" is non-null.
33171        if (in1 == null) {
33172            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33173        }
33174        // Verify that the array length is a multiple of the vector size.
33175        if (in1.length % 4 != 0) {
33176            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
33177        }
33178        Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4);
33179        ain1.setAutoPadding(true);
33180        ain1.copyFrom(in1);
33181        // Verify that "in2" is non-null.
33182        if (in2 == null) {
33183            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33184        }
33185        // Verify that input array lengths are the same.
33186        if (in1.length / 4 != in2.length) {
33187            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33188        }
33189        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
33190        ain2.setAutoPadding(true);
33191        ain2.copyFrom(in2);
33192
33193        result_int result = reduce_my_short4_bool_1(ain1, ain2, null);
33194        result.mTempIns = new Allocation[]{ain1, ain2};
33195        return result;
33196    }
33197
33198    // ain1 = "short4 a"
33199    // ain2 = "bool b"
33200    public result_int reduce_my_short4_bool_1(Allocation ain1, Allocation ain2) {
33201        return reduce_my_short4_bool_1(ain1, ain2, null);
33202    }
33203
33204    // ain1 = "short4 a"
33205    // ain2 = "bool b"
33206    public result_int reduce_my_short4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33207        Type t0, t1;
33208        // check ain1
33209        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
33210            throw new RSRuntimeException("Type mismatch with I16_4!");
33211        }
33212        // check ain2
33213        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
33214            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
33215        }
33216        // Verify dimensions
33217        t0 = ain1.getType();
33218        t1 = ain2.getType();
33219        if ((t0.getCount() != t1.getCount()) ||
33220            (t0.getX() != t1.getX()) ||
33221            (t0.getY() != t1.getY()) ||
33222            (t0.getZ() != t1.getZ()) ||
33223            (t0.hasFaces()   != t1.hasFaces()) ||
33224            (t0.hasMipmaps() != t1.hasMipmaps())) {
33225            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33226        }
33227
33228        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33229        aout.setAutoPadding(true);
33230        reduce(mExportReduceIdx_my_short4_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
33231        return new result_int(aout);
33232    }
33233
33234    private final static int mExportReduceIdx_my_short4_rs_matrix2x2_0 = 500;
33235    // ain1 = "short4 a"
33236    // ain2 = "rs_matrix2x2 b"
33237    public result_int reduce_my_short4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
33238        return reduce_my_short4_rs_matrix2x2_0(ain1, ain2, null);
33239    }
33240
33241    // ain1 = "short4 a"
33242    // ain2 = "rs_matrix2x2 b"
33243    public result_int reduce_my_short4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33244        Type t0, t1;
33245        // check ain1
33246        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
33247            throw new RSRuntimeException("Type mismatch with I16_4!");
33248        }
33249        // check ain2
33250        // Verify dimensions
33251        t0 = ain1.getType();
33252        t1 = ain2.getType();
33253        if ((t0.getCount() != t1.getCount()) ||
33254            (t0.getX() != t1.getX()) ||
33255            (t0.getY() != t1.getY()) ||
33256            (t0.getZ() != t1.getZ()) ||
33257            (t0.hasFaces()   != t1.hasFaces()) ||
33258            (t0.hasMipmaps() != t1.hasMipmaps())) {
33259            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33260        }
33261
33262        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33263        aout.setAutoPadding(true);
33264        reduce(mExportReduceIdx_my_short4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
33265        return new result_int(aout);
33266    }
33267
33268    private final static int mExportReduceIdx_my_short4_rs_matrix2x2_1 = 501;
33269    // ain1 = "short4 a"
33270    // ain2 = "rs_matrix2x2 b"
33271    public result_int reduce_my_short4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
33272        return reduce_my_short4_rs_matrix2x2_1(ain1, ain2, null);
33273    }
33274
33275    // ain1 = "short4 a"
33276    // ain2 = "rs_matrix2x2 b"
33277    public result_int reduce_my_short4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33278        Type t0, t1;
33279        // check ain1
33280        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
33281            throw new RSRuntimeException("Type mismatch with I16_4!");
33282        }
33283        // check ain2
33284        // Verify dimensions
33285        t0 = ain1.getType();
33286        t1 = ain2.getType();
33287        if ((t0.getCount() != t1.getCount()) ||
33288            (t0.getX() != t1.getX()) ||
33289            (t0.getY() != t1.getY()) ||
33290            (t0.getZ() != t1.getZ()) ||
33291            (t0.hasFaces()   != t1.hasFaces()) ||
33292            (t0.hasMipmaps() != t1.hasMipmaps())) {
33293            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33294        }
33295
33296        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33297        aout.setAutoPadding(true);
33298        reduce(mExportReduceIdx_my_short4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
33299        return new result_int(aout);
33300    }
33301
33302    private final static int mExportReduceIdx_my_short4_MyStruct_0 = 502;
33303    // ain1 = "short4 a"
33304    // ain2 = "/* struct <> */ b"
33305    public result_int reduce_my_short4_MyStruct_0(Allocation ain1, Allocation ain2) {
33306        return reduce_my_short4_MyStruct_0(ain1, ain2, null);
33307    }
33308
33309    // ain1 = "short4 a"
33310    // ain2 = "/* struct <> */ b"
33311    public result_int reduce_my_short4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33312        Type t0, t1;
33313        // check ain1
33314        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
33315            throw new RSRuntimeException("Type mismatch with I16_4!");
33316        }
33317        // check ain2
33318        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
33319            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
33320        }
33321        // Verify dimensions
33322        t0 = ain1.getType();
33323        t1 = ain2.getType();
33324        if ((t0.getCount() != t1.getCount()) ||
33325            (t0.getX() != t1.getX()) ||
33326            (t0.getY() != t1.getY()) ||
33327            (t0.getZ() != t1.getZ()) ||
33328            (t0.hasFaces()   != t1.hasFaces()) ||
33329            (t0.hasMipmaps() != t1.hasMipmaps())) {
33330            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33331        }
33332
33333        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33334        aout.setAutoPadding(true);
33335        reduce(mExportReduceIdx_my_short4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
33336        return new result_int(aout);
33337    }
33338
33339    private final static int mExportReduceIdx_my_short4_MyStruct_1 = 503;
33340    // ain1 = "short4 a"
33341    // ain2 = "/* struct <> */ b"
33342    public result_int reduce_my_short4_MyStruct_1(Allocation ain1, Allocation ain2) {
33343        return reduce_my_short4_MyStruct_1(ain1, ain2, null);
33344    }
33345
33346    // ain1 = "short4 a"
33347    // ain2 = "/* struct <> */ b"
33348    public result_int reduce_my_short4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33349        Type t0, t1;
33350        // check ain1
33351        if (!ain1.getType().getElement().isCompatible(__I16_4)) {
33352            throw new RSRuntimeException("Type mismatch with I16_4!");
33353        }
33354        // check ain2
33355        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
33356            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
33357        }
33358        // Verify dimensions
33359        t0 = ain1.getType();
33360        t1 = ain2.getType();
33361        if ((t0.getCount() != t1.getCount()) ||
33362            (t0.getX() != t1.getX()) ||
33363            (t0.getY() != t1.getY()) ||
33364            (t0.getZ() != t1.getZ()) ||
33365            (t0.hasFaces()   != t1.hasFaces()) ||
33366            (t0.hasMipmaps() != t1.hasMipmaps())) {
33367            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33368        }
33369
33370        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33371        aout.setAutoPadding(true);
33372        reduce(mExportReduceIdx_my_short4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
33373        return new result_int(aout);
33374    }
33375
33376    private final static int mExportReduceIdx_my_uchar_half_0 = 504;
33377    // in1 = "a"
33378    // in2 = "b"
33379    public result_int reduce_my_uchar_half_0(byte[] in1, short[] in2) {
33380        // Verify that "in1" is non-null.
33381        if (in1 == null) {
33382            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33383        }
33384        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33385        ain1.setAutoPadding(true);
33386        ain1.copyFrom(in1);
33387        // Verify that "in2" is non-null.
33388        if (in2 == null) {
33389            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33390        }
33391        // Verify that input array lengths are the same.
33392        if (in1.length != in2.length) {
33393            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33394        }
33395        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
33396        ain2.setAutoPadding(true);
33397        ain2.copyFrom(in2);
33398
33399        result_int result = reduce_my_uchar_half_0(ain1, ain2, null);
33400        result.mTempIns = new Allocation[]{ain1, ain2};
33401        return result;
33402    }
33403
33404    // ain1 = "uchar a"
33405    // ain2 = "half b"
33406    public result_int reduce_my_uchar_half_0(Allocation ain1, Allocation ain2) {
33407        return reduce_my_uchar_half_0(ain1, ain2, null);
33408    }
33409
33410    // ain1 = "uchar a"
33411    // ain2 = "half b"
33412    public result_int reduce_my_uchar_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33413        Type t0, t1;
33414        // check ain1
33415        if (!ain1.getType().getElement().isCompatible(__U8)) {
33416            throw new RSRuntimeException("Type mismatch with U8!");
33417        }
33418        // check ain2
33419        if (!ain2.getType().getElement().isCompatible(__F16)) {
33420            throw new RSRuntimeException("Type mismatch with F16!");
33421        }
33422        // Verify dimensions
33423        t0 = ain1.getType();
33424        t1 = ain2.getType();
33425        if ((t0.getCount() != t1.getCount()) ||
33426            (t0.getX() != t1.getX()) ||
33427            (t0.getY() != t1.getY()) ||
33428            (t0.getZ() != t1.getZ()) ||
33429            (t0.hasFaces()   != t1.hasFaces()) ||
33430            (t0.hasMipmaps() != t1.hasMipmaps())) {
33431            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33432        }
33433
33434        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33435        aout.setAutoPadding(true);
33436        reduce(mExportReduceIdx_my_uchar_half_0, new Allocation[]{ain1, ain2}, aout, sc);
33437        return new result_int(aout);
33438    }
33439
33440    private final static int mExportReduceIdx_my_uchar_half_1 = 505;
33441    // in1 = "a"
33442    // in2 = "b"
33443    public result_int reduce_my_uchar_half_1(byte[] in1, short[] in2) {
33444        // Verify that "in1" is non-null.
33445        if (in1 == null) {
33446            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33447        }
33448        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33449        ain1.setAutoPadding(true);
33450        ain1.copyFrom(in1);
33451        // Verify that "in2" is non-null.
33452        if (in2 == null) {
33453            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33454        }
33455        // Verify that input array lengths are the same.
33456        if (in1.length != in2.length) {
33457            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33458        }
33459        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
33460        ain2.setAutoPadding(true);
33461        ain2.copyFrom(in2);
33462
33463        result_int result = reduce_my_uchar_half_1(ain1, ain2, null);
33464        result.mTempIns = new Allocation[]{ain1, ain2};
33465        return result;
33466    }
33467
33468    // ain1 = "uchar a"
33469    // ain2 = "half b"
33470    public result_int reduce_my_uchar_half_1(Allocation ain1, Allocation ain2) {
33471        return reduce_my_uchar_half_1(ain1, ain2, null);
33472    }
33473
33474    // ain1 = "uchar a"
33475    // ain2 = "half b"
33476    public result_int reduce_my_uchar_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33477        Type t0, t1;
33478        // check ain1
33479        if (!ain1.getType().getElement().isCompatible(__U8)) {
33480            throw new RSRuntimeException("Type mismatch with U8!");
33481        }
33482        // check ain2
33483        if (!ain2.getType().getElement().isCompatible(__F16)) {
33484            throw new RSRuntimeException("Type mismatch with F16!");
33485        }
33486        // Verify dimensions
33487        t0 = ain1.getType();
33488        t1 = ain2.getType();
33489        if ((t0.getCount() != t1.getCount()) ||
33490            (t0.getX() != t1.getX()) ||
33491            (t0.getY() != t1.getY()) ||
33492            (t0.getZ() != t1.getZ()) ||
33493            (t0.hasFaces()   != t1.hasFaces()) ||
33494            (t0.hasMipmaps() != t1.hasMipmaps())) {
33495            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33496        }
33497
33498        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33499        aout.setAutoPadding(true);
33500        reduce(mExportReduceIdx_my_uchar_half_1, new Allocation[]{ain1, ain2}, aout, sc);
33501        return new result_int(aout);
33502    }
33503
33504    private final static int mExportReduceIdx_my_uchar_half2_0 = 506;
33505    // in1 = "a"
33506    // in2 = "b", flattened 2-vectors
33507    public result_int reduce_my_uchar_half2_0(byte[] in1, short[] in2) {
33508        // Verify that "in1" is non-null.
33509        if (in1 == null) {
33510            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33511        }
33512        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33513        ain1.setAutoPadding(true);
33514        ain1.copyFrom(in1);
33515        // Verify that "in2" is non-null.
33516        if (in2 == null) {
33517            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33518        }
33519        // Verify that the array length is a multiple of the vector size.
33520        if (in2.length % 2 != 0) {
33521            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
33522        }
33523        // Verify that input array lengths are the same.
33524        if (in1.length != in2.length / 2) {
33525            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33526        }
33527        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
33528        ain2.setAutoPadding(true);
33529        ain2.copyFrom(in2);
33530
33531        result_int result = reduce_my_uchar_half2_0(ain1, ain2, null);
33532        result.mTempIns = new Allocation[]{ain1, ain2};
33533        return result;
33534    }
33535
33536    // ain1 = "uchar a"
33537    // ain2 = "half2 b"
33538    public result_int reduce_my_uchar_half2_0(Allocation ain1, Allocation ain2) {
33539        return reduce_my_uchar_half2_0(ain1, ain2, null);
33540    }
33541
33542    // ain1 = "uchar a"
33543    // ain2 = "half2 b"
33544    public result_int reduce_my_uchar_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33545        Type t0, t1;
33546        // check ain1
33547        if (!ain1.getType().getElement().isCompatible(__U8)) {
33548            throw new RSRuntimeException("Type mismatch with U8!");
33549        }
33550        // check ain2
33551        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
33552            throw new RSRuntimeException("Type mismatch with F16_2!");
33553        }
33554        // Verify dimensions
33555        t0 = ain1.getType();
33556        t1 = ain2.getType();
33557        if ((t0.getCount() != t1.getCount()) ||
33558            (t0.getX() != t1.getX()) ||
33559            (t0.getY() != t1.getY()) ||
33560            (t0.getZ() != t1.getZ()) ||
33561            (t0.hasFaces()   != t1.hasFaces()) ||
33562            (t0.hasMipmaps() != t1.hasMipmaps())) {
33563            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33564        }
33565
33566        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33567        aout.setAutoPadding(true);
33568        reduce(mExportReduceIdx_my_uchar_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
33569        return new result_int(aout);
33570    }
33571
33572    private final static int mExportReduceIdx_my_uchar_half2_1 = 507;
33573    // in1 = "a"
33574    // in2 = "b", flattened 2-vectors
33575    public result_int reduce_my_uchar_half2_1(byte[] in1, short[] in2) {
33576        // Verify that "in1" is non-null.
33577        if (in1 == null) {
33578            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33579        }
33580        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33581        ain1.setAutoPadding(true);
33582        ain1.copyFrom(in1);
33583        // Verify that "in2" is non-null.
33584        if (in2 == null) {
33585            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33586        }
33587        // Verify that the array length is a multiple of the vector size.
33588        if (in2.length % 2 != 0) {
33589            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
33590        }
33591        // Verify that input array lengths are the same.
33592        if (in1.length != in2.length / 2) {
33593            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33594        }
33595        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
33596        ain2.setAutoPadding(true);
33597        ain2.copyFrom(in2);
33598
33599        result_int result = reduce_my_uchar_half2_1(ain1, ain2, null);
33600        result.mTempIns = new Allocation[]{ain1, ain2};
33601        return result;
33602    }
33603
33604    // ain1 = "uchar a"
33605    // ain2 = "half2 b"
33606    public result_int reduce_my_uchar_half2_1(Allocation ain1, Allocation ain2) {
33607        return reduce_my_uchar_half2_1(ain1, ain2, null);
33608    }
33609
33610    // ain1 = "uchar a"
33611    // ain2 = "half2 b"
33612    public result_int reduce_my_uchar_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33613        Type t0, t1;
33614        // check ain1
33615        if (!ain1.getType().getElement().isCompatible(__U8)) {
33616            throw new RSRuntimeException("Type mismatch with U8!");
33617        }
33618        // check ain2
33619        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
33620            throw new RSRuntimeException("Type mismatch with F16_2!");
33621        }
33622        // Verify dimensions
33623        t0 = ain1.getType();
33624        t1 = ain2.getType();
33625        if ((t0.getCount() != t1.getCount()) ||
33626            (t0.getX() != t1.getX()) ||
33627            (t0.getY() != t1.getY()) ||
33628            (t0.getZ() != t1.getZ()) ||
33629            (t0.hasFaces()   != t1.hasFaces()) ||
33630            (t0.hasMipmaps() != t1.hasMipmaps())) {
33631            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33632        }
33633
33634        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33635        aout.setAutoPadding(true);
33636        reduce(mExportReduceIdx_my_uchar_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
33637        return new result_int(aout);
33638    }
33639
33640    private final static int mExportReduceIdx_my_uchar_half4_0 = 508;
33641    // in1 = "a"
33642    // in2 = "b", flattened 4-vectors
33643    public result_int reduce_my_uchar_half4_0(byte[] in1, short[] in2) {
33644        // Verify that "in1" is non-null.
33645        if (in1 == null) {
33646            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33647        }
33648        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33649        ain1.setAutoPadding(true);
33650        ain1.copyFrom(in1);
33651        // Verify that "in2" is non-null.
33652        if (in2 == null) {
33653            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33654        }
33655        // Verify that the array length is a multiple of the vector size.
33656        if (in2.length % 4 != 0) {
33657            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
33658        }
33659        // Verify that input array lengths are the same.
33660        if (in1.length != in2.length / 4) {
33661            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33662        }
33663        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
33664        ain2.setAutoPadding(true);
33665        ain2.copyFrom(in2);
33666
33667        result_int result = reduce_my_uchar_half4_0(ain1, ain2, null);
33668        result.mTempIns = new Allocation[]{ain1, ain2};
33669        return result;
33670    }
33671
33672    // ain1 = "uchar a"
33673    // ain2 = "half4 b"
33674    public result_int reduce_my_uchar_half4_0(Allocation ain1, Allocation ain2) {
33675        return reduce_my_uchar_half4_0(ain1, ain2, null);
33676    }
33677
33678    // ain1 = "uchar a"
33679    // ain2 = "half4 b"
33680    public result_int reduce_my_uchar_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33681        Type t0, t1;
33682        // check ain1
33683        if (!ain1.getType().getElement().isCompatible(__U8)) {
33684            throw new RSRuntimeException("Type mismatch with U8!");
33685        }
33686        // check ain2
33687        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
33688            throw new RSRuntimeException("Type mismatch with F16_4!");
33689        }
33690        // Verify dimensions
33691        t0 = ain1.getType();
33692        t1 = ain2.getType();
33693        if ((t0.getCount() != t1.getCount()) ||
33694            (t0.getX() != t1.getX()) ||
33695            (t0.getY() != t1.getY()) ||
33696            (t0.getZ() != t1.getZ()) ||
33697            (t0.hasFaces()   != t1.hasFaces()) ||
33698            (t0.hasMipmaps() != t1.hasMipmaps())) {
33699            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33700        }
33701
33702        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33703        aout.setAutoPadding(true);
33704        reduce(mExportReduceIdx_my_uchar_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
33705        return new result_int(aout);
33706    }
33707
33708    private final static int mExportReduceIdx_my_uchar_half4_1 = 509;
33709    // in1 = "a"
33710    // in2 = "b", flattened 4-vectors
33711    public result_int reduce_my_uchar_half4_1(byte[] in1, short[] in2) {
33712        // Verify that "in1" is non-null.
33713        if (in1 == null) {
33714            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33715        }
33716        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33717        ain1.setAutoPadding(true);
33718        ain1.copyFrom(in1);
33719        // Verify that "in2" is non-null.
33720        if (in2 == null) {
33721            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33722        }
33723        // Verify that the array length is a multiple of the vector size.
33724        if (in2.length % 4 != 0) {
33725            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
33726        }
33727        // Verify that input array lengths are the same.
33728        if (in1.length != in2.length / 4) {
33729            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33730        }
33731        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
33732        ain2.setAutoPadding(true);
33733        ain2.copyFrom(in2);
33734
33735        result_int result = reduce_my_uchar_half4_1(ain1, ain2, null);
33736        result.mTempIns = new Allocation[]{ain1, ain2};
33737        return result;
33738    }
33739
33740    // ain1 = "uchar a"
33741    // ain2 = "half4 b"
33742    public result_int reduce_my_uchar_half4_1(Allocation ain1, Allocation ain2) {
33743        return reduce_my_uchar_half4_1(ain1, ain2, null);
33744    }
33745
33746    // ain1 = "uchar a"
33747    // ain2 = "half4 b"
33748    public result_int reduce_my_uchar_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33749        Type t0, t1;
33750        // check ain1
33751        if (!ain1.getType().getElement().isCompatible(__U8)) {
33752            throw new RSRuntimeException("Type mismatch with U8!");
33753        }
33754        // check ain2
33755        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
33756            throw new RSRuntimeException("Type mismatch with F16_4!");
33757        }
33758        // Verify dimensions
33759        t0 = ain1.getType();
33760        t1 = ain2.getType();
33761        if ((t0.getCount() != t1.getCount()) ||
33762            (t0.getX() != t1.getX()) ||
33763            (t0.getY() != t1.getY()) ||
33764            (t0.getZ() != t1.getZ()) ||
33765            (t0.hasFaces()   != t1.hasFaces()) ||
33766            (t0.hasMipmaps() != t1.hasMipmaps())) {
33767            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33768        }
33769
33770        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33771        aout.setAutoPadding(true);
33772        reduce(mExportReduceIdx_my_uchar_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
33773        return new result_int(aout);
33774    }
33775
33776    private final static int mExportReduceIdx_my_uchar_float_0 = 510;
33777    // in1 = "a"
33778    // in2 = "b"
33779    public result_int reduce_my_uchar_float_0(byte[] in1, float[] in2) {
33780        // Verify that "in1" is non-null.
33781        if (in1 == null) {
33782            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33783        }
33784        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33785        ain1.setAutoPadding(true);
33786        ain1.copyFrom(in1);
33787        // Verify that "in2" is non-null.
33788        if (in2 == null) {
33789            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33790        }
33791        // Verify that input array lengths are the same.
33792        if (in1.length != in2.length) {
33793            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33794        }
33795        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
33796        ain2.setAutoPadding(true);
33797        ain2.copyFrom(in2);
33798
33799        result_int result = reduce_my_uchar_float_0(ain1, ain2, null);
33800        result.mTempIns = new Allocation[]{ain1, ain2};
33801        return result;
33802    }
33803
33804    // ain1 = "uchar a"
33805    // ain2 = "float b"
33806    public result_int reduce_my_uchar_float_0(Allocation ain1, Allocation ain2) {
33807        return reduce_my_uchar_float_0(ain1, ain2, null);
33808    }
33809
33810    // ain1 = "uchar a"
33811    // ain2 = "float b"
33812    public result_int reduce_my_uchar_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33813        Type t0, t1;
33814        // check ain1
33815        if (!ain1.getType().getElement().isCompatible(__U8)) {
33816            throw new RSRuntimeException("Type mismatch with U8!");
33817        }
33818        // check ain2
33819        if (!ain2.getType().getElement().isCompatible(__F32)) {
33820            throw new RSRuntimeException("Type mismatch with F32!");
33821        }
33822        // Verify dimensions
33823        t0 = ain1.getType();
33824        t1 = ain2.getType();
33825        if ((t0.getCount() != t1.getCount()) ||
33826            (t0.getX() != t1.getX()) ||
33827            (t0.getY() != t1.getY()) ||
33828            (t0.getZ() != t1.getZ()) ||
33829            (t0.hasFaces()   != t1.hasFaces()) ||
33830            (t0.hasMipmaps() != t1.hasMipmaps())) {
33831            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33832        }
33833
33834        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33835        aout.setAutoPadding(true);
33836        reduce(mExportReduceIdx_my_uchar_float_0, new Allocation[]{ain1, ain2}, aout, sc);
33837        return new result_int(aout);
33838    }
33839
33840    private final static int mExportReduceIdx_my_uchar_float_1 = 511;
33841    // in1 = "a"
33842    // in2 = "b"
33843    public result_int reduce_my_uchar_float_1(byte[] in1, float[] in2) {
33844        // Verify that "in1" is non-null.
33845        if (in1 == null) {
33846            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33847        }
33848        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33849        ain1.setAutoPadding(true);
33850        ain1.copyFrom(in1);
33851        // Verify that "in2" is non-null.
33852        if (in2 == null) {
33853            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33854        }
33855        // Verify that input array lengths are the same.
33856        if (in1.length != in2.length) {
33857            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33858        }
33859        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
33860        ain2.setAutoPadding(true);
33861        ain2.copyFrom(in2);
33862
33863        result_int result = reduce_my_uchar_float_1(ain1, ain2, null);
33864        result.mTempIns = new Allocation[]{ain1, ain2};
33865        return result;
33866    }
33867
33868    // ain1 = "uchar a"
33869    // ain2 = "float b"
33870    public result_int reduce_my_uchar_float_1(Allocation ain1, Allocation ain2) {
33871        return reduce_my_uchar_float_1(ain1, ain2, null);
33872    }
33873
33874    // ain1 = "uchar a"
33875    // ain2 = "float b"
33876    public result_int reduce_my_uchar_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33877        Type t0, t1;
33878        // check ain1
33879        if (!ain1.getType().getElement().isCompatible(__U8)) {
33880            throw new RSRuntimeException("Type mismatch with U8!");
33881        }
33882        // check ain2
33883        if (!ain2.getType().getElement().isCompatible(__F32)) {
33884            throw new RSRuntimeException("Type mismatch with F32!");
33885        }
33886        // Verify dimensions
33887        t0 = ain1.getType();
33888        t1 = ain2.getType();
33889        if ((t0.getCount() != t1.getCount()) ||
33890            (t0.getX() != t1.getX()) ||
33891            (t0.getY() != t1.getY()) ||
33892            (t0.getZ() != t1.getZ()) ||
33893            (t0.hasFaces()   != t1.hasFaces()) ||
33894            (t0.hasMipmaps() != t1.hasMipmaps())) {
33895            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33896        }
33897
33898        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33899        aout.setAutoPadding(true);
33900        reduce(mExportReduceIdx_my_uchar_float_1, new Allocation[]{ain1, ain2}, aout, sc);
33901        return new result_int(aout);
33902    }
33903
33904    private final static int mExportReduceIdx_my_uchar_float2_0 = 512;
33905    // in1 = "a"
33906    // in2 = "b", flattened 2-vectors
33907    public result_int reduce_my_uchar_float2_0(byte[] in1, float[] in2) {
33908        // Verify that "in1" is non-null.
33909        if (in1 == null) {
33910            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33911        }
33912        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33913        ain1.setAutoPadding(true);
33914        ain1.copyFrom(in1);
33915        // Verify that "in2" is non-null.
33916        if (in2 == null) {
33917            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33918        }
33919        // Verify that the array length is a multiple of the vector size.
33920        if (in2.length % 2 != 0) {
33921            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
33922        }
33923        // Verify that input array lengths are the same.
33924        if (in1.length != in2.length / 2) {
33925            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33926        }
33927        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
33928        ain2.setAutoPadding(true);
33929        ain2.copyFrom(in2);
33930
33931        result_int result = reduce_my_uchar_float2_0(ain1, ain2, null);
33932        result.mTempIns = new Allocation[]{ain1, ain2};
33933        return result;
33934    }
33935
33936    // ain1 = "uchar a"
33937    // ain2 = "float2 b"
33938    public result_int reduce_my_uchar_float2_0(Allocation ain1, Allocation ain2) {
33939        return reduce_my_uchar_float2_0(ain1, ain2, null);
33940    }
33941
33942    // ain1 = "uchar a"
33943    // ain2 = "float2 b"
33944    public result_int reduce_my_uchar_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
33945        Type t0, t1;
33946        // check ain1
33947        if (!ain1.getType().getElement().isCompatible(__U8)) {
33948            throw new RSRuntimeException("Type mismatch with U8!");
33949        }
33950        // check ain2
33951        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
33952            throw new RSRuntimeException("Type mismatch with F32_2!");
33953        }
33954        // Verify dimensions
33955        t0 = ain1.getType();
33956        t1 = ain2.getType();
33957        if ((t0.getCount() != t1.getCount()) ||
33958            (t0.getX() != t1.getX()) ||
33959            (t0.getY() != t1.getY()) ||
33960            (t0.getZ() != t1.getZ()) ||
33961            (t0.hasFaces()   != t1.hasFaces()) ||
33962            (t0.hasMipmaps() != t1.hasMipmaps())) {
33963            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
33964        }
33965
33966        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
33967        aout.setAutoPadding(true);
33968        reduce(mExportReduceIdx_my_uchar_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
33969        return new result_int(aout);
33970    }
33971
33972    private final static int mExportReduceIdx_my_uchar_float2_1 = 513;
33973    // in1 = "a"
33974    // in2 = "b", flattened 2-vectors
33975    public result_int reduce_my_uchar_float2_1(byte[] in1, float[] in2) {
33976        // Verify that "in1" is non-null.
33977        if (in1 == null) {
33978            throw new RSIllegalArgumentException("Array \"in1\" is null!");
33979        }
33980        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
33981        ain1.setAutoPadding(true);
33982        ain1.copyFrom(in1);
33983        // Verify that "in2" is non-null.
33984        if (in2 == null) {
33985            throw new RSIllegalArgumentException("Array \"in2\" is null!");
33986        }
33987        // Verify that the array length is a multiple of the vector size.
33988        if (in2.length % 2 != 0) {
33989            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
33990        }
33991        // Verify that input array lengths are the same.
33992        if (in1.length != in2.length / 2) {
33993            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
33994        }
33995        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
33996        ain2.setAutoPadding(true);
33997        ain2.copyFrom(in2);
33998
33999        result_int result = reduce_my_uchar_float2_1(ain1, ain2, null);
34000        result.mTempIns = new Allocation[]{ain1, ain2};
34001        return result;
34002    }
34003
34004    // ain1 = "uchar a"
34005    // ain2 = "float2 b"
34006    public result_int reduce_my_uchar_float2_1(Allocation ain1, Allocation ain2) {
34007        return reduce_my_uchar_float2_1(ain1, ain2, null);
34008    }
34009
34010    // ain1 = "uchar a"
34011    // ain2 = "float2 b"
34012    public result_int reduce_my_uchar_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34013        Type t0, t1;
34014        // check ain1
34015        if (!ain1.getType().getElement().isCompatible(__U8)) {
34016            throw new RSRuntimeException("Type mismatch with U8!");
34017        }
34018        // check ain2
34019        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
34020            throw new RSRuntimeException("Type mismatch with F32_2!");
34021        }
34022        // Verify dimensions
34023        t0 = ain1.getType();
34024        t1 = ain2.getType();
34025        if ((t0.getCount() != t1.getCount()) ||
34026            (t0.getX() != t1.getX()) ||
34027            (t0.getY() != t1.getY()) ||
34028            (t0.getZ() != t1.getZ()) ||
34029            (t0.hasFaces()   != t1.hasFaces()) ||
34030            (t0.hasMipmaps() != t1.hasMipmaps())) {
34031            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34032        }
34033
34034        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34035        aout.setAutoPadding(true);
34036        reduce(mExportReduceIdx_my_uchar_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
34037        return new result_int(aout);
34038    }
34039
34040    private final static int mExportReduceIdx_my_uchar_float4_0 = 514;
34041    // in1 = "a"
34042    // in2 = "b", flattened 4-vectors
34043    public result_int reduce_my_uchar_float4_0(byte[] in1, float[] in2) {
34044        // Verify that "in1" is non-null.
34045        if (in1 == null) {
34046            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34047        }
34048        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34049        ain1.setAutoPadding(true);
34050        ain1.copyFrom(in1);
34051        // Verify that "in2" is non-null.
34052        if (in2 == null) {
34053            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34054        }
34055        // Verify that the array length is a multiple of the vector size.
34056        if (in2.length % 4 != 0) {
34057            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
34058        }
34059        // Verify that input array lengths are the same.
34060        if (in1.length != in2.length / 4) {
34061            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34062        }
34063        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
34064        ain2.setAutoPadding(true);
34065        ain2.copyFrom(in2);
34066
34067        result_int result = reduce_my_uchar_float4_0(ain1, ain2, null);
34068        result.mTempIns = new Allocation[]{ain1, ain2};
34069        return result;
34070    }
34071
34072    // ain1 = "uchar a"
34073    // ain2 = "float4 b"
34074    public result_int reduce_my_uchar_float4_0(Allocation ain1, Allocation ain2) {
34075        return reduce_my_uchar_float4_0(ain1, ain2, null);
34076    }
34077
34078    // ain1 = "uchar a"
34079    // ain2 = "float4 b"
34080    public result_int reduce_my_uchar_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34081        Type t0, t1;
34082        // check ain1
34083        if (!ain1.getType().getElement().isCompatible(__U8)) {
34084            throw new RSRuntimeException("Type mismatch with U8!");
34085        }
34086        // check ain2
34087        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
34088            throw new RSRuntimeException("Type mismatch with F32_4!");
34089        }
34090        // Verify dimensions
34091        t0 = ain1.getType();
34092        t1 = ain2.getType();
34093        if ((t0.getCount() != t1.getCount()) ||
34094            (t0.getX() != t1.getX()) ||
34095            (t0.getY() != t1.getY()) ||
34096            (t0.getZ() != t1.getZ()) ||
34097            (t0.hasFaces()   != t1.hasFaces()) ||
34098            (t0.hasMipmaps() != t1.hasMipmaps())) {
34099            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34100        }
34101
34102        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34103        aout.setAutoPadding(true);
34104        reduce(mExportReduceIdx_my_uchar_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
34105        return new result_int(aout);
34106    }
34107
34108    private final static int mExportReduceIdx_my_uchar_float4_1 = 515;
34109    // in1 = "a"
34110    // in2 = "b", flattened 4-vectors
34111    public result_int reduce_my_uchar_float4_1(byte[] in1, float[] in2) {
34112        // Verify that "in1" is non-null.
34113        if (in1 == null) {
34114            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34115        }
34116        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34117        ain1.setAutoPadding(true);
34118        ain1.copyFrom(in1);
34119        // Verify that "in2" is non-null.
34120        if (in2 == null) {
34121            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34122        }
34123        // Verify that the array length is a multiple of the vector size.
34124        if (in2.length % 4 != 0) {
34125            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
34126        }
34127        // Verify that input array lengths are the same.
34128        if (in1.length != in2.length / 4) {
34129            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34130        }
34131        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
34132        ain2.setAutoPadding(true);
34133        ain2.copyFrom(in2);
34134
34135        result_int result = reduce_my_uchar_float4_1(ain1, ain2, null);
34136        result.mTempIns = new Allocation[]{ain1, ain2};
34137        return result;
34138    }
34139
34140    // ain1 = "uchar a"
34141    // ain2 = "float4 b"
34142    public result_int reduce_my_uchar_float4_1(Allocation ain1, Allocation ain2) {
34143        return reduce_my_uchar_float4_1(ain1, ain2, null);
34144    }
34145
34146    // ain1 = "uchar a"
34147    // ain2 = "float4 b"
34148    public result_int reduce_my_uchar_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34149        Type t0, t1;
34150        // check ain1
34151        if (!ain1.getType().getElement().isCompatible(__U8)) {
34152            throw new RSRuntimeException("Type mismatch with U8!");
34153        }
34154        // check ain2
34155        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
34156            throw new RSRuntimeException("Type mismatch with F32_4!");
34157        }
34158        // Verify dimensions
34159        t0 = ain1.getType();
34160        t1 = ain2.getType();
34161        if ((t0.getCount() != t1.getCount()) ||
34162            (t0.getX() != t1.getX()) ||
34163            (t0.getY() != t1.getY()) ||
34164            (t0.getZ() != t1.getZ()) ||
34165            (t0.hasFaces()   != t1.hasFaces()) ||
34166            (t0.hasMipmaps() != t1.hasMipmaps())) {
34167            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34168        }
34169
34170        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34171        aout.setAutoPadding(true);
34172        reduce(mExportReduceIdx_my_uchar_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
34173        return new result_int(aout);
34174    }
34175
34176    private final static int mExportReduceIdx_my_uchar_char_0 = 516;
34177    // in1 = "a"
34178    // in2 = "b"
34179    public result_int reduce_my_uchar_char_0(byte[] in1, byte[] in2) {
34180        // Verify that "in1" is non-null.
34181        if (in1 == null) {
34182            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34183        }
34184        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34185        ain1.setAutoPadding(true);
34186        ain1.copyFrom(in1);
34187        // Verify that "in2" is non-null.
34188        if (in2 == null) {
34189            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34190        }
34191        // Verify that input array lengths are the same.
34192        if (in1.length != in2.length) {
34193            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34194        }
34195        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
34196        ain2.setAutoPadding(true);
34197        ain2.copyFrom(in2);
34198
34199        result_int result = reduce_my_uchar_char_0(ain1, ain2, null);
34200        result.mTempIns = new Allocation[]{ain1, ain2};
34201        return result;
34202    }
34203
34204    // ain1 = "uchar a"
34205    // ain2 = "char b"
34206    public result_int reduce_my_uchar_char_0(Allocation ain1, Allocation ain2) {
34207        return reduce_my_uchar_char_0(ain1, ain2, null);
34208    }
34209
34210    // ain1 = "uchar a"
34211    // ain2 = "char b"
34212    public result_int reduce_my_uchar_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34213        Type t0, t1;
34214        // check ain1
34215        if (!ain1.getType().getElement().isCompatible(__U8)) {
34216            throw new RSRuntimeException("Type mismatch with U8!");
34217        }
34218        // check ain2
34219        if (!ain2.getType().getElement().isCompatible(__I8)) {
34220            throw new RSRuntimeException("Type mismatch with I8!");
34221        }
34222        // Verify dimensions
34223        t0 = ain1.getType();
34224        t1 = ain2.getType();
34225        if ((t0.getCount() != t1.getCount()) ||
34226            (t0.getX() != t1.getX()) ||
34227            (t0.getY() != t1.getY()) ||
34228            (t0.getZ() != t1.getZ()) ||
34229            (t0.hasFaces()   != t1.hasFaces()) ||
34230            (t0.hasMipmaps() != t1.hasMipmaps())) {
34231            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34232        }
34233
34234        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34235        aout.setAutoPadding(true);
34236        reduce(mExportReduceIdx_my_uchar_char_0, new Allocation[]{ain1, ain2}, aout, sc);
34237        return new result_int(aout);
34238    }
34239
34240    private final static int mExportReduceIdx_my_uchar_char_1 = 517;
34241    // in1 = "a"
34242    // in2 = "b"
34243    public result_int reduce_my_uchar_char_1(byte[] in1, byte[] in2) {
34244        // Verify that "in1" is non-null.
34245        if (in1 == null) {
34246            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34247        }
34248        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34249        ain1.setAutoPadding(true);
34250        ain1.copyFrom(in1);
34251        // Verify that "in2" is non-null.
34252        if (in2 == null) {
34253            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34254        }
34255        // Verify that input array lengths are the same.
34256        if (in1.length != in2.length) {
34257            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34258        }
34259        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
34260        ain2.setAutoPadding(true);
34261        ain2.copyFrom(in2);
34262
34263        result_int result = reduce_my_uchar_char_1(ain1, ain2, null);
34264        result.mTempIns = new Allocation[]{ain1, ain2};
34265        return result;
34266    }
34267
34268    // ain1 = "uchar a"
34269    // ain2 = "char b"
34270    public result_int reduce_my_uchar_char_1(Allocation ain1, Allocation ain2) {
34271        return reduce_my_uchar_char_1(ain1, ain2, null);
34272    }
34273
34274    // ain1 = "uchar a"
34275    // ain2 = "char b"
34276    public result_int reduce_my_uchar_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34277        Type t0, t1;
34278        // check ain1
34279        if (!ain1.getType().getElement().isCompatible(__U8)) {
34280            throw new RSRuntimeException("Type mismatch with U8!");
34281        }
34282        // check ain2
34283        if (!ain2.getType().getElement().isCompatible(__I8)) {
34284            throw new RSRuntimeException("Type mismatch with I8!");
34285        }
34286        // Verify dimensions
34287        t0 = ain1.getType();
34288        t1 = ain2.getType();
34289        if ((t0.getCount() != t1.getCount()) ||
34290            (t0.getX() != t1.getX()) ||
34291            (t0.getY() != t1.getY()) ||
34292            (t0.getZ() != t1.getZ()) ||
34293            (t0.hasFaces()   != t1.hasFaces()) ||
34294            (t0.hasMipmaps() != t1.hasMipmaps())) {
34295            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34296        }
34297
34298        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34299        aout.setAutoPadding(true);
34300        reduce(mExportReduceIdx_my_uchar_char_1, new Allocation[]{ain1, ain2}, aout, sc);
34301        return new result_int(aout);
34302    }
34303
34304    private final static int mExportReduceIdx_my_uchar_char2_0 = 518;
34305    // in1 = "a"
34306    // in2 = "b", flattened 2-vectors
34307    public result_int reduce_my_uchar_char2_0(byte[] in1, byte[] in2) {
34308        // Verify that "in1" is non-null.
34309        if (in1 == null) {
34310            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34311        }
34312        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34313        ain1.setAutoPadding(true);
34314        ain1.copyFrom(in1);
34315        // Verify that "in2" is non-null.
34316        if (in2 == null) {
34317            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34318        }
34319        // Verify that the array length is a multiple of the vector size.
34320        if (in2.length % 2 != 0) {
34321            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
34322        }
34323        // Verify that input array lengths are the same.
34324        if (in1.length != in2.length / 2) {
34325            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34326        }
34327        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
34328        ain2.setAutoPadding(true);
34329        ain2.copyFrom(in2);
34330
34331        result_int result = reduce_my_uchar_char2_0(ain1, ain2, null);
34332        result.mTempIns = new Allocation[]{ain1, ain2};
34333        return result;
34334    }
34335
34336    // ain1 = "uchar a"
34337    // ain2 = "char2 b"
34338    public result_int reduce_my_uchar_char2_0(Allocation ain1, Allocation ain2) {
34339        return reduce_my_uchar_char2_0(ain1, ain2, null);
34340    }
34341
34342    // ain1 = "uchar a"
34343    // ain2 = "char2 b"
34344    public result_int reduce_my_uchar_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34345        Type t0, t1;
34346        // check ain1
34347        if (!ain1.getType().getElement().isCompatible(__U8)) {
34348            throw new RSRuntimeException("Type mismatch with U8!");
34349        }
34350        // check ain2
34351        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
34352            throw new RSRuntimeException("Type mismatch with I8_2!");
34353        }
34354        // Verify dimensions
34355        t0 = ain1.getType();
34356        t1 = ain2.getType();
34357        if ((t0.getCount() != t1.getCount()) ||
34358            (t0.getX() != t1.getX()) ||
34359            (t0.getY() != t1.getY()) ||
34360            (t0.getZ() != t1.getZ()) ||
34361            (t0.hasFaces()   != t1.hasFaces()) ||
34362            (t0.hasMipmaps() != t1.hasMipmaps())) {
34363            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34364        }
34365
34366        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34367        aout.setAutoPadding(true);
34368        reduce(mExportReduceIdx_my_uchar_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
34369        return new result_int(aout);
34370    }
34371
34372    private final static int mExportReduceIdx_my_uchar_char2_1 = 519;
34373    // in1 = "a"
34374    // in2 = "b", flattened 2-vectors
34375    public result_int reduce_my_uchar_char2_1(byte[] in1, byte[] in2) {
34376        // Verify that "in1" is non-null.
34377        if (in1 == null) {
34378            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34379        }
34380        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34381        ain1.setAutoPadding(true);
34382        ain1.copyFrom(in1);
34383        // Verify that "in2" is non-null.
34384        if (in2 == null) {
34385            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34386        }
34387        // Verify that the array length is a multiple of the vector size.
34388        if (in2.length % 2 != 0) {
34389            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
34390        }
34391        // Verify that input array lengths are the same.
34392        if (in1.length != in2.length / 2) {
34393            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34394        }
34395        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
34396        ain2.setAutoPadding(true);
34397        ain2.copyFrom(in2);
34398
34399        result_int result = reduce_my_uchar_char2_1(ain1, ain2, null);
34400        result.mTempIns = new Allocation[]{ain1, ain2};
34401        return result;
34402    }
34403
34404    // ain1 = "uchar a"
34405    // ain2 = "char2 b"
34406    public result_int reduce_my_uchar_char2_1(Allocation ain1, Allocation ain2) {
34407        return reduce_my_uchar_char2_1(ain1, ain2, null);
34408    }
34409
34410    // ain1 = "uchar a"
34411    // ain2 = "char2 b"
34412    public result_int reduce_my_uchar_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34413        Type t0, t1;
34414        // check ain1
34415        if (!ain1.getType().getElement().isCompatible(__U8)) {
34416            throw new RSRuntimeException("Type mismatch with U8!");
34417        }
34418        // check ain2
34419        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
34420            throw new RSRuntimeException("Type mismatch with I8_2!");
34421        }
34422        // Verify dimensions
34423        t0 = ain1.getType();
34424        t1 = ain2.getType();
34425        if ((t0.getCount() != t1.getCount()) ||
34426            (t0.getX() != t1.getX()) ||
34427            (t0.getY() != t1.getY()) ||
34428            (t0.getZ() != t1.getZ()) ||
34429            (t0.hasFaces()   != t1.hasFaces()) ||
34430            (t0.hasMipmaps() != t1.hasMipmaps())) {
34431            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34432        }
34433
34434        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34435        aout.setAutoPadding(true);
34436        reduce(mExportReduceIdx_my_uchar_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
34437        return new result_int(aout);
34438    }
34439
34440    private final static int mExportReduceIdx_my_uchar_char4_0 = 520;
34441    // in1 = "a"
34442    // in2 = "b", flattened 4-vectors
34443    public result_int reduce_my_uchar_char4_0(byte[] in1, byte[] in2) {
34444        // Verify that "in1" is non-null.
34445        if (in1 == null) {
34446            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34447        }
34448        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34449        ain1.setAutoPadding(true);
34450        ain1.copyFrom(in1);
34451        // Verify that "in2" is non-null.
34452        if (in2 == null) {
34453            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34454        }
34455        // Verify that the array length is a multiple of the vector size.
34456        if (in2.length % 4 != 0) {
34457            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
34458        }
34459        // Verify that input array lengths are the same.
34460        if (in1.length != in2.length / 4) {
34461            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34462        }
34463        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
34464        ain2.setAutoPadding(true);
34465        ain2.copyFrom(in2);
34466
34467        result_int result = reduce_my_uchar_char4_0(ain1, ain2, null);
34468        result.mTempIns = new Allocation[]{ain1, ain2};
34469        return result;
34470    }
34471
34472    // ain1 = "uchar a"
34473    // ain2 = "char4 b"
34474    public result_int reduce_my_uchar_char4_0(Allocation ain1, Allocation ain2) {
34475        return reduce_my_uchar_char4_0(ain1, ain2, null);
34476    }
34477
34478    // ain1 = "uchar a"
34479    // ain2 = "char4 b"
34480    public result_int reduce_my_uchar_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34481        Type t0, t1;
34482        // check ain1
34483        if (!ain1.getType().getElement().isCompatible(__U8)) {
34484            throw new RSRuntimeException("Type mismatch with U8!");
34485        }
34486        // check ain2
34487        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
34488            throw new RSRuntimeException("Type mismatch with I8_4!");
34489        }
34490        // Verify dimensions
34491        t0 = ain1.getType();
34492        t1 = ain2.getType();
34493        if ((t0.getCount() != t1.getCount()) ||
34494            (t0.getX() != t1.getX()) ||
34495            (t0.getY() != t1.getY()) ||
34496            (t0.getZ() != t1.getZ()) ||
34497            (t0.hasFaces()   != t1.hasFaces()) ||
34498            (t0.hasMipmaps() != t1.hasMipmaps())) {
34499            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34500        }
34501
34502        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34503        aout.setAutoPadding(true);
34504        reduce(mExportReduceIdx_my_uchar_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
34505        return new result_int(aout);
34506    }
34507
34508    private final static int mExportReduceIdx_my_uchar_char4_1 = 521;
34509    // in1 = "a"
34510    // in2 = "b", flattened 4-vectors
34511    public result_int reduce_my_uchar_char4_1(byte[] in1, byte[] in2) {
34512        // Verify that "in1" is non-null.
34513        if (in1 == null) {
34514            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34515        }
34516        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34517        ain1.setAutoPadding(true);
34518        ain1.copyFrom(in1);
34519        // Verify that "in2" is non-null.
34520        if (in2 == null) {
34521            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34522        }
34523        // Verify that the array length is a multiple of the vector size.
34524        if (in2.length % 4 != 0) {
34525            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
34526        }
34527        // Verify that input array lengths are the same.
34528        if (in1.length != in2.length / 4) {
34529            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34530        }
34531        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
34532        ain2.setAutoPadding(true);
34533        ain2.copyFrom(in2);
34534
34535        result_int result = reduce_my_uchar_char4_1(ain1, ain2, null);
34536        result.mTempIns = new Allocation[]{ain1, ain2};
34537        return result;
34538    }
34539
34540    // ain1 = "uchar a"
34541    // ain2 = "char4 b"
34542    public result_int reduce_my_uchar_char4_1(Allocation ain1, Allocation ain2) {
34543        return reduce_my_uchar_char4_1(ain1, ain2, null);
34544    }
34545
34546    // ain1 = "uchar a"
34547    // ain2 = "char4 b"
34548    public result_int reduce_my_uchar_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34549        Type t0, t1;
34550        // check ain1
34551        if (!ain1.getType().getElement().isCompatible(__U8)) {
34552            throw new RSRuntimeException("Type mismatch with U8!");
34553        }
34554        // check ain2
34555        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
34556            throw new RSRuntimeException("Type mismatch with I8_4!");
34557        }
34558        // Verify dimensions
34559        t0 = ain1.getType();
34560        t1 = ain2.getType();
34561        if ((t0.getCount() != t1.getCount()) ||
34562            (t0.getX() != t1.getX()) ||
34563            (t0.getY() != t1.getY()) ||
34564            (t0.getZ() != t1.getZ()) ||
34565            (t0.hasFaces()   != t1.hasFaces()) ||
34566            (t0.hasMipmaps() != t1.hasMipmaps())) {
34567            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34568        }
34569
34570        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34571        aout.setAutoPadding(true);
34572        reduce(mExportReduceIdx_my_uchar_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
34573        return new result_int(aout);
34574    }
34575
34576    private final static int mExportReduceIdx_my_uchar_short_0 = 522;
34577    // in1 = "a"
34578    // in2 = "b"
34579    public result_int reduce_my_uchar_short_0(byte[] in1, short[] in2) {
34580        // Verify that "in1" is non-null.
34581        if (in1 == null) {
34582            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34583        }
34584        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34585        ain1.setAutoPadding(true);
34586        ain1.copyFrom(in1);
34587        // Verify that "in2" is non-null.
34588        if (in2 == null) {
34589            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34590        }
34591        // Verify that input array lengths are the same.
34592        if (in1.length != in2.length) {
34593            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34594        }
34595        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
34596        ain2.setAutoPadding(true);
34597        ain2.copyFrom(in2);
34598
34599        result_int result = reduce_my_uchar_short_0(ain1, ain2, null);
34600        result.mTempIns = new Allocation[]{ain1, ain2};
34601        return result;
34602    }
34603
34604    // ain1 = "uchar a"
34605    // ain2 = "short b"
34606    public result_int reduce_my_uchar_short_0(Allocation ain1, Allocation ain2) {
34607        return reduce_my_uchar_short_0(ain1, ain2, null);
34608    }
34609
34610    // ain1 = "uchar a"
34611    // ain2 = "short b"
34612    public result_int reduce_my_uchar_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34613        Type t0, t1;
34614        // check ain1
34615        if (!ain1.getType().getElement().isCompatible(__U8)) {
34616            throw new RSRuntimeException("Type mismatch with U8!");
34617        }
34618        // check ain2
34619        if (!ain2.getType().getElement().isCompatible(__I16)) {
34620            throw new RSRuntimeException("Type mismatch with I16!");
34621        }
34622        // Verify dimensions
34623        t0 = ain1.getType();
34624        t1 = ain2.getType();
34625        if ((t0.getCount() != t1.getCount()) ||
34626            (t0.getX() != t1.getX()) ||
34627            (t0.getY() != t1.getY()) ||
34628            (t0.getZ() != t1.getZ()) ||
34629            (t0.hasFaces()   != t1.hasFaces()) ||
34630            (t0.hasMipmaps() != t1.hasMipmaps())) {
34631            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34632        }
34633
34634        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34635        aout.setAutoPadding(true);
34636        reduce(mExportReduceIdx_my_uchar_short_0, new Allocation[]{ain1, ain2}, aout, sc);
34637        return new result_int(aout);
34638    }
34639
34640    private final static int mExportReduceIdx_my_uchar_short_1 = 523;
34641    // in1 = "a"
34642    // in2 = "b"
34643    public result_int reduce_my_uchar_short_1(byte[] in1, short[] in2) {
34644        // Verify that "in1" is non-null.
34645        if (in1 == null) {
34646            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34647        }
34648        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34649        ain1.setAutoPadding(true);
34650        ain1.copyFrom(in1);
34651        // Verify that "in2" is non-null.
34652        if (in2 == null) {
34653            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34654        }
34655        // Verify that input array lengths are the same.
34656        if (in1.length != in2.length) {
34657            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34658        }
34659        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
34660        ain2.setAutoPadding(true);
34661        ain2.copyFrom(in2);
34662
34663        result_int result = reduce_my_uchar_short_1(ain1, ain2, null);
34664        result.mTempIns = new Allocation[]{ain1, ain2};
34665        return result;
34666    }
34667
34668    // ain1 = "uchar a"
34669    // ain2 = "short b"
34670    public result_int reduce_my_uchar_short_1(Allocation ain1, Allocation ain2) {
34671        return reduce_my_uchar_short_1(ain1, ain2, null);
34672    }
34673
34674    // ain1 = "uchar a"
34675    // ain2 = "short b"
34676    public result_int reduce_my_uchar_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34677        Type t0, t1;
34678        // check ain1
34679        if (!ain1.getType().getElement().isCompatible(__U8)) {
34680            throw new RSRuntimeException("Type mismatch with U8!");
34681        }
34682        // check ain2
34683        if (!ain2.getType().getElement().isCompatible(__I16)) {
34684            throw new RSRuntimeException("Type mismatch with I16!");
34685        }
34686        // Verify dimensions
34687        t0 = ain1.getType();
34688        t1 = ain2.getType();
34689        if ((t0.getCount() != t1.getCount()) ||
34690            (t0.getX() != t1.getX()) ||
34691            (t0.getY() != t1.getY()) ||
34692            (t0.getZ() != t1.getZ()) ||
34693            (t0.hasFaces()   != t1.hasFaces()) ||
34694            (t0.hasMipmaps() != t1.hasMipmaps())) {
34695            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34696        }
34697
34698        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34699        aout.setAutoPadding(true);
34700        reduce(mExportReduceIdx_my_uchar_short_1, new Allocation[]{ain1, ain2}, aout, sc);
34701        return new result_int(aout);
34702    }
34703
34704    private final static int mExportReduceIdx_my_uchar_short2_0 = 524;
34705    // in1 = "a"
34706    // in2 = "b", flattened 2-vectors
34707    public result_int reduce_my_uchar_short2_0(byte[] in1, short[] in2) {
34708        // Verify that "in1" is non-null.
34709        if (in1 == null) {
34710            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34711        }
34712        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34713        ain1.setAutoPadding(true);
34714        ain1.copyFrom(in1);
34715        // Verify that "in2" is non-null.
34716        if (in2 == null) {
34717            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34718        }
34719        // Verify that the array length is a multiple of the vector size.
34720        if (in2.length % 2 != 0) {
34721            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
34722        }
34723        // Verify that input array lengths are the same.
34724        if (in1.length != in2.length / 2) {
34725            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34726        }
34727        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
34728        ain2.setAutoPadding(true);
34729        ain2.copyFrom(in2);
34730
34731        result_int result = reduce_my_uchar_short2_0(ain1, ain2, null);
34732        result.mTempIns = new Allocation[]{ain1, ain2};
34733        return result;
34734    }
34735
34736    // ain1 = "uchar a"
34737    // ain2 = "short2 b"
34738    public result_int reduce_my_uchar_short2_0(Allocation ain1, Allocation ain2) {
34739        return reduce_my_uchar_short2_0(ain1, ain2, null);
34740    }
34741
34742    // ain1 = "uchar a"
34743    // ain2 = "short2 b"
34744    public result_int reduce_my_uchar_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34745        Type t0, t1;
34746        // check ain1
34747        if (!ain1.getType().getElement().isCompatible(__U8)) {
34748            throw new RSRuntimeException("Type mismatch with U8!");
34749        }
34750        // check ain2
34751        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
34752            throw new RSRuntimeException("Type mismatch with I16_2!");
34753        }
34754        // Verify dimensions
34755        t0 = ain1.getType();
34756        t1 = ain2.getType();
34757        if ((t0.getCount() != t1.getCount()) ||
34758            (t0.getX() != t1.getX()) ||
34759            (t0.getY() != t1.getY()) ||
34760            (t0.getZ() != t1.getZ()) ||
34761            (t0.hasFaces()   != t1.hasFaces()) ||
34762            (t0.hasMipmaps() != t1.hasMipmaps())) {
34763            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34764        }
34765
34766        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34767        aout.setAutoPadding(true);
34768        reduce(mExportReduceIdx_my_uchar_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
34769        return new result_int(aout);
34770    }
34771
34772    private final static int mExportReduceIdx_my_uchar_short2_1 = 525;
34773    // in1 = "a"
34774    // in2 = "b", flattened 2-vectors
34775    public result_int reduce_my_uchar_short2_1(byte[] in1, short[] in2) {
34776        // Verify that "in1" is non-null.
34777        if (in1 == null) {
34778            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34779        }
34780        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34781        ain1.setAutoPadding(true);
34782        ain1.copyFrom(in1);
34783        // Verify that "in2" is non-null.
34784        if (in2 == null) {
34785            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34786        }
34787        // Verify that the array length is a multiple of the vector size.
34788        if (in2.length % 2 != 0) {
34789            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
34790        }
34791        // Verify that input array lengths are the same.
34792        if (in1.length != in2.length / 2) {
34793            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34794        }
34795        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
34796        ain2.setAutoPadding(true);
34797        ain2.copyFrom(in2);
34798
34799        result_int result = reduce_my_uchar_short2_1(ain1, ain2, null);
34800        result.mTempIns = new Allocation[]{ain1, ain2};
34801        return result;
34802    }
34803
34804    // ain1 = "uchar a"
34805    // ain2 = "short2 b"
34806    public result_int reduce_my_uchar_short2_1(Allocation ain1, Allocation ain2) {
34807        return reduce_my_uchar_short2_1(ain1, ain2, null);
34808    }
34809
34810    // ain1 = "uchar a"
34811    // ain2 = "short2 b"
34812    public result_int reduce_my_uchar_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34813        Type t0, t1;
34814        // check ain1
34815        if (!ain1.getType().getElement().isCompatible(__U8)) {
34816            throw new RSRuntimeException("Type mismatch with U8!");
34817        }
34818        // check ain2
34819        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
34820            throw new RSRuntimeException("Type mismatch with I16_2!");
34821        }
34822        // Verify dimensions
34823        t0 = ain1.getType();
34824        t1 = ain2.getType();
34825        if ((t0.getCount() != t1.getCount()) ||
34826            (t0.getX() != t1.getX()) ||
34827            (t0.getY() != t1.getY()) ||
34828            (t0.getZ() != t1.getZ()) ||
34829            (t0.hasFaces()   != t1.hasFaces()) ||
34830            (t0.hasMipmaps() != t1.hasMipmaps())) {
34831            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34832        }
34833
34834        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34835        aout.setAutoPadding(true);
34836        reduce(mExportReduceIdx_my_uchar_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
34837        return new result_int(aout);
34838    }
34839
34840    private final static int mExportReduceIdx_my_uchar_short4_0 = 526;
34841    // in1 = "a"
34842    // in2 = "b", flattened 4-vectors
34843    public result_int reduce_my_uchar_short4_0(byte[] in1, short[] in2) {
34844        // Verify that "in1" is non-null.
34845        if (in1 == null) {
34846            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34847        }
34848        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34849        ain1.setAutoPadding(true);
34850        ain1.copyFrom(in1);
34851        // Verify that "in2" is non-null.
34852        if (in2 == null) {
34853            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34854        }
34855        // Verify that the array length is a multiple of the vector size.
34856        if (in2.length % 4 != 0) {
34857            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
34858        }
34859        // Verify that input array lengths are the same.
34860        if (in1.length != in2.length / 4) {
34861            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34862        }
34863        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
34864        ain2.setAutoPadding(true);
34865        ain2.copyFrom(in2);
34866
34867        result_int result = reduce_my_uchar_short4_0(ain1, ain2, null);
34868        result.mTempIns = new Allocation[]{ain1, ain2};
34869        return result;
34870    }
34871
34872    // ain1 = "uchar a"
34873    // ain2 = "short4 b"
34874    public result_int reduce_my_uchar_short4_0(Allocation ain1, Allocation ain2) {
34875        return reduce_my_uchar_short4_0(ain1, ain2, null);
34876    }
34877
34878    // ain1 = "uchar a"
34879    // ain2 = "short4 b"
34880    public result_int reduce_my_uchar_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34881        Type t0, t1;
34882        // check ain1
34883        if (!ain1.getType().getElement().isCompatible(__U8)) {
34884            throw new RSRuntimeException("Type mismatch with U8!");
34885        }
34886        // check ain2
34887        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
34888            throw new RSRuntimeException("Type mismatch with I16_4!");
34889        }
34890        // Verify dimensions
34891        t0 = ain1.getType();
34892        t1 = ain2.getType();
34893        if ((t0.getCount() != t1.getCount()) ||
34894            (t0.getX() != t1.getX()) ||
34895            (t0.getY() != t1.getY()) ||
34896            (t0.getZ() != t1.getZ()) ||
34897            (t0.hasFaces()   != t1.hasFaces()) ||
34898            (t0.hasMipmaps() != t1.hasMipmaps())) {
34899            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34900        }
34901
34902        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34903        aout.setAutoPadding(true);
34904        reduce(mExportReduceIdx_my_uchar_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
34905        return new result_int(aout);
34906    }
34907
34908    private final static int mExportReduceIdx_my_uchar_short4_1 = 527;
34909    // in1 = "a"
34910    // in2 = "b", flattened 4-vectors
34911    public result_int reduce_my_uchar_short4_1(byte[] in1, short[] in2) {
34912        // Verify that "in1" is non-null.
34913        if (in1 == null) {
34914            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34915        }
34916        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34917        ain1.setAutoPadding(true);
34918        ain1.copyFrom(in1);
34919        // Verify that "in2" is non-null.
34920        if (in2 == null) {
34921            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34922        }
34923        // Verify that the array length is a multiple of the vector size.
34924        if (in2.length % 4 != 0) {
34925            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
34926        }
34927        // Verify that input array lengths are the same.
34928        if (in1.length != in2.length / 4) {
34929            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34930        }
34931        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
34932        ain2.setAutoPadding(true);
34933        ain2.copyFrom(in2);
34934
34935        result_int result = reduce_my_uchar_short4_1(ain1, ain2, null);
34936        result.mTempIns = new Allocation[]{ain1, ain2};
34937        return result;
34938    }
34939
34940    // ain1 = "uchar a"
34941    // ain2 = "short4 b"
34942    public result_int reduce_my_uchar_short4_1(Allocation ain1, Allocation ain2) {
34943        return reduce_my_uchar_short4_1(ain1, ain2, null);
34944    }
34945
34946    // ain1 = "uchar a"
34947    // ain2 = "short4 b"
34948    public result_int reduce_my_uchar_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
34949        Type t0, t1;
34950        // check ain1
34951        if (!ain1.getType().getElement().isCompatible(__U8)) {
34952            throw new RSRuntimeException("Type mismatch with U8!");
34953        }
34954        // check ain2
34955        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
34956            throw new RSRuntimeException("Type mismatch with I16_4!");
34957        }
34958        // Verify dimensions
34959        t0 = ain1.getType();
34960        t1 = ain2.getType();
34961        if ((t0.getCount() != t1.getCount()) ||
34962            (t0.getX() != t1.getX()) ||
34963            (t0.getY() != t1.getY()) ||
34964            (t0.getZ() != t1.getZ()) ||
34965            (t0.hasFaces()   != t1.hasFaces()) ||
34966            (t0.hasMipmaps() != t1.hasMipmaps())) {
34967            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
34968        }
34969
34970        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
34971        aout.setAutoPadding(true);
34972        reduce(mExportReduceIdx_my_uchar_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
34973        return new result_int(aout);
34974    }
34975
34976    private final static int mExportReduceIdx_my_uchar_uchar_0 = 528;
34977    // in1 = "a"
34978    // in2 = "b"
34979    public result_int reduce_my_uchar_uchar_0(byte[] in1, byte[] in2) {
34980        // Verify that "in1" is non-null.
34981        if (in1 == null) {
34982            throw new RSIllegalArgumentException("Array \"in1\" is null!");
34983        }
34984        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
34985        ain1.setAutoPadding(true);
34986        ain1.copyFrom(in1);
34987        // Verify that "in2" is non-null.
34988        if (in2 == null) {
34989            throw new RSIllegalArgumentException("Array \"in2\" is null!");
34990        }
34991        // Verify that input array lengths are the same.
34992        if (in1.length != in2.length) {
34993            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
34994        }
34995        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
34996        ain2.setAutoPadding(true);
34997        ain2.copyFrom(in2);
34998
34999        result_int result = reduce_my_uchar_uchar_0(ain1, ain2, null);
35000        result.mTempIns = new Allocation[]{ain1, ain2};
35001        return result;
35002    }
35003
35004    // ain1 = "uchar a"
35005    // ain2 = "uchar b"
35006    public result_int reduce_my_uchar_uchar_0(Allocation ain1, Allocation ain2) {
35007        return reduce_my_uchar_uchar_0(ain1, ain2, null);
35008    }
35009
35010    // ain1 = "uchar a"
35011    // ain2 = "uchar b"
35012    public result_int reduce_my_uchar_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35013        Type t0, t1;
35014        // check ain1
35015        if (!ain1.getType().getElement().isCompatible(__U8)) {
35016            throw new RSRuntimeException("Type mismatch with U8!");
35017        }
35018        // check ain2
35019        if (!ain2.getType().getElement().isCompatible(__U8)) {
35020            throw new RSRuntimeException("Type mismatch with U8!");
35021        }
35022        // Verify dimensions
35023        t0 = ain1.getType();
35024        t1 = ain2.getType();
35025        if ((t0.getCount() != t1.getCount()) ||
35026            (t0.getX() != t1.getX()) ||
35027            (t0.getY() != t1.getY()) ||
35028            (t0.getZ() != t1.getZ()) ||
35029            (t0.hasFaces()   != t1.hasFaces()) ||
35030            (t0.hasMipmaps() != t1.hasMipmaps())) {
35031            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35032        }
35033
35034        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35035        aout.setAutoPadding(true);
35036        reduce(mExportReduceIdx_my_uchar_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
35037        return new result_int(aout);
35038    }
35039
35040    private final static int mExportReduceIdx_my_uchar_uchar_1 = 529;
35041    // in1 = "a"
35042    // in2 = "b"
35043    public result_int reduce_my_uchar_uchar_1(byte[] in1, byte[] in2) {
35044        // Verify that "in1" is non-null.
35045        if (in1 == null) {
35046            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35047        }
35048        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35049        ain1.setAutoPadding(true);
35050        ain1.copyFrom(in1);
35051        // Verify that "in2" is non-null.
35052        if (in2 == null) {
35053            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35054        }
35055        // Verify that input array lengths are the same.
35056        if (in1.length != in2.length) {
35057            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35058        }
35059        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
35060        ain2.setAutoPadding(true);
35061        ain2.copyFrom(in2);
35062
35063        result_int result = reduce_my_uchar_uchar_1(ain1, ain2, null);
35064        result.mTempIns = new Allocation[]{ain1, ain2};
35065        return result;
35066    }
35067
35068    // ain1 = "uchar a"
35069    // ain2 = "uchar b"
35070    public result_int reduce_my_uchar_uchar_1(Allocation ain1, Allocation ain2) {
35071        return reduce_my_uchar_uchar_1(ain1, ain2, null);
35072    }
35073
35074    // ain1 = "uchar a"
35075    // ain2 = "uchar b"
35076    public result_int reduce_my_uchar_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35077        Type t0, t1;
35078        // check ain1
35079        if (!ain1.getType().getElement().isCompatible(__U8)) {
35080            throw new RSRuntimeException("Type mismatch with U8!");
35081        }
35082        // check ain2
35083        if (!ain2.getType().getElement().isCompatible(__U8)) {
35084            throw new RSRuntimeException("Type mismatch with U8!");
35085        }
35086        // Verify dimensions
35087        t0 = ain1.getType();
35088        t1 = ain2.getType();
35089        if ((t0.getCount() != t1.getCount()) ||
35090            (t0.getX() != t1.getX()) ||
35091            (t0.getY() != t1.getY()) ||
35092            (t0.getZ() != t1.getZ()) ||
35093            (t0.hasFaces()   != t1.hasFaces()) ||
35094            (t0.hasMipmaps() != t1.hasMipmaps())) {
35095            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35096        }
35097
35098        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35099        aout.setAutoPadding(true);
35100        reduce(mExportReduceIdx_my_uchar_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
35101        return new result_int(aout);
35102    }
35103
35104    private final static int mExportReduceIdx_my_uchar_uchar2_0 = 530;
35105    // in1 = "a"
35106    // in2 = "b", flattened 2-vectors
35107    public result_int reduce_my_uchar_uchar2_0(byte[] in1, byte[] in2) {
35108        // Verify that "in1" is non-null.
35109        if (in1 == null) {
35110            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35111        }
35112        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35113        ain1.setAutoPadding(true);
35114        ain1.copyFrom(in1);
35115        // Verify that "in2" is non-null.
35116        if (in2 == null) {
35117            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35118        }
35119        // Verify that the array length is a multiple of the vector size.
35120        if (in2.length % 2 != 0) {
35121            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
35122        }
35123        // Verify that input array lengths are the same.
35124        if (in1.length != in2.length / 2) {
35125            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35126        }
35127        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
35128        ain2.setAutoPadding(true);
35129        ain2.copyFrom(in2);
35130
35131        result_int result = reduce_my_uchar_uchar2_0(ain1, ain2, null);
35132        result.mTempIns = new Allocation[]{ain1, ain2};
35133        return result;
35134    }
35135
35136    // ain1 = "uchar a"
35137    // ain2 = "uchar2 b"
35138    public result_int reduce_my_uchar_uchar2_0(Allocation ain1, Allocation ain2) {
35139        return reduce_my_uchar_uchar2_0(ain1, ain2, null);
35140    }
35141
35142    // ain1 = "uchar a"
35143    // ain2 = "uchar2 b"
35144    public result_int reduce_my_uchar_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35145        Type t0, t1;
35146        // check ain1
35147        if (!ain1.getType().getElement().isCompatible(__U8)) {
35148            throw new RSRuntimeException("Type mismatch with U8!");
35149        }
35150        // check ain2
35151        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
35152            throw new RSRuntimeException("Type mismatch with U8_2!");
35153        }
35154        // Verify dimensions
35155        t0 = ain1.getType();
35156        t1 = ain2.getType();
35157        if ((t0.getCount() != t1.getCount()) ||
35158            (t0.getX() != t1.getX()) ||
35159            (t0.getY() != t1.getY()) ||
35160            (t0.getZ() != t1.getZ()) ||
35161            (t0.hasFaces()   != t1.hasFaces()) ||
35162            (t0.hasMipmaps() != t1.hasMipmaps())) {
35163            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35164        }
35165
35166        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35167        aout.setAutoPadding(true);
35168        reduce(mExportReduceIdx_my_uchar_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
35169        return new result_int(aout);
35170    }
35171
35172    private final static int mExportReduceIdx_my_uchar_uchar2_1 = 531;
35173    // in1 = "a"
35174    // in2 = "b", flattened 2-vectors
35175    public result_int reduce_my_uchar_uchar2_1(byte[] in1, byte[] in2) {
35176        // Verify that "in1" is non-null.
35177        if (in1 == null) {
35178            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35179        }
35180        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35181        ain1.setAutoPadding(true);
35182        ain1.copyFrom(in1);
35183        // Verify that "in2" is non-null.
35184        if (in2 == null) {
35185            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35186        }
35187        // Verify that the array length is a multiple of the vector size.
35188        if (in2.length % 2 != 0) {
35189            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
35190        }
35191        // Verify that input array lengths are the same.
35192        if (in1.length != in2.length / 2) {
35193            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35194        }
35195        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
35196        ain2.setAutoPadding(true);
35197        ain2.copyFrom(in2);
35198
35199        result_int result = reduce_my_uchar_uchar2_1(ain1, ain2, null);
35200        result.mTempIns = new Allocation[]{ain1, ain2};
35201        return result;
35202    }
35203
35204    // ain1 = "uchar a"
35205    // ain2 = "uchar2 b"
35206    public result_int reduce_my_uchar_uchar2_1(Allocation ain1, Allocation ain2) {
35207        return reduce_my_uchar_uchar2_1(ain1, ain2, null);
35208    }
35209
35210    // ain1 = "uchar a"
35211    // ain2 = "uchar2 b"
35212    public result_int reduce_my_uchar_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35213        Type t0, t1;
35214        // check ain1
35215        if (!ain1.getType().getElement().isCompatible(__U8)) {
35216            throw new RSRuntimeException("Type mismatch with U8!");
35217        }
35218        // check ain2
35219        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
35220            throw new RSRuntimeException("Type mismatch with U8_2!");
35221        }
35222        // Verify dimensions
35223        t0 = ain1.getType();
35224        t1 = ain2.getType();
35225        if ((t0.getCount() != t1.getCount()) ||
35226            (t0.getX() != t1.getX()) ||
35227            (t0.getY() != t1.getY()) ||
35228            (t0.getZ() != t1.getZ()) ||
35229            (t0.hasFaces()   != t1.hasFaces()) ||
35230            (t0.hasMipmaps() != t1.hasMipmaps())) {
35231            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35232        }
35233
35234        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35235        aout.setAutoPadding(true);
35236        reduce(mExportReduceIdx_my_uchar_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
35237        return new result_int(aout);
35238    }
35239
35240    private final static int mExportReduceIdx_my_uchar_uchar4_0 = 532;
35241    // in1 = "a"
35242    // in2 = "b", flattened 4-vectors
35243    public result_int reduce_my_uchar_uchar4_0(byte[] in1, byte[] in2) {
35244        // Verify that "in1" is non-null.
35245        if (in1 == null) {
35246            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35247        }
35248        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35249        ain1.setAutoPadding(true);
35250        ain1.copyFrom(in1);
35251        // Verify that "in2" is non-null.
35252        if (in2 == null) {
35253            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35254        }
35255        // Verify that the array length is a multiple of the vector size.
35256        if (in2.length % 4 != 0) {
35257            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
35258        }
35259        // Verify that input array lengths are the same.
35260        if (in1.length != in2.length / 4) {
35261            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35262        }
35263        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
35264        ain2.setAutoPadding(true);
35265        ain2.copyFrom(in2);
35266
35267        result_int result = reduce_my_uchar_uchar4_0(ain1, ain2, null);
35268        result.mTempIns = new Allocation[]{ain1, ain2};
35269        return result;
35270    }
35271
35272    // ain1 = "uchar a"
35273    // ain2 = "uchar4 b"
35274    public result_int reduce_my_uchar_uchar4_0(Allocation ain1, Allocation ain2) {
35275        return reduce_my_uchar_uchar4_0(ain1, ain2, null);
35276    }
35277
35278    // ain1 = "uchar a"
35279    // ain2 = "uchar4 b"
35280    public result_int reduce_my_uchar_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35281        Type t0, t1;
35282        // check ain1
35283        if (!ain1.getType().getElement().isCompatible(__U8)) {
35284            throw new RSRuntimeException("Type mismatch with U8!");
35285        }
35286        // check ain2
35287        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
35288            throw new RSRuntimeException("Type mismatch with U8_4!");
35289        }
35290        // Verify dimensions
35291        t0 = ain1.getType();
35292        t1 = ain2.getType();
35293        if ((t0.getCount() != t1.getCount()) ||
35294            (t0.getX() != t1.getX()) ||
35295            (t0.getY() != t1.getY()) ||
35296            (t0.getZ() != t1.getZ()) ||
35297            (t0.hasFaces()   != t1.hasFaces()) ||
35298            (t0.hasMipmaps() != t1.hasMipmaps())) {
35299            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35300        }
35301
35302        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35303        aout.setAutoPadding(true);
35304        reduce(mExportReduceIdx_my_uchar_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
35305        return new result_int(aout);
35306    }
35307
35308    private final static int mExportReduceIdx_my_uchar_uchar4_1 = 533;
35309    // in1 = "a"
35310    // in2 = "b", flattened 4-vectors
35311    public result_int reduce_my_uchar_uchar4_1(byte[] in1, byte[] in2) {
35312        // Verify that "in1" is non-null.
35313        if (in1 == null) {
35314            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35315        }
35316        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35317        ain1.setAutoPadding(true);
35318        ain1.copyFrom(in1);
35319        // Verify that "in2" is non-null.
35320        if (in2 == null) {
35321            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35322        }
35323        // Verify that the array length is a multiple of the vector size.
35324        if (in2.length % 4 != 0) {
35325            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
35326        }
35327        // Verify that input array lengths are the same.
35328        if (in1.length != in2.length / 4) {
35329            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35330        }
35331        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
35332        ain2.setAutoPadding(true);
35333        ain2.copyFrom(in2);
35334
35335        result_int result = reduce_my_uchar_uchar4_1(ain1, ain2, null);
35336        result.mTempIns = new Allocation[]{ain1, ain2};
35337        return result;
35338    }
35339
35340    // ain1 = "uchar a"
35341    // ain2 = "uchar4 b"
35342    public result_int reduce_my_uchar_uchar4_1(Allocation ain1, Allocation ain2) {
35343        return reduce_my_uchar_uchar4_1(ain1, ain2, null);
35344    }
35345
35346    // ain1 = "uchar a"
35347    // ain2 = "uchar4 b"
35348    public result_int reduce_my_uchar_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35349        Type t0, t1;
35350        // check ain1
35351        if (!ain1.getType().getElement().isCompatible(__U8)) {
35352            throw new RSRuntimeException("Type mismatch with U8!");
35353        }
35354        // check ain2
35355        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
35356            throw new RSRuntimeException("Type mismatch with U8_4!");
35357        }
35358        // Verify dimensions
35359        t0 = ain1.getType();
35360        t1 = ain2.getType();
35361        if ((t0.getCount() != t1.getCount()) ||
35362            (t0.getX() != t1.getX()) ||
35363            (t0.getY() != t1.getY()) ||
35364            (t0.getZ() != t1.getZ()) ||
35365            (t0.hasFaces()   != t1.hasFaces()) ||
35366            (t0.hasMipmaps() != t1.hasMipmaps())) {
35367            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35368        }
35369
35370        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35371        aout.setAutoPadding(true);
35372        reduce(mExportReduceIdx_my_uchar_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
35373        return new result_int(aout);
35374    }
35375
35376    private final static int mExportReduceIdx_my_uchar_ushort_0 = 534;
35377    // in1 = "a"
35378    // in2 = "b"
35379    public result_int reduce_my_uchar_ushort_0(byte[] in1, short[] in2) {
35380        // Verify that "in1" is non-null.
35381        if (in1 == null) {
35382            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35383        }
35384        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35385        ain1.setAutoPadding(true);
35386        ain1.copyFrom(in1);
35387        // Verify that "in2" is non-null.
35388        if (in2 == null) {
35389            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35390        }
35391        // Verify that input array lengths are the same.
35392        if (in1.length != in2.length) {
35393            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35394        }
35395        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
35396        ain2.setAutoPadding(true);
35397        ain2.copyFrom(in2);
35398
35399        result_int result = reduce_my_uchar_ushort_0(ain1, ain2, null);
35400        result.mTempIns = new Allocation[]{ain1, ain2};
35401        return result;
35402    }
35403
35404    // ain1 = "uchar a"
35405    // ain2 = "ushort b"
35406    public result_int reduce_my_uchar_ushort_0(Allocation ain1, Allocation ain2) {
35407        return reduce_my_uchar_ushort_0(ain1, ain2, null);
35408    }
35409
35410    // ain1 = "uchar a"
35411    // ain2 = "ushort b"
35412    public result_int reduce_my_uchar_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35413        Type t0, t1;
35414        // check ain1
35415        if (!ain1.getType().getElement().isCompatible(__U8)) {
35416            throw new RSRuntimeException("Type mismatch with U8!");
35417        }
35418        // check ain2
35419        if (!ain2.getType().getElement().isCompatible(__U16)) {
35420            throw new RSRuntimeException("Type mismatch with U16!");
35421        }
35422        // Verify dimensions
35423        t0 = ain1.getType();
35424        t1 = ain2.getType();
35425        if ((t0.getCount() != t1.getCount()) ||
35426            (t0.getX() != t1.getX()) ||
35427            (t0.getY() != t1.getY()) ||
35428            (t0.getZ() != t1.getZ()) ||
35429            (t0.hasFaces()   != t1.hasFaces()) ||
35430            (t0.hasMipmaps() != t1.hasMipmaps())) {
35431            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35432        }
35433
35434        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35435        aout.setAutoPadding(true);
35436        reduce(mExportReduceIdx_my_uchar_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
35437        return new result_int(aout);
35438    }
35439
35440    private final static int mExportReduceIdx_my_uchar_ushort_1 = 535;
35441    // in1 = "a"
35442    // in2 = "b"
35443    public result_int reduce_my_uchar_ushort_1(byte[] in1, short[] in2) {
35444        // Verify that "in1" is non-null.
35445        if (in1 == null) {
35446            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35447        }
35448        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35449        ain1.setAutoPadding(true);
35450        ain1.copyFrom(in1);
35451        // Verify that "in2" is non-null.
35452        if (in2 == null) {
35453            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35454        }
35455        // Verify that input array lengths are the same.
35456        if (in1.length != in2.length) {
35457            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35458        }
35459        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
35460        ain2.setAutoPadding(true);
35461        ain2.copyFrom(in2);
35462
35463        result_int result = reduce_my_uchar_ushort_1(ain1, ain2, null);
35464        result.mTempIns = new Allocation[]{ain1, ain2};
35465        return result;
35466    }
35467
35468    // ain1 = "uchar a"
35469    // ain2 = "ushort b"
35470    public result_int reduce_my_uchar_ushort_1(Allocation ain1, Allocation ain2) {
35471        return reduce_my_uchar_ushort_1(ain1, ain2, null);
35472    }
35473
35474    // ain1 = "uchar a"
35475    // ain2 = "ushort b"
35476    public result_int reduce_my_uchar_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35477        Type t0, t1;
35478        // check ain1
35479        if (!ain1.getType().getElement().isCompatible(__U8)) {
35480            throw new RSRuntimeException("Type mismatch with U8!");
35481        }
35482        // check ain2
35483        if (!ain2.getType().getElement().isCompatible(__U16)) {
35484            throw new RSRuntimeException("Type mismatch with U16!");
35485        }
35486        // Verify dimensions
35487        t0 = ain1.getType();
35488        t1 = ain2.getType();
35489        if ((t0.getCount() != t1.getCount()) ||
35490            (t0.getX() != t1.getX()) ||
35491            (t0.getY() != t1.getY()) ||
35492            (t0.getZ() != t1.getZ()) ||
35493            (t0.hasFaces()   != t1.hasFaces()) ||
35494            (t0.hasMipmaps() != t1.hasMipmaps())) {
35495            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35496        }
35497
35498        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35499        aout.setAutoPadding(true);
35500        reduce(mExportReduceIdx_my_uchar_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
35501        return new result_int(aout);
35502    }
35503
35504    private final static int mExportReduceIdx_my_uchar_ushort2_0 = 536;
35505    // in1 = "a"
35506    // in2 = "b", flattened 2-vectors
35507    public result_int reduce_my_uchar_ushort2_0(byte[] in1, short[] in2) {
35508        // Verify that "in1" is non-null.
35509        if (in1 == null) {
35510            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35511        }
35512        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35513        ain1.setAutoPadding(true);
35514        ain1.copyFrom(in1);
35515        // Verify that "in2" is non-null.
35516        if (in2 == null) {
35517            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35518        }
35519        // Verify that the array length is a multiple of the vector size.
35520        if (in2.length % 2 != 0) {
35521            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
35522        }
35523        // Verify that input array lengths are the same.
35524        if (in1.length != in2.length / 2) {
35525            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35526        }
35527        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
35528        ain2.setAutoPadding(true);
35529        ain2.copyFrom(in2);
35530
35531        result_int result = reduce_my_uchar_ushort2_0(ain1, ain2, null);
35532        result.mTempIns = new Allocation[]{ain1, ain2};
35533        return result;
35534    }
35535
35536    // ain1 = "uchar a"
35537    // ain2 = "ushort2 b"
35538    public result_int reduce_my_uchar_ushort2_0(Allocation ain1, Allocation ain2) {
35539        return reduce_my_uchar_ushort2_0(ain1, ain2, null);
35540    }
35541
35542    // ain1 = "uchar a"
35543    // ain2 = "ushort2 b"
35544    public result_int reduce_my_uchar_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35545        Type t0, t1;
35546        // check ain1
35547        if (!ain1.getType().getElement().isCompatible(__U8)) {
35548            throw new RSRuntimeException("Type mismatch with U8!");
35549        }
35550        // check ain2
35551        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
35552            throw new RSRuntimeException("Type mismatch with U16_2!");
35553        }
35554        // Verify dimensions
35555        t0 = ain1.getType();
35556        t1 = ain2.getType();
35557        if ((t0.getCount() != t1.getCount()) ||
35558            (t0.getX() != t1.getX()) ||
35559            (t0.getY() != t1.getY()) ||
35560            (t0.getZ() != t1.getZ()) ||
35561            (t0.hasFaces()   != t1.hasFaces()) ||
35562            (t0.hasMipmaps() != t1.hasMipmaps())) {
35563            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35564        }
35565
35566        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35567        aout.setAutoPadding(true);
35568        reduce(mExportReduceIdx_my_uchar_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
35569        return new result_int(aout);
35570    }
35571
35572    private final static int mExportReduceIdx_my_uchar_ushort2_1 = 537;
35573    // in1 = "a"
35574    // in2 = "b", flattened 2-vectors
35575    public result_int reduce_my_uchar_ushort2_1(byte[] in1, short[] in2) {
35576        // Verify that "in1" is non-null.
35577        if (in1 == null) {
35578            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35579        }
35580        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35581        ain1.setAutoPadding(true);
35582        ain1.copyFrom(in1);
35583        // Verify that "in2" is non-null.
35584        if (in2 == null) {
35585            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35586        }
35587        // Verify that the array length is a multiple of the vector size.
35588        if (in2.length % 2 != 0) {
35589            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
35590        }
35591        // Verify that input array lengths are the same.
35592        if (in1.length != in2.length / 2) {
35593            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35594        }
35595        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
35596        ain2.setAutoPadding(true);
35597        ain2.copyFrom(in2);
35598
35599        result_int result = reduce_my_uchar_ushort2_1(ain1, ain2, null);
35600        result.mTempIns = new Allocation[]{ain1, ain2};
35601        return result;
35602    }
35603
35604    // ain1 = "uchar a"
35605    // ain2 = "ushort2 b"
35606    public result_int reduce_my_uchar_ushort2_1(Allocation ain1, Allocation ain2) {
35607        return reduce_my_uchar_ushort2_1(ain1, ain2, null);
35608    }
35609
35610    // ain1 = "uchar a"
35611    // ain2 = "ushort2 b"
35612    public result_int reduce_my_uchar_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35613        Type t0, t1;
35614        // check ain1
35615        if (!ain1.getType().getElement().isCompatible(__U8)) {
35616            throw new RSRuntimeException("Type mismatch with U8!");
35617        }
35618        // check ain2
35619        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
35620            throw new RSRuntimeException("Type mismatch with U16_2!");
35621        }
35622        // Verify dimensions
35623        t0 = ain1.getType();
35624        t1 = ain2.getType();
35625        if ((t0.getCount() != t1.getCount()) ||
35626            (t0.getX() != t1.getX()) ||
35627            (t0.getY() != t1.getY()) ||
35628            (t0.getZ() != t1.getZ()) ||
35629            (t0.hasFaces()   != t1.hasFaces()) ||
35630            (t0.hasMipmaps() != t1.hasMipmaps())) {
35631            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35632        }
35633
35634        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35635        aout.setAutoPadding(true);
35636        reduce(mExportReduceIdx_my_uchar_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
35637        return new result_int(aout);
35638    }
35639
35640    private final static int mExportReduceIdx_my_uchar_ushort4_0 = 538;
35641    // in1 = "a"
35642    // in2 = "b", flattened 4-vectors
35643    public result_int reduce_my_uchar_ushort4_0(byte[] in1, short[] in2) {
35644        // Verify that "in1" is non-null.
35645        if (in1 == null) {
35646            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35647        }
35648        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35649        ain1.setAutoPadding(true);
35650        ain1.copyFrom(in1);
35651        // Verify that "in2" is non-null.
35652        if (in2 == null) {
35653            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35654        }
35655        // Verify that the array length is a multiple of the vector size.
35656        if (in2.length % 4 != 0) {
35657            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
35658        }
35659        // Verify that input array lengths are the same.
35660        if (in1.length != in2.length / 4) {
35661            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35662        }
35663        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
35664        ain2.setAutoPadding(true);
35665        ain2.copyFrom(in2);
35666
35667        result_int result = reduce_my_uchar_ushort4_0(ain1, ain2, null);
35668        result.mTempIns = new Allocation[]{ain1, ain2};
35669        return result;
35670    }
35671
35672    // ain1 = "uchar a"
35673    // ain2 = "ushort4 b"
35674    public result_int reduce_my_uchar_ushort4_0(Allocation ain1, Allocation ain2) {
35675        return reduce_my_uchar_ushort4_0(ain1, ain2, null);
35676    }
35677
35678    // ain1 = "uchar a"
35679    // ain2 = "ushort4 b"
35680    public result_int reduce_my_uchar_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35681        Type t0, t1;
35682        // check ain1
35683        if (!ain1.getType().getElement().isCompatible(__U8)) {
35684            throw new RSRuntimeException("Type mismatch with U8!");
35685        }
35686        // check ain2
35687        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
35688            throw new RSRuntimeException("Type mismatch with U16_4!");
35689        }
35690        // Verify dimensions
35691        t0 = ain1.getType();
35692        t1 = ain2.getType();
35693        if ((t0.getCount() != t1.getCount()) ||
35694            (t0.getX() != t1.getX()) ||
35695            (t0.getY() != t1.getY()) ||
35696            (t0.getZ() != t1.getZ()) ||
35697            (t0.hasFaces()   != t1.hasFaces()) ||
35698            (t0.hasMipmaps() != t1.hasMipmaps())) {
35699            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35700        }
35701
35702        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35703        aout.setAutoPadding(true);
35704        reduce(mExportReduceIdx_my_uchar_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
35705        return new result_int(aout);
35706    }
35707
35708    private final static int mExportReduceIdx_my_uchar_ushort4_1 = 539;
35709    // in1 = "a"
35710    // in2 = "b", flattened 4-vectors
35711    public result_int reduce_my_uchar_ushort4_1(byte[] in1, short[] in2) {
35712        // Verify that "in1" is non-null.
35713        if (in1 == null) {
35714            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35715        }
35716        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35717        ain1.setAutoPadding(true);
35718        ain1.copyFrom(in1);
35719        // Verify that "in2" is non-null.
35720        if (in2 == null) {
35721            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35722        }
35723        // Verify that the array length is a multiple of the vector size.
35724        if (in2.length % 4 != 0) {
35725            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
35726        }
35727        // Verify that input array lengths are the same.
35728        if (in1.length != in2.length / 4) {
35729            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35730        }
35731        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
35732        ain2.setAutoPadding(true);
35733        ain2.copyFrom(in2);
35734
35735        result_int result = reduce_my_uchar_ushort4_1(ain1, ain2, null);
35736        result.mTempIns = new Allocation[]{ain1, ain2};
35737        return result;
35738    }
35739
35740    // ain1 = "uchar a"
35741    // ain2 = "ushort4 b"
35742    public result_int reduce_my_uchar_ushort4_1(Allocation ain1, Allocation ain2) {
35743        return reduce_my_uchar_ushort4_1(ain1, ain2, null);
35744    }
35745
35746    // ain1 = "uchar a"
35747    // ain2 = "ushort4 b"
35748    public result_int reduce_my_uchar_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35749        Type t0, t1;
35750        // check ain1
35751        if (!ain1.getType().getElement().isCompatible(__U8)) {
35752            throw new RSRuntimeException("Type mismatch with U8!");
35753        }
35754        // check ain2
35755        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
35756            throw new RSRuntimeException("Type mismatch with U16_4!");
35757        }
35758        // Verify dimensions
35759        t0 = ain1.getType();
35760        t1 = ain2.getType();
35761        if ((t0.getCount() != t1.getCount()) ||
35762            (t0.getX() != t1.getX()) ||
35763            (t0.getY() != t1.getY()) ||
35764            (t0.getZ() != t1.getZ()) ||
35765            (t0.hasFaces()   != t1.hasFaces()) ||
35766            (t0.hasMipmaps() != t1.hasMipmaps())) {
35767            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35768        }
35769
35770        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35771        aout.setAutoPadding(true);
35772        reduce(mExportReduceIdx_my_uchar_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
35773        return new result_int(aout);
35774    }
35775
35776    private final static int mExportReduceIdx_my_uchar_bool_0 = 540;
35777    // in1 = "a"
35778    // in2 = "b"
35779    public result_int reduce_my_uchar_bool_0(byte[] in1, byte[] in2) {
35780        // Verify that "in1" is non-null.
35781        if (in1 == null) {
35782            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35783        }
35784        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35785        ain1.setAutoPadding(true);
35786        ain1.copyFrom(in1);
35787        // Verify that "in2" is non-null.
35788        if (in2 == null) {
35789            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35790        }
35791        // Verify that input array lengths are the same.
35792        if (in1.length != in2.length) {
35793            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35794        }
35795        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
35796        ain2.setAutoPadding(true);
35797        ain2.copyFrom(in2);
35798
35799        result_int result = reduce_my_uchar_bool_0(ain1, ain2, null);
35800        result.mTempIns = new Allocation[]{ain1, ain2};
35801        return result;
35802    }
35803
35804    // ain1 = "uchar a"
35805    // ain2 = "bool b"
35806    public result_int reduce_my_uchar_bool_0(Allocation ain1, Allocation ain2) {
35807        return reduce_my_uchar_bool_0(ain1, ain2, null);
35808    }
35809
35810    // ain1 = "uchar a"
35811    // ain2 = "bool b"
35812    public result_int reduce_my_uchar_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35813        Type t0, t1;
35814        // check ain1
35815        if (!ain1.getType().getElement().isCompatible(__U8)) {
35816            throw new RSRuntimeException("Type mismatch with U8!");
35817        }
35818        // check ain2
35819        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
35820            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
35821        }
35822        // Verify dimensions
35823        t0 = ain1.getType();
35824        t1 = ain2.getType();
35825        if ((t0.getCount() != t1.getCount()) ||
35826            (t0.getX() != t1.getX()) ||
35827            (t0.getY() != t1.getY()) ||
35828            (t0.getZ() != t1.getZ()) ||
35829            (t0.hasFaces()   != t1.hasFaces()) ||
35830            (t0.hasMipmaps() != t1.hasMipmaps())) {
35831            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35832        }
35833
35834        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35835        aout.setAutoPadding(true);
35836        reduce(mExportReduceIdx_my_uchar_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
35837        return new result_int(aout);
35838    }
35839
35840    private final static int mExportReduceIdx_my_uchar_bool_1 = 541;
35841    // in1 = "a"
35842    // in2 = "b"
35843    public result_int reduce_my_uchar_bool_1(byte[] in1, byte[] in2) {
35844        // Verify that "in1" is non-null.
35845        if (in1 == null) {
35846            throw new RSIllegalArgumentException("Array \"in1\" is null!");
35847        }
35848        Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length);
35849        ain1.setAutoPadding(true);
35850        ain1.copyFrom(in1);
35851        // Verify that "in2" is non-null.
35852        if (in2 == null) {
35853            throw new RSIllegalArgumentException("Array \"in2\" is null!");
35854        }
35855        // Verify that input array lengths are the same.
35856        if (in1.length != in2.length) {
35857            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
35858        }
35859        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
35860        ain2.setAutoPadding(true);
35861        ain2.copyFrom(in2);
35862
35863        result_int result = reduce_my_uchar_bool_1(ain1, ain2, null);
35864        result.mTempIns = new Allocation[]{ain1, ain2};
35865        return result;
35866    }
35867
35868    // ain1 = "uchar a"
35869    // ain2 = "bool b"
35870    public result_int reduce_my_uchar_bool_1(Allocation ain1, Allocation ain2) {
35871        return reduce_my_uchar_bool_1(ain1, ain2, null);
35872    }
35873
35874    // ain1 = "uchar a"
35875    // ain2 = "bool b"
35876    public result_int reduce_my_uchar_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35877        Type t0, t1;
35878        // check ain1
35879        if (!ain1.getType().getElement().isCompatible(__U8)) {
35880            throw new RSRuntimeException("Type mismatch with U8!");
35881        }
35882        // check ain2
35883        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
35884            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
35885        }
35886        // Verify dimensions
35887        t0 = ain1.getType();
35888        t1 = ain2.getType();
35889        if ((t0.getCount() != t1.getCount()) ||
35890            (t0.getX() != t1.getX()) ||
35891            (t0.getY() != t1.getY()) ||
35892            (t0.getZ() != t1.getZ()) ||
35893            (t0.hasFaces()   != t1.hasFaces()) ||
35894            (t0.hasMipmaps() != t1.hasMipmaps())) {
35895            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35896        }
35897
35898        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35899        aout.setAutoPadding(true);
35900        reduce(mExportReduceIdx_my_uchar_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
35901        return new result_int(aout);
35902    }
35903
35904    private final static int mExportReduceIdx_my_uchar_rs_matrix2x2_0 = 542;
35905    // ain1 = "uchar a"
35906    // ain2 = "rs_matrix2x2 b"
35907    public result_int reduce_my_uchar_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
35908        return reduce_my_uchar_rs_matrix2x2_0(ain1, ain2, null);
35909    }
35910
35911    // ain1 = "uchar a"
35912    // ain2 = "rs_matrix2x2 b"
35913    public result_int reduce_my_uchar_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35914        Type t0, t1;
35915        // check ain1
35916        if (!ain1.getType().getElement().isCompatible(__U8)) {
35917            throw new RSRuntimeException("Type mismatch with U8!");
35918        }
35919        // check ain2
35920        // Verify dimensions
35921        t0 = ain1.getType();
35922        t1 = ain2.getType();
35923        if ((t0.getCount() != t1.getCount()) ||
35924            (t0.getX() != t1.getX()) ||
35925            (t0.getY() != t1.getY()) ||
35926            (t0.getZ() != t1.getZ()) ||
35927            (t0.hasFaces()   != t1.hasFaces()) ||
35928            (t0.hasMipmaps() != t1.hasMipmaps())) {
35929            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35930        }
35931
35932        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35933        aout.setAutoPadding(true);
35934        reduce(mExportReduceIdx_my_uchar_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
35935        return new result_int(aout);
35936    }
35937
35938    private final static int mExportReduceIdx_my_uchar_rs_matrix2x2_1 = 543;
35939    // ain1 = "uchar a"
35940    // ain2 = "rs_matrix2x2 b"
35941    public result_int reduce_my_uchar_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
35942        return reduce_my_uchar_rs_matrix2x2_1(ain1, ain2, null);
35943    }
35944
35945    // ain1 = "uchar a"
35946    // ain2 = "rs_matrix2x2 b"
35947    public result_int reduce_my_uchar_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35948        Type t0, t1;
35949        // check ain1
35950        if (!ain1.getType().getElement().isCompatible(__U8)) {
35951            throw new RSRuntimeException("Type mismatch with U8!");
35952        }
35953        // check ain2
35954        // Verify dimensions
35955        t0 = ain1.getType();
35956        t1 = ain2.getType();
35957        if ((t0.getCount() != t1.getCount()) ||
35958            (t0.getX() != t1.getX()) ||
35959            (t0.getY() != t1.getY()) ||
35960            (t0.getZ() != t1.getZ()) ||
35961            (t0.hasFaces()   != t1.hasFaces()) ||
35962            (t0.hasMipmaps() != t1.hasMipmaps())) {
35963            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
35964        }
35965
35966        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
35967        aout.setAutoPadding(true);
35968        reduce(mExportReduceIdx_my_uchar_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
35969        return new result_int(aout);
35970    }
35971
35972    private final static int mExportReduceIdx_my_uchar_MyStruct_0 = 544;
35973    // ain1 = "uchar a"
35974    // ain2 = "/* struct <> */ b"
35975    public result_int reduce_my_uchar_MyStruct_0(Allocation ain1, Allocation ain2) {
35976        return reduce_my_uchar_MyStruct_0(ain1, ain2, null);
35977    }
35978
35979    // ain1 = "uchar a"
35980    // ain2 = "/* struct <> */ b"
35981    public result_int reduce_my_uchar_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
35982        Type t0, t1;
35983        // check ain1
35984        if (!ain1.getType().getElement().isCompatible(__U8)) {
35985            throw new RSRuntimeException("Type mismatch with U8!");
35986        }
35987        // check ain2
35988        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
35989            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
35990        }
35991        // Verify dimensions
35992        t0 = ain1.getType();
35993        t1 = ain2.getType();
35994        if ((t0.getCount() != t1.getCount()) ||
35995            (t0.getX() != t1.getX()) ||
35996            (t0.getY() != t1.getY()) ||
35997            (t0.getZ() != t1.getZ()) ||
35998            (t0.hasFaces()   != t1.hasFaces()) ||
35999            (t0.hasMipmaps() != t1.hasMipmaps())) {
36000            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36001        }
36002
36003        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36004        aout.setAutoPadding(true);
36005        reduce(mExportReduceIdx_my_uchar_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
36006        return new result_int(aout);
36007    }
36008
36009    private final static int mExportReduceIdx_my_uchar_MyStruct_1 = 545;
36010    // ain1 = "uchar a"
36011    // ain2 = "/* struct <> */ b"
36012    public result_int reduce_my_uchar_MyStruct_1(Allocation ain1, Allocation ain2) {
36013        return reduce_my_uchar_MyStruct_1(ain1, ain2, null);
36014    }
36015
36016    // ain1 = "uchar a"
36017    // ain2 = "/* struct <> */ b"
36018    public result_int reduce_my_uchar_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36019        Type t0, t1;
36020        // check ain1
36021        if (!ain1.getType().getElement().isCompatible(__U8)) {
36022            throw new RSRuntimeException("Type mismatch with U8!");
36023        }
36024        // check ain2
36025        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
36026            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
36027        }
36028        // Verify dimensions
36029        t0 = ain1.getType();
36030        t1 = ain2.getType();
36031        if ((t0.getCount() != t1.getCount()) ||
36032            (t0.getX() != t1.getX()) ||
36033            (t0.getY() != t1.getY()) ||
36034            (t0.getZ() != t1.getZ()) ||
36035            (t0.hasFaces()   != t1.hasFaces()) ||
36036            (t0.hasMipmaps() != t1.hasMipmaps())) {
36037            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36038        }
36039
36040        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36041        aout.setAutoPadding(true);
36042        reduce(mExportReduceIdx_my_uchar_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
36043        return new result_int(aout);
36044    }
36045
36046    private final static int mExportReduceIdx_my_uchar2_half_0 = 546;
36047    // in1 = "a", flattened 2-vectors
36048    // in2 = "b"
36049    public result_int reduce_my_uchar2_half_0(byte[] in1, short[] in2) {
36050        // Verify that "in1" is non-null.
36051        if (in1 == null) {
36052            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36053        }
36054        // Verify that the array length is a multiple of the vector size.
36055        if (in1.length % 2 != 0) {
36056            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36057        }
36058        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36059        ain1.setAutoPadding(true);
36060        ain1.copyFrom(in1);
36061        // Verify that "in2" is non-null.
36062        if (in2 == null) {
36063            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36064        }
36065        // Verify that input array lengths are the same.
36066        if (in1.length / 2 != in2.length) {
36067            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36068        }
36069        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
36070        ain2.setAutoPadding(true);
36071        ain2.copyFrom(in2);
36072
36073        result_int result = reduce_my_uchar2_half_0(ain1, ain2, null);
36074        result.mTempIns = new Allocation[]{ain1, ain2};
36075        return result;
36076    }
36077
36078    // ain1 = "uchar2 a"
36079    // ain2 = "half b"
36080    public result_int reduce_my_uchar2_half_0(Allocation ain1, Allocation ain2) {
36081        return reduce_my_uchar2_half_0(ain1, ain2, null);
36082    }
36083
36084    // ain1 = "uchar2 a"
36085    // ain2 = "half b"
36086    public result_int reduce_my_uchar2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36087        Type t0, t1;
36088        // check ain1
36089        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36090            throw new RSRuntimeException("Type mismatch with U8_2!");
36091        }
36092        // check ain2
36093        if (!ain2.getType().getElement().isCompatible(__F16)) {
36094            throw new RSRuntimeException("Type mismatch with F16!");
36095        }
36096        // Verify dimensions
36097        t0 = ain1.getType();
36098        t1 = ain2.getType();
36099        if ((t0.getCount() != t1.getCount()) ||
36100            (t0.getX() != t1.getX()) ||
36101            (t0.getY() != t1.getY()) ||
36102            (t0.getZ() != t1.getZ()) ||
36103            (t0.hasFaces()   != t1.hasFaces()) ||
36104            (t0.hasMipmaps() != t1.hasMipmaps())) {
36105            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36106        }
36107
36108        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36109        aout.setAutoPadding(true);
36110        reduce(mExportReduceIdx_my_uchar2_half_0, new Allocation[]{ain1, ain2}, aout, sc);
36111        return new result_int(aout);
36112    }
36113
36114    private final static int mExportReduceIdx_my_uchar2_half_1 = 547;
36115    // in1 = "a", flattened 2-vectors
36116    // in2 = "b"
36117    public result_int reduce_my_uchar2_half_1(byte[] in1, short[] in2) {
36118        // Verify that "in1" is non-null.
36119        if (in1 == null) {
36120            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36121        }
36122        // Verify that the array length is a multiple of the vector size.
36123        if (in1.length % 2 != 0) {
36124            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36125        }
36126        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36127        ain1.setAutoPadding(true);
36128        ain1.copyFrom(in1);
36129        // Verify that "in2" is non-null.
36130        if (in2 == null) {
36131            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36132        }
36133        // Verify that input array lengths are the same.
36134        if (in1.length / 2 != in2.length) {
36135            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36136        }
36137        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
36138        ain2.setAutoPadding(true);
36139        ain2.copyFrom(in2);
36140
36141        result_int result = reduce_my_uchar2_half_1(ain1, ain2, null);
36142        result.mTempIns = new Allocation[]{ain1, ain2};
36143        return result;
36144    }
36145
36146    // ain1 = "uchar2 a"
36147    // ain2 = "half b"
36148    public result_int reduce_my_uchar2_half_1(Allocation ain1, Allocation ain2) {
36149        return reduce_my_uchar2_half_1(ain1, ain2, null);
36150    }
36151
36152    // ain1 = "uchar2 a"
36153    // ain2 = "half b"
36154    public result_int reduce_my_uchar2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36155        Type t0, t1;
36156        // check ain1
36157        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36158            throw new RSRuntimeException("Type mismatch with U8_2!");
36159        }
36160        // check ain2
36161        if (!ain2.getType().getElement().isCompatible(__F16)) {
36162            throw new RSRuntimeException("Type mismatch with F16!");
36163        }
36164        // Verify dimensions
36165        t0 = ain1.getType();
36166        t1 = ain2.getType();
36167        if ((t0.getCount() != t1.getCount()) ||
36168            (t0.getX() != t1.getX()) ||
36169            (t0.getY() != t1.getY()) ||
36170            (t0.getZ() != t1.getZ()) ||
36171            (t0.hasFaces()   != t1.hasFaces()) ||
36172            (t0.hasMipmaps() != t1.hasMipmaps())) {
36173            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36174        }
36175
36176        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36177        aout.setAutoPadding(true);
36178        reduce(mExportReduceIdx_my_uchar2_half_1, new Allocation[]{ain1, ain2}, aout, sc);
36179        return new result_int(aout);
36180    }
36181
36182    private final static int mExportReduceIdx_my_uchar2_half2_0 = 548;
36183    // in1 = "a", flattened 2-vectors
36184    // in2 = "b", flattened 2-vectors
36185    public result_int reduce_my_uchar2_half2_0(byte[] in1, short[] in2) {
36186        // Verify that "in1" is non-null.
36187        if (in1 == null) {
36188            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36189        }
36190        // Verify that the array length is a multiple of the vector size.
36191        if (in1.length % 2 != 0) {
36192            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36193        }
36194        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36195        ain1.setAutoPadding(true);
36196        ain1.copyFrom(in1);
36197        // Verify that "in2" is non-null.
36198        if (in2 == null) {
36199            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36200        }
36201        // Verify that the array length is a multiple of the vector size.
36202        if (in2.length % 2 != 0) {
36203            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
36204        }
36205        // Verify that input array lengths are the same.
36206        if (in1.length / 2 != in2.length / 2) {
36207            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36208        }
36209        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
36210        ain2.setAutoPadding(true);
36211        ain2.copyFrom(in2);
36212
36213        result_int result = reduce_my_uchar2_half2_0(ain1, ain2, null);
36214        result.mTempIns = new Allocation[]{ain1, ain2};
36215        return result;
36216    }
36217
36218    // ain1 = "uchar2 a"
36219    // ain2 = "half2 b"
36220    public result_int reduce_my_uchar2_half2_0(Allocation ain1, Allocation ain2) {
36221        return reduce_my_uchar2_half2_0(ain1, ain2, null);
36222    }
36223
36224    // ain1 = "uchar2 a"
36225    // ain2 = "half2 b"
36226    public result_int reduce_my_uchar2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36227        Type t0, t1;
36228        // check ain1
36229        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36230            throw new RSRuntimeException("Type mismatch with U8_2!");
36231        }
36232        // check ain2
36233        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
36234            throw new RSRuntimeException("Type mismatch with F16_2!");
36235        }
36236        // Verify dimensions
36237        t0 = ain1.getType();
36238        t1 = ain2.getType();
36239        if ((t0.getCount() != t1.getCount()) ||
36240            (t0.getX() != t1.getX()) ||
36241            (t0.getY() != t1.getY()) ||
36242            (t0.getZ() != t1.getZ()) ||
36243            (t0.hasFaces()   != t1.hasFaces()) ||
36244            (t0.hasMipmaps() != t1.hasMipmaps())) {
36245            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36246        }
36247
36248        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36249        aout.setAutoPadding(true);
36250        reduce(mExportReduceIdx_my_uchar2_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
36251        return new result_int(aout);
36252    }
36253
36254    private final static int mExportReduceIdx_my_uchar2_half2_1 = 549;
36255    // in1 = "a", flattened 2-vectors
36256    // in2 = "b", flattened 2-vectors
36257    public result_int reduce_my_uchar2_half2_1(byte[] in1, short[] in2) {
36258        // Verify that "in1" is non-null.
36259        if (in1 == null) {
36260            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36261        }
36262        // Verify that the array length is a multiple of the vector size.
36263        if (in1.length % 2 != 0) {
36264            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36265        }
36266        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36267        ain1.setAutoPadding(true);
36268        ain1.copyFrom(in1);
36269        // Verify that "in2" is non-null.
36270        if (in2 == null) {
36271            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36272        }
36273        // Verify that the array length is a multiple of the vector size.
36274        if (in2.length % 2 != 0) {
36275            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
36276        }
36277        // Verify that input array lengths are the same.
36278        if (in1.length / 2 != in2.length / 2) {
36279            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36280        }
36281        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
36282        ain2.setAutoPadding(true);
36283        ain2.copyFrom(in2);
36284
36285        result_int result = reduce_my_uchar2_half2_1(ain1, ain2, null);
36286        result.mTempIns = new Allocation[]{ain1, ain2};
36287        return result;
36288    }
36289
36290    // ain1 = "uchar2 a"
36291    // ain2 = "half2 b"
36292    public result_int reduce_my_uchar2_half2_1(Allocation ain1, Allocation ain2) {
36293        return reduce_my_uchar2_half2_1(ain1, ain2, null);
36294    }
36295
36296    // ain1 = "uchar2 a"
36297    // ain2 = "half2 b"
36298    public result_int reduce_my_uchar2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36299        Type t0, t1;
36300        // check ain1
36301        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36302            throw new RSRuntimeException("Type mismatch with U8_2!");
36303        }
36304        // check ain2
36305        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
36306            throw new RSRuntimeException("Type mismatch with F16_2!");
36307        }
36308        // Verify dimensions
36309        t0 = ain1.getType();
36310        t1 = ain2.getType();
36311        if ((t0.getCount() != t1.getCount()) ||
36312            (t0.getX() != t1.getX()) ||
36313            (t0.getY() != t1.getY()) ||
36314            (t0.getZ() != t1.getZ()) ||
36315            (t0.hasFaces()   != t1.hasFaces()) ||
36316            (t0.hasMipmaps() != t1.hasMipmaps())) {
36317            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36318        }
36319
36320        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36321        aout.setAutoPadding(true);
36322        reduce(mExportReduceIdx_my_uchar2_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
36323        return new result_int(aout);
36324    }
36325
36326    private final static int mExportReduceIdx_my_uchar2_half4_0 = 550;
36327    // in1 = "a", flattened 2-vectors
36328    // in2 = "b", flattened 4-vectors
36329    public result_int reduce_my_uchar2_half4_0(byte[] in1, short[] in2) {
36330        // Verify that "in1" is non-null.
36331        if (in1 == null) {
36332            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36333        }
36334        // Verify that the array length is a multiple of the vector size.
36335        if (in1.length % 2 != 0) {
36336            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36337        }
36338        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36339        ain1.setAutoPadding(true);
36340        ain1.copyFrom(in1);
36341        // Verify that "in2" is non-null.
36342        if (in2 == null) {
36343            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36344        }
36345        // Verify that the array length is a multiple of the vector size.
36346        if (in2.length % 4 != 0) {
36347            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
36348        }
36349        // Verify that input array lengths are the same.
36350        if (in1.length / 2 != in2.length / 4) {
36351            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36352        }
36353        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
36354        ain2.setAutoPadding(true);
36355        ain2.copyFrom(in2);
36356
36357        result_int result = reduce_my_uchar2_half4_0(ain1, ain2, null);
36358        result.mTempIns = new Allocation[]{ain1, ain2};
36359        return result;
36360    }
36361
36362    // ain1 = "uchar2 a"
36363    // ain2 = "half4 b"
36364    public result_int reduce_my_uchar2_half4_0(Allocation ain1, Allocation ain2) {
36365        return reduce_my_uchar2_half4_0(ain1, ain2, null);
36366    }
36367
36368    // ain1 = "uchar2 a"
36369    // ain2 = "half4 b"
36370    public result_int reduce_my_uchar2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36371        Type t0, t1;
36372        // check ain1
36373        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36374            throw new RSRuntimeException("Type mismatch with U8_2!");
36375        }
36376        // check ain2
36377        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
36378            throw new RSRuntimeException("Type mismatch with F16_4!");
36379        }
36380        // Verify dimensions
36381        t0 = ain1.getType();
36382        t1 = ain2.getType();
36383        if ((t0.getCount() != t1.getCount()) ||
36384            (t0.getX() != t1.getX()) ||
36385            (t0.getY() != t1.getY()) ||
36386            (t0.getZ() != t1.getZ()) ||
36387            (t0.hasFaces()   != t1.hasFaces()) ||
36388            (t0.hasMipmaps() != t1.hasMipmaps())) {
36389            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36390        }
36391
36392        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36393        aout.setAutoPadding(true);
36394        reduce(mExportReduceIdx_my_uchar2_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
36395        return new result_int(aout);
36396    }
36397
36398    private final static int mExportReduceIdx_my_uchar2_half4_1 = 551;
36399    // in1 = "a", flattened 2-vectors
36400    // in2 = "b", flattened 4-vectors
36401    public result_int reduce_my_uchar2_half4_1(byte[] in1, short[] in2) {
36402        // Verify that "in1" is non-null.
36403        if (in1 == null) {
36404            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36405        }
36406        // Verify that the array length is a multiple of the vector size.
36407        if (in1.length % 2 != 0) {
36408            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36409        }
36410        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36411        ain1.setAutoPadding(true);
36412        ain1.copyFrom(in1);
36413        // Verify that "in2" is non-null.
36414        if (in2 == null) {
36415            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36416        }
36417        // Verify that the array length is a multiple of the vector size.
36418        if (in2.length % 4 != 0) {
36419            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
36420        }
36421        // Verify that input array lengths are the same.
36422        if (in1.length / 2 != in2.length / 4) {
36423            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36424        }
36425        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
36426        ain2.setAutoPadding(true);
36427        ain2.copyFrom(in2);
36428
36429        result_int result = reduce_my_uchar2_half4_1(ain1, ain2, null);
36430        result.mTempIns = new Allocation[]{ain1, ain2};
36431        return result;
36432    }
36433
36434    // ain1 = "uchar2 a"
36435    // ain2 = "half4 b"
36436    public result_int reduce_my_uchar2_half4_1(Allocation ain1, Allocation ain2) {
36437        return reduce_my_uchar2_half4_1(ain1, ain2, null);
36438    }
36439
36440    // ain1 = "uchar2 a"
36441    // ain2 = "half4 b"
36442    public result_int reduce_my_uchar2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36443        Type t0, t1;
36444        // check ain1
36445        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36446            throw new RSRuntimeException("Type mismatch with U8_2!");
36447        }
36448        // check ain2
36449        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
36450            throw new RSRuntimeException("Type mismatch with F16_4!");
36451        }
36452        // Verify dimensions
36453        t0 = ain1.getType();
36454        t1 = ain2.getType();
36455        if ((t0.getCount() != t1.getCount()) ||
36456            (t0.getX() != t1.getX()) ||
36457            (t0.getY() != t1.getY()) ||
36458            (t0.getZ() != t1.getZ()) ||
36459            (t0.hasFaces()   != t1.hasFaces()) ||
36460            (t0.hasMipmaps() != t1.hasMipmaps())) {
36461            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36462        }
36463
36464        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36465        aout.setAutoPadding(true);
36466        reduce(mExportReduceIdx_my_uchar2_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
36467        return new result_int(aout);
36468    }
36469
36470    private final static int mExportReduceIdx_my_uchar2_float_0 = 552;
36471    // in1 = "a", flattened 2-vectors
36472    // in2 = "b"
36473    public result_int reduce_my_uchar2_float_0(byte[] in1, float[] in2) {
36474        // Verify that "in1" is non-null.
36475        if (in1 == null) {
36476            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36477        }
36478        // Verify that the array length is a multiple of the vector size.
36479        if (in1.length % 2 != 0) {
36480            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36481        }
36482        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36483        ain1.setAutoPadding(true);
36484        ain1.copyFrom(in1);
36485        // Verify that "in2" is non-null.
36486        if (in2 == null) {
36487            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36488        }
36489        // Verify that input array lengths are the same.
36490        if (in1.length / 2 != in2.length) {
36491            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36492        }
36493        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
36494        ain2.setAutoPadding(true);
36495        ain2.copyFrom(in2);
36496
36497        result_int result = reduce_my_uchar2_float_0(ain1, ain2, null);
36498        result.mTempIns = new Allocation[]{ain1, ain2};
36499        return result;
36500    }
36501
36502    // ain1 = "uchar2 a"
36503    // ain2 = "float b"
36504    public result_int reduce_my_uchar2_float_0(Allocation ain1, Allocation ain2) {
36505        return reduce_my_uchar2_float_0(ain1, ain2, null);
36506    }
36507
36508    // ain1 = "uchar2 a"
36509    // ain2 = "float b"
36510    public result_int reduce_my_uchar2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36511        Type t0, t1;
36512        // check ain1
36513        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36514            throw new RSRuntimeException("Type mismatch with U8_2!");
36515        }
36516        // check ain2
36517        if (!ain2.getType().getElement().isCompatible(__F32)) {
36518            throw new RSRuntimeException("Type mismatch with F32!");
36519        }
36520        // Verify dimensions
36521        t0 = ain1.getType();
36522        t1 = ain2.getType();
36523        if ((t0.getCount() != t1.getCount()) ||
36524            (t0.getX() != t1.getX()) ||
36525            (t0.getY() != t1.getY()) ||
36526            (t0.getZ() != t1.getZ()) ||
36527            (t0.hasFaces()   != t1.hasFaces()) ||
36528            (t0.hasMipmaps() != t1.hasMipmaps())) {
36529            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36530        }
36531
36532        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36533        aout.setAutoPadding(true);
36534        reduce(mExportReduceIdx_my_uchar2_float_0, new Allocation[]{ain1, ain2}, aout, sc);
36535        return new result_int(aout);
36536    }
36537
36538    private final static int mExportReduceIdx_my_uchar2_float_1 = 553;
36539    // in1 = "a", flattened 2-vectors
36540    // in2 = "b"
36541    public result_int reduce_my_uchar2_float_1(byte[] in1, float[] in2) {
36542        // Verify that "in1" is non-null.
36543        if (in1 == null) {
36544            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36545        }
36546        // Verify that the array length is a multiple of the vector size.
36547        if (in1.length % 2 != 0) {
36548            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36549        }
36550        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36551        ain1.setAutoPadding(true);
36552        ain1.copyFrom(in1);
36553        // Verify that "in2" is non-null.
36554        if (in2 == null) {
36555            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36556        }
36557        // Verify that input array lengths are the same.
36558        if (in1.length / 2 != in2.length) {
36559            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36560        }
36561        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
36562        ain2.setAutoPadding(true);
36563        ain2.copyFrom(in2);
36564
36565        result_int result = reduce_my_uchar2_float_1(ain1, ain2, null);
36566        result.mTempIns = new Allocation[]{ain1, ain2};
36567        return result;
36568    }
36569
36570    // ain1 = "uchar2 a"
36571    // ain2 = "float b"
36572    public result_int reduce_my_uchar2_float_1(Allocation ain1, Allocation ain2) {
36573        return reduce_my_uchar2_float_1(ain1, ain2, null);
36574    }
36575
36576    // ain1 = "uchar2 a"
36577    // ain2 = "float b"
36578    public result_int reduce_my_uchar2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36579        Type t0, t1;
36580        // check ain1
36581        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36582            throw new RSRuntimeException("Type mismatch with U8_2!");
36583        }
36584        // check ain2
36585        if (!ain2.getType().getElement().isCompatible(__F32)) {
36586            throw new RSRuntimeException("Type mismatch with F32!");
36587        }
36588        // Verify dimensions
36589        t0 = ain1.getType();
36590        t1 = ain2.getType();
36591        if ((t0.getCount() != t1.getCount()) ||
36592            (t0.getX() != t1.getX()) ||
36593            (t0.getY() != t1.getY()) ||
36594            (t0.getZ() != t1.getZ()) ||
36595            (t0.hasFaces()   != t1.hasFaces()) ||
36596            (t0.hasMipmaps() != t1.hasMipmaps())) {
36597            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36598        }
36599
36600        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36601        aout.setAutoPadding(true);
36602        reduce(mExportReduceIdx_my_uchar2_float_1, new Allocation[]{ain1, ain2}, aout, sc);
36603        return new result_int(aout);
36604    }
36605
36606    private final static int mExportReduceIdx_my_uchar2_float2_0 = 554;
36607    // in1 = "a", flattened 2-vectors
36608    // in2 = "b", flattened 2-vectors
36609    public result_int reduce_my_uchar2_float2_0(byte[] in1, float[] in2) {
36610        // Verify that "in1" is non-null.
36611        if (in1 == null) {
36612            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36613        }
36614        // Verify that the array length is a multiple of the vector size.
36615        if (in1.length % 2 != 0) {
36616            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36617        }
36618        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36619        ain1.setAutoPadding(true);
36620        ain1.copyFrom(in1);
36621        // Verify that "in2" is non-null.
36622        if (in2 == null) {
36623            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36624        }
36625        // Verify that the array length is a multiple of the vector size.
36626        if (in2.length % 2 != 0) {
36627            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
36628        }
36629        // Verify that input array lengths are the same.
36630        if (in1.length / 2 != in2.length / 2) {
36631            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36632        }
36633        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
36634        ain2.setAutoPadding(true);
36635        ain2.copyFrom(in2);
36636
36637        result_int result = reduce_my_uchar2_float2_0(ain1, ain2, null);
36638        result.mTempIns = new Allocation[]{ain1, ain2};
36639        return result;
36640    }
36641
36642    // ain1 = "uchar2 a"
36643    // ain2 = "float2 b"
36644    public result_int reduce_my_uchar2_float2_0(Allocation ain1, Allocation ain2) {
36645        return reduce_my_uchar2_float2_0(ain1, ain2, null);
36646    }
36647
36648    // ain1 = "uchar2 a"
36649    // ain2 = "float2 b"
36650    public result_int reduce_my_uchar2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36651        Type t0, t1;
36652        // check ain1
36653        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36654            throw new RSRuntimeException("Type mismatch with U8_2!");
36655        }
36656        // check ain2
36657        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
36658            throw new RSRuntimeException("Type mismatch with F32_2!");
36659        }
36660        // Verify dimensions
36661        t0 = ain1.getType();
36662        t1 = ain2.getType();
36663        if ((t0.getCount() != t1.getCount()) ||
36664            (t0.getX() != t1.getX()) ||
36665            (t0.getY() != t1.getY()) ||
36666            (t0.getZ() != t1.getZ()) ||
36667            (t0.hasFaces()   != t1.hasFaces()) ||
36668            (t0.hasMipmaps() != t1.hasMipmaps())) {
36669            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36670        }
36671
36672        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36673        aout.setAutoPadding(true);
36674        reduce(mExportReduceIdx_my_uchar2_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
36675        return new result_int(aout);
36676    }
36677
36678    private final static int mExportReduceIdx_my_uchar2_float2_1 = 555;
36679    // in1 = "a", flattened 2-vectors
36680    // in2 = "b", flattened 2-vectors
36681    public result_int reduce_my_uchar2_float2_1(byte[] in1, float[] in2) {
36682        // Verify that "in1" is non-null.
36683        if (in1 == null) {
36684            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36685        }
36686        // Verify that the array length is a multiple of the vector size.
36687        if (in1.length % 2 != 0) {
36688            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36689        }
36690        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36691        ain1.setAutoPadding(true);
36692        ain1.copyFrom(in1);
36693        // Verify that "in2" is non-null.
36694        if (in2 == null) {
36695            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36696        }
36697        // Verify that the array length is a multiple of the vector size.
36698        if (in2.length % 2 != 0) {
36699            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
36700        }
36701        // Verify that input array lengths are the same.
36702        if (in1.length / 2 != in2.length / 2) {
36703            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36704        }
36705        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
36706        ain2.setAutoPadding(true);
36707        ain2.copyFrom(in2);
36708
36709        result_int result = reduce_my_uchar2_float2_1(ain1, ain2, null);
36710        result.mTempIns = new Allocation[]{ain1, ain2};
36711        return result;
36712    }
36713
36714    // ain1 = "uchar2 a"
36715    // ain2 = "float2 b"
36716    public result_int reduce_my_uchar2_float2_1(Allocation ain1, Allocation ain2) {
36717        return reduce_my_uchar2_float2_1(ain1, ain2, null);
36718    }
36719
36720    // ain1 = "uchar2 a"
36721    // ain2 = "float2 b"
36722    public result_int reduce_my_uchar2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36723        Type t0, t1;
36724        // check ain1
36725        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36726            throw new RSRuntimeException("Type mismatch with U8_2!");
36727        }
36728        // check ain2
36729        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
36730            throw new RSRuntimeException("Type mismatch with F32_2!");
36731        }
36732        // Verify dimensions
36733        t0 = ain1.getType();
36734        t1 = ain2.getType();
36735        if ((t0.getCount() != t1.getCount()) ||
36736            (t0.getX() != t1.getX()) ||
36737            (t0.getY() != t1.getY()) ||
36738            (t0.getZ() != t1.getZ()) ||
36739            (t0.hasFaces()   != t1.hasFaces()) ||
36740            (t0.hasMipmaps() != t1.hasMipmaps())) {
36741            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36742        }
36743
36744        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36745        aout.setAutoPadding(true);
36746        reduce(mExportReduceIdx_my_uchar2_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
36747        return new result_int(aout);
36748    }
36749
36750    private final static int mExportReduceIdx_my_uchar2_float4_0 = 556;
36751    // in1 = "a", flattened 2-vectors
36752    // in2 = "b", flattened 4-vectors
36753    public result_int reduce_my_uchar2_float4_0(byte[] in1, float[] in2) {
36754        // Verify that "in1" is non-null.
36755        if (in1 == null) {
36756            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36757        }
36758        // Verify that the array length is a multiple of the vector size.
36759        if (in1.length % 2 != 0) {
36760            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36761        }
36762        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36763        ain1.setAutoPadding(true);
36764        ain1.copyFrom(in1);
36765        // Verify that "in2" is non-null.
36766        if (in2 == null) {
36767            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36768        }
36769        // Verify that the array length is a multiple of the vector size.
36770        if (in2.length % 4 != 0) {
36771            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
36772        }
36773        // Verify that input array lengths are the same.
36774        if (in1.length / 2 != in2.length / 4) {
36775            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36776        }
36777        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
36778        ain2.setAutoPadding(true);
36779        ain2.copyFrom(in2);
36780
36781        result_int result = reduce_my_uchar2_float4_0(ain1, ain2, null);
36782        result.mTempIns = new Allocation[]{ain1, ain2};
36783        return result;
36784    }
36785
36786    // ain1 = "uchar2 a"
36787    // ain2 = "float4 b"
36788    public result_int reduce_my_uchar2_float4_0(Allocation ain1, Allocation ain2) {
36789        return reduce_my_uchar2_float4_0(ain1, ain2, null);
36790    }
36791
36792    // ain1 = "uchar2 a"
36793    // ain2 = "float4 b"
36794    public result_int reduce_my_uchar2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36795        Type t0, t1;
36796        // check ain1
36797        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36798            throw new RSRuntimeException("Type mismatch with U8_2!");
36799        }
36800        // check ain2
36801        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
36802            throw new RSRuntimeException("Type mismatch with F32_4!");
36803        }
36804        // Verify dimensions
36805        t0 = ain1.getType();
36806        t1 = ain2.getType();
36807        if ((t0.getCount() != t1.getCount()) ||
36808            (t0.getX() != t1.getX()) ||
36809            (t0.getY() != t1.getY()) ||
36810            (t0.getZ() != t1.getZ()) ||
36811            (t0.hasFaces()   != t1.hasFaces()) ||
36812            (t0.hasMipmaps() != t1.hasMipmaps())) {
36813            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36814        }
36815
36816        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36817        aout.setAutoPadding(true);
36818        reduce(mExportReduceIdx_my_uchar2_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
36819        return new result_int(aout);
36820    }
36821
36822    private final static int mExportReduceIdx_my_uchar2_float4_1 = 557;
36823    // in1 = "a", flattened 2-vectors
36824    // in2 = "b", flattened 4-vectors
36825    public result_int reduce_my_uchar2_float4_1(byte[] in1, float[] in2) {
36826        // Verify that "in1" is non-null.
36827        if (in1 == null) {
36828            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36829        }
36830        // Verify that the array length is a multiple of the vector size.
36831        if (in1.length % 2 != 0) {
36832            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36833        }
36834        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36835        ain1.setAutoPadding(true);
36836        ain1.copyFrom(in1);
36837        // Verify that "in2" is non-null.
36838        if (in2 == null) {
36839            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36840        }
36841        // Verify that the array length is a multiple of the vector size.
36842        if (in2.length % 4 != 0) {
36843            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
36844        }
36845        // Verify that input array lengths are the same.
36846        if (in1.length / 2 != in2.length / 4) {
36847            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36848        }
36849        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
36850        ain2.setAutoPadding(true);
36851        ain2.copyFrom(in2);
36852
36853        result_int result = reduce_my_uchar2_float4_1(ain1, ain2, null);
36854        result.mTempIns = new Allocation[]{ain1, ain2};
36855        return result;
36856    }
36857
36858    // ain1 = "uchar2 a"
36859    // ain2 = "float4 b"
36860    public result_int reduce_my_uchar2_float4_1(Allocation ain1, Allocation ain2) {
36861        return reduce_my_uchar2_float4_1(ain1, ain2, null);
36862    }
36863
36864    // ain1 = "uchar2 a"
36865    // ain2 = "float4 b"
36866    public result_int reduce_my_uchar2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36867        Type t0, t1;
36868        // check ain1
36869        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36870            throw new RSRuntimeException("Type mismatch with U8_2!");
36871        }
36872        // check ain2
36873        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
36874            throw new RSRuntimeException("Type mismatch with F32_4!");
36875        }
36876        // Verify dimensions
36877        t0 = ain1.getType();
36878        t1 = ain2.getType();
36879        if ((t0.getCount() != t1.getCount()) ||
36880            (t0.getX() != t1.getX()) ||
36881            (t0.getY() != t1.getY()) ||
36882            (t0.getZ() != t1.getZ()) ||
36883            (t0.hasFaces()   != t1.hasFaces()) ||
36884            (t0.hasMipmaps() != t1.hasMipmaps())) {
36885            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36886        }
36887
36888        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36889        aout.setAutoPadding(true);
36890        reduce(mExportReduceIdx_my_uchar2_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
36891        return new result_int(aout);
36892    }
36893
36894    private final static int mExportReduceIdx_my_uchar2_char_0 = 558;
36895    // in1 = "a", flattened 2-vectors
36896    // in2 = "b"
36897    public result_int reduce_my_uchar2_char_0(byte[] in1, byte[] in2) {
36898        // Verify that "in1" is non-null.
36899        if (in1 == null) {
36900            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36901        }
36902        // Verify that the array length is a multiple of the vector size.
36903        if (in1.length % 2 != 0) {
36904            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36905        }
36906        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36907        ain1.setAutoPadding(true);
36908        ain1.copyFrom(in1);
36909        // Verify that "in2" is non-null.
36910        if (in2 == null) {
36911            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36912        }
36913        // Verify that input array lengths are the same.
36914        if (in1.length / 2 != in2.length) {
36915            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36916        }
36917        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
36918        ain2.setAutoPadding(true);
36919        ain2.copyFrom(in2);
36920
36921        result_int result = reduce_my_uchar2_char_0(ain1, ain2, null);
36922        result.mTempIns = new Allocation[]{ain1, ain2};
36923        return result;
36924    }
36925
36926    // ain1 = "uchar2 a"
36927    // ain2 = "char b"
36928    public result_int reduce_my_uchar2_char_0(Allocation ain1, Allocation ain2) {
36929        return reduce_my_uchar2_char_0(ain1, ain2, null);
36930    }
36931
36932    // ain1 = "uchar2 a"
36933    // ain2 = "char b"
36934    public result_int reduce_my_uchar2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
36935        Type t0, t1;
36936        // check ain1
36937        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
36938            throw new RSRuntimeException("Type mismatch with U8_2!");
36939        }
36940        // check ain2
36941        if (!ain2.getType().getElement().isCompatible(__I8)) {
36942            throw new RSRuntimeException("Type mismatch with I8!");
36943        }
36944        // Verify dimensions
36945        t0 = ain1.getType();
36946        t1 = ain2.getType();
36947        if ((t0.getCount() != t1.getCount()) ||
36948            (t0.getX() != t1.getX()) ||
36949            (t0.getY() != t1.getY()) ||
36950            (t0.getZ() != t1.getZ()) ||
36951            (t0.hasFaces()   != t1.hasFaces()) ||
36952            (t0.hasMipmaps() != t1.hasMipmaps())) {
36953            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
36954        }
36955
36956        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
36957        aout.setAutoPadding(true);
36958        reduce(mExportReduceIdx_my_uchar2_char_0, new Allocation[]{ain1, ain2}, aout, sc);
36959        return new result_int(aout);
36960    }
36961
36962    private final static int mExportReduceIdx_my_uchar2_char_1 = 559;
36963    // in1 = "a", flattened 2-vectors
36964    // in2 = "b"
36965    public result_int reduce_my_uchar2_char_1(byte[] in1, byte[] in2) {
36966        // Verify that "in1" is non-null.
36967        if (in1 == null) {
36968            throw new RSIllegalArgumentException("Array \"in1\" is null!");
36969        }
36970        // Verify that the array length is a multiple of the vector size.
36971        if (in1.length % 2 != 0) {
36972            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
36973        }
36974        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
36975        ain1.setAutoPadding(true);
36976        ain1.copyFrom(in1);
36977        // Verify that "in2" is non-null.
36978        if (in2 == null) {
36979            throw new RSIllegalArgumentException("Array \"in2\" is null!");
36980        }
36981        // Verify that input array lengths are the same.
36982        if (in1.length / 2 != in2.length) {
36983            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
36984        }
36985        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
36986        ain2.setAutoPadding(true);
36987        ain2.copyFrom(in2);
36988
36989        result_int result = reduce_my_uchar2_char_1(ain1, ain2, null);
36990        result.mTempIns = new Allocation[]{ain1, ain2};
36991        return result;
36992    }
36993
36994    // ain1 = "uchar2 a"
36995    // ain2 = "char b"
36996    public result_int reduce_my_uchar2_char_1(Allocation ain1, Allocation ain2) {
36997        return reduce_my_uchar2_char_1(ain1, ain2, null);
36998    }
36999
37000    // ain1 = "uchar2 a"
37001    // ain2 = "char b"
37002    public result_int reduce_my_uchar2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37003        Type t0, t1;
37004        // check ain1
37005        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37006            throw new RSRuntimeException("Type mismatch with U8_2!");
37007        }
37008        // check ain2
37009        if (!ain2.getType().getElement().isCompatible(__I8)) {
37010            throw new RSRuntimeException("Type mismatch with I8!");
37011        }
37012        // Verify dimensions
37013        t0 = ain1.getType();
37014        t1 = ain2.getType();
37015        if ((t0.getCount() != t1.getCount()) ||
37016            (t0.getX() != t1.getX()) ||
37017            (t0.getY() != t1.getY()) ||
37018            (t0.getZ() != t1.getZ()) ||
37019            (t0.hasFaces()   != t1.hasFaces()) ||
37020            (t0.hasMipmaps() != t1.hasMipmaps())) {
37021            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37022        }
37023
37024        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37025        aout.setAutoPadding(true);
37026        reduce(mExportReduceIdx_my_uchar2_char_1, new Allocation[]{ain1, ain2}, aout, sc);
37027        return new result_int(aout);
37028    }
37029
37030    private final static int mExportReduceIdx_my_uchar2_char2_0 = 560;
37031    // in1 = "a", flattened 2-vectors
37032    // in2 = "b", flattened 2-vectors
37033    public result_int reduce_my_uchar2_char2_0(byte[] in1, byte[] in2) {
37034        // Verify that "in1" is non-null.
37035        if (in1 == null) {
37036            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37037        }
37038        // Verify that the array length is a multiple of the vector size.
37039        if (in1.length % 2 != 0) {
37040            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37041        }
37042        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37043        ain1.setAutoPadding(true);
37044        ain1.copyFrom(in1);
37045        // Verify that "in2" is non-null.
37046        if (in2 == null) {
37047            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37048        }
37049        // Verify that the array length is a multiple of the vector size.
37050        if (in2.length % 2 != 0) {
37051            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
37052        }
37053        // Verify that input array lengths are the same.
37054        if (in1.length / 2 != in2.length / 2) {
37055            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37056        }
37057        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
37058        ain2.setAutoPadding(true);
37059        ain2.copyFrom(in2);
37060
37061        result_int result = reduce_my_uchar2_char2_0(ain1, ain2, null);
37062        result.mTempIns = new Allocation[]{ain1, ain2};
37063        return result;
37064    }
37065
37066    // ain1 = "uchar2 a"
37067    // ain2 = "char2 b"
37068    public result_int reduce_my_uchar2_char2_0(Allocation ain1, Allocation ain2) {
37069        return reduce_my_uchar2_char2_0(ain1, ain2, null);
37070    }
37071
37072    // ain1 = "uchar2 a"
37073    // ain2 = "char2 b"
37074    public result_int reduce_my_uchar2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37075        Type t0, t1;
37076        // check ain1
37077        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37078            throw new RSRuntimeException("Type mismatch with U8_2!");
37079        }
37080        // check ain2
37081        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
37082            throw new RSRuntimeException("Type mismatch with I8_2!");
37083        }
37084        // Verify dimensions
37085        t0 = ain1.getType();
37086        t1 = ain2.getType();
37087        if ((t0.getCount() != t1.getCount()) ||
37088            (t0.getX() != t1.getX()) ||
37089            (t0.getY() != t1.getY()) ||
37090            (t0.getZ() != t1.getZ()) ||
37091            (t0.hasFaces()   != t1.hasFaces()) ||
37092            (t0.hasMipmaps() != t1.hasMipmaps())) {
37093            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37094        }
37095
37096        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37097        aout.setAutoPadding(true);
37098        reduce(mExportReduceIdx_my_uchar2_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
37099        return new result_int(aout);
37100    }
37101
37102    private final static int mExportReduceIdx_my_uchar2_char2_1 = 561;
37103    // in1 = "a", flattened 2-vectors
37104    // in2 = "b", flattened 2-vectors
37105    public result_int reduce_my_uchar2_char2_1(byte[] in1, byte[] in2) {
37106        // Verify that "in1" is non-null.
37107        if (in1 == null) {
37108            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37109        }
37110        // Verify that the array length is a multiple of the vector size.
37111        if (in1.length % 2 != 0) {
37112            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37113        }
37114        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37115        ain1.setAutoPadding(true);
37116        ain1.copyFrom(in1);
37117        // Verify that "in2" is non-null.
37118        if (in2 == null) {
37119            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37120        }
37121        // Verify that the array length is a multiple of the vector size.
37122        if (in2.length % 2 != 0) {
37123            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
37124        }
37125        // Verify that input array lengths are the same.
37126        if (in1.length / 2 != in2.length / 2) {
37127            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37128        }
37129        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
37130        ain2.setAutoPadding(true);
37131        ain2.copyFrom(in2);
37132
37133        result_int result = reduce_my_uchar2_char2_1(ain1, ain2, null);
37134        result.mTempIns = new Allocation[]{ain1, ain2};
37135        return result;
37136    }
37137
37138    // ain1 = "uchar2 a"
37139    // ain2 = "char2 b"
37140    public result_int reduce_my_uchar2_char2_1(Allocation ain1, Allocation ain2) {
37141        return reduce_my_uchar2_char2_1(ain1, ain2, null);
37142    }
37143
37144    // ain1 = "uchar2 a"
37145    // ain2 = "char2 b"
37146    public result_int reduce_my_uchar2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37147        Type t0, t1;
37148        // check ain1
37149        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37150            throw new RSRuntimeException("Type mismatch with U8_2!");
37151        }
37152        // check ain2
37153        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
37154            throw new RSRuntimeException("Type mismatch with I8_2!");
37155        }
37156        // Verify dimensions
37157        t0 = ain1.getType();
37158        t1 = ain2.getType();
37159        if ((t0.getCount() != t1.getCount()) ||
37160            (t0.getX() != t1.getX()) ||
37161            (t0.getY() != t1.getY()) ||
37162            (t0.getZ() != t1.getZ()) ||
37163            (t0.hasFaces()   != t1.hasFaces()) ||
37164            (t0.hasMipmaps() != t1.hasMipmaps())) {
37165            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37166        }
37167
37168        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37169        aout.setAutoPadding(true);
37170        reduce(mExportReduceIdx_my_uchar2_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
37171        return new result_int(aout);
37172    }
37173
37174    private final static int mExportReduceIdx_my_uchar2_char4_0 = 562;
37175    // in1 = "a", flattened 2-vectors
37176    // in2 = "b", flattened 4-vectors
37177    public result_int reduce_my_uchar2_char4_0(byte[] in1, byte[] in2) {
37178        // Verify that "in1" is non-null.
37179        if (in1 == null) {
37180            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37181        }
37182        // Verify that the array length is a multiple of the vector size.
37183        if (in1.length % 2 != 0) {
37184            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37185        }
37186        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37187        ain1.setAutoPadding(true);
37188        ain1.copyFrom(in1);
37189        // Verify that "in2" is non-null.
37190        if (in2 == null) {
37191            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37192        }
37193        // Verify that the array length is a multiple of the vector size.
37194        if (in2.length % 4 != 0) {
37195            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
37196        }
37197        // Verify that input array lengths are the same.
37198        if (in1.length / 2 != in2.length / 4) {
37199            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37200        }
37201        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
37202        ain2.setAutoPadding(true);
37203        ain2.copyFrom(in2);
37204
37205        result_int result = reduce_my_uchar2_char4_0(ain1, ain2, null);
37206        result.mTempIns = new Allocation[]{ain1, ain2};
37207        return result;
37208    }
37209
37210    // ain1 = "uchar2 a"
37211    // ain2 = "char4 b"
37212    public result_int reduce_my_uchar2_char4_0(Allocation ain1, Allocation ain2) {
37213        return reduce_my_uchar2_char4_0(ain1, ain2, null);
37214    }
37215
37216    // ain1 = "uchar2 a"
37217    // ain2 = "char4 b"
37218    public result_int reduce_my_uchar2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37219        Type t0, t1;
37220        // check ain1
37221        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37222            throw new RSRuntimeException("Type mismatch with U8_2!");
37223        }
37224        // check ain2
37225        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
37226            throw new RSRuntimeException("Type mismatch with I8_4!");
37227        }
37228        // Verify dimensions
37229        t0 = ain1.getType();
37230        t1 = ain2.getType();
37231        if ((t0.getCount() != t1.getCount()) ||
37232            (t0.getX() != t1.getX()) ||
37233            (t0.getY() != t1.getY()) ||
37234            (t0.getZ() != t1.getZ()) ||
37235            (t0.hasFaces()   != t1.hasFaces()) ||
37236            (t0.hasMipmaps() != t1.hasMipmaps())) {
37237            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37238        }
37239
37240        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37241        aout.setAutoPadding(true);
37242        reduce(mExportReduceIdx_my_uchar2_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
37243        return new result_int(aout);
37244    }
37245
37246    private final static int mExportReduceIdx_my_uchar2_char4_1 = 563;
37247    // in1 = "a", flattened 2-vectors
37248    // in2 = "b", flattened 4-vectors
37249    public result_int reduce_my_uchar2_char4_1(byte[] in1, byte[] in2) {
37250        // Verify that "in1" is non-null.
37251        if (in1 == null) {
37252            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37253        }
37254        // Verify that the array length is a multiple of the vector size.
37255        if (in1.length % 2 != 0) {
37256            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37257        }
37258        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37259        ain1.setAutoPadding(true);
37260        ain1.copyFrom(in1);
37261        // Verify that "in2" is non-null.
37262        if (in2 == null) {
37263            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37264        }
37265        // Verify that the array length is a multiple of the vector size.
37266        if (in2.length % 4 != 0) {
37267            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
37268        }
37269        // Verify that input array lengths are the same.
37270        if (in1.length / 2 != in2.length / 4) {
37271            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37272        }
37273        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
37274        ain2.setAutoPadding(true);
37275        ain2.copyFrom(in2);
37276
37277        result_int result = reduce_my_uchar2_char4_1(ain1, ain2, null);
37278        result.mTempIns = new Allocation[]{ain1, ain2};
37279        return result;
37280    }
37281
37282    // ain1 = "uchar2 a"
37283    // ain2 = "char4 b"
37284    public result_int reduce_my_uchar2_char4_1(Allocation ain1, Allocation ain2) {
37285        return reduce_my_uchar2_char4_1(ain1, ain2, null);
37286    }
37287
37288    // ain1 = "uchar2 a"
37289    // ain2 = "char4 b"
37290    public result_int reduce_my_uchar2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37291        Type t0, t1;
37292        // check ain1
37293        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37294            throw new RSRuntimeException("Type mismatch with U8_2!");
37295        }
37296        // check ain2
37297        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
37298            throw new RSRuntimeException("Type mismatch with I8_4!");
37299        }
37300        // Verify dimensions
37301        t0 = ain1.getType();
37302        t1 = ain2.getType();
37303        if ((t0.getCount() != t1.getCount()) ||
37304            (t0.getX() != t1.getX()) ||
37305            (t0.getY() != t1.getY()) ||
37306            (t0.getZ() != t1.getZ()) ||
37307            (t0.hasFaces()   != t1.hasFaces()) ||
37308            (t0.hasMipmaps() != t1.hasMipmaps())) {
37309            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37310        }
37311
37312        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37313        aout.setAutoPadding(true);
37314        reduce(mExportReduceIdx_my_uchar2_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
37315        return new result_int(aout);
37316    }
37317
37318    private final static int mExportReduceIdx_my_uchar2_short_0 = 564;
37319    // in1 = "a", flattened 2-vectors
37320    // in2 = "b"
37321    public result_int reduce_my_uchar2_short_0(byte[] in1, short[] in2) {
37322        // Verify that "in1" is non-null.
37323        if (in1 == null) {
37324            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37325        }
37326        // Verify that the array length is a multiple of the vector size.
37327        if (in1.length % 2 != 0) {
37328            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37329        }
37330        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37331        ain1.setAutoPadding(true);
37332        ain1.copyFrom(in1);
37333        // Verify that "in2" is non-null.
37334        if (in2 == null) {
37335            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37336        }
37337        // Verify that input array lengths are the same.
37338        if (in1.length / 2 != in2.length) {
37339            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37340        }
37341        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
37342        ain2.setAutoPadding(true);
37343        ain2.copyFrom(in2);
37344
37345        result_int result = reduce_my_uchar2_short_0(ain1, ain2, null);
37346        result.mTempIns = new Allocation[]{ain1, ain2};
37347        return result;
37348    }
37349
37350    // ain1 = "uchar2 a"
37351    // ain2 = "short b"
37352    public result_int reduce_my_uchar2_short_0(Allocation ain1, Allocation ain2) {
37353        return reduce_my_uchar2_short_0(ain1, ain2, null);
37354    }
37355
37356    // ain1 = "uchar2 a"
37357    // ain2 = "short b"
37358    public result_int reduce_my_uchar2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37359        Type t0, t1;
37360        // check ain1
37361        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37362            throw new RSRuntimeException("Type mismatch with U8_2!");
37363        }
37364        // check ain2
37365        if (!ain2.getType().getElement().isCompatible(__I16)) {
37366            throw new RSRuntimeException("Type mismatch with I16!");
37367        }
37368        // Verify dimensions
37369        t0 = ain1.getType();
37370        t1 = ain2.getType();
37371        if ((t0.getCount() != t1.getCount()) ||
37372            (t0.getX() != t1.getX()) ||
37373            (t0.getY() != t1.getY()) ||
37374            (t0.getZ() != t1.getZ()) ||
37375            (t0.hasFaces()   != t1.hasFaces()) ||
37376            (t0.hasMipmaps() != t1.hasMipmaps())) {
37377            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37378        }
37379
37380        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37381        aout.setAutoPadding(true);
37382        reduce(mExportReduceIdx_my_uchar2_short_0, new Allocation[]{ain1, ain2}, aout, sc);
37383        return new result_int(aout);
37384    }
37385
37386    private final static int mExportReduceIdx_my_uchar2_short_1 = 565;
37387    // in1 = "a", flattened 2-vectors
37388    // in2 = "b"
37389    public result_int reduce_my_uchar2_short_1(byte[] in1, short[] in2) {
37390        // Verify that "in1" is non-null.
37391        if (in1 == null) {
37392            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37393        }
37394        // Verify that the array length is a multiple of the vector size.
37395        if (in1.length % 2 != 0) {
37396            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37397        }
37398        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37399        ain1.setAutoPadding(true);
37400        ain1.copyFrom(in1);
37401        // Verify that "in2" is non-null.
37402        if (in2 == null) {
37403            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37404        }
37405        // Verify that input array lengths are the same.
37406        if (in1.length / 2 != in2.length) {
37407            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37408        }
37409        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
37410        ain2.setAutoPadding(true);
37411        ain2.copyFrom(in2);
37412
37413        result_int result = reduce_my_uchar2_short_1(ain1, ain2, null);
37414        result.mTempIns = new Allocation[]{ain1, ain2};
37415        return result;
37416    }
37417
37418    // ain1 = "uchar2 a"
37419    // ain2 = "short b"
37420    public result_int reduce_my_uchar2_short_1(Allocation ain1, Allocation ain2) {
37421        return reduce_my_uchar2_short_1(ain1, ain2, null);
37422    }
37423
37424    // ain1 = "uchar2 a"
37425    // ain2 = "short b"
37426    public result_int reduce_my_uchar2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37427        Type t0, t1;
37428        // check ain1
37429        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37430            throw new RSRuntimeException("Type mismatch with U8_2!");
37431        }
37432        // check ain2
37433        if (!ain2.getType().getElement().isCompatible(__I16)) {
37434            throw new RSRuntimeException("Type mismatch with I16!");
37435        }
37436        // Verify dimensions
37437        t0 = ain1.getType();
37438        t1 = ain2.getType();
37439        if ((t0.getCount() != t1.getCount()) ||
37440            (t0.getX() != t1.getX()) ||
37441            (t0.getY() != t1.getY()) ||
37442            (t0.getZ() != t1.getZ()) ||
37443            (t0.hasFaces()   != t1.hasFaces()) ||
37444            (t0.hasMipmaps() != t1.hasMipmaps())) {
37445            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37446        }
37447
37448        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37449        aout.setAutoPadding(true);
37450        reduce(mExportReduceIdx_my_uchar2_short_1, new Allocation[]{ain1, ain2}, aout, sc);
37451        return new result_int(aout);
37452    }
37453
37454    private final static int mExportReduceIdx_my_uchar2_short2_0 = 566;
37455    // in1 = "a", flattened 2-vectors
37456    // in2 = "b", flattened 2-vectors
37457    public result_int reduce_my_uchar2_short2_0(byte[] in1, short[] in2) {
37458        // Verify that "in1" is non-null.
37459        if (in1 == null) {
37460            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37461        }
37462        // Verify that the array length is a multiple of the vector size.
37463        if (in1.length % 2 != 0) {
37464            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37465        }
37466        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37467        ain1.setAutoPadding(true);
37468        ain1.copyFrom(in1);
37469        // Verify that "in2" is non-null.
37470        if (in2 == null) {
37471            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37472        }
37473        // Verify that the array length is a multiple of the vector size.
37474        if (in2.length % 2 != 0) {
37475            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
37476        }
37477        // Verify that input array lengths are the same.
37478        if (in1.length / 2 != in2.length / 2) {
37479            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37480        }
37481        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
37482        ain2.setAutoPadding(true);
37483        ain2.copyFrom(in2);
37484
37485        result_int result = reduce_my_uchar2_short2_0(ain1, ain2, null);
37486        result.mTempIns = new Allocation[]{ain1, ain2};
37487        return result;
37488    }
37489
37490    // ain1 = "uchar2 a"
37491    // ain2 = "short2 b"
37492    public result_int reduce_my_uchar2_short2_0(Allocation ain1, Allocation ain2) {
37493        return reduce_my_uchar2_short2_0(ain1, ain2, null);
37494    }
37495
37496    // ain1 = "uchar2 a"
37497    // ain2 = "short2 b"
37498    public result_int reduce_my_uchar2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37499        Type t0, t1;
37500        // check ain1
37501        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37502            throw new RSRuntimeException("Type mismatch with U8_2!");
37503        }
37504        // check ain2
37505        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
37506            throw new RSRuntimeException("Type mismatch with I16_2!");
37507        }
37508        // Verify dimensions
37509        t0 = ain1.getType();
37510        t1 = ain2.getType();
37511        if ((t0.getCount() != t1.getCount()) ||
37512            (t0.getX() != t1.getX()) ||
37513            (t0.getY() != t1.getY()) ||
37514            (t0.getZ() != t1.getZ()) ||
37515            (t0.hasFaces()   != t1.hasFaces()) ||
37516            (t0.hasMipmaps() != t1.hasMipmaps())) {
37517            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37518        }
37519
37520        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37521        aout.setAutoPadding(true);
37522        reduce(mExportReduceIdx_my_uchar2_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
37523        return new result_int(aout);
37524    }
37525
37526    private final static int mExportReduceIdx_my_uchar2_short2_1 = 567;
37527    // in1 = "a", flattened 2-vectors
37528    // in2 = "b", flattened 2-vectors
37529    public result_int reduce_my_uchar2_short2_1(byte[] in1, short[] in2) {
37530        // Verify that "in1" is non-null.
37531        if (in1 == null) {
37532            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37533        }
37534        // Verify that the array length is a multiple of the vector size.
37535        if (in1.length % 2 != 0) {
37536            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37537        }
37538        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37539        ain1.setAutoPadding(true);
37540        ain1.copyFrom(in1);
37541        // Verify that "in2" is non-null.
37542        if (in2 == null) {
37543            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37544        }
37545        // Verify that the array length is a multiple of the vector size.
37546        if (in2.length % 2 != 0) {
37547            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
37548        }
37549        // Verify that input array lengths are the same.
37550        if (in1.length / 2 != in2.length / 2) {
37551            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37552        }
37553        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
37554        ain2.setAutoPadding(true);
37555        ain2.copyFrom(in2);
37556
37557        result_int result = reduce_my_uchar2_short2_1(ain1, ain2, null);
37558        result.mTempIns = new Allocation[]{ain1, ain2};
37559        return result;
37560    }
37561
37562    // ain1 = "uchar2 a"
37563    // ain2 = "short2 b"
37564    public result_int reduce_my_uchar2_short2_1(Allocation ain1, Allocation ain2) {
37565        return reduce_my_uchar2_short2_1(ain1, ain2, null);
37566    }
37567
37568    // ain1 = "uchar2 a"
37569    // ain2 = "short2 b"
37570    public result_int reduce_my_uchar2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37571        Type t0, t1;
37572        // check ain1
37573        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37574            throw new RSRuntimeException("Type mismatch with U8_2!");
37575        }
37576        // check ain2
37577        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
37578            throw new RSRuntimeException("Type mismatch with I16_2!");
37579        }
37580        // Verify dimensions
37581        t0 = ain1.getType();
37582        t1 = ain2.getType();
37583        if ((t0.getCount() != t1.getCount()) ||
37584            (t0.getX() != t1.getX()) ||
37585            (t0.getY() != t1.getY()) ||
37586            (t0.getZ() != t1.getZ()) ||
37587            (t0.hasFaces()   != t1.hasFaces()) ||
37588            (t0.hasMipmaps() != t1.hasMipmaps())) {
37589            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37590        }
37591
37592        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37593        aout.setAutoPadding(true);
37594        reduce(mExportReduceIdx_my_uchar2_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
37595        return new result_int(aout);
37596    }
37597
37598    private final static int mExportReduceIdx_my_uchar2_short4_0 = 568;
37599    // in1 = "a", flattened 2-vectors
37600    // in2 = "b", flattened 4-vectors
37601    public result_int reduce_my_uchar2_short4_0(byte[] in1, short[] in2) {
37602        // Verify that "in1" is non-null.
37603        if (in1 == null) {
37604            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37605        }
37606        // Verify that the array length is a multiple of the vector size.
37607        if (in1.length % 2 != 0) {
37608            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37609        }
37610        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37611        ain1.setAutoPadding(true);
37612        ain1.copyFrom(in1);
37613        // Verify that "in2" is non-null.
37614        if (in2 == null) {
37615            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37616        }
37617        // Verify that the array length is a multiple of the vector size.
37618        if (in2.length % 4 != 0) {
37619            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
37620        }
37621        // Verify that input array lengths are the same.
37622        if (in1.length / 2 != in2.length / 4) {
37623            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37624        }
37625        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
37626        ain2.setAutoPadding(true);
37627        ain2.copyFrom(in2);
37628
37629        result_int result = reduce_my_uchar2_short4_0(ain1, ain2, null);
37630        result.mTempIns = new Allocation[]{ain1, ain2};
37631        return result;
37632    }
37633
37634    // ain1 = "uchar2 a"
37635    // ain2 = "short4 b"
37636    public result_int reduce_my_uchar2_short4_0(Allocation ain1, Allocation ain2) {
37637        return reduce_my_uchar2_short4_0(ain1, ain2, null);
37638    }
37639
37640    // ain1 = "uchar2 a"
37641    // ain2 = "short4 b"
37642    public result_int reduce_my_uchar2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37643        Type t0, t1;
37644        // check ain1
37645        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37646            throw new RSRuntimeException("Type mismatch with U8_2!");
37647        }
37648        // check ain2
37649        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
37650            throw new RSRuntimeException("Type mismatch with I16_4!");
37651        }
37652        // Verify dimensions
37653        t0 = ain1.getType();
37654        t1 = ain2.getType();
37655        if ((t0.getCount() != t1.getCount()) ||
37656            (t0.getX() != t1.getX()) ||
37657            (t0.getY() != t1.getY()) ||
37658            (t0.getZ() != t1.getZ()) ||
37659            (t0.hasFaces()   != t1.hasFaces()) ||
37660            (t0.hasMipmaps() != t1.hasMipmaps())) {
37661            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37662        }
37663
37664        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37665        aout.setAutoPadding(true);
37666        reduce(mExportReduceIdx_my_uchar2_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
37667        return new result_int(aout);
37668    }
37669
37670    private final static int mExportReduceIdx_my_uchar2_short4_1 = 569;
37671    // in1 = "a", flattened 2-vectors
37672    // in2 = "b", flattened 4-vectors
37673    public result_int reduce_my_uchar2_short4_1(byte[] in1, short[] in2) {
37674        // Verify that "in1" is non-null.
37675        if (in1 == null) {
37676            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37677        }
37678        // Verify that the array length is a multiple of the vector size.
37679        if (in1.length % 2 != 0) {
37680            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37681        }
37682        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37683        ain1.setAutoPadding(true);
37684        ain1.copyFrom(in1);
37685        // Verify that "in2" is non-null.
37686        if (in2 == null) {
37687            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37688        }
37689        // Verify that the array length is a multiple of the vector size.
37690        if (in2.length % 4 != 0) {
37691            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
37692        }
37693        // Verify that input array lengths are the same.
37694        if (in1.length / 2 != in2.length / 4) {
37695            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37696        }
37697        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
37698        ain2.setAutoPadding(true);
37699        ain2.copyFrom(in2);
37700
37701        result_int result = reduce_my_uchar2_short4_1(ain1, ain2, null);
37702        result.mTempIns = new Allocation[]{ain1, ain2};
37703        return result;
37704    }
37705
37706    // ain1 = "uchar2 a"
37707    // ain2 = "short4 b"
37708    public result_int reduce_my_uchar2_short4_1(Allocation ain1, Allocation ain2) {
37709        return reduce_my_uchar2_short4_1(ain1, ain2, null);
37710    }
37711
37712    // ain1 = "uchar2 a"
37713    // ain2 = "short4 b"
37714    public result_int reduce_my_uchar2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37715        Type t0, t1;
37716        // check ain1
37717        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37718            throw new RSRuntimeException("Type mismatch with U8_2!");
37719        }
37720        // check ain2
37721        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
37722            throw new RSRuntimeException("Type mismatch with I16_4!");
37723        }
37724        // Verify dimensions
37725        t0 = ain1.getType();
37726        t1 = ain2.getType();
37727        if ((t0.getCount() != t1.getCount()) ||
37728            (t0.getX() != t1.getX()) ||
37729            (t0.getY() != t1.getY()) ||
37730            (t0.getZ() != t1.getZ()) ||
37731            (t0.hasFaces()   != t1.hasFaces()) ||
37732            (t0.hasMipmaps() != t1.hasMipmaps())) {
37733            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37734        }
37735
37736        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37737        aout.setAutoPadding(true);
37738        reduce(mExportReduceIdx_my_uchar2_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
37739        return new result_int(aout);
37740    }
37741
37742    private final static int mExportReduceIdx_my_uchar2_uchar_0 = 570;
37743    // in1 = "a", flattened 2-vectors
37744    // in2 = "b"
37745    public result_int reduce_my_uchar2_uchar_0(byte[] in1, byte[] in2) {
37746        // Verify that "in1" is non-null.
37747        if (in1 == null) {
37748            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37749        }
37750        // Verify that the array length is a multiple of the vector size.
37751        if (in1.length % 2 != 0) {
37752            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37753        }
37754        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37755        ain1.setAutoPadding(true);
37756        ain1.copyFrom(in1);
37757        // Verify that "in2" is non-null.
37758        if (in2 == null) {
37759            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37760        }
37761        // Verify that input array lengths are the same.
37762        if (in1.length / 2 != in2.length) {
37763            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37764        }
37765        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
37766        ain2.setAutoPadding(true);
37767        ain2.copyFrom(in2);
37768
37769        result_int result = reduce_my_uchar2_uchar_0(ain1, ain2, null);
37770        result.mTempIns = new Allocation[]{ain1, ain2};
37771        return result;
37772    }
37773
37774    // ain1 = "uchar2 a"
37775    // ain2 = "uchar b"
37776    public result_int reduce_my_uchar2_uchar_0(Allocation ain1, Allocation ain2) {
37777        return reduce_my_uchar2_uchar_0(ain1, ain2, null);
37778    }
37779
37780    // ain1 = "uchar2 a"
37781    // ain2 = "uchar b"
37782    public result_int reduce_my_uchar2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37783        Type t0, t1;
37784        // check ain1
37785        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37786            throw new RSRuntimeException("Type mismatch with U8_2!");
37787        }
37788        // check ain2
37789        if (!ain2.getType().getElement().isCompatible(__U8)) {
37790            throw new RSRuntimeException("Type mismatch with U8!");
37791        }
37792        // Verify dimensions
37793        t0 = ain1.getType();
37794        t1 = ain2.getType();
37795        if ((t0.getCount() != t1.getCount()) ||
37796            (t0.getX() != t1.getX()) ||
37797            (t0.getY() != t1.getY()) ||
37798            (t0.getZ() != t1.getZ()) ||
37799            (t0.hasFaces()   != t1.hasFaces()) ||
37800            (t0.hasMipmaps() != t1.hasMipmaps())) {
37801            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37802        }
37803
37804        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37805        aout.setAutoPadding(true);
37806        reduce(mExportReduceIdx_my_uchar2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
37807        return new result_int(aout);
37808    }
37809
37810    private final static int mExportReduceIdx_my_uchar2_uchar_1 = 571;
37811    // in1 = "a", flattened 2-vectors
37812    // in2 = "b"
37813    public result_int reduce_my_uchar2_uchar_1(byte[] in1, byte[] in2) {
37814        // Verify that "in1" is non-null.
37815        if (in1 == null) {
37816            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37817        }
37818        // Verify that the array length is a multiple of the vector size.
37819        if (in1.length % 2 != 0) {
37820            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37821        }
37822        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37823        ain1.setAutoPadding(true);
37824        ain1.copyFrom(in1);
37825        // Verify that "in2" is non-null.
37826        if (in2 == null) {
37827            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37828        }
37829        // Verify that input array lengths are the same.
37830        if (in1.length / 2 != in2.length) {
37831            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37832        }
37833        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
37834        ain2.setAutoPadding(true);
37835        ain2.copyFrom(in2);
37836
37837        result_int result = reduce_my_uchar2_uchar_1(ain1, ain2, null);
37838        result.mTempIns = new Allocation[]{ain1, ain2};
37839        return result;
37840    }
37841
37842    // ain1 = "uchar2 a"
37843    // ain2 = "uchar b"
37844    public result_int reduce_my_uchar2_uchar_1(Allocation ain1, Allocation ain2) {
37845        return reduce_my_uchar2_uchar_1(ain1, ain2, null);
37846    }
37847
37848    // ain1 = "uchar2 a"
37849    // ain2 = "uchar b"
37850    public result_int reduce_my_uchar2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37851        Type t0, t1;
37852        // check ain1
37853        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37854            throw new RSRuntimeException("Type mismatch with U8_2!");
37855        }
37856        // check ain2
37857        if (!ain2.getType().getElement().isCompatible(__U8)) {
37858            throw new RSRuntimeException("Type mismatch with U8!");
37859        }
37860        // Verify dimensions
37861        t0 = ain1.getType();
37862        t1 = ain2.getType();
37863        if ((t0.getCount() != t1.getCount()) ||
37864            (t0.getX() != t1.getX()) ||
37865            (t0.getY() != t1.getY()) ||
37866            (t0.getZ() != t1.getZ()) ||
37867            (t0.hasFaces()   != t1.hasFaces()) ||
37868            (t0.hasMipmaps() != t1.hasMipmaps())) {
37869            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37870        }
37871
37872        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37873        aout.setAutoPadding(true);
37874        reduce(mExportReduceIdx_my_uchar2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
37875        return new result_int(aout);
37876    }
37877
37878    private final static int mExportReduceIdx_my_uchar2_uchar2_0 = 572;
37879    // in1 = "a", flattened 2-vectors
37880    // in2 = "b", flattened 2-vectors
37881    public result_int reduce_my_uchar2_uchar2_0(byte[] in1, byte[] in2) {
37882        // Verify that "in1" is non-null.
37883        if (in1 == null) {
37884            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37885        }
37886        // Verify that the array length is a multiple of the vector size.
37887        if (in1.length % 2 != 0) {
37888            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37889        }
37890        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37891        ain1.setAutoPadding(true);
37892        ain1.copyFrom(in1);
37893        // Verify that "in2" is non-null.
37894        if (in2 == null) {
37895            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37896        }
37897        // Verify that the array length is a multiple of the vector size.
37898        if (in2.length % 2 != 0) {
37899            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
37900        }
37901        // Verify that input array lengths are the same.
37902        if (in1.length / 2 != in2.length / 2) {
37903            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37904        }
37905        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
37906        ain2.setAutoPadding(true);
37907        ain2.copyFrom(in2);
37908
37909        result_int result = reduce_my_uchar2_uchar2_0(ain1, ain2, null);
37910        result.mTempIns = new Allocation[]{ain1, ain2};
37911        return result;
37912    }
37913
37914    // ain1 = "uchar2 a"
37915    // ain2 = "uchar2 b"
37916    public result_int reduce_my_uchar2_uchar2_0(Allocation ain1, Allocation ain2) {
37917        return reduce_my_uchar2_uchar2_0(ain1, ain2, null);
37918    }
37919
37920    // ain1 = "uchar2 a"
37921    // ain2 = "uchar2 b"
37922    public result_int reduce_my_uchar2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37923        Type t0, t1;
37924        // check ain1
37925        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37926            throw new RSRuntimeException("Type mismatch with U8_2!");
37927        }
37928        // check ain2
37929        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
37930            throw new RSRuntimeException("Type mismatch with U8_2!");
37931        }
37932        // Verify dimensions
37933        t0 = ain1.getType();
37934        t1 = ain2.getType();
37935        if ((t0.getCount() != t1.getCount()) ||
37936            (t0.getX() != t1.getX()) ||
37937            (t0.getY() != t1.getY()) ||
37938            (t0.getZ() != t1.getZ()) ||
37939            (t0.hasFaces()   != t1.hasFaces()) ||
37940            (t0.hasMipmaps() != t1.hasMipmaps())) {
37941            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
37942        }
37943
37944        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
37945        aout.setAutoPadding(true);
37946        reduce(mExportReduceIdx_my_uchar2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
37947        return new result_int(aout);
37948    }
37949
37950    private final static int mExportReduceIdx_my_uchar2_uchar2_1 = 573;
37951    // in1 = "a", flattened 2-vectors
37952    // in2 = "b", flattened 2-vectors
37953    public result_int reduce_my_uchar2_uchar2_1(byte[] in1, byte[] in2) {
37954        // Verify that "in1" is non-null.
37955        if (in1 == null) {
37956            throw new RSIllegalArgumentException("Array \"in1\" is null!");
37957        }
37958        // Verify that the array length is a multiple of the vector size.
37959        if (in1.length % 2 != 0) {
37960            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
37961        }
37962        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
37963        ain1.setAutoPadding(true);
37964        ain1.copyFrom(in1);
37965        // Verify that "in2" is non-null.
37966        if (in2 == null) {
37967            throw new RSIllegalArgumentException("Array \"in2\" is null!");
37968        }
37969        // Verify that the array length is a multiple of the vector size.
37970        if (in2.length % 2 != 0) {
37971            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
37972        }
37973        // Verify that input array lengths are the same.
37974        if (in1.length / 2 != in2.length / 2) {
37975            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
37976        }
37977        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
37978        ain2.setAutoPadding(true);
37979        ain2.copyFrom(in2);
37980
37981        result_int result = reduce_my_uchar2_uchar2_1(ain1, ain2, null);
37982        result.mTempIns = new Allocation[]{ain1, ain2};
37983        return result;
37984    }
37985
37986    // ain1 = "uchar2 a"
37987    // ain2 = "uchar2 b"
37988    public result_int reduce_my_uchar2_uchar2_1(Allocation ain1, Allocation ain2) {
37989        return reduce_my_uchar2_uchar2_1(ain1, ain2, null);
37990    }
37991
37992    // ain1 = "uchar2 a"
37993    // ain2 = "uchar2 b"
37994    public result_int reduce_my_uchar2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
37995        Type t0, t1;
37996        // check ain1
37997        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
37998            throw new RSRuntimeException("Type mismatch with U8_2!");
37999        }
38000        // check ain2
38001        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
38002            throw new RSRuntimeException("Type mismatch with U8_2!");
38003        }
38004        // Verify dimensions
38005        t0 = ain1.getType();
38006        t1 = ain2.getType();
38007        if ((t0.getCount() != t1.getCount()) ||
38008            (t0.getX() != t1.getX()) ||
38009            (t0.getY() != t1.getY()) ||
38010            (t0.getZ() != t1.getZ()) ||
38011            (t0.hasFaces()   != t1.hasFaces()) ||
38012            (t0.hasMipmaps() != t1.hasMipmaps())) {
38013            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38014        }
38015
38016        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38017        aout.setAutoPadding(true);
38018        reduce(mExportReduceIdx_my_uchar2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
38019        return new result_int(aout);
38020    }
38021
38022    private final static int mExportReduceIdx_my_uchar2_uchar4_0 = 574;
38023    // in1 = "a", flattened 2-vectors
38024    // in2 = "b", flattened 4-vectors
38025    public result_int reduce_my_uchar2_uchar4_0(byte[] in1, byte[] in2) {
38026        // Verify that "in1" is non-null.
38027        if (in1 == null) {
38028            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38029        }
38030        // Verify that the array length is a multiple of the vector size.
38031        if (in1.length % 2 != 0) {
38032            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38033        }
38034        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38035        ain1.setAutoPadding(true);
38036        ain1.copyFrom(in1);
38037        // Verify that "in2" is non-null.
38038        if (in2 == null) {
38039            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38040        }
38041        // Verify that the array length is a multiple of the vector size.
38042        if (in2.length % 4 != 0) {
38043            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
38044        }
38045        // Verify that input array lengths are the same.
38046        if (in1.length / 2 != in2.length / 4) {
38047            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38048        }
38049        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
38050        ain2.setAutoPadding(true);
38051        ain2.copyFrom(in2);
38052
38053        result_int result = reduce_my_uchar2_uchar4_0(ain1, ain2, null);
38054        result.mTempIns = new Allocation[]{ain1, ain2};
38055        return result;
38056    }
38057
38058    // ain1 = "uchar2 a"
38059    // ain2 = "uchar4 b"
38060    public result_int reduce_my_uchar2_uchar4_0(Allocation ain1, Allocation ain2) {
38061        return reduce_my_uchar2_uchar4_0(ain1, ain2, null);
38062    }
38063
38064    // ain1 = "uchar2 a"
38065    // ain2 = "uchar4 b"
38066    public result_int reduce_my_uchar2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38067        Type t0, t1;
38068        // check ain1
38069        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38070            throw new RSRuntimeException("Type mismatch with U8_2!");
38071        }
38072        // check ain2
38073        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
38074            throw new RSRuntimeException("Type mismatch with U8_4!");
38075        }
38076        // Verify dimensions
38077        t0 = ain1.getType();
38078        t1 = ain2.getType();
38079        if ((t0.getCount() != t1.getCount()) ||
38080            (t0.getX() != t1.getX()) ||
38081            (t0.getY() != t1.getY()) ||
38082            (t0.getZ() != t1.getZ()) ||
38083            (t0.hasFaces()   != t1.hasFaces()) ||
38084            (t0.hasMipmaps() != t1.hasMipmaps())) {
38085            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38086        }
38087
38088        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38089        aout.setAutoPadding(true);
38090        reduce(mExportReduceIdx_my_uchar2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
38091        return new result_int(aout);
38092    }
38093
38094    private final static int mExportReduceIdx_my_uchar2_uchar4_1 = 575;
38095    // in1 = "a", flattened 2-vectors
38096    // in2 = "b", flattened 4-vectors
38097    public result_int reduce_my_uchar2_uchar4_1(byte[] in1, byte[] in2) {
38098        // Verify that "in1" is non-null.
38099        if (in1 == null) {
38100            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38101        }
38102        // Verify that the array length is a multiple of the vector size.
38103        if (in1.length % 2 != 0) {
38104            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38105        }
38106        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38107        ain1.setAutoPadding(true);
38108        ain1.copyFrom(in1);
38109        // Verify that "in2" is non-null.
38110        if (in2 == null) {
38111            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38112        }
38113        // Verify that the array length is a multiple of the vector size.
38114        if (in2.length % 4 != 0) {
38115            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
38116        }
38117        // Verify that input array lengths are the same.
38118        if (in1.length / 2 != in2.length / 4) {
38119            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38120        }
38121        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
38122        ain2.setAutoPadding(true);
38123        ain2.copyFrom(in2);
38124
38125        result_int result = reduce_my_uchar2_uchar4_1(ain1, ain2, null);
38126        result.mTempIns = new Allocation[]{ain1, ain2};
38127        return result;
38128    }
38129
38130    // ain1 = "uchar2 a"
38131    // ain2 = "uchar4 b"
38132    public result_int reduce_my_uchar2_uchar4_1(Allocation ain1, Allocation ain2) {
38133        return reduce_my_uchar2_uchar4_1(ain1, ain2, null);
38134    }
38135
38136    // ain1 = "uchar2 a"
38137    // ain2 = "uchar4 b"
38138    public result_int reduce_my_uchar2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38139        Type t0, t1;
38140        // check ain1
38141        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38142            throw new RSRuntimeException("Type mismatch with U8_2!");
38143        }
38144        // check ain2
38145        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
38146            throw new RSRuntimeException("Type mismatch with U8_4!");
38147        }
38148        // Verify dimensions
38149        t0 = ain1.getType();
38150        t1 = ain2.getType();
38151        if ((t0.getCount() != t1.getCount()) ||
38152            (t0.getX() != t1.getX()) ||
38153            (t0.getY() != t1.getY()) ||
38154            (t0.getZ() != t1.getZ()) ||
38155            (t0.hasFaces()   != t1.hasFaces()) ||
38156            (t0.hasMipmaps() != t1.hasMipmaps())) {
38157            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38158        }
38159
38160        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38161        aout.setAutoPadding(true);
38162        reduce(mExportReduceIdx_my_uchar2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
38163        return new result_int(aout);
38164    }
38165
38166    private final static int mExportReduceIdx_my_uchar2_ushort_0 = 576;
38167    // in1 = "a", flattened 2-vectors
38168    // in2 = "b"
38169    public result_int reduce_my_uchar2_ushort_0(byte[] in1, short[] in2) {
38170        // Verify that "in1" is non-null.
38171        if (in1 == null) {
38172            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38173        }
38174        // Verify that the array length is a multiple of the vector size.
38175        if (in1.length % 2 != 0) {
38176            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38177        }
38178        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38179        ain1.setAutoPadding(true);
38180        ain1.copyFrom(in1);
38181        // Verify that "in2" is non-null.
38182        if (in2 == null) {
38183            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38184        }
38185        // Verify that input array lengths are the same.
38186        if (in1.length / 2 != in2.length) {
38187            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38188        }
38189        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
38190        ain2.setAutoPadding(true);
38191        ain2.copyFrom(in2);
38192
38193        result_int result = reduce_my_uchar2_ushort_0(ain1, ain2, null);
38194        result.mTempIns = new Allocation[]{ain1, ain2};
38195        return result;
38196    }
38197
38198    // ain1 = "uchar2 a"
38199    // ain2 = "ushort b"
38200    public result_int reduce_my_uchar2_ushort_0(Allocation ain1, Allocation ain2) {
38201        return reduce_my_uchar2_ushort_0(ain1, ain2, null);
38202    }
38203
38204    // ain1 = "uchar2 a"
38205    // ain2 = "ushort b"
38206    public result_int reduce_my_uchar2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38207        Type t0, t1;
38208        // check ain1
38209        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38210            throw new RSRuntimeException("Type mismatch with U8_2!");
38211        }
38212        // check ain2
38213        if (!ain2.getType().getElement().isCompatible(__U16)) {
38214            throw new RSRuntimeException("Type mismatch with U16!");
38215        }
38216        // Verify dimensions
38217        t0 = ain1.getType();
38218        t1 = ain2.getType();
38219        if ((t0.getCount() != t1.getCount()) ||
38220            (t0.getX() != t1.getX()) ||
38221            (t0.getY() != t1.getY()) ||
38222            (t0.getZ() != t1.getZ()) ||
38223            (t0.hasFaces()   != t1.hasFaces()) ||
38224            (t0.hasMipmaps() != t1.hasMipmaps())) {
38225            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38226        }
38227
38228        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38229        aout.setAutoPadding(true);
38230        reduce(mExportReduceIdx_my_uchar2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
38231        return new result_int(aout);
38232    }
38233
38234    private final static int mExportReduceIdx_my_uchar2_ushort_1 = 577;
38235    // in1 = "a", flattened 2-vectors
38236    // in2 = "b"
38237    public result_int reduce_my_uchar2_ushort_1(byte[] in1, short[] in2) {
38238        // Verify that "in1" is non-null.
38239        if (in1 == null) {
38240            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38241        }
38242        // Verify that the array length is a multiple of the vector size.
38243        if (in1.length % 2 != 0) {
38244            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38245        }
38246        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38247        ain1.setAutoPadding(true);
38248        ain1.copyFrom(in1);
38249        // Verify that "in2" is non-null.
38250        if (in2 == null) {
38251            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38252        }
38253        // Verify that input array lengths are the same.
38254        if (in1.length / 2 != in2.length) {
38255            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38256        }
38257        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
38258        ain2.setAutoPadding(true);
38259        ain2.copyFrom(in2);
38260
38261        result_int result = reduce_my_uchar2_ushort_1(ain1, ain2, null);
38262        result.mTempIns = new Allocation[]{ain1, ain2};
38263        return result;
38264    }
38265
38266    // ain1 = "uchar2 a"
38267    // ain2 = "ushort b"
38268    public result_int reduce_my_uchar2_ushort_1(Allocation ain1, Allocation ain2) {
38269        return reduce_my_uchar2_ushort_1(ain1, ain2, null);
38270    }
38271
38272    // ain1 = "uchar2 a"
38273    // ain2 = "ushort b"
38274    public result_int reduce_my_uchar2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38275        Type t0, t1;
38276        // check ain1
38277        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38278            throw new RSRuntimeException("Type mismatch with U8_2!");
38279        }
38280        // check ain2
38281        if (!ain2.getType().getElement().isCompatible(__U16)) {
38282            throw new RSRuntimeException("Type mismatch with U16!");
38283        }
38284        // Verify dimensions
38285        t0 = ain1.getType();
38286        t1 = ain2.getType();
38287        if ((t0.getCount() != t1.getCount()) ||
38288            (t0.getX() != t1.getX()) ||
38289            (t0.getY() != t1.getY()) ||
38290            (t0.getZ() != t1.getZ()) ||
38291            (t0.hasFaces()   != t1.hasFaces()) ||
38292            (t0.hasMipmaps() != t1.hasMipmaps())) {
38293            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38294        }
38295
38296        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38297        aout.setAutoPadding(true);
38298        reduce(mExportReduceIdx_my_uchar2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
38299        return new result_int(aout);
38300    }
38301
38302    private final static int mExportReduceIdx_my_uchar2_ushort2_0 = 578;
38303    // in1 = "a", flattened 2-vectors
38304    // in2 = "b", flattened 2-vectors
38305    public result_int reduce_my_uchar2_ushort2_0(byte[] in1, short[] in2) {
38306        // Verify that "in1" is non-null.
38307        if (in1 == null) {
38308            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38309        }
38310        // Verify that the array length is a multiple of the vector size.
38311        if (in1.length % 2 != 0) {
38312            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38313        }
38314        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38315        ain1.setAutoPadding(true);
38316        ain1.copyFrom(in1);
38317        // Verify that "in2" is non-null.
38318        if (in2 == null) {
38319            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38320        }
38321        // Verify that the array length is a multiple of the vector size.
38322        if (in2.length % 2 != 0) {
38323            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
38324        }
38325        // Verify that input array lengths are the same.
38326        if (in1.length / 2 != in2.length / 2) {
38327            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38328        }
38329        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
38330        ain2.setAutoPadding(true);
38331        ain2.copyFrom(in2);
38332
38333        result_int result = reduce_my_uchar2_ushort2_0(ain1, ain2, null);
38334        result.mTempIns = new Allocation[]{ain1, ain2};
38335        return result;
38336    }
38337
38338    // ain1 = "uchar2 a"
38339    // ain2 = "ushort2 b"
38340    public result_int reduce_my_uchar2_ushort2_0(Allocation ain1, Allocation ain2) {
38341        return reduce_my_uchar2_ushort2_0(ain1, ain2, null);
38342    }
38343
38344    // ain1 = "uchar2 a"
38345    // ain2 = "ushort2 b"
38346    public result_int reduce_my_uchar2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38347        Type t0, t1;
38348        // check ain1
38349        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38350            throw new RSRuntimeException("Type mismatch with U8_2!");
38351        }
38352        // check ain2
38353        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
38354            throw new RSRuntimeException("Type mismatch with U16_2!");
38355        }
38356        // Verify dimensions
38357        t0 = ain1.getType();
38358        t1 = ain2.getType();
38359        if ((t0.getCount() != t1.getCount()) ||
38360            (t0.getX() != t1.getX()) ||
38361            (t0.getY() != t1.getY()) ||
38362            (t0.getZ() != t1.getZ()) ||
38363            (t0.hasFaces()   != t1.hasFaces()) ||
38364            (t0.hasMipmaps() != t1.hasMipmaps())) {
38365            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38366        }
38367
38368        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38369        aout.setAutoPadding(true);
38370        reduce(mExportReduceIdx_my_uchar2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
38371        return new result_int(aout);
38372    }
38373
38374    private final static int mExportReduceIdx_my_uchar2_ushort2_1 = 579;
38375    // in1 = "a", flattened 2-vectors
38376    // in2 = "b", flattened 2-vectors
38377    public result_int reduce_my_uchar2_ushort2_1(byte[] in1, short[] in2) {
38378        // Verify that "in1" is non-null.
38379        if (in1 == null) {
38380            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38381        }
38382        // Verify that the array length is a multiple of the vector size.
38383        if (in1.length % 2 != 0) {
38384            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38385        }
38386        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38387        ain1.setAutoPadding(true);
38388        ain1.copyFrom(in1);
38389        // Verify that "in2" is non-null.
38390        if (in2 == null) {
38391            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38392        }
38393        // Verify that the array length is a multiple of the vector size.
38394        if (in2.length % 2 != 0) {
38395            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
38396        }
38397        // Verify that input array lengths are the same.
38398        if (in1.length / 2 != in2.length / 2) {
38399            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38400        }
38401        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
38402        ain2.setAutoPadding(true);
38403        ain2.copyFrom(in2);
38404
38405        result_int result = reduce_my_uchar2_ushort2_1(ain1, ain2, null);
38406        result.mTempIns = new Allocation[]{ain1, ain2};
38407        return result;
38408    }
38409
38410    // ain1 = "uchar2 a"
38411    // ain2 = "ushort2 b"
38412    public result_int reduce_my_uchar2_ushort2_1(Allocation ain1, Allocation ain2) {
38413        return reduce_my_uchar2_ushort2_1(ain1, ain2, null);
38414    }
38415
38416    // ain1 = "uchar2 a"
38417    // ain2 = "ushort2 b"
38418    public result_int reduce_my_uchar2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38419        Type t0, t1;
38420        // check ain1
38421        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38422            throw new RSRuntimeException("Type mismatch with U8_2!");
38423        }
38424        // check ain2
38425        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
38426            throw new RSRuntimeException("Type mismatch with U16_2!");
38427        }
38428        // Verify dimensions
38429        t0 = ain1.getType();
38430        t1 = ain2.getType();
38431        if ((t0.getCount() != t1.getCount()) ||
38432            (t0.getX() != t1.getX()) ||
38433            (t0.getY() != t1.getY()) ||
38434            (t0.getZ() != t1.getZ()) ||
38435            (t0.hasFaces()   != t1.hasFaces()) ||
38436            (t0.hasMipmaps() != t1.hasMipmaps())) {
38437            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38438        }
38439
38440        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38441        aout.setAutoPadding(true);
38442        reduce(mExportReduceIdx_my_uchar2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
38443        return new result_int(aout);
38444    }
38445
38446    private final static int mExportReduceIdx_my_uchar2_ushort4_0 = 580;
38447    // in1 = "a", flattened 2-vectors
38448    // in2 = "b", flattened 4-vectors
38449    public result_int reduce_my_uchar2_ushort4_0(byte[] in1, short[] in2) {
38450        // Verify that "in1" is non-null.
38451        if (in1 == null) {
38452            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38453        }
38454        // Verify that the array length is a multiple of the vector size.
38455        if (in1.length % 2 != 0) {
38456            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38457        }
38458        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38459        ain1.setAutoPadding(true);
38460        ain1.copyFrom(in1);
38461        // Verify that "in2" is non-null.
38462        if (in2 == null) {
38463            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38464        }
38465        // Verify that the array length is a multiple of the vector size.
38466        if (in2.length % 4 != 0) {
38467            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
38468        }
38469        // Verify that input array lengths are the same.
38470        if (in1.length / 2 != in2.length / 4) {
38471            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38472        }
38473        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
38474        ain2.setAutoPadding(true);
38475        ain2.copyFrom(in2);
38476
38477        result_int result = reduce_my_uchar2_ushort4_0(ain1, ain2, null);
38478        result.mTempIns = new Allocation[]{ain1, ain2};
38479        return result;
38480    }
38481
38482    // ain1 = "uchar2 a"
38483    // ain2 = "ushort4 b"
38484    public result_int reduce_my_uchar2_ushort4_0(Allocation ain1, Allocation ain2) {
38485        return reduce_my_uchar2_ushort4_0(ain1, ain2, null);
38486    }
38487
38488    // ain1 = "uchar2 a"
38489    // ain2 = "ushort4 b"
38490    public result_int reduce_my_uchar2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38491        Type t0, t1;
38492        // check ain1
38493        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38494            throw new RSRuntimeException("Type mismatch with U8_2!");
38495        }
38496        // check ain2
38497        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
38498            throw new RSRuntimeException("Type mismatch with U16_4!");
38499        }
38500        // Verify dimensions
38501        t0 = ain1.getType();
38502        t1 = ain2.getType();
38503        if ((t0.getCount() != t1.getCount()) ||
38504            (t0.getX() != t1.getX()) ||
38505            (t0.getY() != t1.getY()) ||
38506            (t0.getZ() != t1.getZ()) ||
38507            (t0.hasFaces()   != t1.hasFaces()) ||
38508            (t0.hasMipmaps() != t1.hasMipmaps())) {
38509            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38510        }
38511
38512        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38513        aout.setAutoPadding(true);
38514        reduce(mExportReduceIdx_my_uchar2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
38515        return new result_int(aout);
38516    }
38517
38518    private final static int mExportReduceIdx_my_uchar2_ushort4_1 = 581;
38519    // in1 = "a", flattened 2-vectors
38520    // in2 = "b", flattened 4-vectors
38521    public result_int reduce_my_uchar2_ushort4_1(byte[] in1, short[] in2) {
38522        // Verify that "in1" is non-null.
38523        if (in1 == null) {
38524            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38525        }
38526        // Verify that the array length is a multiple of the vector size.
38527        if (in1.length % 2 != 0) {
38528            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38529        }
38530        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38531        ain1.setAutoPadding(true);
38532        ain1.copyFrom(in1);
38533        // Verify that "in2" is non-null.
38534        if (in2 == null) {
38535            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38536        }
38537        // Verify that the array length is a multiple of the vector size.
38538        if (in2.length % 4 != 0) {
38539            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
38540        }
38541        // Verify that input array lengths are the same.
38542        if (in1.length / 2 != in2.length / 4) {
38543            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38544        }
38545        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
38546        ain2.setAutoPadding(true);
38547        ain2.copyFrom(in2);
38548
38549        result_int result = reduce_my_uchar2_ushort4_1(ain1, ain2, null);
38550        result.mTempIns = new Allocation[]{ain1, ain2};
38551        return result;
38552    }
38553
38554    // ain1 = "uchar2 a"
38555    // ain2 = "ushort4 b"
38556    public result_int reduce_my_uchar2_ushort4_1(Allocation ain1, Allocation ain2) {
38557        return reduce_my_uchar2_ushort4_1(ain1, ain2, null);
38558    }
38559
38560    // ain1 = "uchar2 a"
38561    // ain2 = "ushort4 b"
38562    public result_int reduce_my_uchar2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38563        Type t0, t1;
38564        // check ain1
38565        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38566            throw new RSRuntimeException("Type mismatch with U8_2!");
38567        }
38568        // check ain2
38569        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
38570            throw new RSRuntimeException("Type mismatch with U16_4!");
38571        }
38572        // Verify dimensions
38573        t0 = ain1.getType();
38574        t1 = ain2.getType();
38575        if ((t0.getCount() != t1.getCount()) ||
38576            (t0.getX() != t1.getX()) ||
38577            (t0.getY() != t1.getY()) ||
38578            (t0.getZ() != t1.getZ()) ||
38579            (t0.hasFaces()   != t1.hasFaces()) ||
38580            (t0.hasMipmaps() != t1.hasMipmaps())) {
38581            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38582        }
38583
38584        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38585        aout.setAutoPadding(true);
38586        reduce(mExportReduceIdx_my_uchar2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
38587        return new result_int(aout);
38588    }
38589
38590    private final static int mExportReduceIdx_my_uchar2_bool_0 = 582;
38591    // in1 = "a", flattened 2-vectors
38592    // in2 = "b"
38593    public result_int reduce_my_uchar2_bool_0(byte[] in1, byte[] in2) {
38594        // Verify that "in1" is non-null.
38595        if (in1 == null) {
38596            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38597        }
38598        // Verify that the array length is a multiple of the vector size.
38599        if (in1.length % 2 != 0) {
38600            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38601        }
38602        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38603        ain1.setAutoPadding(true);
38604        ain1.copyFrom(in1);
38605        // Verify that "in2" is non-null.
38606        if (in2 == null) {
38607            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38608        }
38609        // Verify that input array lengths are the same.
38610        if (in1.length / 2 != in2.length) {
38611            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38612        }
38613        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
38614        ain2.setAutoPadding(true);
38615        ain2.copyFrom(in2);
38616
38617        result_int result = reduce_my_uchar2_bool_0(ain1, ain2, null);
38618        result.mTempIns = new Allocation[]{ain1, ain2};
38619        return result;
38620    }
38621
38622    // ain1 = "uchar2 a"
38623    // ain2 = "bool b"
38624    public result_int reduce_my_uchar2_bool_0(Allocation ain1, Allocation ain2) {
38625        return reduce_my_uchar2_bool_0(ain1, ain2, null);
38626    }
38627
38628    // ain1 = "uchar2 a"
38629    // ain2 = "bool b"
38630    public result_int reduce_my_uchar2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38631        Type t0, t1;
38632        // check ain1
38633        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38634            throw new RSRuntimeException("Type mismatch with U8_2!");
38635        }
38636        // check ain2
38637        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
38638            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
38639        }
38640        // Verify dimensions
38641        t0 = ain1.getType();
38642        t1 = ain2.getType();
38643        if ((t0.getCount() != t1.getCount()) ||
38644            (t0.getX() != t1.getX()) ||
38645            (t0.getY() != t1.getY()) ||
38646            (t0.getZ() != t1.getZ()) ||
38647            (t0.hasFaces()   != t1.hasFaces()) ||
38648            (t0.hasMipmaps() != t1.hasMipmaps())) {
38649            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38650        }
38651
38652        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38653        aout.setAutoPadding(true);
38654        reduce(mExportReduceIdx_my_uchar2_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
38655        return new result_int(aout);
38656    }
38657
38658    private final static int mExportReduceIdx_my_uchar2_bool_1 = 583;
38659    // in1 = "a", flattened 2-vectors
38660    // in2 = "b"
38661    public result_int reduce_my_uchar2_bool_1(byte[] in1, byte[] in2) {
38662        // Verify that "in1" is non-null.
38663        if (in1 == null) {
38664            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38665        }
38666        // Verify that the array length is a multiple of the vector size.
38667        if (in1.length % 2 != 0) {
38668            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
38669        }
38670        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2);
38671        ain1.setAutoPadding(true);
38672        ain1.copyFrom(in1);
38673        // Verify that "in2" is non-null.
38674        if (in2 == null) {
38675            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38676        }
38677        // Verify that input array lengths are the same.
38678        if (in1.length / 2 != in2.length) {
38679            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38680        }
38681        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
38682        ain2.setAutoPadding(true);
38683        ain2.copyFrom(in2);
38684
38685        result_int result = reduce_my_uchar2_bool_1(ain1, ain2, null);
38686        result.mTempIns = new Allocation[]{ain1, ain2};
38687        return result;
38688    }
38689
38690    // ain1 = "uchar2 a"
38691    // ain2 = "bool b"
38692    public result_int reduce_my_uchar2_bool_1(Allocation ain1, Allocation ain2) {
38693        return reduce_my_uchar2_bool_1(ain1, ain2, null);
38694    }
38695
38696    // ain1 = "uchar2 a"
38697    // ain2 = "bool b"
38698    public result_int reduce_my_uchar2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38699        Type t0, t1;
38700        // check ain1
38701        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38702            throw new RSRuntimeException("Type mismatch with U8_2!");
38703        }
38704        // check ain2
38705        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
38706            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
38707        }
38708        // Verify dimensions
38709        t0 = ain1.getType();
38710        t1 = ain2.getType();
38711        if ((t0.getCount() != t1.getCount()) ||
38712            (t0.getX() != t1.getX()) ||
38713            (t0.getY() != t1.getY()) ||
38714            (t0.getZ() != t1.getZ()) ||
38715            (t0.hasFaces()   != t1.hasFaces()) ||
38716            (t0.hasMipmaps() != t1.hasMipmaps())) {
38717            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38718        }
38719
38720        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38721        aout.setAutoPadding(true);
38722        reduce(mExportReduceIdx_my_uchar2_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
38723        return new result_int(aout);
38724    }
38725
38726    private final static int mExportReduceIdx_my_uchar2_rs_matrix2x2_0 = 584;
38727    // ain1 = "uchar2 a"
38728    // ain2 = "rs_matrix2x2 b"
38729    public result_int reduce_my_uchar2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
38730        return reduce_my_uchar2_rs_matrix2x2_0(ain1, ain2, null);
38731    }
38732
38733    // ain1 = "uchar2 a"
38734    // ain2 = "rs_matrix2x2 b"
38735    public result_int reduce_my_uchar2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38736        Type t0, t1;
38737        // check ain1
38738        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38739            throw new RSRuntimeException("Type mismatch with U8_2!");
38740        }
38741        // check ain2
38742        // Verify dimensions
38743        t0 = ain1.getType();
38744        t1 = ain2.getType();
38745        if ((t0.getCount() != t1.getCount()) ||
38746            (t0.getX() != t1.getX()) ||
38747            (t0.getY() != t1.getY()) ||
38748            (t0.getZ() != t1.getZ()) ||
38749            (t0.hasFaces()   != t1.hasFaces()) ||
38750            (t0.hasMipmaps() != t1.hasMipmaps())) {
38751            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38752        }
38753
38754        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38755        aout.setAutoPadding(true);
38756        reduce(mExportReduceIdx_my_uchar2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
38757        return new result_int(aout);
38758    }
38759
38760    private final static int mExportReduceIdx_my_uchar2_rs_matrix2x2_1 = 585;
38761    // ain1 = "uchar2 a"
38762    // ain2 = "rs_matrix2x2 b"
38763    public result_int reduce_my_uchar2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
38764        return reduce_my_uchar2_rs_matrix2x2_1(ain1, ain2, null);
38765    }
38766
38767    // ain1 = "uchar2 a"
38768    // ain2 = "rs_matrix2x2 b"
38769    public result_int reduce_my_uchar2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38770        Type t0, t1;
38771        // check ain1
38772        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38773            throw new RSRuntimeException("Type mismatch with U8_2!");
38774        }
38775        // check ain2
38776        // Verify dimensions
38777        t0 = ain1.getType();
38778        t1 = ain2.getType();
38779        if ((t0.getCount() != t1.getCount()) ||
38780            (t0.getX() != t1.getX()) ||
38781            (t0.getY() != t1.getY()) ||
38782            (t0.getZ() != t1.getZ()) ||
38783            (t0.hasFaces()   != t1.hasFaces()) ||
38784            (t0.hasMipmaps() != t1.hasMipmaps())) {
38785            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38786        }
38787
38788        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38789        aout.setAutoPadding(true);
38790        reduce(mExportReduceIdx_my_uchar2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
38791        return new result_int(aout);
38792    }
38793
38794    private final static int mExportReduceIdx_my_uchar2_MyStruct_0 = 586;
38795    // ain1 = "uchar2 a"
38796    // ain2 = "/* struct <> */ b"
38797    public result_int reduce_my_uchar2_MyStruct_0(Allocation ain1, Allocation ain2) {
38798        return reduce_my_uchar2_MyStruct_0(ain1, ain2, null);
38799    }
38800
38801    // ain1 = "uchar2 a"
38802    // ain2 = "/* struct <> */ b"
38803    public result_int reduce_my_uchar2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38804        Type t0, t1;
38805        // check ain1
38806        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38807            throw new RSRuntimeException("Type mismatch with U8_2!");
38808        }
38809        // check ain2
38810        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
38811            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
38812        }
38813        // Verify dimensions
38814        t0 = ain1.getType();
38815        t1 = ain2.getType();
38816        if ((t0.getCount() != t1.getCount()) ||
38817            (t0.getX() != t1.getX()) ||
38818            (t0.getY() != t1.getY()) ||
38819            (t0.getZ() != t1.getZ()) ||
38820            (t0.hasFaces()   != t1.hasFaces()) ||
38821            (t0.hasMipmaps() != t1.hasMipmaps())) {
38822            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38823        }
38824
38825        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38826        aout.setAutoPadding(true);
38827        reduce(mExportReduceIdx_my_uchar2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
38828        return new result_int(aout);
38829    }
38830
38831    private final static int mExportReduceIdx_my_uchar2_MyStruct_1 = 587;
38832    // ain1 = "uchar2 a"
38833    // ain2 = "/* struct <> */ b"
38834    public result_int reduce_my_uchar2_MyStruct_1(Allocation ain1, Allocation ain2) {
38835        return reduce_my_uchar2_MyStruct_1(ain1, ain2, null);
38836    }
38837
38838    // ain1 = "uchar2 a"
38839    // ain2 = "/* struct <> */ b"
38840    public result_int reduce_my_uchar2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38841        Type t0, t1;
38842        // check ain1
38843        if (!ain1.getType().getElement().isCompatible(__U8_2)) {
38844            throw new RSRuntimeException("Type mismatch with U8_2!");
38845        }
38846        // check ain2
38847        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
38848            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
38849        }
38850        // Verify dimensions
38851        t0 = ain1.getType();
38852        t1 = ain2.getType();
38853        if ((t0.getCount() != t1.getCount()) ||
38854            (t0.getX() != t1.getX()) ||
38855            (t0.getY() != t1.getY()) ||
38856            (t0.getZ() != t1.getZ()) ||
38857            (t0.hasFaces()   != t1.hasFaces()) ||
38858            (t0.hasMipmaps() != t1.hasMipmaps())) {
38859            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38860        }
38861
38862        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38863        aout.setAutoPadding(true);
38864        reduce(mExportReduceIdx_my_uchar2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
38865        return new result_int(aout);
38866    }
38867
38868    private final static int mExportReduceIdx_my_uchar4_half_0 = 588;
38869    // in1 = "a", flattened 4-vectors
38870    // in2 = "b"
38871    public result_int reduce_my_uchar4_half_0(byte[] in1, short[] in2) {
38872        // Verify that "in1" is non-null.
38873        if (in1 == null) {
38874            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38875        }
38876        // Verify that the array length is a multiple of the vector size.
38877        if (in1.length % 4 != 0) {
38878            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
38879        }
38880        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
38881        ain1.setAutoPadding(true);
38882        ain1.copyFrom(in1);
38883        // Verify that "in2" is non-null.
38884        if (in2 == null) {
38885            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38886        }
38887        // Verify that input array lengths are the same.
38888        if (in1.length / 4 != in2.length) {
38889            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38890        }
38891        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
38892        ain2.setAutoPadding(true);
38893        ain2.copyFrom(in2);
38894
38895        result_int result = reduce_my_uchar4_half_0(ain1, ain2, null);
38896        result.mTempIns = new Allocation[]{ain1, ain2};
38897        return result;
38898    }
38899
38900    // ain1 = "uchar4 a"
38901    // ain2 = "half b"
38902    public result_int reduce_my_uchar4_half_0(Allocation ain1, Allocation ain2) {
38903        return reduce_my_uchar4_half_0(ain1, ain2, null);
38904    }
38905
38906    // ain1 = "uchar4 a"
38907    // ain2 = "half b"
38908    public result_int reduce_my_uchar4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38909        Type t0, t1;
38910        // check ain1
38911        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
38912            throw new RSRuntimeException("Type mismatch with U8_4!");
38913        }
38914        // check ain2
38915        if (!ain2.getType().getElement().isCompatible(__F16)) {
38916            throw new RSRuntimeException("Type mismatch with F16!");
38917        }
38918        // Verify dimensions
38919        t0 = ain1.getType();
38920        t1 = ain2.getType();
38921        if ((t0.getCount() != t1.getCount()) ||
38922            (t0.getX() != t1.getX()) ||
38923            (t0.getY() != t1.getY()) ||
38924            (t0.getZ() != t1.getZ()) ||
38925            (t0.hasFaces()   != t1.hasFaces()) ||
38926            (t0.hasMipmaps() != t1.hasMipmaps())) {
38927            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38928        }
38929
38930        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38931        aout.setAutoPadding(true);
38932        reduce(mExportReduceIdx_my_uchar4_half_0, new Allocation[]{ain1, ain2}, aout, sc);
38933        return new result_int(aout);
38934    }
38935
38936    private final static int mExportReduceIdx_my_uchar4_half_1 = 589;
38937    // in1 = "a", flattened 4-vectors
38938    // in2 = "b"
38939    public result_int reduce_my_uchar4_half_1(byte[] in1, short[] in2) {
38940        // Verify that "in1" is non-null.
38941        if (in1 == null) {
38942            throw new RSIllegalArgumentException("Array \"in1\" is null!");
38943        }
38944        // Verify that the array length is a multiple of the vector size.
38945        if (in1.length % 4 != 0) {
38946            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
38947        }
38948        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
38949        ain1.setAutoPadding(true);
38950        ain1.copyFrom(in1);
38951        // Verify that "in2" is non-null.
38952        if (in2 == null) {
38953            throw new RSIllegalArgumentException("Array \"in2\" is null!");
38954        }
38955        // Verify that input array lengths are the same.
38956        if (in1.length / 4 != in2.length) {
38957            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
38958        }
38959        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
38960        ain2.setAutoPadding(true);
38961        ain2.copyFrom(in2);
38962
38963        result_int result = reduce_my_uchar4_half_1(ain1, ain2, null);
38964        result.mTempIns = new Allocation[]{ain1, ain2};
38965        return result;
38966    }
38967
38968    // ain1 = "uchar4 a"
38969    // ain2 = "half b"
38970    public result_int reduce_my_uchar4_half_1(Allocation ain1, Allocation ain2) {
38971        return reduce_my_uchar4_half_1(ain1, ain2, null);
38972    }
38973
38974    // ain1 = "uchar4 a"
38975    // ain2 = "half b"
38976    public result_int reduce_my_uchar4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
38977        Type t0, t1;
38978        // check ain1
38979        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
38980            throw new RSRuntimeException("Type mismatch with U8_4!");
38981        }
38982        // check ain2
38983        if (!ain2.getType().getElement().isCompatible(__F16)) {
38984            throw new RSRuntimeException("Type mismatch with F16!");
38985        }
38986        // Verify dimensions
38987        t0 = ain1.getType();
38988        t1 = ain2.getType();
38989        if ((t0.getCount() != t1.getCount()) ||
38990            (t0.getX() != t1.getX()) ||
38991            (t0.getY() != t1.getY()) ||
38992            (t0.getZ() != t1.getZ()) ||
38993            (t0.hasFaces()   != t1.hasFaces()) ||
38994            (t0.hasMipmaps() != t1.hasMipmaps())) {
38995            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
38996        }
38997
38998        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
38999        aout.setAutoPadding(true);
39000        reduce(mExportReduceIdx_my_uchar4_half_1, new Allocation[]{ain1, ain2}, aout, sc);
39001        return new result_int(aout);
39002    }
39003
39004    private final static int mExportReduceIdx_my_uchar4_half2_0 = 590;
39005    // in1 = "a", flattened 4-vectors
39006    // in2 = "b", flattened 2-vectors
39007    public result_int reduce_my_uchar4_half2_0(byte[] in1, short[] in2) {
39008        // Verify that "in1" is non-null.
39009        if (in1 == null) {
39010            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39011        }
39012        // Verify that the array length is a multiple of the vector size.
39013        if (in1.length % 4 != 0) {
39014            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39015        }
39016        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39017        ain1.setAutoPadding(true);
39018        ain1.copyFrom(in1);
39019        // Verify that "in2" is non-null.
39020        if (in2 == null) {
39021            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39022        }
39023        // Verify that the array length is a multiple of the vector size.
39024        if (in2.length % 2 != 0) {
39025            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
39026        }
39027        // Verify that input array lengths are the same.
39028        if (in1.length / 4 != in2.length / 2) {
39029            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39030        }
39031        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
39032        ain2.setAutoPadding(true);
39033        ain2.copyFrom(in2);
39034
39035        result_int result = reduce_my_uchar4_half2_0(ain1, ain2, null);
39036        result.mTempIns = new Allocation[]{ain1, ain2};
39037        return result;
39038    }
39039
39040    // ain1 = "uchar4 a"
39041    // ain2 = "half2 b"
39042    public result_int reduce_my_uchar4_half2_0(Allocation ain1, Allocation ain2) {
39043        return reduce_my_uchar4_half2_0(ain1, ain2, null);
39044    }
39045
39046    // ain1 = "uchar4 a"
39047    // ain2 = "half2 b"
39048    public result_int reduce_my_uchar4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39049        Type t0, t1;
39050        // check ain1
39051        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39052            throw new RSRuntimeException("Type mismatch with U8_4!");
39053        }
39054        // check ain2
39055        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
39056            throw new RSRuntimeException("Type mismatch with F16_2!");
39057        }
39058        // Verify dimensions
39059        t0 = ain1.getType();
39060        t1 = ain2.getType();
39061        if ((t0.getCount() != t1.getCount()) ||
39062            (t0.getX() != t1.getX()) ||
39063            (t0.getY() != t1.getY()) ||
39064            (t0.getZ() != t1.getZ()) ||
39065            (t0.hasFaces()   != t1.hasFaces()) ||
39066            (t0.hasMipmaps() != t1.hasMipmaps())) {
39067            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39068        }
39069
39070        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39071        aout.setAutoPadding(true);
39072        reduce(mExportReduceIdx_my_uchar4_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
39073        return new result_int(aout);
39074    }
39075
39076    private final static int mExportReduceIdx_my_uchar4_half2_1 = 591;
39077    // in1 = "a", flattened 4-vectors
39078    // in2 = "b", flattened 2-vectors
39079    public result_int reduce_my_uchar4_half2_1(byte[] in1, short[] in2) {
39080        // Verify that "in1" is non-null.
39081        if (in1 == null) {
39082            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39083        }
39084        // Verify that the array length is a multiple of the vector size.
39085        if (in1.length % 4 != 0) {
39086            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39087        }
39088        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39089        ain1.setAutoPadding(true);
39090        ain1.copyFrom(in1);
39091        // Verify that "in2" is non-null.
39092        if (in2 == null) {
39093            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39094        }
39095        // Verify that the array length is a multiple of the vector size.
39096        if (in2.length % 2 != 0) {
39097            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
39098        }
39099        // Verify that input array lengths are the same.
39100        if (in1.length / 4 != in2.length / 2) {
39101            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39102        }
39103        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
39104        ain2.setAutoPadding(true);
39105        ain2.copyFrom(in2);
39106
39107        result_int result = reduce_my_uchar4_half2_1(ain1, ain2, null);
39108        result.mTempIns = new Allocation[]{ain1, ain2};
39109        return result;
39110    }
39111
39112    // ain1 = "uchar4 a"
39113    // ain2 = "half2 b"
39114    public result_int reduce_my_uchar4_half2_1(Allocation ain1, Allocation ain2) {
39115        return reduce_my_uchar4_half2_1(ain1, ain2, null);
39116    }
39117
39118    // ain1 = "uchar4 a"
39119    // ain2 = "half2 b"
39120    public result_int reduce_my_uchar4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39121        Type t0, t1;
39122        // check ain1
39123        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39124            throw new RSRuntimeException("Type mismatch with U8_4!");
39125        }
39126        // check ain2
39127        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
39128            throw new RSRuntimeException("Type mismatch with F16_2!");
39129        }
39130        // Verify dimensions
39131        t0 = ain1.getType();
39132        t1 = ain2.getType();
39133        if ((t0.getCount() != t1.getCount()) ||
39134            (t0.getX() != t1.getX()) ||
39135            (t0.getY() != t1.getY()) ||
39136            (t0.getZ() != t1.getZ()) ||
39137            (t0.hasFaces()   != t1.hasFaces()) ||
39138            (t0.hasMipmaps() != t1.hasMipmaps())) {
39139            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39140        }
39141
39142        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39143        aout.setAutoPadding(true);
39144        reduce(mExportReduceIdx_my_uchar4_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
39145        return new result_int(aout);
39146    }
39147
39148    private final static int mExportReduceIdx_my_uchar4_half4_0 = 592;
39149    // in1 = "a", flattened 4-vectors
39150    // in2 = "b", flattened 4-vectors
39151    public result_int reduce_my_uchar4_half4_0(byte[] in1, short[] in2) {
39152        // Verify that "in1" is non-null.
39153        if (in1 == null) {
39154            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39155        }
39156        // Verify that the array length is a multiple of the vector size.
39157        if (in1.length % 4 != 0) {
39158            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39159        }
39160        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39161        ain1.setAutoPadding(true);
39162        ain1.copyFrom(in1);
39163        // Verify that "in2" is non-null.
39164        if (in2 == null) {
39165            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39166        }
39167        // Verify that the array length is a multiple of the vector size.
39168        if (in2.length % 4 != 0) {
39169            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
39170        }
39171        // Verify that input array lengths are the same.
39172        if (in1.length / 4 != in2.length / 4) {
39173            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39174        }
39175        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
39176        ain2.setAutoPadding(true);
39177        ain2.copyFrom(in2);
39178
39179        result_int result = reduce_my_uchar4_half4_0(ain1, ain2, null);
39180        result.mTempIns = new Allocation[]{ain1, ain2};
39181        return result;
39182    }
39183
39184    // ain1 = "uchar4 a"
39185    // ain2 = "half4 b"
39186    public result_int reduce_my_uchar4_half4_0(Allocation ain1, Allocation ain2) {
39187        return reduce_my_uchar4_half4_0(ain1, ain2, null);
39188    }
39189
39190    // ain1 = "uchar4 a"
39191    // ain2 = "half4 b"
39192    public result_int reduce_my_uchar4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39193        Type t0, t1;
39194        // check ain1
39195        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39196            throw new RSRuntimeException("Type mismatch with U8_4!");
39197        }
39198        // check ain2
39199        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
39200            throw new RSRuntimeException("Type mismatch with F16_4!");
39201        }
39202        // Verify dimensions
39203        t0 = ain1.getType();
39204        t1 = ain2.getType();
39205        if ((t0.getCount() != t1.getCount()) ||
39206            (t0.getX() != t1.getX()) ||
39207            (t0.getY() != t1.getY()) ||
39208            (t0.getZ() != t1.getZ()) ||
39209            (t0.hasFaces()   != t1.hasFaces()) ||
39210            (t0.hasMipmaps() != t1.hasMipmaps())) {
39211            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39212        }
39213
39214        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39215        aout.setAutoPadding(true);
39216        reduce(mExportReduceIdx_my_uchar4_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
39217        return new result_int(aout);
39218    }
39219
39220    private final static int mExportReduceIdx_my_uchar4_half4_1 = 593;
39221    // in1 = "a", flattened 4-vectors
39222    // in2 = "b", flattened 4-vectors
39223    public result_int reduce_my_uchar4_half4_1(byte[] in1, short[] in2) {
39224        // Verify that "in1" is non-null.
39225        if (in1 == null) {
39226            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39227        }
39228        // Verify that the array length is a multiple of the vector size.
39229        if (in1.length % 4 != 0) {
39230            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39231        }
39232        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39233        ain1.setAutoPadding(true);
39234        ain1.copyFrom(in1);
39235        // Verify that "in2" is non-null.
39236        if (in2 == null) {
39237            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39238        }
39239        // Verify that the array length is a multiple of the vector size.
39240        if (in2.length % 4 != 0) {
39241            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
39242        }
39243        // Verify that input array lengths are the same.
39244        if (in1.length / 4 != in2.length / 4) {
39245            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39246        }
39247        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
39248        ain2.setAutoPadding(true);
39249        ain2.copyFrom(in2);
39250
39251        result_int result = reduce_my_uchar4_half4_1(ain1, ain2, null);
39252        result.mTempIns = new Allocation[]{ain1, ain2};
39253        return result;
39254    }
39255
39256    // ain1 = "uchar4 a"
39257    // ain2 = "half4 b"
39258    public result_int reduce_my_uchar4_half4_1(Allocation ain1, Allocation ain2) {
39259        return reduce_my_uchar4_half4_1(ain1, ain2, null);
39260    }
39261
39262    // ain1 = "uchar4 a"
39263    // ain2 = "half4 b"
39264    public result_int reduce_my_uchar4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39265        Type t0, t1;
39266        // check ain1
39267        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39268            throw new RSRuntimeException("Type mismatch with U8_4!");
39269        }
39270        // check ain2
39271        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
39272            throw new RSRuntimeException("Type mismatch with F16_4!");
39273        }
39274        // Verify dimensions
39275        t0 = ain1.getType();
39276        t1 = ain2.getType();
39277        if ((t0.getCount() != t1.getCount()) ||
39278            (t0.getX() != t1.getX()) ||
39279            (t0.getY() != t1.getY()) ||
39280            (t0.getZ() != t1.getZ()) ||
39281            (t0.hasFaces()   != t1.hasFaces()) ||
39282            (t0.hasMipmaps() != t1.hasMipmaps())) {
39283            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39284        }
39285
39286        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39287        aout.setAutoPadding(true);
39288        reduce(mExportReduceIdx_my_uchar4_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
39289        return new result_int(aout);
39290    }
39291
39292    private final static int mExportReduceIdx_my_uchar4_float_0 = 594;
39293    // in1 = "a", flattened 4-vectors
39294    // in2 = "b"
39295    public result_int reduce_my_uchar4_float_0(byte[] in1, float[] in2) {
39296        // Verify that "in1" is non-null.
39297        if (in1 == null) {
39298            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39299        }
39300        // Verify that the array length is a multiple of the vector size.
39301        if (in1.length % 4 != 0) {
39302            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39303        }
39304        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39305        ain1.setAutoPadding(true);
39306        ain1.copyFrom(in1);
39307        // Verify that "in2" is non-null.
39308        if (in2 == null) {
39309            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39310        }
39311        // Verify that input array lengths are the same.
39312        if (in1.length / 4 != in2.length) {
39313            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39314        }
39315        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
39316        ain2.setAutoPadding(true);
39317        ain2.copyFrom(in2);
39318
39319        result_int result = reduce_my_uchar4_float_0(ain1, ain2, null);
39320        result.mTempIns = new Allocation[]{ain1, ain2};
39321        return result;
39322    }
39323
39324    // ain1 = "uchar4 a"
39325    // ain2 = "float b"
39326    public result_int reduce_my_uchar4_float_0(Allocation ain1, Allocation ain2) {
39327        return reduce_my_uchar4_float_0(ain1, ain2, null);
39328    }
39329
39330    // ain1 = "uchar4 a"
39331    // ain2 = "float b"
39332    public result_int reduce_my_uchar4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39333        Type t0, t1;
39334        // check ain1
39335        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39336            throw new RSRuntimeException("Type mismatch with U8_4!");
39337        }
39338        // check ain2
39339        if (!ain2.getType().getElement().isCompatible(__F32)) {
39340            throw new RSRuntimeException("Type mismatch with F32!");
39341        }
39342        // Verify dimensions
39343        t0 = ain1.getType();
39344        t1 = ain2.getType();
39345        if ((t0.getCount() != t1.getCount()) ||
39346            (t0.getX() != t1.getX()) ||
39347            (t0.getY() != t1.getY()) ||
39348            (t0.getZ() != t1.getZ()) ||
39349            (t0.hasFaces()   != t1.hasFaces()) ||
39350            (t0.hasMipmaps() != t1.hasMipmaps())) {
39351            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39352        }
39353
39354        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39355        aout.setAutoPadding(true);
39356        reduce(mExportReduceIdx_my_uchar4_float_0, new Allocation[]{ain1, ain2}, aout, sc);
39357        return new result_int(aout);
39358    }
39359
39360    private final static int mExportReduceIdx_my_uchar4_float_1 = 595;
39361    // in1 = "a", flattened 4-vectors
39362    // in2 = "b"
39363    public result_int reduce_my_uchar4_float_1(byte[] in1, float[] in2) {
39364        // Verify that "in1" is non-null.
39365        if (in1 == null) {
39366            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39367        }
39368        // Verify that the array length is a multiple of the vector size.
39369        if (in1.length % 4 != 0) {
39370            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39371        }
39372        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39373        ain1.setAutoPadding(true);
39374        ain1.copyFrom(in1);
39375        // Verify that "in2" is non-null.
39376        if (in2 == null) {
39377            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39378        }
39379        // Verify that input array lengths are the same.
39380        if (in1.length / 4 != in2.length) {
39381            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39382        }
39383        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
39384        ain2.setAutoPadding(true);
39385        ain2.copyFrom(in2);
39386
39387        result_int result = reduce_my_uchar4_float_1(ain1, ain2, null);
39388        result.mTempIns = new Allocation[]{ain1, ain2};
39389        return result;
39390    }
39391
39392    // ain1 = "uchar4 a"
39393    // ain2 = "float b"
39394    public result_int reduce_my_uchar4_float_1(Allocation ain1, Allocation ain2) {
39395        return reduce_my_uchar4_float_1(ain1, ain2, null);
39396    }
39397
39398    // ain1 = "uchar4 a"
39399    // ain2 = "float b"
39400    public result_int reduce_my_uchar4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39401        Type t0, t1;
39402        // check ain1
39403        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39404            throw new RSRuntimeException("Type mismatch with U8_4!");
39405        }
39406        // check ain2
39407        if (!ain2.getType().getElement().isCompatible(__F32)) {
39408            throw new RSRuntimeException("Type mismatch with F32!");
39409        }
39410        // Verify dimensions
39411        t0 = ain1.getType();
39412        t1 = ain2.getType();
39413        if ((t0.getCount() != t1.getCount()) ||
39414            (t0.getX() != t1.getX()) ||
39415            (t0.getY() != t1.getY()) ||
39416            (t0.getZ() != t1.getZ()) ||
39417            (t0.hasFaces()   != t1.hasFaces()) ||
39418            (t0.hasMipmaps() != t1.hasMipmaps())) {
39419            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39420        }
39421
39422        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39423        aout.setAutoPadding(true);
39424        reduce(mExportReduceIdx_my_uchar4_float_1, new Allocation[]{ain1, ain2}, aout, sc);
39425        return new result_int(aout);
39426    }
39427
39428    private final static int mExportReduceIdx_my_uchar4_float2_0 = 596;
39429    // in1 = "a", flattened 4-vectors
39430    // in2 = "b", flattened 2-vectors
39431    public result_int reduce_my_uchar4_float2_0(byte[] in1, float[] in2) {
39432        // Verify that "in1" is non-null.
39433        if (in1 == null) {
39434            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39435        }
39436        // Verify that the array length is a multiple of the vector size.
39437        if (in1.length % 4 != 0) {
39438            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39439        }
39440        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39441        ain1.setAutoPadding(true);
39442        ain1.copyFrom(in1);
39443        // Verify that "in2" is non-null.
39444        if (in2 == null) {
39445            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39446        }
39447        // Verify that the array length is a multiple of the vector size.
39448        if (in2.length % 2 != 0) {
39449            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
39450        }
39451        // Verify that input array lengths are the same.
39452        if (in1.length / 4 != in2.length / 2) {
39453            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39454        }
39455        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
39456        ain2.setAutoPadding(true);
39457        ain2.copyFrom(in2);
39458
39459        result_int result = reduce_my_uchar4_float2_0(ain1, ain2, null);
39460        result.mTempIns = new Allocation[]{ain1, ain2};
39461        return result;
39462    }
39463
39464    // ain1 = "uchar4 a"
39465    // ain2 = "float2 b"
39466    public result_int reduce_my_uchar4_float2_0(Allocation ain1, Allocation ain2) {
39467        return reduce_my_uchar4_float2_0(ain1, ain2, null);
39468    }
39469
39470    // ain1 = "uchar4 a"
39471    // ain2 = "float2 b"
39472    public result_int reduce_my_uchar4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39473        Type t0, t1;
39474        // check ain1
39475        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39476            throw new RSRuntimeException("Type mismatch with U8_4!");
39477        }
39478        // check ain2
39479        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
39480            throw new RSRuntimeException("Type mismatch with F32_2!");
39481        }
39482        // Verify dimensions
39483        t0 = ain1.getType();
39484        t1 = ain2.getType();
39485        if ((t0.getCount() != t1.getCount()) ||
39486            (t0.getX() != t1.getX()) ||
39487            (t0.getY() != t1.getY()) ||
39488            (t0.getZ() != t1.getZ()) ||
39489            (t0.hasFaces()   != t1.hasFaces()) ||
39490            (t0.hasMipmaps() != t1.hasMipmaps())) {
39491            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39492        }
39493
39494        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39495        aout.setAutoPadding(true);
39496        reduce(mExportReduceIdx_my_uchar4_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
39497        return new result_int(aout);
39498    }
39499
39500    private final static int mExportReduceIdx_my_uchar4_float2_1 = 597;
39501    // in1 = "a", flattened 4-vectors
39502    // in2 = "b", flattened 2-vectors
39503    public result_int reduce_my_uchar4_float2_1(byte[] in1, float[] in2) {
39504        // Verify that "in1" is non-null.
39505        if (in1 == null) {
39506            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39507        }
39508        // Verify that the array length is a multiple of the vector size.
39509        if (in1.length % 4 != 0) {
39510            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39511        }
39512        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39513        ain1.setAutoPadding(true);
39514        ain1.copyFrom(in1);
39515        // Verify that "in2" is non-null.
39516        if (in2 == null) {
39517            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39518        }
39519        // Verify that the array length is a multiple of the vector size.
39520        if (in2.length % 2 != 0) {
39521            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
39522        }
39523        // Verify that input array lengths are the same.
39524        if (in1.length / 4 != in2.length / 2) {
39525            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39526        }
39527        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
39528        ain2.setAutoPadding(true);
39529        ain2.copyFrom(in2);
39530
39531        result_int result = reduce_my_uchar4_float2_1(ain1, ain2, null);
39532        result.mTempIns = new Allocation[]{ain1, ain2};
39533        return result;
39534    }
39535
39536    // ain1 = "uchar4 a"
39537    // ain2 = "float2 b"
39538    public result_int reduce_my_uchar4_float2_1(Allocation ain1, Allocation ain2) {
39539        return reduce_my_uchar4_float2_1(ain1, ain2, null);
39540    }
39541
39542    // ain1 = "uchar4 a"
39543    // ain2 = "float2 b"
39544    public result_int reduce_my_uchar4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39545        Type t0, t1;
39546        // check ain1
39547        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39548            throw new RSRuntimeException("Type mismatch with U8_4!");
39549        }
39550        // check ain2
39551        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
39552            throw new RSRuntimeException("Type mismatch with F32_2!");
39553        }
39554        // Verify dimensions
39555        t0 = ain1.getType();
39556        t1 = ain2.getType();
39557        if ((t0.getCount() != t1.getCount()) ||
39558            (t0.getX() != t1.getX()) ||
39559            (t0.getY() != t1.getY()) ||
39560            (t0.getZ() != t1.getZ()) ||
39561            (t0.hasFaces()   != t1.hasFaces()) ||
39562            (t0.hasMipmaps() != t1.hasMipmaps())) {
39563            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39564        }
39565
39566        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39567        aout.setAutoPadding(true);
39568        reduce(mExportReduceIdx_my_uchar4_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
39569        return new result_int(aout);
39570    }
39571
39572    private final static int mExportReduceIdx_my_uchar4_float4_0 = 598;
39573    // in1 = "a", flattened 4-vectors
39574    // in2 = "b", flattened 4-vectors
39575    public result_int reduce_my_uchar4_float4_0(byte[] in1, float[] in2) {
39576        // Verify that "in1" is non-null.
39577        if (in1 == null) {
39578            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39579        }
39580        // Verify that the array length is a multiple of the vector size.
39581        if (in1.length % 4 != 0) {
39582            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39583        }
39584        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39585        ain1.setAutoPadding(true);
39586        ain1.copyFrom(in1);
39587        // Verify that "in2" is non-null.
39588        if (in2 == null) {
39589            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39590        }
39591        // Verify that the array length is a multiple of the vector size.
39592        if (in2.length % 4 != 0) {
39593            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
39594        }
39595        // Verify that input array lengths are the same.
39596        if (in1.length / 4 != in2.length / 4) {
39597            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39598        }
39599        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
39600        ain2.setAutoPadding(true);
39601        ain2.copyFrom(in2);
39602
39603        result_int result = reduce_my_uchar4_float4_0(ain1, ain2, null);
39604        result.mTempIns = new Allocation[]{ain1, ain2};
39605        return result;
39606    }
39607
39608    // ain1 = "uchar4 a"
39609    // ain2 = "float4 b"
39610    public result_int reduce_my_uchar4_float4_0(Allocation ain1, Allocation ain2) {
39611        return reduce_my_uchar4_float4_0(ain1, ain2, null);
39612    }
39613
39614    // ain1 = "uchar4 a"
39615    // ain2 = "float4 b"
39616    public result_int reduce_my_uchar4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39617        Type t0, t1;
39618        // check ain1
39619        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39620            throw new RSRuntimeException("Type mismatch with U8_4!");
39621        }
39622        // check ain2
39623        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
39624            throw new RSRuntimeException("Type mismatch with F32_4!");
39625        }
39626        // Verify dimensions
39627        t0 = ain1.getType();
39628        t1 = ain2.getType();
39629        if ((t0.getCount() != t1.getCount()) ||
39630            (t0.getX() != t1.getX()) ||
39631            (t0.getY() != t1.getY()) ||
39632            (t0.getZ() != t1.getZ()) ||
39633            (t0.hasFaces()   != t1.hasFaces()) ||
39634            (t0.hasMipmaps() != t1.hasMipmaps())) {
39635            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39636        }
39637
39638        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39639        aout.setAutoPadding(true);
39640        reduce(mExportReduceIdx_my_uchar4_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
39641        return new result_int(aout);
39642    }
39643
39644    private final static int mExportReduceIdx_my_uchar4_float4_1 = 599;
39645    // in1 = "a", flattened 4-vectors
39646    // in2 = "b", flattened 4-vectors
39647    public result_int reduce_my_uchar4_float4_1(byte[] in1, float[] in2) {
39648        // Verify that "in1" is non-null.
39649        if (in1 == null) {
39650            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39651        }
39652        // Verify that the array length is a multiple of the vector size.
39653        if (in1.length % 4 != 0) {
39654            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39655        }
39656        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39657        ain1.setAutoPadding(true);
39658        ain1.copyFrom(in1);
39659        // Verify that "in2" is non-null.
39660        if (in2 == null) {
39661            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39662        }
39663        // Verify that the array length is a multiple of the vector size.
39664        if (in2.length % 4 != 0) {
39665            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
39666        }
39667        // Verify that input array lengths are the same.
39668        if (in1.length / 4 != in2.length / 4) {
39669            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39670        }
39671        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
39672        ain2.setAutoPadding(true);
39673        ain2.copyFrom(in2);
39674
39675        result_int result = reduce_my_uchar4_float4_1(ain1, ain2, null);
39676        result.mTempIns = new Allocation[]{ain1, ain2};
39677        return result;
39678    }
39679
39680    // ain1 = "uchar4 a"
39681    // ain2 = "float4 b"
39682    public result_int reduce_my_uchar4_float4_1(Allocation ain1, Allocation ain2) {
39683        return reduce_my_uchar4_float4_1(ain1, ain2, null);
39684    }
39685
39686    // ain1 = "uchar4 a"
39687    // ain2 = "float4 b"
39688    public result_int reduce_my_uchar4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39689        Type t0, t1;
39690        // check ain1
39691        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39692            throw new RSRuntimeException("Type mismatch with U8_4!");
39693        }
39694        // check ain2
39695        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
39696            throw new RSRuntimeException("Type mismatch with F32_4!");
39697        }
39698        // Verify dimensions
39699        t0 = ain1.getType();
39700        t1 = ain2.getType();
39701        if ((t0.getCount() != t1.getCount()) ||
39702            (t0.getX() != t1.getX()) ||
39703            (t0.getY() != t1.getY()) ||
39704            (t0.getZ() != t1.getZ()) ||
39705            (t0.hasFaces()   != t1.hasFaces()) ||
39706            (t0.hasMipmaps() != t1.hasMipmaps())) {
39707            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39708        }
39709
39710        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39711        aout.setAutoPadding(true);
39712        reduce(mExportReduceIdx_my_uchar4_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
39713        return new result_int(aout);
39714    }
39715
39716    private final static int mExportReduceIdx_my_uchar4_char_0 = 600;
39717    // in1 = "a", flattened 4-vectors
39718    // in2 = "b"
39719    public result_int reduce_my_uchar4_char_0(byte[] in1, byte[] in2) {
39720        // Verify that "in1" is non-null.
39721        if (in1 == null) {
39722            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39723        }
39724        // Verify that the array length is a multiple of the vector size.
39725        if (in1.length % 4 != 0) {
39726            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39727        }
39728        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39729        ain1.setAutoPadding(true);
39730        ain1.copyFrom(in1);
39731        // Verify that "in2" is non-null.
39732        if (in2 == null) {
39733            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39734        }
39735        // Verify that input array lengths are the same.
39736        if (in1.length / 4 != in2.length) {
39737            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39738        }
39739        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
39740        ain2.setAutoPadding(true);
39741        ain2.copyFrom(in2);
39742
39743        result_int result = reduce_my_uchar4_char_0(ain1, ain2, null);
39744        result.mTempIns = new Allocation[]{ain1, ain2};
39745        return result;
39746    }
39747
39748    // ain1 = "uchar4 a"
39749    // ain2 = "char b"
39750    public result_int reduce_my_uchar4_char_0(Allocation ain1, Allocation ain2) {
39751        return reduce_my_uchar4_char_0(ain1, ain2, null);
39752    }
39753
39754    // ain1 = "uchar4 a"
39755    // ain2 = "char b"
39756    public result_int reduce_my_uchar4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39757        Type t0, t1;
39758        // check ain1
39759        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39760            throw new RSRuntimeException("Type mismatch with U8_4!");
39761        }
39762        // check ain2
39763        if (!ain2.getType().getElement().isCompatible(__I8)) {
39764            throw new RSRuntimeException("Type mismatch with I8!");
39765        }
39766        // Verify dimensions
39767        t0 = ain1.getType();
39768        t1 = ain2.getType();
39769        if ((t0.getCount() != t1.getCount()) ||
39770            (t0.getX() != t1.getX()) ||
39771            (t0.getY() != t1.getY()) ||
39772            (t0.getZ() != t1.getZ()) ||
39773            (t0.hasFaces()   != t1.hasFaces()) ||
39774            (t0.hasMipmaps() != t1.hasMipmaps())) {
39775            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39776        }
39777
39778        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39779        aout.setAutoPadding(true);
39780        reduce(mExportReduceIdx_my_uchar4_char_0, new Allocation[]{ain1, ain2}, aout, sc);
39781        return new result_int(aout);
39782    }
39783
39784    private final static int mExportReduceIdx_my_uchar4_char_1 = 601;
39785    // in1 = "a", flattened 4-vectors
39786    // in2 = "b"
39787    public result_int reduce_my_uchar4_char_1(byte[] in1, byte[] in2) {
39788        // Verify that "in1" is non-null.
39789        if (in1 == null) {
39790            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39791        }
39792        // Verify that the array length is a multiple of the vector size.
39793        if (in1.length % 4 != 0) {
39794            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39795        }
39796        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39797        ain1.setAutoPadding(true);
39798        ain1.copyFrom(in1);
39799        // Verify that "in2" is non-null.
39800        if (in2 == null) {
39801            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39802        }
39803        // Verify that input array lengths are the same.
39804        if (in1.length / 4 != in2.length) {
39805            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39806        }
39807        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
39808        ain2.setAutoPadding(true);
39809        ain2.copyFrom(in2);
39810
39811        result_int result = reduce_my_uchar4_char_1(ain1, ain2, null);
39812        result.mTempIns = new Allocation[]{ain1, ain2};
39813        return result;
39814    }
39815
39816    // ain1 = "uchar4 a"
39817    // ain2 = "char b"
39818    public result_int reduce_my_uchar4_char_1(Allocation ain1, Allocation ain2) {
39819        return reduce_my_uchar4_char_1(ain1, ain2, null);
39820    }
39821
39822    // ain1 = "uchar4 a"
39823    // ain2 = "char b"
39824    public result_int reduce_my_uchar4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39825        Type t0, t1;
39826        // check ain1
39827        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39828            throw new RSRuntimeException("Type mismatch with U8_4!");
39829        }
39830        // check ain2
39831        if (!ain2.getType().getElement().isCompatible(__I8)) {
39832            throw new RSRuntimeException("Type mismatch with I8!");
39833        }
39834        // Verify dimensions
39835        t0 = ain1.getType();
39836        t1 = ain2.getType();
39837        if ((t0.getCount() != t1.getCount()) ||
39838            (t0.getX() != t1.getX()) ||
39839            (t0.getY() != t1.getY()) ||
39840            (t0.getZ() != t1.getZ()) ||
39841            (t0.hasFaces()   != t1.hasFaces()) ||
39842            (t0.hasMipmaps() != t1.hasMipmaps())) {
39843            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39844        }
39845
39846        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39847        aout.setAutoPadding(true);
39848        reduce(mExportReduceIdx_my_uchar4_char_1, new Allocation[]{ain1, ain2}, aout, sc);
39849        return new result_int(aout);
39850    }
39851
39852    private final static int mExportReduceIdx_my_uchar4_char2_0 = 602;
39853    // in1 = "a", flattened 4-vectors
39854    // in2 = "b", flattened 2-vectors
39855    public result_int reduce_my_uchar4_char2_0(byte[] in1, byte[] in2) {
39856        // Verify that "in1" is non-null.
39857        if (in1 == null) {
39858            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39859        }
39860        // Verify that the array length is a multiple of the vector size.
39861        if (in1.length % 4 != 0) {
39862            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39863        }
39864        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39865        ain1.setAutoPadding(true);
39866        ain1.copyFrom(in1);
39867        // Verify that "in2" is non-null.
39868        if (in2 == null) {
39869            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39870        }
39871        // Verify that the array length is a multiple of the vector size.
39872        if (in2.length % 2 != 0) {
39873            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
39874        }
39875        // Verify that input array lengths are the same.
39876        if (in1.length / 4 != in2.length / 2) {
39877            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39878        }
39879        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
39880        ain2.setAutoPadding(true);
39881        ain2.copyFrom(in2);
39882
39883        result_int result = reduce_my_uchar4_char2_0(ain1, ain2, null);
39884        result.mTempIns = new Allocation[]{ain1, ain2};
39885        return result;
39886    }
39887
39888    // ain1 = "uchar4 a"
39889    // ain2 = "char2 b"
39890    public result_int reduce_my_uchar4_char2_0(Allocation ain1, Allocation ain2) {
39891        return reduce_my_uchar4_char2_0(ain1, ain2, null);
39892    }
39893
39894    // ain1 = "uchar4 a"
39895    // ain2 = "char2 b"
39896    public result_int reduce_my_uchar4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39897        Type t0, t1;
39898        // check ain1
39899        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39900            throw new RSRuntimeException("Type mismatch with U8_4!");
39901        }
39902        // check ain2
39903        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
39904            throw new RSRuntimeException("Type mismatch with I8_2!");
39905        }
39906        // Verify dimensions
39907        t0 = ain1.getType();
39908        t1 = ain2.getType();
39909        if ((t0.getCount() != t1.getCount()) ||
39910            (t0.getX() != t1.getX()) ||
39911            (t0.getY() != t1.getY()) ||
39912            (t0.getZ() != t1.getZ()) ||
39913            (t0.hasFaces()   != t1.hasFaces()) ||
39914            (t0.hasMipmaps() != t1.hasMipmaps())) {
39915            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39916        }
39917
39918        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39919        aout.setAutoPadding(true);
39920        reduce(mExportReduceIdx_my_uchar4_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
39921        return new result_int(aout);
39922    }
39923
39924    private final static int mExportReduceIdx_my_uchar4_char2_1 = 603;
39925    // in1 = "a", flattened 4-vectors
39926    // in2 = "b", flattened 2-vectors
39927    public result_int reduce_my_uchar4_char2_1(byte[] in1, byte[] in2) {
39928        // Verify that "in1" is non-null.
39929        if (in1 == null) {
39930            throw new RSIllegalArgumentException("Array \"in1\" is null!");
39931        }
39932        // Verify that the array length is a multiple of the vector size.
39933        if (in1.length % 4 != 0) {
39934            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
39935        }
39936        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
39937        ain1.setAutoPadding(true);
39938        ain1.copyFrom(in1);
39939        // Verify that "in2" is non-null.
39940        if (in2 == null) {
39941            throw new RSIllegalArgumentException("Array \"in2\" is null!");
39942        }
39943        // Verify that the array length is a multiple of the vector size.
39944        if (in2.length % 2 != 0) {
39945            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
39946        }
39947        // Verify that input array lengths are the same.
39948        if (in1.length / 4 != in2.length / 2) {
39949            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
39950        }
39951        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
39952        ain2.setAutoPadding(true);
39953        ain2.copyFrom(in2);
39954
39955        result_int result = reduce_my_uchar4_char2_1(ain1, ain2, null);
39956        result.mTempIns = new Allocation[]{ain1, ain2};
39957        return result;
39958    }
39959
39960    // ain1 = "uchar4 a"
39961    // ain2 = "char2 b"
39962    public result_int reduce_my_uchar4_char2_1(Allocation ain1, Allocation ain2) {
39963        return reduce_my_uchar4_char2_1(ain1, ain2, null);
39964    }
39965
39966    // ain1 = "uchar4 a"
39967    // ain2 = "char2 b"
39968    public result_int reduce_my_uchar4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
39969        Type t0, t1;
39970        // check ain1
39971        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
39972            throw new RSRuntimeException("Type mismatch with U8_4!");
39973        }
39974        // check ain2
39975        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
39976            throw new RSRuntimeException("Type mismatch with I8_2!");
39977        }
39978        // Verify dimensions
39979        t0 = ain1.getType();
39980        t1 = ain2.getType();
39981        if ((t0.getCount() != t1.getCount()) ||
39982            (t0.getX() != t1.getX()) ||
39983            (t0.getY() != t1.getY()) ||
39984            (t0.getZ() != t1.getZ()) ||
39985            (t0.hasFaces()   != t1.hasFaces()) ||
39986            (t0.hasMipmaps() != t1.hasMipmaps())) {
39987            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
39988        }
39989
39990        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
39991        aout.setAutoPadding(true);
39992        reduce(mExportReduceIdx_my_uchar4_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
39993        return new result_int(aout);
39994    }
39995
39996    private final static int mExportReduceIdx_my_uchar4_char4_0 = 604;
39997    // in1 = "a", flattened 4-vectors
39998    // in2 = "b", flattened 4-vectors
39999    public result_int reduce_my_uchar4_char4_0(byte[] in1, byte[] in2) {
40000        // Verify that "in1" is non-null.
40001        if (in1 == null) {
40002            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40003        }
40004        // Verify that the array length is a multiple of the vector size.
40005        if (in1.length % 4 != 0) {
40006            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40007        }
40008        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40009        ain1.setAutoPadding(true);
40010        ain1.copyFrom(in1);
40011        // Verify that "in2" is non-null.
40012        if (in2 == null) {
40013            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40014        }
40015        // Verify that the array length is a multiple of the vector size.
40016        if (in2.length % 4 != 0) {
40017            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
40018        }
40019        // Verify that input array lengths are the same.
40020        if (in1.length / 4 != in2.length / 4) {
40021            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40022        }
40023        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
40024        ain2.setAutoPadding(true);
40025        ain2.copyFrom(in2);
40026
40027        result_int result = reduce_my_uchar4_char4_0(ain1, ain2, null);
40028        result.mTempIns = new Allocation[]{ain1, ain2};
40029        return result;
40030    }
40031
40032    // ain1 = "uchar4 a"
40033    // ain2 = "char4 b"
40034    public result_int reduce_my_uchar4_char4_0(Allocation ain1, Allocation ain2) {
40035        return reduce_my_uchar4_char4_0(ain1, ain2, null);
40036    }
40037
40038    // ain1 = "uchar4 a"
40039    // ain2 = "char4 b"
40040    public result_int reduce_my_uchar4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40041        Type t0, t1;
40042        // check ain1
40043        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40044            throw new RSRuntimeException("Type mismatch with U8_4!");
40045        }
40046        // check ain2
40047        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
40048            throw new RSRuntimeException("Type mismatch with I8_4!");
40049        }
40050        // Verify dimensions
40051        t0 = ain1.getType();
40052        t1 = ain2.getType();
40053        if ((t0.getCount() != t1.getCount()) ||
40054            (t0.getX() != t1.getX()) ||
40055            (t0.getY() != t1.getY()) ||
40056            (t0.getZ() != t1.getZ()) ||
40057            (t0.hasFaces()   != t1.hasFaces()) ||
40058            (t0.hasMipmaps() != t1.hasMipmaps())) {
40059            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40060        }
40061
40062        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40063        aout.setAutoPadding(true);
40064        reduce(mExportReduceIdx_my_uchar4_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
40065        return new result_int(aout);
40066    }
40067
40068    private final static int mExportReduceIdx_my_uchar4_char4_1 = 605;
40069    // in1 = "a", flattened 4-vectors
40070    // in2 = "b", flattened 4-vectors
40071    public result_int reduce_my_uchar4_char4_1(byte[] in1, byte[] in2) {
40072        // Verify that "in1" is non-null.
40073        if (in1 == null) {
40074            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40075        }
40076        // Verify that the array length is a multiple of the vector size.
40077        if (in1.length % 4 != 0) {
40078            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40079        }
40080        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40081        ain1.setAutoPadding(true);
40082        ain1.copyFrom(in1);
40083        // Verify that "in2" is non-null.
40084        if (in2 == null) {
40085            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40086        }
40087        // Verify that the array length is a multiple of the vector size.
40088        if (in2.length % 4 != 0) {
40089            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
40090        }
40091        // Verify that input array lengths are the same.
40092        if (in1.length / 4 != in2.length / 4) {
40093            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40094        }
40095        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
40096        ain2.setAutoPadding(true);
40097        ain2.copyFrom(in2);
40098
40099        result_int result = reduce_my_uchar4_char4_1(ain1, ain2, null);
40100        result.mTempIns = new Allocation[]{ain1, ain2};
40101        return result;
40102    }
40103
40104    // ain1 = "uchar4 a"
40105    // ain2 = "char4 b"
40106    public result_int reduce_my_uchar4_char4_1(Allocation ain1, Allocation ain2) {
40107        return reduce_my_uchar4_char4_1(ain1, ain2, null);
40108    }
40109
40110    // ain1 = "uchar4 a"
40111    // ain2 = "char4 b"
40112    public result_int reduce_my_uchar4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40113        Type t0, t1;
40114        // check ain1
40115        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40116            throw new RSRuntimeException("Type mismatch with U8_4!");
40117        }
40118        // check ain2
40119        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
40120            throw new RSRuntimeException("Type mismatch with I8_4!");
40121        }
40122        // Verify dimensions
40123        t0 = ain1.getType();
40124        t1 = ain2.getType();
40125        if ((t0.getCount() != t1.getCount()) ||
40126            (t0.getX() != t1.getX()) ||
40127            (t0.getY() != t1.getY()) ||
40128            (t0.getZ() != t1.getZ()) ||
40129            (t0.hasFaces()   != t1.hasFaces()) ||
40130            (t0.hasMipmaps() != t1.hasMipmaps())) {
40131            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40132        }
40133
40134        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40135        aout.setAutoPadding(true);
40136        reduce(mExportReduceIdx_my_uchar4_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
40137        return new result_int(aout);
40138    }
40139
40140    private final static int mExportReduceIdx_my_uchar4_short_0 = 606;
40141    // in1 = "a", flattened 4-vectors
40142    // in2 = "b"
40143    public result_int reduce_my_uchar4_short_0(byte[] in1, short[] in2) {
40144        // Verify that "in1" is non-null.
40145        if (in1 == null) {
40146            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40147        }
40148        // Verify that the array length is a multiple of the vector size.
40149        if (in1.length % 4 != 0) {
40150            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40151        }
40152        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40153        ain1.setAutoPadding(true);
40154        ain1.copyFrom(in1);
40155        // Verify that "in2" is non-null.
40156        if (in2 == null) {
40157            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40158        }
40159        // Verify that input array lengths are the same.
40160        if (in1.length / 4 != in2.length) {
40161            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40162        }
40163        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
40164        ain2.setAutoPadding(true);
40165        ain2.copyFrom(in2);
40166
40167        result_int result = reduce_my_uchar4_short_0(ain1, ain2, null);
40168        result.mTempIns = new Allocation[]{ain1, ain2};
40169        return result;
40170    }
40171
40172    // ain1 = "uchar4 a"
40173    // ain2 = "short b"
40174    public result_int reduce_my_uchar4_short_0(Allocation ain1, Allocation ain2) {
40175        return reduce_my_uchar4_short_0(ain1, ain2, null);
40176    }
40177
40178    // ain1 = "uchar4 a"
40179    // ain2 = "short b"
40180    public result_int reduce_my_uchar4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40181        Type t0, t1;
40182        // check ain1
40183        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40184            throw new RSRuntimeException("Type mismatch with U8_4!");
40185        }
40186        // check ain2
40187        if (!ain2.getType().getElement().isCompatible(__I16)) {
40188            throw new RSRuntimeException("Type mismatch with I16!");
40189        }
40190        // Verify dimensions
40191        t0 = ain1.getType();
40192        t1 = ain2.getType();
40193        if ((t0.getCount() != t1.getCount()) ||
40194            (t0.getX() != t1.getX()) ||
40195            (t0.getY() != t1.getY()) ||
40196            (t0.getZ() != t1.getZ()) ||
40197            (t0.hasFaces()   != t1.hasFaces()) ||
40198            (t0.hasMipmaps() != t1.hasMipmaps())) {
40199            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40200        }
40201
40202        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40203        aout.setAutoPadding(true);
40204        reduce(mExportReduceIdx_my_uchar4_short_0, new Allocation[]{ain1, ain2}, aout, sc);
40205        return new result_int(aout);
40206    }
40207
40208    private final static int mExportReduceIdx_my_uchar4_short_1 = 607;
40209    // in1 = "a", flattened 4-vectors
40210    // in2 = "b"
40211    public result_int reduce_my_uchar4_short_1(byte[] in1, short[] in2) {
40212        // Verify that "in1" is non-null.
40213        if (in1 == null) {
40214            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40215        }
40216        // Verify that the array length is a multiple of the vector size.
40217        if (in1.length % 4 != 0) {
40218            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40219        }
40220        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40221        ain1.setAutoPadding(true);
40222        ain1.copyFrom(in1);
40223        // Verify that "in2" is non-null.
40224        if (in2 == null) {
40225            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40226        }
40227        // Verify that input array lengths are the same.
40228        if (in1.length / 4 != in2.length) {
40229            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40230        }
40231        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
40232        ain2.setAutoPadding(true);
40233        ain2.copyFrom(in2);
40234
40235        result_int result = reduce_my_uchar4_short_1(ain1, ain2, null);
40236        result.mTempIns = new Allocation[]{ain1, ain2};
40237        return result;
40238    }
40239
40240    // ain1 = "uchar4 a"
40241    // ain2 = "short b"
40242    public result_int reduce_my_uchar4_short_1(Allocation ain1, Allocation ain2) {
40243        return reduce_my_uchar4_short_1(ain1, ain2, null);
40244    }
40245
40246    // ain1 = "uchar4 a"
40247    // ain2 = "short b"
40248    public result_int reduce_my_uchar4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40249        Type t0, t1;
40250        // check ain1
40251        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40252            throw new RSRuntimeException("Type mismatch with U8_4!");
40253        }
40254        // check ain2
40255        if (!ain2.getType().getElement().isCompatible(__I16)) {
40256            throw new RSRuntimeException("Type mismatch with I16!");
40257        }
40258        // Verify dimensions
40259        t0 = ain1.getType();
40260        t1 = ain2.getType();
40261        if ((t0.getCount() != t1.getCount()) ||
40262            (t0.getX() != t1.getX()) ||
40263            (t0.getY() != t1.getY()) ||
40264            (t0.getZ() != t1.getZ()) ||
40265            (t0.hasFaces()   != t1.hasFaces()) ||
40266            (t0.hasMipmaps() != t1.hasMipmaps())) {
40267            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40268        }
40269
40270        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40271        aout.setAutoPadding(true);
40272        reduce(mExportReduceIdx_my_uchar4_short_1, new Allocation[]{ain1, ain2}, aout, sc);
40273        return new result_int(aout);
40274    }
40275
40276    private final static int mExportReduceIdx_my_uchar4_short2_0 = 608;
40277    // in1 = "a", flattened 4-vectors
40278    // in2 = "b", flattened 2-vectors
40279    public result_int reduce_my_uchar4_short2_0(byte[] in1, short[] in2) {
40280        // Verify that "in1" is non-null.
40281        if (in1 == null) {
40282            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40283        }
40284        // Verify that the array length is a multiple of the vector size.
40285        if (in1.length % 4 != 0) {
40286            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40287        }
40288        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40289        ain1.setAutoPadding(true);
40290        ain1.copyFrom(in1);
40291        // Verify that "in2" is non-null.
40292        if (in2 == null) {
40293            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40294        }
40295        // Verify that the array length is a multiple of the vector size.
40296        if (in2.length % 2 != 0) {
40297            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
40298        }
40299        // Verify that input array lengths are the same.
40300        if (in1.length / 4 != in2.length / 2) {
40301            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40302        }
40303        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
40304        ain2.setAutoPadding(true);
40305        ain2.copyFrom(in2);
40306
40307        result_int result = reduce_my_uchar4_short2_0(ain1, ain2, null);
40308        result.mTempIns = new Allocation[]{ain1, ain2};
40309        return result;
40310    }
40311
40312    // ain1 = "uchar4 a"
40313    // ain2 = "short2 b"
40314    public result_int reduce_my_uchar4_short2_0(Allocation ain1, Allocation ain2) {
40315        return reduce_my_uchar4_short2_0(ain1, ain2, null);
40316    }
40317
40318    // ain1 = "uchar4 a"
40319    // ain2 = "short2 b"
40320    public result_int reduce_my_uchar4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40321        Type t0, t1;
40322        // check ain1
40323        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40324            throw new RSRuntimeException("Type mismatch with U8_4!");
40325        }
40326        // check ain2
40327        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
40328            throw new RSRuntimeException("Type mismatch with I16_2!");
40329        }
40330        // Verify dimensions
40331        t0 = ain1.getType();
40332        t1 = ain2.getType();
40333        if ((t0.getCount() != t1.getCount()) ||
40334            (t0.getX() != t1.getX()) ||
40335            (t0.getY() != t1.getY()) ||
40336            (t0.getZ() != t1.getZ()) ||
40337            (t0.hasFaces()   != t1.hasFaces()) ||
40338            (t0.hasMipmaps() != t1.hasMipmaps())) {
40339            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40340        }
40341
40342        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40343        aout.setAutoPadding(true);
40344        reduce(mExportReduceIdx_my_uchar4_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
40345        return new result_int(aout);
40346    }
40347
40348    private final static int mExportReduceIdx_my_uchar4_short2_1 = 609;
40349    // in1 = "a", flattened 4-vectors
40350    // in2 = "b", flattened 2-vectors
40351    public result_int reduce_my_uchar4_short2_1(byte[] in1, short[] in2) {
40352        // Verify that "in1" is non-null.
40353        if (in1 == null) {
40354            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40355        }
40356        // Verify that the array length is a multiple of the vector size.
40357        if (in1.length % 4 != 0) {
40358            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40359        }
40360        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40361        ain1.setAutoPadding(true);
40362        ain1.copyFrom(in1);
40363        // Verify that "in2" is non-null.
40364        if (in2 == null) {
40365            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40366        }
40367        // Verify that the array length is a multiple of the vector size.
40368        if (in2.length % 2 != 0) {
40369            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
40370        }
40371        // Verify that input array lengths are the same.
40372        if (in1.length / 4 != in2.length / 2) {
40373            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40374        }
40375        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
40376        ain2.setAutoPadding(true);
40377        ain2.copyFrom(in2);
40378
40379        result_int result = reduce_my_uchar4_short2_1(ain1, ain2, null);
40380        result.mTempIns = new Allocation[]{ain1, ain2};
40381        return result;
40382    }
40383
40384    // ain1 = "uchar4 a"
40385    // ain2 = "short2 b"
40386    public result_int reduce_my_uchar4_short2_1(Allocation ain1, Allocation ain2) {
40387        return reduce_my_uchar4_short2_1(ain1, ain2, null);
40388    }
40389
40390    // ain1 = "uchar4 a"
40391    // ain2 = "short2 b"
40392    public result_int reduce_my_uchar4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40393        Type t0, t1;
40394        // check ain1
40395        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40396            throw new RSRuntimeException("Type mismatch with U8_4!");
40397        }
40398        // check ain2
40399        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
40400            throw new RSRuntimeException("Type mismatch with I16_2!");
40401        }
40402        // Verify dimensions
40403        t0 = ain1.getType();
40404        t1 = ain2.getType();
40405        if ((t0.getCount() != t1.getCount()) ||
40406            (t0.getX() != t1.getX()) ||
40407            (t0.getY() != t1.getY()) ||
40408            (t0.getZ() != t1.getZ()) ||
40409            (t0.hasFaces()   != t1.hasFaces()) ||
40410            (t0.hasMipmaps() != t1.hasMipmaps())) {
40411            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40412        }
40413
40414        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40415        aout.setAutoPadding(true);
40416        reduce(mExportReduceIdx_my_uchar4_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
40417        return new result_int(aout);
40418    }
40419
40420    private final static int mExportReduceIdx_my_uchar4_short4_0 = 610;
40421    // in1 = "a", flattened 4-vectors
40422    // in2 = "b", flattened 4-vectors
40423    public result_int reduce_my_uchar4_short4_0(byte[] in1, short[] in2) {
40424        // Verify that "in1" is non-null.
40425        if (in1 == null) {
40426            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40427        }
40428        // Verify that the array length is a multiple of the vector size.
40429        if (in1.length % 4 != 0) {
40430            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40431        }
40432        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40433        ain1.setAutoPadding(true);
40434        ain1.copyFrom(in1);
40435        // Verify that "in2" is non-null.
40436        if (in2 == null) {
40437            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40438        }
40439        // Verify that the array length is a multiple of the vector size.
40440        if (in2.length % 4 != 0) {
40441            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
40442        }
40443        // Verify that input array lengths are the same.
40444        if (in1.length / 4 != in2.length / 4) {
40445            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40446        }
40447        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
40448        ain2.setAutoPadding(true);
40449        ain2.copyFrom(in2);
40450
40451        result_int result = reduce_my_uchar4_short4_0(ain1, ain2, null);
40452        result.mTempIns = new Allocation[]{ain1, ain2};
40453        return result;
40454    }
40455
40456    // ain1 = "uchar4 a"
40457    // ain2 = "short4 b"
40458    public result_int reduce_my_uchar4_short4_0(Allocation ain1, Allocation ain2) {
40459        return reduce_my_uchar4_short4_0(ain1, ain2, null);
40460    }
40461
40462    // ain1 = "uchar4 a"
40463    // ain2 = "short4 b"
40464    public result_int reduce_my_uchar4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40465        Type t0, t1;
40466        // check ain1
40467        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40468            throw new RSRuntimeException("Type mismatch with U8_4!");
40469        }
40470        // check ain2
40471        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
40472            throw new RSRuntimeException("Type mismatch with I16_4!");
40473        }
40474        // Verify dimensions
40475        t0 = ain1.getType();
40476        t1 = ain2.getType();
40477        if ((t0.getCount() != t1.getCount()) ||
40478            (t0.getX() != t1.getX()) ||
40479            (t0.getY() != t1.getY()) ||
40480            (t0.getZ() != t1.getZ()) ||
40481            (t0.hasFaces()   != t1.hasFaces()) ||
40482            (t0.hasMipmaps() != t1.hasMipmaps())) {
40483            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40484        }
40485
40486        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40487        aout.setAutoPadding(true);
40488        reduce(mExportReduceIdx_my_uchar4_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
40489        return new result_int(aout);
40490    }
40491
40492    private final static int mExportReduceIdx_my_uchar4_short4_1 = 611;
40493    // in1 = "a", flattened 4-vectors
40494    // in2 = "b", flattened 4-vectors
40495    public result_int reduce_my_uchar4_short4_1(byte[] in1, short[] in2) {
40496        // Verify that "in1" is non-null.
40497        if (in1 == null) {
40498            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40499        }
40500        // Verify that the array length is a multiple of the vector size.
40501        if (in1.length % 4 != 0) {
40502            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40503        }
40504        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40505        ain1.setAutoPadding(true);
40506        ain1.copyFrom(in1);
40507        // Verify that "in2" is non-null.
40508        if (in2 == null) {
40509            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40510        }
40511        // Verify that the array length is a multiple of the vector size.
40512        if (in2.length % 4 != 0) {
40513            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
40514        }
40515        // Verify that input array lengths are the same.
40516        if (in1.length / 4 != in2.length / 4) {
40517            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40518        }
40519        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
40520        ain2.setAutoPadding(true);
40521        ain2.copyFrom(in2);
40522
40523        result_int result = reduce_my_uchar4_short4_1(ain1, ain2, null);
40524        result.mTempIns = new Allocation[]{ain1, ain2};
40525        return result;
40526    }
40527
40528    // ain1 = "uchar4 a"
40529    // ain2 = "short4 b"
40530    public result_int reduce_my_uchar4_short4_1(Allocation ain1, Allocation ain2) {
40531        return reduce_my_uchar4_short4_1(ain1, ain2, null);
40532    }
40533
40534    // ain1 = "uchar4 a"
40535    // ain2 = "short4 b"
40536    public result_int reduce_my_uchar4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40537        Type t0, t1;
40538        // check ain1
40539        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40540            throw new RSRuntimeException("Type mismatch with U8_4!");
40541        }
40542        // check ain2
40543        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
40544            throw new RSRuntimeException("Type mismatch with I16_4!");
40545        }
40546        // Verify dimensions
40547        t0 = ain1.getType();
40548        t1 = ain2.getType();
40549        if ((t0.getCount() != t1.getCount()) ||
40550            (t0.getX() != t1.getX()) ||
40551            (t0.getY() != t1.getY()) ||
40552            (t0.getZ() != t1.getZ()) ||
40553            (t0.hasFaces()   != t1.hasFaces()) ||
40554            (t0.hasMipmaps() != t1.hasMipmaps())) {
40555            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40556        }
40557
40558        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40559        aout.setAutoPadding(true);
40560        reduce(mExportReduceIdx_my_uchar4_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
40561        return new result_int(aout);
40562    }
40563
40564    private final static int mExportReduceIdx_my_uchar4_uchar_0 = 612;
40565    // in1 = "a", flattened 4-vectors
40566    // in2 = "b"
40567    public result_int reduce_my_uchar4_uchar_0(byte[] in1, byte[] in2) {
40568        // Verify that "in1" is non-null.
40569        if (in1 == null) {
40570            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40571        }
40572        // Verify that the array length is a multiple of the vector size.
40573        if (in1.length % 4 != 0) {
40574            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40575        }
40576        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40577        ain1.setAutoPadding(true);
40578        ain1.copyFrom(in1);
40579        // Verify that "in2" is non-null.
40580        if (in2 == null) {
40581            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40582        }
40583        // Verify that input array lengths are the same.
40584        if (in1.length / 4 != in2.length) {
40585            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40586        }
40587        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
40588        ain2.setAutoPadding(true);
40589        ain2.copyFrom(in2);
40590
40591        result_int result = reduce_my_uchar4_uchar_0(ain1, ain2, null);
40592        result.mTempIns = new Allocation[]{ain1, ain2};
40593        return result;
40594    }
40595
40596    // ain1 = "uchar4 a"
40597    // ain2 = "uchar b"
40598    public result_int reduce_my_uchar4_uchar_0(Allocation ain1, Allocation ain2) {
40599        return reduce_my_uchar4_uchar_0(ain1, ain2, null);
40600    }
40601
40602    // ain1 = "uchar4 a"
40603    // ain2 = "uchar b"
40604    public result_int reduce_my_uchar4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40605        Type t0, t1;
40606        // check ain1
40607        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40608            throw new RSRuntimeException("Type mismatch with U8_4!");
40609        }
40610        // check ain2
40611        if (!ain2.getType().getElement().isCompatible(__U8)) {
40612            throw new RSRuntimeException("Type mismatch with U8!");
40613        }
40614        // Verify dimensions
40615        t0 = ain1.getType();
40616        t1 = ain2.getType();
40617        if ((t0.getCount() != t1.getCount()) ||
40618            (t0.getX() != t1.getX()) ||
40619            (t0.getY() != t1.getY()) ||
40620            (t0.getZ() != t1.getZ()) ||
40621            (t0.hasFaces()   != t1.hasFaces()) ||
40622            (t0.hasMipmaps() != t1.hasMipmaps())) {
40623            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40624        }
40625
40626        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40627        aout.setAutoPadding(true);
40628        reduce(mExportReduceIdx_my_uchar4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
40629        return new result_int(aout);
40630    }
40631
40632    private final static int mExportReduceIdx_my_uchar4_uchar_1 = 613;
40633    // in1 = "a", flattened 4-vectors
40634    // in2 = "b"
40635    public result_int reduce_my_uchar4_uchar_1(byte[] in1, byte[] in2) {
40636        // Verify that "in1" is non-null.
40637        if (in1 == null) {
40638            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40639        }
40640        // Verify that the array length is a multiple of the vector size.
40641        if (in1.length % 4 != 0) {
40642            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40643        }
40644        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40645        ain1.setAutoPadding(true);
40646        ain1.copyFrom(in1);
40647        // Verify that "in2" is non-null.
40648        if (in2 == null) {
40649            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40650        }
40651        // Verify that input array lengths are the same.
40652        if (in1.length / 4 != in2.length) {
40653            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40654        }
40655        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
40656        ain2.setAutoPadding(true);
40657        ain2.copyFrom(in2);
40658
40659        result_int result = reduce_my_uchar4_uchar_1(ain1, ain2, null);
40660        result.mTempIns = new Allocation[]{ain1, ain2};
40661        return result;
40662    }
40663
40664    // ain1 = "uchar4 a"
40665    // ain2 = "uchar b"
40666    public result_int reduce_my_uchar4_uchar_1(Allocation ain1, Allocation ain2) {
40667        return reduce_my_uchar4_uchar_1(ain1, ain2, null);
40668    }
40669
40670    // ain1 = "uchar4 a"
40671    // ain2 = "uchar b"
40672    public result_int reduce_my_uchar4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40673        Type t0, t1;
40674        // check ain1
40675        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40676            throw new RSRuntimeException("Type mismatch with U8_4!");
40677        }
40678        // check ain2
40679        if (!ain2.getType().getElement().isCompatible(__U8)) {
40680            throw new RSRuntimeException("Type mismatch with U8!");
40681        }
40682        // Verify dimensions
40683        t0 = ain1.getType();
40684        t1 = ain2.getType();
40685        if ((t0.getCount() != t1.getCount()) ||
40686            (t0.getX() != t1.getX()) ||
40687            (t0.getY() != t1.getY()) ||
40688            (t0.getZ() != t1.getZ()) ||
40689            (t0.hasFaces()   != t1.hasFaces()) ||
40690            (t0.hasMipmaps() != t1.hasMipmaps())) {
40691            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40692        }
40693
40694        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40695        aout.setAutoPadding(true);
40696        reduce(mExportReduceIdx_my_uchar4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
40697        return new result_int(aout);
40698    }
40699
40700    private final static int mExportReduceIdx_my_uchar4_uchar2_0 = 614;
40701    // in1 = "a", flattened 4-vectors
40702    // in2 = "b", flattened 2-vectors
40703    public result_int reduce_my_uchar4_uchar2_0(byte[] in1, byte[] in2) {
40704        // Verify that "in1" is non-null.
40705        if (in1 == null) {
40706            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40707        }
40708        // Verify that the array length is a multiple of the vector size.
40709        if (in1.length % 4 != 0) {
40710            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40711        }
40712        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40713        ain1.setAutoPadding(true);
40714        ain1.copyFrom(in1);
40715        // Verify that "in2" is non-null.
40716        if (in2 == null) {
40717            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40718        }
40719        // Verify that the array length is a multiple of the vector size.
40720        if (in2.length % 2 != 0) {
40721            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
40722        }
40723        // Verify that input array lengths are the same.
40724        if (in1.length / 4 != in2.length / 2) {
40725            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40726        }
40727        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
40728        ain2.setAutoPadding(true);
40729        ain2.copyFrom(in2);
40730
40731        result_int result = reduce_my_uchar4_uchar2_0(ain1, ain2, null);
40732        result.mTempIns = new Allocation[]{ain1, ain2};
40733        return result;
40734    }
40735
40736    // ain1 = "uchar4 a"
40737    // ain2 = "uchar2 b"
40738    public result_int reduce_my_uchar4_uchar2_0(Allocation ain1, Allocation ain2) {
40739        return reduce_my_uchar4_uchar2_0(ain1, ain2, null);
40740    }
40741
40742    // ain1 = "uchar4 a"
40743    // ain2 = "uchar2 b"
40744    public result_int reduce_my_uchar4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40745        Type t0, t1;
40746        // check ain1
40747        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40748            throw new RSRuntimeException("Type mismatch with U8_4!");
40749        }
40750        // check ain2
40751        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
40752            throw new RSRuntimeException("Type mismatch with U8_2!");
40753        }
40754        // Verify dimensions
40755        t0 = ain1.getType();
40756        t1 = ain2.getType();
40757        if ((t0.getCount() != t1.getCount()) ||
40758            (t0.getX() != t1.getX()) ||
40759            (t0.getY() != t1.getY()) ||
40760            (t0.getZ() != t1.getZ()) ||
40761            (t0.hasFaces()   != t1.hasFaces()) ||
40762            (t0.hasMipmaps() != t1.hasMipmaps())) {
40763            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40764        }
40765
40766        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40767        aout.setAutoPadding(true);
40768        reduce(mExportReduceIdx_my_uchar4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
40769        return new result_int(aout);
40770    }
40771
40772    private final static int mExportReduceIdx_my_uchar4_uchar2_1 = 615;
40773    // in1 = "a", flattened 4-vectors
40774    // in2 = "b", flattened 2-vectors
40775    public result_int reduce_my_uchar4_uchar2_1(byte[] in1, byte[] in2) {
40776        // Verify that "in1" is non-null.
40777        if (in1 == null) {
40778            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40779        }
40780        // Verify that the array length is a multiple of the vector size.
40781        if (in1.length % 4 != 0) {
40782            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40783        }
40784        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40785        ain1.setAutoPadding(true);
40786        ain1.copyFrom(in1);
40787        // Verify that "in2" is non-null.
40788        if (in2 == null) {
40789            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40790        }
40791        // Verify that the array length is a multiple of the vector size.
40792        if (in2.length % 2 != 0) {
40793            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
40794        }
40795        // Verify that input array lengths are the same.
40796        if (in1.length / 4 != in2.length / 2) {
40797            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40798        }
40799        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
40800        ain2.setAutoPadding(true);
40801        ain2.copyFrom(in2);
40802
40803        result_int result = reduce_my_uchar4_uchar2_1(ain1, ain2, null);
40804        result.mTempIns = new Allocation[]{ain1, ain2};
40805        return result;
40806    }
40807
40808    // ain1 = "uchar4 a"
40809    // ain2 = "uchar2 b"
40810    public result_int reduce_my_uchar4_uchar2_1(Allocation ain1, Allocation ain2) {
40811        return reduce_my_uchar4_uchar2_1(ain1, ain2, null);
40812    }
40813
40814    // ain1 = "uchar4 a"
40815    // ain2 = "uchar2 b"
40816    public result_int reduce_my_uchar4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40817        Type t0, t1;
40818        // check ain1
40819        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40820            throw new RSRuntimeException("Type mismatch with U8_4!");
40821        }
40822        // check ain2
40823        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
40824            throw new RSRuntimeException("Type mismatch with U8_2!");
40825        }
40826        // Verify dimensions
40827        t0 = ain1.getType();
40828        t1 = ain2.getType();
40829        if ((t0.getCount() != t1.getCount()) ||
40830            (t0.getX() != t1.getX()) ||
40831            (t0.getY() != t1.getY()) ||
40832            (t0.getZ() != t1.getZ()) ||
40833            (t0.hasFaces()   != t1.hasFaces()) ||
40834            (t0.hasMipmaps() != t1.hasMipmaps())) {
40835            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40836        }
40837
40838        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40839        aout.setAutoPadding(true);
40840        reduce(mExportReduceIdx_my_uchar4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
40841        return new result_int(aout);
40842    }
40843
40844    private final static int mExportReduceIdx_my_uchar4_uchar4_0 = 616;
40845    // in1 = "a", flattened 4-vectors
40846    // in2 = "b", flattened 4-vectors
40847    public result_int reduce_my_uchar4_uchar4_0(byte[] in1, byte[] in2) {
40848        // Verify that "in1" is non-null.
40849        if (in1 == null) {
40850            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40851        }
40852        // Verify that the array length is a multiple of the vector size.
40853        if (in1.length % 4 != 0) {
40854            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40855        }
40856        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40857        ain1.setAutoPadding(true);
40858        ain1.copyFrom(in1);
40859        // Verify that "in2" is non-null.
40860        if (in2 == null) {
40861            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40862        }
40863        // Verify that the array length is a multiple of the vector size.
40864        if (in2.length % 4 != 0) {
40865            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
40866        }
40867        // Verify that input array lengths are the same.
40868        if (in1.length / 4 != in2.length / 4) {
40869            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40870        }
40871        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
40872        ain2.setAutoPadding(true);
40873        ain2.copyFrom(in2);
40874
40875        result_int result = reduce_my_uchar4_uchar4_0(ain1, ain2, null);
40876        result.mTempIns = new Allocation[]{ain1, ain2};
40877        return result;
40878    }
40879
40880    // ain1 = "uchar4 a"
40881    // ain2 = "uchar4 b"
40882    public result_int reduce_my_uchar4_uchar4_0(Allocation ain1, Allocation ain2) {
40883        return reduce_my_uchar4_uchar4_0(ain1, ain2, null);
40884    }
40885
40886    // ain1 = "uchar4 a"
40887    // ain2 = "uchar4 b"
40888    public result_int reduce_my_uchar4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40889        Type t0, t1;
40890        // check ain1
40891        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40892            throw new RSRuntimeException("Type mismatch with U8_4!");
40893        }
40894        // check ain2
40895        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
40896            throw new RSRuntimeException("Type mismatch with U8_4!");
40897        }
40898        // Verify dimensions
40899        t0 = ain1.getType();
40900        t1 = ain2.getType();
40901        if ((t0.getCount() != t1.getCount()) ||
40902            (t0.getX() != t1.getX()) ||
40903            (t0.getY() != t1.getY()) ||
40904            (t0.getZ() != t1.getZ()) ||
40905            (t0.hasFaces()   != t1.hasFaces()) ||
40906            (t0.hasMipmaps() != t1.hasMipmaps())) {
40907            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40908        }
40909
40910        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40911        aout.setAutoPadding(true);
40912        reduce(mExportReduceIdx_my_uchar4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
40913        return new result_int(aout);
40914    }
40915
40916    private final static int mExportReduceIdx_my_uchar4_uchar4_1 = 617;
40917    // in1 = "a", flattened 4-vectors
40918    // in2 = "b", flattened 4-vectors
40919    public result_int reduce_my_uchar4_uchar4_1(byte[] in1, byte[] in2) {
40920        // Verify that "in1" is non-null.
40921        if (in1 == null) {
40922            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40923        }
40924        // Verify that the array length is a multiple of the vector size.
40925        if (in1.length % 4 != 0) {
40926            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40927        }
40928        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
40929        ain1.setAutoPadding(true);
40930        ain1.copyFrom(in1);
40931        // Verify that "in2" is non-null.
40932        if (in2 == null) {
40933            throw new RSIllegalArgumentException("Array \"in2\" is null!");
40934        }
40935        // Verify that the array length is a multiple of the vector size.
40936        if (in2.length % 4 != 0) {
40937            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
40938        }
40939        // Verify that input array lengths are the same.
40940        if (in1.length / 4 != in2.length / 4) {
40941            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
40942        }
40943        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
40944        ain2.setAutoPadding(true);
40945        ain2.copyFrom(in2);
40946
40947        result_int result = reduce_my_uchar4_uchar4_1(ain1, ain2, null);
40948        result.mTempIns = new Allocation[]{ain1, ain2};
40949        return result;
40950    }
40951
40952    // ain1 = "uchar4 a"
40953    // ain2 = "uchar4 b"
40954    public result_int reduce_my_uchar4_uchar4_1(Allocation ain1, Allocation ain2) {
40955        return reduce_my_uchar4_uchar4_1(ain1, ain2, null);
40956    }
40957
40958    // ain1 = "uchar4 a"
40959    // ain2 = "uchar4 b"
40960    public result_int reduce_my_uchar4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
40961        Type t0, t1;
40962        // check ain1
40963        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
40964            throw new RSRuntimeException("Type mismatch with U8_4!");
40965        }
40966        // check ain2
40967        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
40968            throw new RSRuntimeException("Type mismatch with U8_4!");
40969        }
40970        // Verify dimensions
40971        t0 = ain1.getType();
40972        t1 = ain2.getType();
40973        if ((t0.getCount() != t1.getCount()) ||
40974            (t0.getX() != t1.getX()) ||
40975            (t0.getY() != t1.getY()) ||
40976            (t0.getZ() != t1.getZ()) ||
40977            (t0.hasFaces()   != t1.hasFaces()) ||
40978            (t0.hasMipmaps() != t1.hasMipmaps())) {
40979            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
40980        }
40981
40982        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
40983        aout.setAutoPadding(true);
40984        reduce(mExportReduceIdx_my_uchar4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
40985        return new result_int(aout);
40986    }
40987
40988    private final static int mExportReduceIdx_my_uchar4_ushort_0 = 618;
40989    // in1 = "a", flattened 4-vectors
40990    // in2 = "b"
40991    public result_int reduce_my_uchar4_ushort_0(byte[] in1, short[] in2) {
40992        // Verify that "in1" is non-null.
40993        if (in1 == null) {
40994            throw new RSIllegalArgumentException("Array \"in1\" is null!");
40995        }
40996        // Verify that the array length is a multiple of the vector size.
40997        if (in1.length % 4 != 0) {
40998            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
40999        }
41000        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
41001        ain1.setAutoPadding(true);
41002        ain1.copyFrom(in1);
41003        // Verify that "in2" is non-null.
41004        if (in2 == null) {
41005            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41006        }
41007        // Verify that input array lengths are the same.
41008        if (in1.length / 4 != in2.length) {
41009            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41010        }
41011        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
41012        ain2.setAutoPadding(true);
41013        ain2.copyFrom(in2);
41014
41015        result_int result = reduce_my_uchar4_ushort_0(ain1, ain2, null);
41016        result.mTempIns = new Allocation[]{ain1, ain2};
41017        return result;
41018    }
41019
41020    // ain1 = "uchar4 a"
41021    // ain2 = "ushort b"
41022    public result_int reduce_my_uchar4_ushort_0(Allocation ain1, Allocation ain2) {
41023        return reduce_my_uchar4_ushort_0(ain1, ain2, null);
41024    }
41025
41026    // ain1 = "uchar4 a"
41027    // ain2 = "ushort b"
41028    public result_int reduce_my_uchar4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41029        Type t0, t1;
41030        // check ain1
41031        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41032            throw new RSRuntimeException("Type mismatch with U8_4!");
41033        }
41034        // check ain2
41035        if (!ain2.getType().getElement().isCompatible(__U16)) {
41036            throw new RSRuntimeException("Type mismatch with U16!");
41037        }
41038        // Verify dimensions
41039        t0 = ain1.getType();
41040        t1 = ain2.getType();
41041        if ((t0.getCount() != t1.getCount()) ||
41042            (t0.getX() != t1.getX()) ||
41043            (t0.getY() != t1.getY()) ||
41044            (t0.getZ() != t1.getZ()) ||
41045            (t0.hasFaces()   != t1.hasFaces()) ||
41046            (t0.hasMipmaps() != t1.hasMipmaps())) {
41047            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41048        }
41049
41050        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41051        aout.setAutoPadding(true);
41052        reduce(mExportReduceIdx_my_uchar4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
41053        return new result_int(aout);
41054    }
41055
41056    private final static int mExportReduceIdx_my_uchar4_ushort_1 = 619;
41057    // in1 = "a", flattened 4-vectors
41058    // in2 = "b"
41059    public result_int reduce_my_uchar4_ushort_1(byte[] in1, short[] in2) {
41060        // Verify that "in1" is non-null.
41061        if (in1 == null) {
41062            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41063        }
41064        // Verify that the array length is a multiple of the vector size.
41065        if (in1.length % 4 != 0) {
41066            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
41067        }
41068        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
41069        ain1.setAutoPadding(true);
41070        ain1.copyFrom(in1);
41071        // Verify that "in2" is non-null.
41072        if (in2 == null) {
41073            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41074        }
41075        // Verify that input array lengths are the same.
41076        if (in1.length / 4 != in2.length) {
41077            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41078        }
41079        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
41080        ain2.setAutoPadding(true);
41081        ain2.copyFrom(in2);
41082
41083        result_int result = reduce_my_uchar4_ushort_1(ain1, ain2, null);
41084        result.mTempIns = new Allocation[]{ain1, ain2};
41085        return result;
41086    }
41087
41088    // ain1 = "uchar4 a"
41089    // ain2 = "ushort b"
41090    public result_int reduce_my_uchar4_ushort_1(Allocation ain1, Allocation ain2) {
41091        return reduce_my_uchar4_ushort_1(ain1, ain2, null);
41092    }
41093
41094    // ain1 = "uchar4 a"
41095    // ain2 = "ushort b"
41096    public result_int reduce_my_uchar4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41097        Type t0, t1;
41098        // check ain1
41099        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41100            throw new RSRuntimeException("Type mismatch with U8_4!");
41101        }
41102        // check ain2
41103        if (!ain2.getType().getElement().isCompatible(__U16)) {
41104            throw new RSRuntimeException("Type mismatch with U16!");
41105        }
41106        // Verify dimensions
41107        t0 = ain1.getType();
41108        t1 = ain2.getType();
41109        if ((t0.getCount() != t1.getCount()) ||
41110            (t0.getX() != t1.getX()) ||
41111            (t0.getY() != t1.getY()) ||
41112            (t0.getZ() != t1.getZ()) ||
41113            (t0.hasFaces()   != t1.hasFaces()) ||
41114            (t0.hasMipmaps() != t1.hasMipmaps())) {
41115            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41116        }
41117
41118        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41119        aout.setAutoPadding(true);
41120        reduce(mExportReduceIdx_my_uchar4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
41121        return new result_int(aout);
41122    }
41123
41124    private final static int mExportReduceIdx_my_uchar4_ushort2_0 = 620;
41125    // in1 = "a", flattened 4-vectors
41126    // in2 = "b", flattened 2-vectors
41127    public result_int reduce_my_uchar4_ushort2_0(byte[] in1, short[] in2) {
41128        // Verify that "in1" is non-null.
41129        if (in1 == null) {
41130            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41131        }
41132        // Verify that the array length is a multiple of the vector size.
41133        if (in1.length % 4 != 0) {
41134            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
41135        }
41136        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
41137        ain1.setAutoPadding(true);
41138        ain1.copyFrom(in1);
41139        // Verify that "in2" is non-null.
41140        if (in2 == null) {
41141            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41142        }
41143        // Verify that the array length is a multiple of the vector size.
41144        if (in2.length % 2 != 0) {
41145            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
41146        }
41147        // Verify that input array lengths are the same.
41148        if (in1.length / 4 != in2.length / 2) {
41149            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41150        }
41151        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
41152        ain2.setAutoPadding(true);
41153        ain2.copyFrom(in2);
41154
41155        result_int result = reduce_my_uchar4_ushort2_0(ain1, ain2, null);
41156        result.mTempIns = new Allocation[]{ain1, ain2};
41157        return result;
41158    }
41159
41160    // ain1 = "uchar4 a"
41161    // ain2 = "ushort2 b"
41162    public result_int reduce_my_uchar4_ushort2_0(Allocation ain1, Allocation ain2) {
41163        return reduce_my_uchar4_ushort2_0(ain1, ain2, null);
41164    }
41165
41166    // ain1 = "uchar4 a"
41167    // ain2 = "ushort2 b"
41168    public result_int reduce_my_uchar4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41169        Type t0, t1;
41170        // check ain1
41171        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41172            throw new RSRuntimeException("Type mismatch with U8_4!");
41173        }
41174        // check ain2
41175        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
41176            throw new RSRuntimeException("Type mismatch with U16_2!");
41177        }
41178        // Verify dimensions
41179        t0 = ain1.getType();
41180        t1 = ain2.getType();
41181        if ((t0.getCount() != t1.getCount()) ||
41182            (t0.getX() != t1.getX()) ||
41183            (t0.getY() != t1.getY()) ||
41184            (t0.getZ() != t1.getZ()) ||
41185            (t0.hasFaces()   != t1.hasFaces()) ||
41186            (t0.hasMipmaps() != t1.hasMipmaps())) {
41187            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41188        }
41189
41190        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41191        aout.setAutoPadding(true);
41192        reduce(mExportReduceIdx_my_uchar4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
41193        return new result_int(aout);
41194    }
41195
41196    private final static int mExportReduceIdx_my_uchar4_ushort2_1 = 621;
41197    // in1 = "a", flattened 4-vectors
41198    // in2 = "b", flattened 2-vectors
41199    public result_int reduce_my_uchar4_ushort2_1(byte[] in1, short[] in2) {
41200        // Verify that "in1" is non-null.
41201        if (in1 == null) {
41202            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41203        }
41204        // Verify that the array length is a multiple of the vector size.
41205        if (in1.length % 4 != 0) {
41206            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
41207        }
41208        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
41209        ain1.setAutoPadding(true);
41210        ain1.copyFrom(in1);
41211        // Verify that "in2" is non-null.
41212        if (in2 == null) {
41213            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41214        }
41215        // Verify that the array length is a multiple of the vector size.
41216        if (in2.length % 2 != 0) {
41217            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
41218        }
41219        // Verify that input array lengths are the same.
41220        if (in1.length / 4 != in2.length / 2) {
41221            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41222        }
41223        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
41224        ain2.setAutoPadding(true);
41225        ain2.copyFrom(in2);
41226
41227        result_int result = reduce_my_uchar4_ushort2_1(ain1, ain2, null);
41228        result.mTempIns = new Allocation[]{ain1, ain2};
41229        return result;
41230    }
41231
41232    // ain1 = "uchar4 a"
41233    // ain2 = "ushort2 b"
41234    public result_int reduce_my_uchar4_ushort2_1(Allocation ain1, Allocation ain2) {
41235        return reduce_my_uchar4_ushort2_1(ain1, ain2, null);
41236    }
41237
41238    // ain1 = "uchar4 a"
41239    // ain2 = "ushort2 b"
41240    public result_int reduce_my_uchar4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41241        Type t0, t1;
41242        // check ain1
41243        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41244            throw new RSRuntimeException("Type mismatch with U8_4!");
41245        }
41246        // check ain2
41247        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
41248            throw new RSRuntimeException("Type mismatch with U16_2!");
41249        }
41250        // Verify dimensions
41251        t0 = ain1.getType();
41252        t1 = ain2.getType();
41253        if ((t0.getCount() != t1.getCount()) ||
41254            (t0.getX() != t1.getX()) ||
41255            (t0.getY() != t1.getY()) ||
41256            (t0.getZ() != t1.getZ()) ||
41257            (t0.hasFaces()   != t1.hasFaces()) ||
41258            (t0.hasMipmaps() != t1.hasMipmaps())) {
41259            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41260        }
41261
41262        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41263        aout.setAutoPadding(true);
41264        reduce(mExportReduceIdx_my_uchar4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
41265        return new result_int(aout);
41266    }
41267
41268    private final static int mExportReduceIdx_my_uchar4_ushort4_0 = 622;
41269    // in1 = "a", flattened 4-vectors
41270    // in2 = "b", flattened 4-vectors
41271    public result_int reduce_my_uchar4_ushort4_0(byte[] in1, short[] in2) {
41272        // Verify that "in1" is non-null.
41273        if (in1 == null) {
41274            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41275        }
41276        // Verify that the array length is a multiple of the vector size.
41277        if (in1.length % 4 != 0) {
41278            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
41279        }
41280        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
41281        ain1.setAutoPadding(true);
41282        ain1.copyFrom(in1);
41283        // Verify that "in2" is non-null.
41284        if (in2 == null) {
41285            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41286        }
41287        // Verify that the array length is a multiple of the vector size.
41288        if (in2.length % 4 != 0) {
41289            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
41290        }
41291        // Verify that input array lengths are the same.
41292        if (in1.length / 4 != in2.length / 4) {
41293            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41294        }
41295        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
41296        ain2.setAutoPadding(true);
41297        ain2.copyFrom(in2);
41298
41299        result_int result = reduce_my_uchar4_ushort4_0(ain1, ain2, null);
41300        result.mTempIns = new Allocation[]{ain1, ain2};
41301        return result;
41302    }
41303
41304    // ain1 = "uchar4 a"
41305    // ain2 = "ushort4 b"
41306    public result_int reduce_my_uchar4_ushort4_0(Allocation ain1, Allocation ain2) {
41307        return reduce_my_uchar4_ushort4_0(ain1, ain2, null);
41308    }
41309
41310    // ain1 = "uchar4 a"
41311    // ain2 = "ushort4 b"
41312    public result_int reduce_my_uchar4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41313        Type t0, t1;
41314        // check ain1
41315        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41316            throw new RSRuntimeException("Type mismatch with U8_4!");
41317        }
41318        // check ain2
41319        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
41320            throw new RSRuntimeException("Type mismatch with U16_4!");
41321        }
41322        // Verify dimensions
41323        t0 = ain1.getType();
41324        t1 = ain2.getType();
41325        if ((t0.getCount() != t1.getCount()) ||
41326            (t0.getX() != t1.getX()) ||
41327            (t0.getY() != t1.getY()) ||
41328            (t0.getZ() != t1.getZ()) ||
41329            (t0.hasFaces()   != t1.hasFaces()) ||
41330            (t0.hasMipmaps() != t1.hasMipmaps())) {
41331            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41332        }
41333
41334        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41335        aout.setAutoPadding(true);
41336        reduce(mExportReduceIdx_my_uchar4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
41337        return new result_int(aout);
41338    }
41339
41340    private final static int mExportReduceIdx_my_uchar4_ushort4_1 = 623;
41341    // in1 = "a", flattened 4-vectors
41342    // in2 = "b", flattened 4-vectors
41343    public result_int reduce_my_uchar4_ushort4_1(byte[] in1, short[] in2) {
41344        // Verify that "in1" is non-null.
41345        if (in1 == null) {
41346            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41347        }
41348        // Verify that the array length is a multiple of the vector size.
41349        if (in1.length % 4 != 0) {
41350            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
41351        }
41352        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
41353        ain1.setAutoPadding(true);
41354        ain1.copyFrom(in1);
41355        // Verify that "in2" is non-null.
41356        if (in2 == null) {
41357            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41358        }
41359        // Verify that the array length is a multiple of the vector size.
41360        if (in2.length % 4 != 0) {
41361            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
41362        }
41363        // Verify that input array lengths are the same.
41364        if (in1.length / 4 != in2.length / 4) {
41365            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41366        }
41367        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
41368        ain2.setAutoPadding(true);
41369        ain2.copyFrom(in2);
41370
41371        result_int result = reduce_my_uchar4_ushort4_1(ain1, ain2, null);
41372        result.mTempIns = new Allocation[]{ain1, ain2};
41373        return result;
41374    }
41375
41376    // ain1 = "uchar4 a"
41377    // ain2 = "ushort4 b"
41378    public result_int reduce_my_uchar4_ushort4_1(Allocation ain1, Allocation ain2) {
41379        return reduce_my_uchar4_ushort4_1(ain1, ain2, null);
41380    }
41381
41382    // ain1 = "uchar4 a"
41383    // ain2 = "ushort4 b"
41384    public result_int reduce_my_uchar4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41385        Type t0, t1;
41386        // check ain1
41387        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41388            throw new RSRuntimeException("Type mismatch with U8_4!");
41389        }
41390        // check ain2
41391        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
41392            throw new RSRuntimeException("Type mismatch with U16_4!");
41393        }
41394        // Verify dimensions
41395        t0 = ain1.getType();
41396        t1 = ain2.getType();
41397        if ((t0.getCount() != t1.getCount()) ||
41398            (t0.getX() != t1.getX()) ||
41399            (t0.getY() != t1.getY()) ||
41400            (t0.getZ() != t1.getZ()) ||
41401            (t0.hasFaces()   != t1.hasFaces()) ||
41402            (t0.hasMipmaps() != t1.hasMipmaps())) {
41403            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41404        }
41405
41406        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41407        aout.setAutoPadding(true);
41408        reduce(mExportReduceIdx_my_uchar4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
41409        return new result_int(aout);
41410    }
41411
41412    private final static int mExportReduceIdx_my_uchar4_bool_0 = 624;
41413    // in1 = "a", flattened 4-vectors
41414    // in2 = "b"
41415    public result_int reduce_my_uchar4_bool_0(byte[] in1, byte[] in2) {
41416        // Verify that "in1" is non-null.
41417        if (in1 == null) {
41418            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41419        }
41420        // Verify that the array length is a multiple of the vector size.
41421        if (in1.length % 4 != 0) {
41422            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
41423        }
41424        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
41425        ain1.setAutoPadding(true);
41426        ain1.copyFrom(in1);
41427        // Verify that "in2" is non-null.
41428        if (in2 == null) {
41429            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41430        }
41431        // Verify that input array lengths are the same.
41432        if (in1.length / 4 != in2.length) {
41433            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41434        }
41435        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
41436        ain2.setAutoPadding(true);
41437        ain2.copyFrom(in2);
41438
41439        result_int result = reduce_my_uchar4_bool_0(ain1, ain2, null);
41440        result.mTempIns = new Allocation[]{ain1, ain2};
41441        return result;
41442    }
41443
41444    // ain1 = "uchar4 a"
41445    // ain2 = "bool b"
41446    public result_int reduce_my_uchar4_bool_0(Allocation ain1, Allocation ain2) {
41447        return reduce_my_uchar4_bool_0(ain1, ain2, null);
41448    }
41449
41450    // ain1 = "uchar4 a"
41451    // ain2 = "bool b"
41452    public result_int reduce_my_uchar4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41453        Type t0, t1;
41454        // check ain1
41455        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41456            throw new RSRuntimeException("Type mismatch with U8_4!");
41457        }
41458        // check ain2
41459        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
41460            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
41461        }
41462        // Verify dimensions
41463        t0 = ain1.getType();
41464        t1 = ain2.getType();
41465        if ((t0.getCount() != t1.getCount()) ||
41466            (t0.getX() != t1.getX()) ||
41467            (t0.getY() != t1.getY()) ||
41468            (t0.getZ() != t1.getZ()) ||
41469            (t0.hasFaces()   != t1.hasFaces()) ||
41470            (t0.hasMipmaps() != t1.hasMipmaps())) {
41471            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41472        }
41473
41474        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41475        aout.setAutoPadding(true);
41476        reduce(mExportReduceIdx_my_uchar4_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
41477        return new result_int(aout);
41478    }
41479
41480    private final static int mExportReduceIdx_my_uchar4_bool_1 = 625;
41481    // in1 = "a", flattened 4-vectors
41482    // in2 = "b"
41483    public result_int reduce_my_uchar4_bool_1(byte[] in1, byte[] in2) {
41484        // Verify that "in1" is non-null.
41485        if (in1 == null) {
41486            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41487        }
41488        // Verify that the array length is a multiple of the vector size.
41489        if (in1.length % 4 != 0) {
41490            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
41491        }
41492        Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4);
41493        ain1.setAutoPadding(true);
41494        ain1.copyFrom(in1);
41495        // Verify that "in2" is non-null.
41496        if (in2 == null) {
41497            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41498        }
41499        // Verify that input array lengths are the same.
41500        if (in1.length / 4 != in2.length) {
41501            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41502        }
41503        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
41504        ain2.setAutoPadding(true);
41505        ain2.copyFrom(in2);
41506
41507        result_int result = reduce_my_uchar4_bool_1(ain1, ain2, null);
41508        result.mTempIns = new Allocation[]{ain1, ain2};
41509        return result;
41510    }
41511
41512    // ain1 = "uchar4 a"
41513    // ain2 = "bool b"
41514    public result_int reduce_my_uchar4_bool_1(Allocation ain1, Allocation ain2) {
41515        return reduce_my_uchar4_bool_1(ain1, ain2, null);
41516    }
41517
41518    // ain1 = "uchar4 a"
41519    // ain2 = "bool b"
41520    public result_int reduce_my_uchar4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41521        Type t0, t1;
41522        // check ain1
41523        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41524            throw new RSRuntimeException("Type mismatch with U8_4!");
41525        }
41526        // check ain2
41527        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
41528            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
41529        }
41530        // Verify dimensions
41531        t0 = ain1.getType();
41532        t1 = ain2.getType();
41533        if ((t0.getCount() != t1.getCount()) ||
41534            (t0.getX() != t1.getX()) ||
41535            (t0.getY() != t1.getY()) ||
41536            (t0.getZ() != t1.getZ()) ||
41537            (t0.hasFaces()   != t1.hasFaces()) ||
41538            (t0.hasMipmaps() != t1.hasMipmaps())) {
41539            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41540        }
41541
41542        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41543        aout.setAutoPadding(true);
41544        reduce(mExportReduceIdx_my_uchar4_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
41545        return new result_int(aout);
41546    }
41547
41548    private final static int mExportReduceIdx_my_uchar4_rs_matrix2x2_0 = 626;
41549    // ain1 = "uchar4 a"
41550    // ain2 = "rs_matrix2x2 b"
41551    public result_int reduce_my_uchar4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
41552        return reduce_my_uchar4_rs_matrix2x2_0(ain1, ain2, null);
41553    }
41554
41555    // ain1 = "uchar4 a"
41556    // ain2 = "rs_matrix2x2 b"
41557    public result_int reduce_my_uchar4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41558        Type t0, t1;
41559        // check ain1
41560        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41561            throw new RSRuntimeException("Type mismatch with U8_4!");
41562        }
41563        // check ain2
41564        // Verify dimensions
41565        t0 = ain1.getType();
41566        t1 = ain2.getType();
41567        if ((t0.getCount() != t1.getCount()) ||
41568            (t0.getX() != t1.getX()) ||
41569            (t0.getY() != t1.getY()) ||
41570            (t0.getZ() != t1.getZ()) ||
41571            (t0.hasFaces()   != t1.hasFaces()) ||
41572            (t0.hasMipmaps() != t1.hasMipmaps())) {
41573            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41574        }
41575
41576        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41577        aout.setAutoPadding(true);
41578        reduce(mExportReduceIdx_my_uchar4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
41579        return new result_int(aout);
41580    }
41581
41582    private final static int mExportReduceIdx_my_uchar4_rs_matrix2x2_1 = 627;
41583    // ain1 = "uchar4 a"
41584    // ain2 = "rs_matrix2x2 b"
41585    public result_int reduce_my_uchar4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
41586        return reduce_my_uchar4_rs_matrix2x2_1(ain1, ain2, null);
41587    }
41588
41589    // ain1 = "uchar4 a"
41590    // ain2 = "rs_matrix2x2 b"
41591    public result_int reduce_my_uchar4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41592        Type t0, t1;
41593        // check ain1
41594        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41595            throw new RSRuntimeException("Type mismatch with U8_4!");
41596        }
41597        // check ain2
41598        // Verify dimensions
41599        t0 = ain1.getType();
41600        t1 = ain2.getType();
41601        if ((t0.getCount() != t1.getCount()) ||
41602            (t0.getX() != t1.getX()) ||
41603            (t0.getY() != t1.getY()) ||
41604            (t0.getZ() != t1.getZ()) ||
41605            (t0.hasFaces()   != t1.hasFaces()) ||
41606            (t0.hasMipmaps() != t1.hasMipmaps())) {
41607            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41608        }
41609
41610        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41611        aout.setAutoPadding(true);
41612        reduce(mExportReduceIdx_my_uchar4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
41613        return new result_int(aout);
41614    }
41615
41616    private final static int mExportReduceIdx_my_uchar4_MyStruct_0 = 628;
41617    // ain1 = "uchar4 a"
41618    // ain2 = "/* struct <> */ b"
41619    public result_int reduce_my_uchar4_MyStruct_0(Allocation ain1, Allocation ain2) {
41620        return reduce_my_uchar4_MyStruct_0(ain1, ain2, null);
41621    }
41622
41623    // ain1 = "uchar4 a"
41624    // ain2 = "/* struct <> */ b"
41625    public result_int reduce_my_uchar4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41626        Type t0, t1;
41627        // check ain1
41628        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41629            throw new RSRuntimeException("Type mismatch with U8_4!");
41630        }
41631        // check ain2
41632        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
41633            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
41634        }
41635        // Verify dimensions
41636        t0 = ain1.getType();
41637        t1 = ain2.getType();
41638        if ((t0.getCount() != t1.getCount()) ||
41639            (t0.getX() != t1.getX()) ||
41640            (t0.getY() != t1.getY()) ||
41641            (t0.getZ() != t1.getZ()) ||
41642            (t0.hasFaces()   != t1.hasFaces()) ||
41643            (t0.hasMipmaps() != t1.hasMipmaps())) {
41644            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41645        }
41646
41647        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41648        aout.setAutoPadding(true);
41649        reduce(mExportReduceIdx_my_uchar4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
41650        return new result_int(aout);
41651    }
41652
41653    private final static int mExportReduceIdx_my_uchar4_MyStruct_1 = 629;
41654    // ain1 = "uchar4 a"
41655    // ain2 = "/* struct <> */ b"
41656    public result_int reduce_my_uchar4_MyStruct_1(Allocation ain1, Allocation ain2) {
41657        return reduce_my_uchar4_MyStruct_1(ain1, ain2, null);
41658    }
41659
41660    // ain1 = "uchar4 a"
41661    // ain2 = "/* struct <> */ b"
41662    public result_int reduce_my_uchar4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41663        Type t0, t1;
41664        // check ain1
41665        if (!ain1.getType().getElement().isCompatible(__U8_4)) {
41666            throw new RSRuntimeException("Type mismatch with U8_4!");
41667        }
41668        // check ain2
41669        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
41670            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
41671        }
41672        // Verify dimensions
41673        t0 = ain1.getType();
41674        t1 = ain2.getType();
41675        if ((t0.getCount() != t1.getCount()) ||
41676            (t0.getX() != t1.getX()) ||
41677            (t0.getY() != t1.getY()) ||
41678            (t0.getZ() != t1.getZ()) ||
41679            (t0.hasFaces()   != t1.hasFaces()) ||
41680            (t0.hasMipmaps() != t1.hasMipmaps())) {
41681            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41682        }
41683
41684        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41685        aout.setAutoPadding(true);
41686        reduce(mExportReduceIdx_my_uchar4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
41687        return new result_int(aout);
41688    }
41689
41690    private final static int mExportReduceIdx_my_ushort_half_0 = 630;
41691    // in1 = "a"
41692    // in2 = "b"
41693    public result_int reduce_my_ushort_half_0(short[] in1, short[] in2) {
41694        // Verify that "in1" is non-null.
41695        if (in1 == null) {
41696            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41697        }
41698        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
41699        ain1.setAutoPadding(true);
41700        ain1.copyFrom(in1);
41701        // Verify that "in2" is non-null.
41702        if (in2 == null) {
41703            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41704        }
41705        // Verify that input array lengths are the same.
41706        if (in1.length != in2.length) {
41707            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41708        }
41709        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
41710        ain2.setAutoPadding(true);
41711        ain2.copyFrom(in2);
41712
41713        result_int result = reduce_my_ushort_half_0(ain1, ain2, null);
41714        result.mTempIns = new Allocation[]{ain1, ain2};
41715        return result;
41716    }
41717
41718    // ain1 = "ushort a"
41719    // ain2 = "half b"
41720    public result_int reduce_my_ushort_half_0(Allocation ain1, Allocation ain2) {
41721        return reduce_my_ushort_half_0(ain1, ain2, null);
41722    }
41723
41724    // ain1 = "ushort a"
41725    // ain2 = "half b"
41726    public result_int reduce_my_ushort_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41727        Type t0, t1;
41728        // check ain1
41729        if (!ain1.getType().getElement().isCompatible(__U16)) {
41730            throw new RSRuntimeException("Type mismatch with U16!");
41731        }
41732        // check ain2
41733        if (!ain2.getType().getElement().isCompatible(__F16)) {
41734            throw new RSRuntimeException("Type mismatch with F16!");
41735        }
41736        // Verify dimensions
41737        t0 = ain1.getType();
41738        t1 = ain2.getType();
41739        if ((t0.getCount() != t1.getCount()) ||
41740            (t0.getX() != t1.getX()) ||
41741            (t0.getY() != t1.getY()) ||
41742            (t0.getZ() != t1.getZ()) ||
41743            (t0.hasFaces()   != t1.hasFaces()) ||
41744            (t0.hasMipmaps() != t1.hasMipmaps())) {
41745            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41746        }
41747
41748        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41749        aout.setAutoPadding(true);
41750        reduce(mExportReduceIdx_my_ushort_half_0, new Allocation[]{ain1, ain2}, aout, sc);
41751        return new result_int(aout);
41752    }
41753
41754    private final static int mExportReduceIdx_my_ushort_half_1 = 631;
41755    // in1 = "a"
41756    // in2 = "b"
41757    public result_int reduce_my_ushort_half_1(short[] in1, short[] in2) {
41758        // Verify that "in1" is non-null.
41759        if (in1 == null) {
41760            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41761        }
41762        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
41763        ain1.setAutoPadding(true);
41764        ain1.copyFrom(in1);
41765        // Verify that "in2" is non-null.
41766        if (in2 == null) {
41767            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41768        }
41769        // Verify that input array lengths are the same.
41770        if (in1.length != in2.length) {
41771            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41772        }
41773        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
41774        ain2.setAutoPadding(true);
41775        ain2.copyFrom(in2);
41776
41777        result_int result = reduce_my_ushort_half_1(ain1, ain2, null);
41778        result.mTempIns = new Allocation[]{ain1, ain2};
41779        return result;
41780    }
41781
41782    // ain1 = "ushort a"
41783    // ain2 = "half b"
41784    public result_int reduce_my_ushort_half_1(Allocation ain1, Allocation ain2) {
41785        return reduce_my_ushort_half_1(ain1, ain2, null);
41786    }
41787
41788    // ain1 = "ushort a"
41789    // ain2 = "half b"
41790    public result_int reduce_my_ushort_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41791        Type t0, t1;
41792        // check ain1
41793        if (!ain1.getType().getElement().isCompatible(__U16)) {
41794            throw new RSRuntimeException("Type mismatch with U16!");
41795        }
41796        // check ain2
41797        if (!ain2.getType().getElement().isCompatible(__F16)) {
41798            throw new RSRuntimeException("Type mismatch with F16!");
41799        }
41800        // Verify dimensions
41801        t0 = ain1.getType();
41802        t1 = ain2.getType();
41803        if ((t0.getCount() != t1.getCount()) ||
41804            (t0.getX() != t1.getX()) ||
41805            (t0.getY() != t1.getY()) ||
41806            (t0.getZ() != t1.getZ()) ||
41807            (t0.hasFaces()   != t1.hasFaces()) ||
41808            (t0.hasMipmaps() != t1.hasMipmaps())) {
41809            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41810        }
41811
41812        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41813        aout.setAutoPadding(true);
41814        reduce(mExportReduceIdx_my_ushort_half_1, new Allocation[]{ain1, ain2}, aout, sc);
41815        return new result_int(aout);
41816    }
41817
41818    private final static int mExportReduceIdx_my_ushort_half2_0 = 632;
41819    // in1 = "a"
41820    // in2 = "b", flattened 2-vectors
41821    public result_int reduce_my_ushort_half2_0(short[] in1, short[] in2) {
41822        // Verify that "in1" is non-null.
41823        if (in1 == null) {
41824            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41825        }
41826        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
41827        ain1.setAutoPadding(true);
41828        ain1.copyFrom(in1);
41829        // Verify that "in2" is non-null.
41830        if (in2 == null) {
41831            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41832        }
41833        // Verify that the array length is a multiple of the vector size.
41834        if (in2.length % 2 != 0) {
41835            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
41836        }
41837        // Verify that input array lengths are the same.
41838        if (in1.length != in2.length / 2) {
41839            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41840        }
41841        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
41842        ain2.setAutoPadding(true);
41843        ain2.copyFrom(in2);
41844
41845        result_int result = reduce_my_ushort_half2_0(ain1, ain2, null);
41846        result.mTempIns = new Allocation[]{ain1, ain2};
41847        return result;
41848    }
41849
41850    // ain1 = "ushort a"
41851    // ain2 = "half2 b"
41852    public result_int reduce_my_ushort_half2_0(Allocation ain1, Allocation ain2) {
41853        return reduce_my_ushort_half2_0(ain1, ain2, null);
41854    }
41855
41856    // ain1 = "ushort a"
41857    // ain2 = "half2 b"
41858    public result_int reduce_my_ushort_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41859        Type t0, t1;
41860        // check ain1
41861        if (!ain1.getType().getElement().isCompatible(__U16)) {
41862            throw new RSRuntimeException("Type mismatch with U16!");
41863        }
41864        // check ain2
41865        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
41866            throw new RSRuntimeException("Type mismatch with F16_2!");
41867        }
41868        // Verify dimensions
41869        t0 = ain1.getType();
41870        t1 = ain2.getType();
41871        if ((t0.getCount() != t1.getCount()) ||
41872            (t0.getX() != t1.getX()) ||
41873            (t0.getY() != t1.getY()) ||
41874            (t0.getZ() != t1.getZ()) ||
41875            (t0.hasFaces()   != t1.hasFaces()) ||
41876            (t0.hasMipmaps() != t1.hasMipmaps())) {
41877            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41878        }
41879
41880        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41881        aout.setAutoPadding(true);
41882        reduce(mExportReduceIdx_my_ushort_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
41883        return new result_int(aout);
41884    }
41885
41886    private final static int mExportReduceIdx_my_ushort_half2_1 = 633;
41887    // in1 = "a"
41888    // in2 = "b", flattened 2-vectors
41889    public result_int reduce_my_ushort_half2_1(short[] in1, short[] in2) {
41890        // Verify that "in1" is non-null.
41891        if (in1 == null) {
41892            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41893        }
41894        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
41895        ain1.setAutoPadding(true);
41896        ain1.copyFrom(in1);
41897        // Verify that "in2" is non-null.
41898        if (in2 == null) {
41899            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41900        }
41901        // Verify that the array length is a multiple of the vector size.
41902        if (in2.length % 2 != 0) {
41903            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
41904        }
41905        // Verify that input array lengths are the same.
41906        if (in1.length != in2.length / 2) {
41907            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41908        }
41909        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
41910        ain2.setAutoPadding(true);
41911        ain2.copyFrom(in2);
41912
41913        result_int result = reduce_my_ushort_half2_1(ain1, ain2, null);
41914        result.mTempIns = new Allocation[]{ain1, ain2};
41915        return result;
41916    }
41917
41918    // ain1 = "ushort a"
41919    // ain2 = "half2 b"
41920    public result_int reduce_my_ushort_half2_1(Allocation ain1, Allocation ain2) {
41921        return reduce_my_ushort_half2_1(ain1, ain2, null);
41922    }
41923
41924    // ain1 = "ushort a"
41925    // ain2 = "half2 b"
41926    public result_int reduce_my_ushort_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41927        Type t0, t1;
41928        // check ain1
41929        if (!ain1.getType().getElement().isCompatible(__U16)) {
41930            throw new RSRuntimeException("Type mismatch with U16!");
41931        }
41932        // check ain2
41933        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
41934            throw new RSRuntimeException("Type mismatch with F16_2!");
41935        }
41936        // Verify dimensions
41937        t0 = ain1.getType();
41938        t1 = ain2.getType();
41939        if ((t0.getCount() != t1.getCount()) ||
41940            (t0.getX() != t1.getX()) ||
41941            (t0.getY() != t1.getY()) ||
41942            (t0.getZ() != t1.getZ()) ||
41943            (t0.hasFaces()   != t1.hasFaces()) ||
41944            (t0.hasMipmaps() != t1.hasMipmaps())) {
41945            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
41946        }
41947
41948        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
41949        aout.setAutoPadding(true);
41950        reduce(mExportReduceIdx_my_ushort_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
41951        return new result_int(aout);
41952    }
41953
41954    private final static int mExportReduceIdx_my_ushort_half4_0 = 634;
41955    // in1 = "a"
41956    // in2 = "b", flattened 4-vectors
41957    public result_int reduce_my_ushort_half4_0(short[] in1, short[] in2) {
41958        // Verify that "in1" is non-null.
41959        if (in1 == null) {
41960            throw new RSIllegalArgumentException("Array \"in1\" is null!");
41961        }
41962        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
41963        ain1.setAutoPadding(true);
41964        ain1.copyFrom(in1);
41965        // Verify that "in2" is non-null.
41966        if (in2 == null) {
41967            throw new RSIllegalArgumentException("Array \"in2\" is null!");
41968        }
41969        // Verify that the array length is a multiple of the vector size.
41970        if (in2.length % 4 != 0) {
41971            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
41972        }
41973        // Verify that input array lengths are the same.
41974        if (in1.length != in2.length / 4) {
41975            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
41976        }
41977        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
41978        ain2.setAutoPadding(true);
41979        ain2.copyFrom(in2);
41980
41981        result_int result = reduce_my_ushort_half4_0(ain1, ain2, null);
41982        result.mTempIns = new Allocation[]{ain1, ain2};
41983        return result;
41984    }
41985
41986    // ain1 = "ushort a"
41987    // ain2 = "half4 b"
41988    public result_int reduce_my_ushort_half4_0(Allocation ain1, Allocation ain2) {
41989        return reduce_my_ushort_half4_0(ain1, ain2, null);
41990    }
41991
41992    // ain1 = "ushort a"
41993    // ain2 = "half4 b"
41994    public result_int reduce_my_ushort_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
41995        Type t0, t1;
41996        // check ain1
41997        if (!ain1.getType().getElement().isCompatible(__U16)) {
41998            throw new RSRuntimeException("Type mismatch with U16!");
41999        }
42000        // check ain2
42001        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
42002            throw new RSRuntimeException("Type mismatch with F16_4!");
42003        }
42004        // Verify dimensions
42005        t0 = ain1.getType();
42006        t1 = ain2.getType();
42007        if ((t0.getCount() != t1.getCount()) ||
42008            (t0.getX() != t1.getX()) ||
42009            (t0.getY() != t1.getY()) ||
42010            (t0.getZ() != t1.getZ()) ||
42011            (t0.hasFaces()   != t1.hasFaces()) ||
42012            (t0.hasMipmaps() != t1.hasMipmaps())) {
42013            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42014        }
42015
42016        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42017        aout.setAutoPadding(true);
42018        reduce(mExportReduceIdx_my_ushort_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
42019        return new result_int(aout);
42020    }
42021
42022    private final static int mExportReduceIdx_my_ushort_half4_1 = 635;
42023    // in1 = "a"
42024    // in2 = "b", flattened 4-vectors
42025    public result_int reduce_my_ushort_half4_1(short[] in1, short[] in2) {
42026        // Verify that "in1" is non-null.
42027        if (in1 == null) {
42028            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42029        }
42030        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42031        ain1.setAutoPadding(true);
42032        ain1.copyFrom(in1);
42033        // Verify that "in2" is non-null.
42034        if (in2 == null) {
42035            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42036        }
42037        // Verify that the array length is a multiple of the vector size.
42038        if (in2.length % 4 != 0) {
42039            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
42040        }
42041        // Verify that input array lengths are the same.
42042        if (in1.length != in2.length / 4) {
42043            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42044        }
42045        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
42046        ain2.setAutoPadding(true);
42047        ain2.copyFrom(in2);
42048
42049        result_int result = reduce_my_ushort_half4_1(ain1, ain2, null);
42050        result.mTempIns = new Allocation[]{ain1, ain2};
42051        return result;
42052    }
42053
42054    // ain1 = "ushort a"
42055    // ain2 = "half4 b"
42056    public result_int reduce_my_ushort_half4_1(Allocation ain1, Allocation ain2) {
42057        return reduce_my_ushort_half4_1(ain1, ain2, null);
42058    }
42059
42060    // ain1 = "ushort a"
42061    // ain2 = "half4 b"
42062    public result_int reduce_my_ushort_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42063        Type t0, t1;
42064        // check ain1
42065        if (!ain1.getType().getElement().isCompatible(__U16)) {
42066            throw new RSRuntimeException("Type mismatch with U16!");
42067        }
42068        // check ain2
42069        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
42070            throw new RSRuntimeException("Type mismatch with F16_4!");
42071        }
42072        // Verify dimensions
42073        t0 = ain1.getType();
42074        t1 = ain2.getType();
42075        if ((t0.getCount() != t1.getCount()) ||
42076            (t0.getX() != t1.getX()) ||
42077            (t0.getY() != t1.getY()) ||
42078            (t0.getZ() != t1.getZ()) ||
42079            (t0.hasFaces()   != t1.hasFaces()) ||
42080            (t0.hasMipmaps() != t1.hasMipmaps())) {
42081            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42082        }
42083
42084        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42085        aout.setAutoPadding(true);
42086        reduce(mExportReduceIdx_my_ushort_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
42087        return new result_int(aout);
42088    }
42089
42090    private final static int mExportReduceIdx_my_ushort_float_0 = 636;
42091    // in1 = "a"
42092    // in2 = "b"
42093    public result_int reduce_my_ushort_float_0(short[] in1, float[] in2) {
42094        // Verify that "in1" is non-null.
42095        if (in1 == null) {
42096            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42097        }
42098        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42099        ain1.setAutoPadding(true);
42100        ain1.copyFrom(in1);
42101        // Verify that "in2" is non-null.
42102        if (in2 == null) {
42103            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42104        }
42105        // Verify that input array lengths are the same.
42106        if (in1.length != in2.length) {
42107            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42108        }
42109        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
42110        ain2.setAutoPadding(true);
42111        ain2.copyFrom(in2);
42112
42113        result_int result = reduce_my_ushort_float_0(ain1, ain2, null);
42114        result.mTempIns = new Allocation[]{ain1, ain2};
42115        return result;
42116    }
42117
42118    // ain1 = "ushort a"
42119    // ain2 = "float b"
42120    public result_int reduce_my_ushort_float_0(Allocation ain1, Allocation ain2) {
42121        return reduce_my_ushort_float_0(ain1, ain2, null);
42122    }
42123
42124    // ain1 = "ushort a"
42125    // ain2 = "float b"
42126    public result_int reduce_my_ushort_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42127        Type t0, t1;
42128        // check ain1
42129        if (!ain1.getType().getElement().isCompatible(__U16)) {
42130            throw new RSRuntimeException("Type mismatch with U16!");
42131        }
42132        // check ain2
42133        if (!ain2.getType().getElement().isCompatible(__F32)) {
42134            throw new RSRuntimeException("Type mismatch with F32!");
42135        }
42136        // Verify dimensions
42137        t0 = ain1.getType();
42138        t1 = ain2.getType();
42139        if ((t0.getCount() != t1.getCount()) ||
42140            (t0.getX() != t1.getX()) ||
42141            (t0.getY() != t1.getY()) ||
42142            (t0.getZ() != t1.getZ()) ||
42143            (t0.hasFaces()   != t1.hasFaces()) ||
42144            (t0.hasMipmaps() != t1.hasMipmaps())) {
42145            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42146        }
42147
42148        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42149        aout.setAutoPadding(true);
42150        reduce(mExportReduceIdx_my_ushort_float_0, new Allocation[]{ain1, ain2}, aout, sc);
42151        return new result_int(aout);
42152    }
42153
42154    private final static int mExportReduceIdx_my_ushort_float_1 = 637;
42155    // in1 = "a"
42156    // in2 = "b"
42157    public result_int reduce_my_ushort_float_1(short[] in1, float[] in2) {
42158        // Verify that "in1" is non-null.
42159        if (in1 == null) {
42160            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42161        }
42162        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42163        ain1.setAutoPadding(true);
42164        ain1.copyFrom(in1);
42165        // Verify that "in2" is non-null.
42166        if (in2 == null) {
42167            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42168        }
42169        // Verify that input array lengths are the same.
42170        if (in1.length != in2.length) {
42171            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42172        }
42173        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
42174        ain2.setAutoPadding(true);
42175        ain2.copyFrom(in2);
42176
42177        result_int result = reduce_my_ushort_float_1(ain1, ain2, null);
42178        result.mTempIns = new Allocation[]{ain1, ain2};
42179        return result;
42180    }
42181
42182    // ain1 = "ushort a"
42183    // ain2 = "float b"
42184    public result_int reduce_my_ushort_float_1(Allocation ain1, Allocation ain2) {
42185        return reduce_my_ushort_float_1(ain1, ain2, null);
42186    }
42187
42188    // ain1 = "ushort a"
42189    // ain2 = "float b"
42190    public result_int reduce_my_ushort_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42191        Type t0, t1;
42192        // check ain1
42193        if (!ain1.getType().getElement().isCompatible(__U16)) {
42194            throw new RSRuntimeException("Type mismatch with U16!");
42195        }
42196        // check ain2
42197        if (!ain2.getType().getElement().isCompatible(__F32)) {
42198            throw new RSRuntimeException("Type mismatch with F32!");
42199        }
42200        // Verify dimensions
42201        t0 = ain1.getType();
42202        t1 = ain2.getType();
42203        if ((t0.getCount() != t1.getCount()) ||
42204            (t0.getX() != t1.getX()) ||
42205            (t0.getY() != t1.getY()) ||
42206            (t0.getZ() != t1.getZ()) ||
42207            (t0.hasFaces()   != t1.hasFaces()) ||
42208            (t0.hasMipmaps() != t1.hasMipmaps())) {
42209            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42210        }
42211
42212        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42213        aout.setAutoPadding(true);
42214        reduce(mExportReduceIdx_my_ushort_float_1, new Allocation[]{ain1, ain2}, aout, sc);
42215        return new result_int(aout);
42216    }
42217
42218    private final static int mExportReduceIdx_my_ushort_float2_0 = 638;
42219    // in1 = "a"
42220    // in2 = "b", flattened 2-vectors
42221    public result_int reduce_my_ushort_float2_0(short[] in1, float[] in2) {
42222        // Verify that "in1" is non-null.
42223        if (in1 == null) {
42224            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42225        }
42226        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42227        ain1.setAutoPadding(true);
42228        ain1.copyFrom(in1);
42229        // Verify that "in2" is non-null.
42230        if (in2 == null) {
42231            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42232        }
42233        // Verify that the array length is a multiple of the vector size.
42234        if (in2.length % 2 != 0) {
42235            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
42236        }
42237        // Verify that input array lengths are the same.
42238        if (in1.length != in2.length / 2) {
42239            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42240        }
42241        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
42242        ain2.setAutoPadding(true);
42243        ain2.copyFrom(in2);
42244
42245        result_int result = reduce_my_ushort_float2_0(ain1, ain2, null);
42246        result.mTempIns = new Allocation[]{ain1, ain2};
42247        return result;
42248    }
42249
42250    // ain1 = "ushort a"
42251    // ain2 = "float2 b"
42252    public result_int reduce_my_ushort_float2_0(Allocation ain1, Allocation ain2) {
42253        return reduce_my_ushort_float2_0(ain1, ain2, null);
42254    }
42255
42256    // ain1 = "ushort a"
42257    // ain2 = "float2 b"
42258    public result_int reduce_my_ushort_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42259        Type t0, t1;
42260        // check ain1
42261        if (!ain1.getType().getElement().isCompatible(__U16)) {
42262            throw new RSRuntimeException("Type mismatch with U16!");
42263        }
42264        // check ain2
42265        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
42266            throw new RSRuntimeException("Type mismatch with F32_2!");
42267        }
42268        // Verify dimensions
42269        t0 = ain1.getType();
42270        t1 = ain2.getType();
42271        if ((t0.getCount() != t1.getCount()) ||
42272            (t0.getX() != t1.getX()) ||
42273            (t0.getY() != t1.getY()) ||
42274            (t0.getZ() != t1.getZ()) ||
42275            (t0.hasFaces()   != t1.hasFaces()) ||
42276            (t0.hasMipmaps() != t1.hasMipmaps())) {
42277            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42278        }
42279
42280        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42281        aout.setAutoPadding(true);
42282        reduce(mExportReduceIdx_my_ushort_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
42283        return new result_int(aout);
42284    }
42285
42286    private final static int mExportReduceIdx_my_ushort_float2_1 = 639;
42287    // in1 = "a"
42288    // in2 = "b", flattened 2-vectors
42289    public result_int reduce_my_ushort_float2_1(short[] in1, float[] in2) {
42290        // Verify that "in1" is non-null.
42291        if (in1 == null) {
42292            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42293        }
42294        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42295        ain1.setAutoPadding(true);
42296        ain1.copyFrom(in1);
42297        // Verify that "in2" is non-null.
42298        if (in2 == null) {
42299            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42300        }
42301        // Verify that the array length is a multiple of the vector size.
42302        if (in2.length % 2 != 0) {
42303            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
42304        }
42305        // Verify that input array lengths are the same.
42306        if (in1.length != in2.length / 2) {
42307            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42308        }
42309        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
42310        ain2.setAutoPadding(true);
42311        ain2.copyFrom(in2);
42312
42313        result_int result = reduce_my_ushort_float2_1(ain1, ain2, null);
42314        result.mTempIns = new Allocation[]{ain1, ain2};
42315        return result;
42316    }
42317
42318    // ain1 = "ushort a"
42319    // ain2 = "float2 b"
42320    public result_int reduce_my_ushort_float2_1(Allocation ain1, Allocation ain2) {
42321        return reduce_my_ushort_float2_1(ain1, ain2, null);
42322    }
42323
42324    // ain1 = "ushort a"
42325    // ain2 = "float2 b"
42326    public result_int reduce_my_ushort_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42327        Type t0, t1;
42328        // check ain1
42329        if (!ain1.getType().getElement().isCompatible(__U16)) {
42330            throw new RSRuntimeException("Type mismatch with U16!");
42331        }
42332        // check ain2
42333        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
42334            throw new RSRuntimeException("Type mismatch with F32_2!");
42335        }
42336        // Verify dimensions
42337        t0 = ain1.getType();
42338        t1 = ain2.getType();
42339        if ((t0.getCount() != t1.getCount()) ||
42340            (t0.getX() != t1.getX()) ||
42341            (t0.getY() != t1.getY()) ||
42342            (t0.getZ() != t1.getZ()) ||
42343            (t0.hasFaces()   != t1.hasFaces()) ||
42344            (t0.hasMipmaps() != t1.hasMipmaps())) {
42345            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42346        }
42347
42348        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42349        aout.setAutoPadding(true);
42350        reduce(mExportReduceIdx_my_ushort_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
42351        return new result_int(aout);
42352    }
42353
42354    private final static int mExportReduceIdx_my_ushort_float4_0 = 640;
42355    // in1 = "a"
42356    // in2 = "b", flattened 4-vectors
42357    public result_int reduce_my_ushort_float4_0(short[] in1, float[] in2) {
42358        // Verify that "in1" is non-null.
42359        if (in1 == null) {
42360            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42361        }
42362        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42363        ain1.setAutoPadding(true);
42364        ain1.copyFrom(in1);
42365        // Verify that "in2" is non-null.
42366        if (in2 == null) {
42367            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42368        }
42369        // Verify that the array length is a multiple of the vector size.
42370        if (in2.length % 4 != 0) {
42371            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
42372        }
42373        // Verify that input array lengths are the same.
42374        if (in1.length != in2.length / 4) {
42375            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42376        }
42377        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
42378        ain2.setAutoPadding(true);
42379        ain2.copyFrom(in2);
42380
42381        result_int result = reduce_my_ushort_float4_0(ain1, ain2, null);
42382        result.mTempIns = new Allocation[]{ain1, ain2};
42383        return result;
42384    }
42385
42386    // ain1 = "ushort a"
42387    // ain2 = "float4 b"
42388    public result_int reduce_my_ushort_float4_0(Allocation ain1, Allocation ain2) {
42389        return reduce_my_ushort_float4_0(ain1, ain2, null);
42390    }
42391
42392    // ain1 = "ushort a"
42393    // ain2 = "float4 b"
42394    public result_int reduce_my_ushort_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42395        Type t0, t1;
42396        // check ain1
42397        if (!ain1.getType().getElement().isCompatible(__U16)) {
42398            throw new RSRuntimeException("Type mismatch with U16!");
42399        }
42400        // check ain2
42401        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
42402            throw new RSRuntimeException("Type mismatch with F32_4!");
42403        }
42404        // Verify dimensions
42405        t0 = ain1.getType();
42406        t1 = ain2.getType();
42407        if ((t0.getCount() != t1.getCount()) ||
42408            (t0.getX() != t1.getX()) ||
42409            (t0.getY() != t1.getY()) ||
42410            (t0.getZ() != t1.getZ()) ||
42411            (t0.hasFaces()   != t1.hasFaces()) ||
42412            (t0.hasMipmaps() != t1.hasMipmaps())) {
42413            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42414        }
42415
42416        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42417        aout.setAutoPadding(true);
42418        reduce(mExportReduceIdx_my_ushort_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
42419        return new result_int(aout);
42420    }
42421
42422    private final static int mExportReduceIdx_my_ushort_float4_1 = 641;
42423    // in1 = "a"
42424    // in2 = "b", flattened 4-vectors
42425    public result_int reduce_my_ushort_float4_1(short[] in1, float[] in2) {
42426        // Verify that "in1" is non-null.
42427        if (in1 == null) {
42428            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42429        }
42430        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42431        ain1.setAutoPadding(true);
42432        ain1.copyFrom(in1);
42433        // Verify that "in2" is non-null.
42434        if (in2 == null) {
42435            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42436        }
42437        // Verify that the array length is a multiple of the vector size.
42438        if (in2.length % 4 != 0) {
42439            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
42440        }
42441        // Verify that input array lengths are the same.
42442        if (in1.length != in2.length / 4) {
42443            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42444        }
42445        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
42446        ain2.setAutoPadding(true);
42447        ain2.copyFrom(in2);
42448
42449        result_int result = reduce_my_ushort_float4_1(ain1, ain2, null);
42450        result.mTempIns = new Allocation[]{ain1, ain2};
42451        return result;
42452    }
42453
42454    // ain1 = "ushort a"
42455    // ain2 = "float4 b"
42456    public result_int reduce_my_ushort_float4_1(Allocation ain1, Allocation ain2) {
42457        return reduce_my_ushort_float4_1(ain1, ain2, null);
42458    }
42459
42460    // ain1 = "ushort a"
42461    // ain2 = "float4 b"
42462    public result_int reduce_my_ushort_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42463        Type t0, t1;
42464        // check ain1
42465        if (!ain1.getType().getElement().isCompatible(__U16)) {
42466            throw new RSRuntimeException("Type mismatch with U16!");
42467        }
42468        // check ain2
42469        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
42470            throw new RSRuntimeException("Type mismatch with F32_4!");
42471        }
42472        // Verify dimensions
42473        t0 = ain1.getType();
42474        t1 = ain2.getType();
42475        if ((t0.getCount() != t1.getCount()) ||
42476            (t0.getX() != t1.getX()) ||
42477            (t0.getY() != t1.getY()) ||
42478            (t0.getZ() != t1.getZ()) ||
42479            (t0.hasFaces()   != t1.hasFaces()) ||
42480            (t0.hasMipmaps() != t1.hasMipmaps())) {
42481            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42482        }
42483
42484        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42485        aout.setAutoPadding(true);
42486        reduce(mExportReduceIdx_my_ushort_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
42487        return new result_int(aout);
42488    }
42489
42490    private final static int mExportReduceIdx_my_ushort_char_0 = 642;
42491    // in1 = "a"
42492    // in2 = "b"
42493    public result_int reduce_my_ushort_char_0(short[] in1, byte[] in2) {
42494        // Verify that "in1" is non-null.
42495        if (in1 == null) {
42496            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42497        }
42498        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42499        ain1.setAutoPadding(true);
42500        ain1.copyFrom(in1);
42501        // Verify that "in2" is non-null.
42502        if (in2 == null) {
42503            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42504        }
42505        // Verify that input array lengths are the same.
42506        if (in1.length != in2.length) {
42507            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42508        }
42509        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
42510        ain2.setAutoPadding(true);
42511        ain2.copyFrom(in2);
42512
42513        result_int result = reduce_my_ushort_char_0(ain1, ain2, null);
42514        result.mTempIns = new Allocation[]{ain1, ain2};
42515        return result;
42516    }
42517
42518    // ain1 = "ushort a"
42519    // ain2 = "char b"
42520    public result_int reduce_my_ushort_char_0(Allocation ain1, Allocation ain2) {
42521        return reduce_my_ushort_char_0(ain1, ain2, null);
42522    }
42523
42524    // ain1 = "ushort a"
42525    // ain2 = "char b"
42526    public result_int reduce_my_ushort_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42527        Type t0, t1;
42528        // check ain1
42529        if (!ain1.getType().getElement().isCompatible(__U16)) {
42530            throw new RSRuntimeException("Type mismatch with U16!");
42531        }
42532        // check ain2
42533        if (!ain2.getType().getElement().isCompatible(__I8)) {
42534            throw new RSRuntimeException("Type mismatch with I8!");
42535        }
42536        // Verify dimensions
42537        t0 = ain1.getType();
42538        t1 = ain2.getType();
42539        if ((t0.getCount() != t1.getCount()) ||
42540            (t0.getX() != t1.getX()) ||
42541            (t0.getY() != t1.getY()) ||
42542            (t0.getZ() != t1.getZ()) ||
42543            (t0.hasFaces()   != t1.hasFaces()) ||
42544            (t0.hasMipmaps() != t1.hasMipmaps())) {
42545            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42546        }
42547
42548        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42549        aout.setAutoPadding(true);
42550        reduce(mExportReduceIdx_my_ushort_char_0, new Allocation[]{ain1, ain2}, aout, sc);
42551        return new result_int(aout);
42552    }
42553
42554    private final static int mExportReduceIdx_my_ushort_char_1 = 643;
42555    // in1 = "a"
42556    // in2 = "b"
42557    public result_int reduce_my_ushort_char_1(short[] in1, byte[] in2) {
42558        // Verify that "in1" is non-null.
42559        if (in1 == null) {
42560            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42561        }
42562        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42563        ain1.setAutoPadding(true);
42564        ain1.copyFrom(in1);
42565        // Verify that "in2" is non-null.
42566        if (in2 == null) {
42567            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42568        }
42569        // Verify that input array lengths are the same.
42570        if (in1.length != in2.length) {
42571            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42572        }
42573        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
42574        ain2.setAutoPadding(true);
42575        ain2.copyFrom(in2);
42576
42577        result_int result = reduce_my_ushort_char_1(ain1, ain2, null);
42578        result.mTempIns = new Allocation[]{ain1, ain2};
42579        return result;
42580    }
42581
42582    // ain1 = "ushort a"
42583    // ain2 = "char b"
42584    public result_int reduce_my_ushort_char_1(Allocation ain1, Allocation ain2) {
42585        return reduce_my_ushort_char_1(ain1, ain2, null);
42586    }
42587
42588    // ain1 = "ushort a"
42589    // ain2 = "char b"
42590    public result_int reduce_my_ushort_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42591        Type t0, t1;
42592        // check ain1
42593        if (!ain1.getType().getElement().isCompatible(__U16)) {
42594            throw new RSRuntimeException("Type mismatch with U16!");
42595        }
42596        // check ain2
42597        if (!ain2.getType().getElement().isCompatible(__I8)) {
42598            throw new RSRuntimeException("Type mismatch with I8!");
42599        }
42600        // Verify dimensions
42601        t0 = ain1.getType();
42602        t1 = ain2.getType();
42603        if ((t0.getCount() != t1.getCount()) ||
42604            (t0.getX() != t1.getX()) ||
42605            (t0.getY() != t1.getY()) ||
42606            (t0.getZ() != t1.getZ()) ||
42607            (t0.hasFaces()   != t1.hasFaces()) ||
42608            (t0.hasMipmaps() != t1.hasMipmaps())) {
42609            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42610        }
42611
42612        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42613        aout.setAutoPadding(true);
42614        reduce(mExportReduceIdx_my_ushort_char_1, new Allocation[]{ain1, ain2}, aout, sc);
42615        return new result_int(aout);
42616    }
42617
42618    private final static int mExportReduceIdx_my_ushort_char2_0 = 644;
42619    // in1 = "a"
42620    // in2 = "b", flattened 2-vectors
42621    public result_int reduce_my_ushort_char2_0(short[] in1, byte[] in2) {
42622        // Verify that "in1" is non-null.
42623        if (in1 == null) {
42624            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42625        }
42626        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42627        ain1.setAutoPadding(true);
42628        ain1.copyFrom(in1);
42629        // Verify that "in2" is non-null.
42630        if (in2 == null) {
42631            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42632        }
42633        // Verify that the array length is a multiple of the vector size.
42634        if (in2.length % 2 != 0) {
42635            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
42636        }
42637        // Verify that input array lengths are the same.
42638        if (in1.length != in2.length / 2) {
42639            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42640        }
42641        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
42642        ain2.setAutoPadding(true);
42643        ain2.copyFrom(in2);
42644
42645        result_int result = reduce_my_ushort_char2_0(ain1, ain2, null);
42646        result.mTempIns = new Allocation[]{ain1, ain2};
42647        return result;
42648    }
42649
42650    // ain1 = "ushort a"
42651    // ain2 = "char2 b"
42652    public result_int reduce_my_ushort_char2_0(Allocation ain1, Allocation ain2) {
42653        return reduce_my_ushort_char2_0(ain1, ain2, null);
42654    }
42655
42656    // ain1 = "ushort a"
42657    // ain2 = "char2 b"
42658    public result_int reduce_my_ushort_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42659        Type t0, t1;
42660        // check ain1
42661        if (!ain1.getType().getElement().isCompatible(__U16)) {
42662            throw new RSRuntimeException("Type mismatch with U16!");
42663        }
42664        // check ain2
42665        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
42666            throw new RSRuntimeException("Type mismatch with I8_2!");
42667        }
42668        // Verify dimensions
42669        t0 = ain1.getType();
42670        t1 = ain2.getType();
42671        if ((t0.getCount() != t1.getCount()) ||
42672            (t0.getX() != t1.getX()) ||
42673            (t0.getY() != t1.getY()) ||
42674            (t0.getZ() != t1.getZ()) ||
42675            (t0.hasFaces()   != t1.hasFaces()) ||
42676            (t0.hasMipmaps() != t1.hasMipmaps())) {
42677            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42678        }
42679
42680        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42681        aout.setAutoPadding(true);
42682        reduce(mExportReduceIdx_my_ushort_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
42683        return new result_int(aout);
42684    }
42685
42686    private final static int mExportReduceIdx_my_ushort_char2_1 = 645;
42687    // in1 = "a"
42688    // in2 = "b", flattened 2-vectors
42689    public result_int reduce_my_ushort_char2_1(short[] in1, byte[] in2) {
42690        // Verify that "in1" is non-null.
42691        if (in1 == null) {
42692            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42693        }
42694        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42695        ain1.setAutoPadding(true);
42696        ain1.copyFrom(in1);
42697        // Verify that "in2" is non-null.
42698        if (in2 == null) {
42699            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42700        }
42701        // Verify that the array length is a multiple of the vector size.
42702        if (in2.length % 2 != 0) {
42703            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
42704        }
42705        // Verify that input array lengths are the same.
42706        if (in1.length != in2.length / 2) {
42707            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42708        }
42709        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
42710        ain2.setAutoPadding(true);
42711        ain2.copyFrom(in2);
42712
42713        result_int result = reduce_my_ushort_char2_1(ain1, ain2, null);
42714        result.mTempIns = new Allocation[]{ain1, ain2};
42715        return result;
42716    }
42717
42718    // ain1 = "ushort a"
42719    // ain2 = "char2 b"
42720    public result_int reduce_my_ushort_char2_1(Allocation ain1, Allocation ain2) {
42721        return reduce_my_ushort_char2_1(ain1, ain2, null);
42722    }
42723
42724    // ain1 = "ushort a"
42725    // ain2 = "char2 b"
42726    public result_int reduce_my_ushort_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42727        Type t0, t1;
42728        // check ain1
42729        if (!ain1.getType().getElement().isCompatible(__U16)) {
42730            throw new RSRuntimeException("Type mismatch with U16!");
42731        }
42732        // check ain2
42733        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
42734            throw new RSRuntimeException("Type mismatch with I8_2!");
42735        }
42736        // Verify dimensions
42737        t0 = ain1.getType();
42738        t1 = ain2.getType();
42739        if ((t0.getCount() != t1.getCount()) ||
42740            (t0.getX() != t1.getX()) ||
42741            (t0.getY() != t1.getY()) ||
42742            (t0.getZ() != t1.getZ()) ||
42743            (t0.hasFaces()   != t1.hasFaces()) ||
42744            (t0.hasMipmaps() != t1.hasMipmaps())) {
42745            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42746        }
42747
42748        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42749        aout.setAutoPadding(true);
42750        reduce(mExportReduceIdx_my_ushort_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
42751        return new result_int(aout);
42752    }
42753
42754    private final static int mExportReduceIdx_my_ushort_char4_0 = 646;
42755    // in1 = "a"
42756    // in2 = "b", flattened 4-vectors
42757    public result_int reduce_my_ushort_char4_0(short[] in1, byte[] in2) {
42758        // Verify that "in1" is non-null.
42759        if (in1 == null) {
42760            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42761        }
42762        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42763        ain1.setAutoPadding(true);
42764        ain1.copyFrom(in1);
42765        // Verify that "in2" is non-null.
42766        if (in2 == null) {
42767            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42768        }
42769        // Verify that the array length is a multiple of the vector size.
42770        if (in2.length % 4 != 0) {
42771            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
42772        }
42773        // Verify that input array lengths are the same.
42774        if (in1.length != in2.length / 4) {
42775            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42776        }
42777        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
42778        ain2.setAutoPadding(true);
42779        ain2.copyFrom(in2);
42780
42781        result_int result = reduce_my_ushort_char4_0(ain1, ain2, null);
42782        result.mTempIns = new Allocation[]{ain1, ain2};
42783        return result;
42784    }
42785
42786    // ain1 = "ushort a"
42787    // ain2 = "char4 b"
42788    public result_int reduce_my_ushort_char4_0(Allocation ain1, Allocation ain2) {
42789        return reduce_my_ushort_char4_0(ain1, ain2, null);
42790    }
42791
42792    // ain1 = "ushort a"
42793    // ain2 = "char4 b"
42794    public result_int reduce_my_ushort_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42795        Type t0, t1;
42796        // check ain1
42797        if (!ain1.getType().getElement().isCompatible(__U16)) {
42798            throw new RSRuntimeException("Type mismatch with U16!");
42799        }
42800        // check ain2
42801        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
42802            throw new RSRuntimeException("Type mismatch with I8_4!");
42803        }
42804        // Verify dimensions
42805        t0 = ain1.getType();
42806        t1 = ain2.getType();
42807        if ((t0.getCount() != t1.getCount()) ||
42808            (t0.getX() != t1.getX()) ||
42809            (t0.getY() != t1.getY()) ||
42810            (t0.getZ() != t1.getZ()) ||
42811            (t0.hasFaces()   != t1.hasFaces()) ||
42812            (t0.hasMipmaps() != t1.hasMipmaps())) {
42813            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42814        }
42815
42816        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42817        aout.setAutoPadding(true);
42818        reduce(mExportReduceIdx_my_ushort_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
42819        return new result_int(aout);
42820    }
42821
42822    private final static int mExportReduceIdx_my_ushort_char4_1 = 647;
42823    // in1 = "a"
42824    // in2 = "b", flattened 4-vectors
42825    public result_int reduce_my_ushort_char4_1(short[] in1, byte[] in2) {
42826        // Verify that "in1" is non-null.
42827        if (in1 == null) {
42828            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42829        }
42830        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42831        ain1.setAutoPadding(true);
42832        ain1.copyFrom(in1);
42833        // Verify that "in2" is non-null.
42834        if (in2 == null) {
42835            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42836        }
42837        // Verify that the array length is a multiple of the vector size.
42838        if (in2.length % 4 != 0) {
42839            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
42840        }
42841        // Verify that input array lengths are the same.
42842        if (in1.length != in2.length / 4) {
42843            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42844        }
42845        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
42846        ain2.setAutoPadding(true);
42847        ain2.copyFrom(in2);
42848
42849        result_int result = reduce_my_ushort_char4_1(ain1, ain2, null);
42850        result.mTempIns = new Allocation[]{ain1, ain2};
42851        return result;
42852    }
42853
42854    // ain1 = "ushort a"
42855    // ain2 = "char4 b"
42856    public result_int reduce_my_ushort_char4_1(Allocation ain1, Allocation ain2) {
42857        return reduce_my_ushort_char4_1(ain1, ain2, null);
42858    }
42859
42860    // ain1 = "ushort a"
42861    // ain2 = "char4 b"
42862    public result_int reduce_my_ushort_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42863        Type t0, t1;
42864        // check ain1
42865        if (!ain1.getType().getElement().isCompatible(__U16)) {
42866            throw new RSRuntimeException("Type mismatch with U16!");
42867        }
42868        // check ain2
42869        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
42870            throw new RSRuntimeException("Type mismatch with I8_4!");
42871        }
42872        // Verify dimensions
42873        t0 = ain1.getType();
42874        t1 = ain2.getType();
42875        if ((t0.getCount() != t1.getCount()) ||
42876            (t0.getX() != t1.getX()) ||
42877            (t0.getY() != t1.getY()) ||
42878            (t0.getZ() != t1.getZ()) ||
42879            (t0.hasFaces()   != t1.hasFaces()) ||
42880            (t0.hasMipmaps() != t1.hasMipmaps())) {
42881            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42882        }
42883
42884        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42885        aout.setAutoPadding(true);
42886        reduce(mExportReduceIdx_my_ushort_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
42887        return new result_int(aout);
42888    }
42889
42890    private final static int mExportReduceIdx_my_ushort_short_0 = 648;
42891    // in1 = "a"
42892    // in2 = "b"
42893    public result_int reduce_my_ushort_short_0(short[] in1, short[] in2) {
42894        // Verify that "in1" is non-null.
42895        if (in1 == null) {
42896            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42897        }
42898        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42899        ain1.setAutoPadding(true);
42900        ain1.copyFrom(in1);
42901        // Verify that "in2" is non-null.
42902        if (in2 == null) {
42903            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42904        }
42905        // Verify that input array lengths are the same.
42906        if (in1.length != in2.length) {
42907            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42908        }
42909        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
42910        ain2.setAutoPadding(true);
42911        ain2.copyFrom(in2);
42912
42913        result_int result = reduce_my_ushort_short_0(ain1, ain2, null);
42914        result.mTempIns = new Allocation[]{ain1, ain2};
42915        return result;
42916    }
42917
42918    // ain1 = "ushort a"
42919    // ain2 = "short b"
42920    public result_int reduce_my_ushort_short_0(Allocation ain1, Allocation ain2) {
42921        return reduce_my_ushort_short_0(ain1, ain2, null);
42922    }
42923
42924    // ain1 = "ushort a"
42925    // ain2 = "short b"
42926    public result_int reduce_my_ushort_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42927        Type t0, t1;
42928        // check ain1
42929        if (!ain1.getType().getElement().isCompatible(__U16)) {
42930            throw new RSRuntimeException("Type mismatch with U16!");
42931        }
42932        // check ain2
42933        if (!ain2.getType().getElement().isCompatible(__I16)) {
42934            throw new RSRuntimeException("Type mismatch with I16!");
42935        }
42936        // Verify dimensions
42937        t0 = ain1.getType();
42938        t1 = ain2.getType();
42939        if ((t0.getCount() != t1.getCount()) ||
42940            (t0.getX() != t1.getX()) ||
42941            (t0.getY() != t1.getY()) ||
42942            (t0.getZ() != t1.getZ()) ||
42943            (t0.hasFaces()   != t1.hasFaces()) ||
42944            (t0.hasMipmaps() != t1.hasMipmaps())) {
42945            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
42946        }
42947
42948        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
42949        aout.setAutoPadding(true);
42950        reduce(mExportReduceIdx_my_ushort_short_0, new Allocation[]{ain1, ain2}, aout, sc);
42951        return new result_int(aout);
42952    }
42953
42954    private final static int mExportReduceIdx_my_ushort_short_1 = 649;
42955    // in1 = "a"
42956    // in2 = "b"
42957    public result_int reduce_my_ushort_short_1(short[] in1, short[] in2) {
42958        // Verify that "in1" is non-null.
42959        if (in1 == null) {
42960            throw new RSIllegalArgumentException("Array \"in1\" is null!");
42961        }
42962        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
42963        ain1.setAutoPadding(true);
42964        ain1.copyFrom(in1);
42965        // Verify that "in2" is non-null.
42966        if (in2 == null) {
42967            throw new RSIllegalArgumentException("Array \"in2\" is null!");
42968        }
42969        // Verify that input array lengths are the same.
42970        if (in1.length != in2.length) {
42971            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
42972        }
42973        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
42974        ain2.setAutoPadding(true);
42975        ain2.copyFrom(in2);
42976
42977        result_int result = reduce_my_ushort_short_1(ain1, ain2, null);
42978        result.mTempIns = new Allocation[]{ain1, ain2};
42979        return result;
42980    }
42981
42982    // ain1 = "ushort a"
42983    // ain2 = "short b"
42984    public result_int reduce_my_ushort_short_1(Allocation ain1, Allocation ain2) {
42985        return reduce_my_ushort_short_1(ain1, ain2, null);
42986    }
42987
42988    // ain1 = "ushort a"
42989    // ain2 = "short b"
42990    public result_int reduce_my_ushort_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
42991        Type t0, t1;
42992        // check ain1
42993        if (!ain1.getType().getElement().isCompatible(__U16)) {
42994            throw new RSRuntimeException("Type mismatch with U16!");
42995        }
42996        // check ain2
42997        if (!ain2.getType().getElement().isCompatible(__I16)) {
42998            throw new RSRuntimeException("Type mismatch with I16!");
42999        }
43000        // Verify dimensions
43001        t0 = ain1.getType();
43002        t1 = ain2.getType();
43003        if ((t0.getCount() != t1.getCount()) ||
43004            (t0.getX() != t1.getX()) ||
43005            (t0.getY() != t1.getY()) ||
43006            (t0.getZ() != t1.getZ()) ||
43007            (t0.hasFaces()   != t1.hasFaces()) ||
43008            (t0.hasMipmaps() != t1.hasMipmaps())) {
43009            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43010        }
43011
43012        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43013        aout.setAutoPadding(true);
43014        reduce(mExportReduceIdx_my_ushort_short_1, new Allocation[]{ain1, ain2}, aout, sc);
43015        return new result_int(aout);
43016    }
43017
43018    private final static int mExportReduceIdx_my_ushort_short2_0 = 650;
43019    // in1 = "a"
43020    // in2 = "b", flattened 2-vectors
43021    public result_int reduce_my_ushort_short2_0(short[] in1, short[] in2) {
43022        // Verify that "in1" is non-null.
43023        if (in1 == null) {
43024            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43025        }
43026        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43027        ain1.setAutoPadding(true);
43028        ain1.copyFrom(in1);
43029        // Verify that "in2" is non-null.
43030        if (in2 == null) {
43031            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43032        }
43033        // Verify that the array length is a multiple of the vector size.
43034        if (in2.length % 2 != 0) {
43035            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
43036        }
43037        // Verify that input array lengths are the same.
43038        if (in1.length != in2.length / 2) {
43039            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43040        }
43041        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
43042        ain2.setAutoPadding(true);
43043        ain2.copyFrom(in2);
43044
43045        result_int result = reduce_my_ushort_short2_0(ain1, ain2, null);
43046        result.mTempIns = new Allocation[]{ain1, ain2};
43047        return result;
43048    }
43049
43050    // ain1 = "ushort a"
43051    // ain2 = "short2 b"
43052    public result_int reduce_my_ushort_short2_0(Allocation ain1, Allocation ain2) {
43053        return reduce_my_ushort_short2_0(ain1, ain2, null);
43054    }
43055
43056    // ain1 = "ushort a"
43057    // ain2 = "short2 b"
43058    public result_int reduce_my_ushort_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43059        Type t0, t1;
43060        // check ain1
43061        if (!ain1.getType().getElement().isCompatible(__U16)) {
43062            throw new RSRuntimeException("Type mismatch with U16!");
43063        }
43064        // check ain2
43065        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
43066            throw new RSRuntimeException("Type mismatch with I16_2!");
43067        }
43068        // Verify dimensions
43069        t0 = ain1.getType();
43070        t1 = ain2.getType();
43071        if ((t0.getCount() != t1.getCount()) ||
43072            (t0.getX() != t1.getX()) ||
43073            (t0.getY() != t1.getY()) ||
43074            (t0.getZ() != t1.getZ()) ||
43075            (t0.hasFaces()   != t1.hasFaces()) ||
43076            (t0.hasMipmaps() != t1.hasMipmaps())) {
43077            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43078        }
43079
43080        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43081        aout.setAutoPadding(true);
43082        reduce(mExportReduceIdx_my_ushort_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
43083        return new result_int(aout);
43084    }
43085
43086    private final static int mExportReduceIdx_my_ushort_short2_1 = 651;
43087    // in1 = "a"
43088    // in2 = "b", flattened 2-vectors
43089    public result_int reduce_my_ushort_short2_1(short[] in1, short[] in2) {
43090        // Verify that "in1" is non-null.
43091        if (in1 == null) {
43092            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43093        }
43094        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43095        ain1.setAutoPadding(true);
43096        ain1.copyFrom(in1);
43097        // Verify that "in2" is non-null.
43098        if (in2 == null) {
43099            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43100        }
43101        // Verify that the array length is a multiple of the vector size.
43102        if (in2.length % 2 != 0) {
43103            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
43104        }
43105        // Verify that input array lengths are the same.
43106        if (in1.length != in2.length / 2) {
43107            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43108        }
43109        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
43110        ain2.setAutoPadding(true);
43111        ain2.copyFrom(in2);
43112
43113        result_int result = reduce_my_ushort_short2_1(ain1, ain2, null);
43114        result.mTempIns = new Allocation[]{ain1, ain2};
43115        return result;
43116    }
43117
43118    // ain1 = "ushort a"
43119    // ain2 = "short2 b"
43120    public result_int reduce_my_ushort_short2_1(Allocation ain1, Allocation ain2) {
43121        return reduce_my_ushort_short2_1(ain1, ain2, null);
43122    }
43123
43124    // ain1 = "ushort a"
43125    // ain2 = "short2 b"
43126    public result_int reduce_my_ushort_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43127        Type t0, t1;
43128        // check ain1
43129        if (!ain1.getType().getElement().isCompatible(__U16)) {
43130            throw new RSRuntimeException("Type mismatch with U16!");
43131        }
43132        // check ain2
43133        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
43134            throw new RSRuntimeException("Type mismatch with I16_2!");
43135        }
43136        // Verify dimensions
43137        t0 = ain1.getType();
43138        t1 = ain2.getType();
43139        if ((t0.getCount() != t1.getCount()) ||
43140            (t0.getX() != t1.getX()) ||
43141            (t0.getY() != t1.getY()) ||
43142            (t0.getZ() != t1.getZ()) ||
43143            (t0.hasFaces()   != t1.hasFaces()) ||
43144            (t0.hasMipmaps() != t1.hasMipmaps())) {
43145            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43146        }
43147
43148        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43149        aout.setAutoPadding(true);
43150        reduce(mExportReduceIdx_my_ushort_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
43151        return new result_int(aout);
43152    }
43153
43154    private final static int mExportReduceIdx_my_ushort_short4_0 = 652;
43155    // in1 = "a"
43156    // in2 = "b", flattened 4-vectors
43157    public result_int reduce_my_ushort_short4_0(short[] in1, short[] in2) {
43158        // Verify that "in1" is non-null.
43159        if (in1 == null) {
43160            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43161        }
43162        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43163        ain1.setAutoPadding(true);
43164        ain1.copyFrom(in1);
43165        // Verify that "in2" is non-null.
43166        if (in2 == null) {
43167            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43168        }
43169        // Verify that the array length is a multiple of the vector size.
43170        if (in2.length % 4 != 0) {
43171            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
43172        }
43173        // Verify that input array lengths are the same.
43174        if (in1.length != in2.length / 4) {
43175            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43176        }
43177        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
43178        ain2.setAutoPadding(true);
43179        ain2.copyFrom(in2);
43180
43181        result_int result = reduce_my_ushort_short4_0(ain1, ain2, null);
43182        result.mTempIns = new Allocation[]{ain1, ain2};
43183        return result;
43184    }
43185
43186    // ain1 = "ushort a"
43187    // ain2 = "short4 b"
43188    public result_int reduce_my_ushort_short4_0(Allocation ain1, Allocation ain2) {
43189        return reduce_my_ushort_short4_0(ain1, ain2, null);
43190    }
43191
43192    // ain1 = "ushort a"
43193    // ain2 = "short4 b"
43194    public result_int reduce_my_ushort_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43195        Type t0, t1;
43196        // check ain1
43197        if (!ain1.getType().getElement().isCompatible(__U16)) {
43198            throw new RSRuntimeException("Type mismatch with U16!");
43199        }
43200        // check ain2
43201        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
43202            throw new RSRuntimeException("Type mismatch with I16_4!");
43203        }
43204        // Verify dimensions
43205        t0 = ain1.getType();
43206        t1 = ain2.getType();
43207        if ((t0.getCount() != t1.getCount()) ||
43208            (t0.getX() != t1.getX()) ||
43209            (t0.getY() != t1.getY()) ||
43210            (t0.getZ() != t1.getZ()) ||
43211            (t0.hasFaces()   != t1.hasFaces()) ||
43212            (t0.hasMipmaps() != t1.hasMipmaps())) {
43213            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43214        }
43215
43216        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43217        aout.setAutoPadding(true);
43218        reduce(mExportReduceIdx_my_ushort_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
43219        return new result_int(aout);
43220    }
43221
43222    private final static int mExportReduceIdx_my_ushort_short4_1 = 653;
43223    // in1 = "a"
43224    // in2 = "b", flattened 4-vectors
43225    public result_int reduce_my_ushort_short4_1(short[] in1, short[] in2) {
43226        // Verify that "in1" is non-null.
43227        if (in1 == null) {
43228            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43229        }
43230        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43231        ain1.setAutoPadding(true);
43232        ain1.copyFrom(in1);
43233        // Verify that "in2" is non-null.
43234        if (in2 == null) {
43235            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43236        }
43237        // Verify that the array length is a multiple of the vector size.
43238        if (in2.length % 4 != 0) {
43239            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
43240        }
43241        // Verify that input array lengths are the same.
43242        if (in1.length != in2.length / 4) {
43243            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43244        }
43245        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
43246        ain2.setAutoPadding(true);
43247        ain2.copyFrom(in2);
43248
43249        result_int result = reduce_my_ushort_short4_1(ain1, ain2, null);
43250        result.mTempIns = new Allocation[]{ain1, ain2};
43251        return result;
43252    }
43253
43254    // ain1 = "ushort a"
43255    // ain2 = "short4 b"
43256    public result_int reduce_my_ushort_short4_1(Allocation ain1, Allocation ain2) {
43257        return reduce_my_ushort_short4_1(ain1, ain2, null);
43258    }
43259
43260    // ain1 = "ushort a"
43261    // ain2 = "short4 b"
43262    public result_int reduce_my_ushort_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43263        Type t0, t1;
43264        // check ain1
43265        if (!ain1.getType().getElement().isCompatible(__U16)) {
43266            throw new RSRuntimeException("Type mismatch with U16!");
43267        }
43268        // check ain2
43269        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
43270            throw new RSRuntimeException("Type mismatch with I16_4!");
43271        }
43272        // Verify dimensions
43273        t0 = ain1.getType();
43274        t1 = ain2.getType();
43275        if ((t0.getCount() != t1.getCount()) ||
43276            (t0.getX() != t1.getX()) ||
43277            (t0.getY() != t1.getY()) ||
43278            (t0.getZ() != t1.getZ()) ||
43279            (t0.hasFaces()   != t1.hasFaces()) ||
43280            (t0.hasMipmaps() != t1.hasMipmaps())) {
43281            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43282        }
43283
43284        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43285        aout.setAutoPadding(true);
43286        reduce(mExportReduceIdx_my_ushort_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
43287        return new result_int(aout);
43288    }
43289
43290    private final static int mExportReduceIdx_my_ushort_uchar_0 = 654;
43291    // in1 = "a"
43292    // in2 = "b"
43293    public result_int reduce_my_ushort_uchar_0(short[] in1, byte[] in2) {
43294        // Verify that "in1" is non-null.
43295        if (in1 == null) {
43296            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43297        }
43298        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43299        ain1.setAutoPadding(true);
43300        ain1.copyFrom(in1);
43301        // Verify that "in2" is non-null.
43302        if (in2 == null) {
43303            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43304        }
43305        // Verify that input array lengths are the same.
43306        if (in1.length != in2.length) {
43307            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43308        }
43309        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
43310        ain2.setAutoPadding(true);
43311        ain2.copyFrom(in2);
43312
43313        result_int result = reduce_my_ushort_uchar_0(ain1, ain2, null);
43314        result.mTempIns = new Allocation[]{ain1, ain2};
43315        return result;
43316    }
43317
43318    // ain1 = "ushort a"
43319    // ain2 = "uchar b"
43320    public result_int reduce_my_ushort_uchar_0(Allocation ain1, Allocation ain2) {
43321        return reduce_my_ushort_uchar_0(ain1, ain2, null);
43322    }
43323
43324    // ain1 = "ushort a"
43325    // ain2 = "uchar b"
43326    public result_int reduce_my_ushort_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43327        Type t0, t1;
43328        // check ain1
43329        if (!ain1.getType().getElement().isCompatible(__U16)) {
43330            throw new RSRuntimeException("Type mismatch with U16!");
43331        }
43332        // check ain2
43333        if (!ain2.getType().getElement().isCompatible(__U8)) {
43334            throw new RSRuntimeException("Type mismatch with U8!");
43335        }
43336        // Verify dimensions
43337        t0 = ain1.getType();
43338        t1 = ain2.getType();
43339        if ((t0.getCount() != t1.getCount()) ||
43340            (t0.getX() != t1.getX()) ||
43341            (t0.getY() != t1.getY()) ||
43342            (t0.getZ() != t1.getZ()) ||
43343            (t0.hasFaces()   != t1.hasFaces()) ||
43344            (t0.hasMipmaps() != t1.hasMipmaps())) {
43345            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43346        }
43347
43348        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43349        aout.setAutoPadding(true);
43350        reduce(mExportReduceIdx_my_ushort_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
43351        return new result_int(aout);
43352    }
43353
43354    private final static int mExportReduceIdx_my_ushort_uchar_1 = 655;
43355    // in1 = "a"
43356    // in2 = "b"
43357    public result_int reduce_my_ushort_uchar_1(short[] in1, byte[] in2) {
43358        // Verify that "in1" is non-null.
43359        if (in1 == null) {
43360            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43361        }
43362        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43363        ain1.setAutoPadding(true);
43364        ain1.copyFrom(in1);
43365        // Verify that "in2" is non-null.
43366        if (in2 == null) {
43367            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43368        }
43369        // Verify that input array lengths are the same.
43370        if (in1.length != in2.length) {
43371            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43372        }
43373        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
43374        ain2.setAutoPadding(true);
43375        ain2.copyFrom(in2);
43376
43377        result_int result = reduce_my_ushort_uchar_1(ain1, ain2, null);
43378        result.mTempIns = new Allocation[]{ain1, ain2};
43379        return result;
43380    }
43381
43382    // ain1 = "ushort a"
43383    // ain2 = "uchar b"
43384    public result_int reduce_my_ushort_uchar_1(Allocation ain1, Allocation ain2) {
43385        return reduce_my_ushort_uchar_1(ain1, ain2, null);
43386    }
43387
43388    // ain1 = "ushort a"
43389    // ain2 = "uchar b"
43390    public result_int reduce_my_ushort_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43391        Type t0, t1;
43392        // check ain1
43393        if (!ain1.getType().getElement().isCompatible(__U16)) {
43394            throw new RSRuntimeException("Type mismatch with U16!");
43395        }
43396        // check ain2
43397        if (!ain2.getType().getElement().isCompatible(__U8)) {
43398            throw new RSRuntimeException("Type mismatch with U8!");
43399        }
43400        // Verify dimensions
43401        t0 = ain1.getType();
43402        t1 = ain2.getType();
43403        if ((t0.getCount() != t1.getCount()) ||
43404            (t0.getX() != t1.getX()) ||
43405            (t0.getY() != t1.getY()) ||
43406            (t0.getZ() != t1.getZ()) ||
43407            (t0.hasFaces()   != t1.hasFaces()) ||
43408            (t0.hasMipmaps() != t1.hasMipmaps())) {
43409            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43410        }
43411
43412        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43413        aout.setAutoPadding(true);
43414        reduce(mExportReduceIdx_my_ushort_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
43415        return new result_int(aout);
43416    }
43417
43418    private final static int mExportReduceIdx_my_ushort_uchar2_0 = 656;
43419    // in1 = "a"
43420    // in2 = "b", flattened 2-vectors
43421    public result_int reduce_my_ushort_uchar2_0(short[] in1, byte[] in2) {
43422        // Verify that "in1" is non-null.
43423        if (in1 == null) {
43424            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43425        }
43426        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43427        ain1.setAutoPadding(true);
43428        ain1.copyFrom(in1);
43429        // Verify that "in2" is non-null.
43430        if (in2 == null) {
43431            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43432        }
43433        // Verify that the array length is a multiple of the vector size.
43434        if (in2.length % 2 != 0) {
43435            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
43436        }
43437        // Verify that input array lengths are the same.
43438        if (in1.length != in2.length / 2) {
43439            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43440        }
43441        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
43442        ain2.setAutoPadding(true);
43443        ain2.copyFrom(in2);
43444
43445        result_int result = reduce_my_ushort_uchar2_0(ain1, ain2, null);
43446        result.mTempIns = new Allocation[]{ain1, ain2};
43447        return result;
43448    }
43449
43450    // ain1 = "ushort a"
43451    // ain2 = "uchar2 b"
43452    public result_int reduce_my_ushort_uchar2_0(Allocation ain1, Allocation ain2) {
43453        return reduce_my_ushort_uchar2_0(ain1, ain2, null);
43454    }
43455
43456    // ain1 = "ushort a"
43457    // ain2 = "uchar2 b"
43458    public result_int reduce_my_ushort_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43459        Type t0, t1;
43460        // check ain1
43461        if (!ain1.getType().getElement().isCompatible(__U16)) {
43462            throw new RSRuntimeException("Type mismatch with U16!");
43463        }
43464        // check ain2
43465        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
43466            throw new RSRuntimeException("Type mismatch with U8_2!");
43467        }
43468        // Verify dimensions
43469        t0 = ain1.getType();
43470        t1 = ain2.getType();
43471        if ((t0.getCount() != t1.getCount()) ||
43472            (t0.getX() != t1.getX()) ||
43473            (t0.getY() != t1.getY()) ||
43474            (t0.getZ() != t1.getZ()) ||
43475            (t0.hasFaces()   != t1.hasFaces()) ||
43476            (t0.hasMipmaps() != t1.hasMipmaps())) {
43477            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43478        }
43479
43480        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43481        aout.setAutoPadding(true);
43482        reduce(mExportReduceIdx_my_ushort_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
43483        return new result_int(aout);
43484    }
43485
43486    private final static int mExportReduceIdx_my_ushort_uchar2_1 = 657;
43487    // in1 = "a"
43488    // in2 = "b", flattened 2-vectors
43489    public result_int reduce_my_ushort_uchar2_1(short[] in1, byte[] in2) {
43490        // Verify that "in1" is non-null.
43491        if (in1 == null) {
43492            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43493        }
43494        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43495        ain1.setAutoPadding(true);
43496        ain1.copyFrom(in1);
43497        // Verify that "in2" is non-null.
43498        if (in2 == null) {
43499            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43500        }
43501        // Verify that the array length is a multiple of the vector size.
43502        if (in2.length % 2 != 0) {
43503            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
43504        }
43505        // Verify that input array lengths are the same.
43506        if (in1.length != in2.length / 2) {
43507            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43508        }
43509        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
43510        ain2.setAutoPadding(true);
43511        ain2.copyFrom(in2);
43512
43513        result_int result = reduce_my_ushort_uchar2_1(ain1, ain2, null);
43514        result.mTempIns = new Allocation[]{ain1, ain2};
43515        return result;
43516    }
43517
43518    // ain1 = "ushort a"
43519    // ain2 = "uchar2 b"
43520    public result_int reduce_my_ushort_uchar2_1(Allocation ain1, Allocation ain2) {
43521        return reduce_my_ushort_uchar2_1(ain1, ain2, null);
43522    }
43523
43524    // ain1 = "ushort a"
43525    // ain2 = "uchar2 b"
43526    public result_int reduce_my_ushort_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43527        Type t0, t1;
43528        // check ain1
43529        if (!ain1.getType().getElement().isCompatible(__U16)) {
43530            throw new RSRuntimeException("Type mismatch with U16!");
43531        }
43532        // check ain2
43533        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
43534            throw new RSRuntimeException("Type mismatch with U8_2!");
43535        }
43536        // Verify dimensions
43537        t0 = ain1.getType();
43538        t1 = ain2.getType();
43539        if ((t0.getCount() != t1.getCount()) ||
43540            (t0.getX() != t1.getX()) ||
43541            (t0.getY() != t1.getY()) ||
43542            (t0.getZ() != t1.getZ()) ||
43543            (t0.hasFaces()   != t1.hasFaces()) ||
43544            (t0.hasMipmaps() != t1.hasMipmaps())) {
43545            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43546        }
43547
43548        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43549        aout.setAutoPadding(true);
43550        reduce(mExportReduceIdx_my_ushort_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
43551        return new result_int(aout);
43552    }
43553
43554    private final static int mExportReduceIdx_my_ushort_uchar4_0 = 658;
43555    // in1 = "a"
43556    // in2 = "b", flattened 4-vectors
43557    public result_int reduce_my_ushort_uchar4_0(short[] in1, byte[] in2) {
43558        // Verify that "in1" is non-null.
43559        if (in1 == null) {
43560            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43561        }
43562        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43563        ain1.setAutoPadding(true);
43564        ain1.copyFrom(in1);
43565        // Verify that "in2" is non-null.
43566        if (in2 == null) {
43567            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43568        }
43569        // Verify that the array length is a multiple of the vector size.
43570        if (in2.length % 4 != 0) {
43571            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
43572        }
43573        // Verify that input array lengths are the same.
43574        if (in1.length != in2.length / 4) {
43575            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43576        }
43577        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
43578        ain2.setAutoPadding(true);
43579        ain2.copyFrom(in2);
43580
43581        result_int result = reduce_my_ushort_uchar4_0(ain1, ain2, null);
43582        result.mTempIns = new Allocation[]{ain1, ain2};
43583        return result;
43584    }
43585
43586    // ain1 = "ushort a"
43587    // ain2 = "uchar4 b"
43588    public result_int reduce_my_ushort_uchar4_0(Allocation ain1, Allocation ain2) {
43589        return reduce_my_ushort_uchar4_0(ain1, ain2, null);
43590    }
43591
43592    // ain1 = "ushort a"
43593    // ain2 = "uchar4 b"
43594    public result_int reduce_my_ushort_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43595        Type t0, t1;
43596        // check ain1
43597        if (!ain1.getType().getElement().isCompatible(__U16)) {
43598            throw new RSRuntimeException("Type mismatch with U16!");
43599        }
43600        // check ain2
43601        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
43602            throw new RSRuntimeException("Type mismatch with U8_4!");
43603        }
43604        // Verify dimensions
43605        t0 = ain1.getType();
43606        t1 = ain2.getType();
43607        if ((t0.getCount() != t1.getCount()) ||
43608            (t0.getX() != t1.getX()) ||
43609            (t0.getY() != t1.getY()) ||
43610            (t0.getZ() != t1.getZ()) ||
43611            (t0.hasFaces()   != t1.hasFaces()) ||
43612            (t0.hasMipmaps() != t1.hasMipmaps())) {
43613            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43614        }
43615
43616        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43617        aout.setAutoPadding(true);
43618        reduce(mExportReduceIdx_my_ushort_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
43619        return new result_int(aout);
43620    }
43621
43622    private final static int mExportReduceIdx_my_ushort_uchar4_1 = 659;
43623    // in1 = "a"
43624    // in2 = "b", flattened 4-vectors
43625    public result_int reduce_my_ushort_uchar4_1(short[] in1, byte[] in2) {
43626        // Verify that "in1" is non-null.
43627        if (in1 == null) {
43628            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43629        }
43630        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43631        ain1.setAutoPadding(true);
43632        ain1.copyFrom(in1);
43633        // Verify that "in2" is non-null.
43634        if (in2 == null) {
43635            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43636        }
43637        // Verify that the array length is a multiple of the vector size.
43638        if (in2.length % 4 != 0) {
43639            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
43640        }
43641        // Verify that input array lengths are the same.
43642        if (in1.length != in2.length / 4) {
43643            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43644        }
43645        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
43646        ain2.setAutoPadding(true);
43647        ain2.copyFrom(in2);
43648
43649        result_int result = reduce_my_ushort_uchar4_1(ain1, ain2, null);
43650        result.mTempIns = new Allocation[]{ain1, ain2};
43651        return result;
43652    }
43653
43654    // ain1 = "ushort a"
43655    // ain2 = "uchar4 b"
43656    public result_int reduce_my_ushort_uchar4_1(Allocation ain1, Allocation ain2) {
43657        return reduce_my_ushort_uchar4_1(ain1, ain2, null);
43658    }
43659
43660    // ain1 = "ushort a"
43661    // ain2 = "uchar4 b"
43662    public result_int reduce_my_ushort_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43663        Type t0, t1;
43664        // check ain1
43665        if (!ain1.getType().getElement().isCompatible(__U16)) {
43666            throw new RSRuntimeException("Type mismatch with U16!");
43667        }
43668        // check ain2
43669        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
43670            throw new RSRuntimeException("Type mismatch with U8_4!");
43671        }
43672        // Verify dimensions
43673        t0 = ain1.getType();
43674        t1 = ain2.getType();
43675        if ((t0.getCount() != t1.getCount()) ||
43676            (t0.getX() != t1.getX()) ||
43677            (t0.getY() != t1.getY()) ||
43678            (t0.getZ() != t1.getZ()) ||
43679            (t0.hasFaces()   != t1.hasFaces()) ||
43680            (t0.hasMipmaps() != t1.hasMipmaps())) {
43681            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43682        }
43683
43684        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43685        aout.setAutoPadding(true);
43686        reduce(mExportReduceIdx_my_ushort_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
43687        return new result_int(aout);
43688    }
43689
43690    private final static int mExportReduceIdx_my_ushort_ushort_0 = 660;
43691    // in1 = "a"
43692    // in2 = "b"
43693    public result_int reduce_my_ushort_ushort_0(short[] in1, short[] in2) {
43694        // Verify that "in1" is non-null.
43695        if (in1 == null) {
43696            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43697        }
43698        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43699        ain1.setAutoPadding(true);
43700        ain1.copyFrom(in1);
43701        // Verify that "in2" is non-null.
43702        if (in2 == null) {
43703            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43704        }
43705        // Verify that input array lengths are the same.
43706        if (in1.length != in2.length) {
43707            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43708        }
43709        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
43710        ain2.setAutoPadding(true);
43711        ain2.copyFrom(in2);
43712
43713        result_int result = reduce_my_ushort_ushort_0(ain1, ain2, null);
43714        result.mTempIns = new Allocation[]{ain1, ain2};
43715        return result;
43716    }
43717
43718    // ain1 = "ushort a"
43719    // ain2 = "ushort b"
43720    public result_int reduce_my_ushort_ushort_0(Allocation ain1, Allocation ain2) {
43721        return reduce_my_ushort_ushort_0(ain1, ain2, null);
43722    }
43723
43724    // ain1 = "ushort a"
43725    // ain2 = "ushort b"
43726    public result_int reduce_my_ushort_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43727        Type t0, t1;
43728        // check ain1
43729        if (!ain1.getType().getElement().isCompatible(__U16)) {
43730            throw new RSRuntimeException("Type mismatch with U16!");
43731        }
43732        // check ain2
43733        if (!ain2.getType().getElement().isCompatible(__U16)) {
43734            throw new RSRuntimeException("Type mismatch with U16!");
43735        }
43736        // Verify dimensions
43737        t0 = ain1.getType();
43738        t1 = ain2.getType();
43739        if ((t0.getCount() != t1.getCount()) ||
43740            (t0.getX() != t1.getX()) ||
43741            (t0.getY() != t1.getY()) ||
43742            (t0.getZ() != t1.getZ()) ||
43743            (t0.hasFaces()   != t1.hasFaces()) ||
43744            (t0.hasMipmaps() != t1.hasMipmaps())) {
43745            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43746        }
43747
43748        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43749        aout.setAutoPadding(true);
43750        reduce(mExportReduceIdx_my_ushort_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
43751        return new result_int(aout);
43752    }
43753
43754    private final static int mExportReduceIdx_my_ushort_ushort_1 = 661;
43755    // in1 = "a"
43756    // in2 = "b"
43757    public result_int reduce_my_ushort_ushort_1(short[] in1, short[] in2) {
43758        // Verify that "in1" is non-null.
43759        if (in1 == null) {
43760            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43761        }
43762        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43763        ain1.setAutoPadding(true);
43764        ain1.copyFrom(in1);
43765        // Verify that "in2" is non-null.
43766        if (in2 == null) {
43767            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43768        }
43769        // Verify that input array lengths are the same.
43770        if (in1.length != in2.length) {
43771            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43772        }
43773        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
43774        ain2.setAutoPadding(true);
43775        ain2.copyFrom(in2);
43776
43777        result_int result = reduce_my_ushort_ushort_1(ain1, ain2, null);
43778        result.mTempIns = new Allocation[]{ain1, ain2};
43779        return result;
43780    }
43781
43782    // ain1 = "ushort a"
43783    // ain2 = "ushort b"
43784    public result_int reduce_my_ushort_ushort_1(Allocation ain1, Allocation ain2) {
43785        return reduce_my_ushort_ushort_1(ain1, ain2, null);
43786    }
43787
43788    // ain1 = "ushort a"
43789    // ain2 = "ushort b"
43790    public result_int reduce_my_ushort_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43791        Type t0, t1;
43792        // check ain1
43793        if (!ain1.getType().getElement().isCompatible(__U16)) {
43794            throw new RSRuntimeException("Type mismatch with U16!");
43795        }
43796        // check ain2
43797        if (!ain2.getType().getElement().isCompatible(__U16)) {
43798            throw new RSRuntimeException("Type mismatch with U16!");
43799        }
43800        // Verify dimensions
43801        t0 = ain1.getType();
43802        t1 = ain2.getType();
43803        if ((t0.getCount() != t1.getCount()) ||
43804            (t0.getX() != t1.getX()) ||
43805            (t0.getY() != t1.getY()) ||
43806            (t0.getZ() != t1.getZ()) ||
43807            (t0.hasFaces()   != t1.hasFaces()) ||
43808            (t0.hasMipmaps() != t1.hasMipmaps())) {
43809            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43810        }
43811
43812        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43813        aout.setAutoPadding(true);
43814        reduce(mExportReduceIdx_my_ushort_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
43815        return new result_int(aout);
43816    }
43817
43818    private final static int mExportReduceIdx_my_ushort_ushort2_0 = 662;
43819    // in1 = "a"
43820    // in2 = "b", flattened 2-vectors
43821    public result_int reduce_my_ushort_ushort2_0(short[] in1, short[] in2) {
43822        // Verify that "in1" is non-null.
43823        if (in1 == null) {
43824            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43825        }
43826        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43827        ain1.setAutoPadding(true);
43828        ain1.copyFrom(in1);
43829        // Verify that "in2" is non-null.
43830        if (in2 == null) {
43831            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43832        }
43833        // Verify that the array length is a multiple of the vector size.
43834        if (in2.length % 2 != 0) {
43835            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
43836        }
43837        // Verify that input array lengths are the same.
43838        if (in1.length != in2.length / 2) {
43839            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43840        }
43841        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
43842        ain2.setAutoPadding(true);
43843        ain2.copyFrom(in2);
43844
43845        result_int result = reduce_my_ushort_ushort2_0(ain1, ain2, null);
43846        result.mTempIns = new Allocation[]{ain1, ain2};
43847        return result;
43848    }
43849
43850    // ain1 = "ushort a"
43851    // ain2 = "ushort2 b"
43852    public result_int reduce_my_ushort_ushort2_0(Allocation ain1, Allocation ain2) {
43853        return reduce_my_ushort_ushort2_0(ain1, ain2, null);
43854    }
43855
43856    // ain1 = "ushort a"
43857    // ain2 = "ushort2 b"
43858    public result_int reduce_my_ushort_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43859        Type t0, t1;
43860        // check ain1
43861        if (!ain1.getType().getElement().isCompatible(__U16)) {
43862            throw new RSRuntimeException("Type mismatch with U16!");
43863        }
43864        // check ain2
43865        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
43866            throw new RSRuntimeException("Type mismatch with U16_2!");
43867        }
43868        // Verify dimensions
43869        t0 = ain1.getType();
43870        t1 = ain2.getType();
43871        if ((t0.getCount() != t1.getCount()) ||
43872            (t0.getX() != t1.getX()) ||
43873            (t0.getY() != t1.getY()) ||
43874            (t0.getZ() != t1.getZ()) ||
43875            (t0.hasFaces()   != t1.hasFaces()) ||
43876            (t0.hasMipmaps() != t1.hasMipmaps())) {
43877            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43878        }
43879
43880        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43881        aout.setAutoPadding(true);
43882        reduce(mExportReduceIdx_my_ushort_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
43883        return new result_int(aout);
43884    }
43885
43886    private final static int mExportReduceIdx_my_ushort_ushort2_1 = 663;
43887    // in1 = "a"
43888    // in2 = "b", flattened 2-vectors
43889    public result_int reduce_my_ushort_ushort2_1(short[] in1, short[] in2) {
43890        // Verify that "in1" is non-null.
43891        if (in1 == null) {
43892            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43893        }
43894        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43895        ain1.setAutoPadding(true);
43896        ain1.copyFrom(in1);
43897        // Verify that "in2" is non-null.
43898        if (in2 == null) {
43899            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43900        }
43901        // Verify that the array length is a multiple of the vector size.
43902        if (in2.length % 2 != 0) {
43903            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
43904        }
43905        // Verify that input array lengths are the same.
43906        if (in1.length != in2.length / 2) {
43907            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43908        }
43909        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
43910        ain2.setAutoPadding(true);
43911        ain2.copyFrom(in2);
43912
43913        result_int result = reduce_my_ushort_ushort2_1(ain1, ain2, null);
43914        result.mTempIns = new Allocation[]{ain1, ain2};
43915        return result;
43916    }
43917
43918    // ain1 = "ushort a"
43919    // ain2 = "ushort2 b"
43920    public result_int reduce_my_ushort_ushort2_1(Allocation ain1, Allocation ain2) {
43921        return reduce_my_ushort_ushort2_1(ain1, ain2, null);
43922    }
43923
43924    // ain1 = "ushort a"
43925    // ain2 = "ushort2 b"
43926    public result_int reduce_my_ushort_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43927        Type t0, t1;
43928        // check ain1
43929        if (!ain1.getType().getElement().isCompatible(__U16)) {
43930            throw new RSRuntimeException("Type mismatch with U16!");
43931        }
43932        // check ain2
43933        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
43934            throw new RSRuntimeException("Type mismatch with U16_2!");
43935        }
43936        // Verify dimensions
43937        t0 = ain1.getType();
43938        t1 = ain2.getType();
43939        if ((t0.getCount() != t1.getCount()) ||
43940            (t0.getX() != t1.getX()) ||
43941            (t0.getY() != t1.getY()) ||
43942            (t0.getZ() != t1.getZ()) ||
43943            (t0.hasFaces()   != t1.hasFaces()) ||
43944            (t0.hasMipmaps() != t1.hasMipmaps())) {
43945            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
43946        }
43947
43948        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
43949        aout.setAutoPadding(true);
43950        reduce(mExportReduceIdx_my_ushort_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
43951        return new result_int(aout);
43952    }
43953
43954    private final static int mExportReduceIdx_my_ushort_ushort4_0 = 664;
43955    // in1 = "a"
43956    // in2 = "b", flattened 4-vectors
43957    public result_int reduce_my_ushort_ushort4_0(short[] in1, short[] in2) {
43958        // Verify that "in1" is non-null.
43959        if (in1 == null) {
43960            throw new RSIllegalArgumentException("Array \"in1\" is null!");
43961        }
43962        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
43963        ain1.setAutoPadding(true);
43964        ain1.copyFrom(in1);
43965        // Verify that "in2" is non-null.
43966        if (in2 == null) {
43967            throw new RSIllegalArgumentException("Array \"in2\" is null!");
43968        }
43969        // Verify that the array length is a multiple of the vector size.
43970        if (in2.length % 4 != 0) {
43971            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
43972        }
43973        // Verify that input array lengths are the same.
43974        if (in1.length != in2.length / 4) {
43975            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
43976        }
43977        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
43978        ain2.setAutoPadding(true);
43979        ain2.copyFrom(in2);
43980
43981        result_int result = reduce_my_ushort_ushort4_0(ain1, ain2, null);
43982        result.mTempIns = new Allocation[]{ain1, ain2};
43983        return result;
43984    }
43985
43986    // ain1 = "ushort a"
43987    // ain2 = "ushort4 b"
43988    public result_int reduce_my_ushort_ushort4_0(Allocation ain1, Allocation ain2) {
43989        return reduce_my_ushort_ushort4_0(ain1, ain2, null);
43990    }
43991
43992    // ain1 = "ushort a"
43993    // ain2 = "ushort4 b"
43994    public result_int reduce_my_ushort_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
43995        Type t0, t1;
43996        // check ain1
43997        if (!ain1.getType().getElement().isCompatible(__U16)) {
43998            throw new RSRuntimeException("Type mismatch with U16!");
43999        }
44000        // check ain2
44001        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
44002            throw new RSRuntimeException("Type mismatch with U16_4!");
44003        }
44004        // Verify dimensions
44005        t0 = ain1.getType();
44006        t1 = ain2.getType();
44007        if ((t0.getCount() != t1.getCount()) ||
44008            (t0.getX() != t1.getX()) ||
44009            (t0.getY() != t1.getY()) ||
44010            (t0.getZ() != t1.getZ()) ||
44011            (t0.hasFaces()   != t1.hasFaces()) ||
44012            (t0.hasMipmaps() != t1.hasMipmaps())) {
44013            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44014        }
44015
44016        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44017        aout.setAutoPadding(true);
44018        reduce(mExportReduceIdx_my_ushort_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
44019        return new result_int(aout);
44020    }
44021
44022    private final static int mExportReduceIdx_my_ushort_ushort4_1 = 665;
44023    // in1 = "a"
44024    // in2 = "b", flattened 4-vectors
44025    public result_int reduce_my_ushort_ushort4_1(short[] in1, short[] in2) {
44026        // Verify that "in1" is non-null.
44027        if (in1 == null) {
44028            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44029        }
44030        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
44031        ain1.setAutoPadding(true);
44032        ain1.copyFrom(in1);
44033        // Verify that "in2" is non-null.
44034        if (in2 == null) {
44035            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44036        }
44037        // Verify that the array length is a multiple of the vector size.
44038        if (in2.length % 4 != 0) {
44039            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
44040        }
44041        // Verify that input array lengths are the same.
44042        if (in1.length != in2.length / 4) {
44043            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44044        }
44045        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
44046        ain2.setAutoPadding(true);
44047        ain2.copyFrom(in2);
44048
44049        result_int result = reduce_my_ushort_ushort4_1(ain1, ain2, null);
44050        result.mTempIns = new Allocation[]{ain1, ain2};
44051        return result;
44052    }
44053
44054    // ain1 = "ushort a"
44055    // ain2 = "ushort4 b"
44056    public result_int reduce_my_ushort_ushort4_1(Allocation ain1, Allocation ain2) {
44057        return reduce_my_ushort_ushort4_1(ain1, ain2, null);
44058    }
44059
44060    // ain1 = "ushort a"
44061    // ain2 = "ushort4 b"
44062    public result_int reduce_my_ushort_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44063        Type t0, t1;
44064        // check ain1
44065        if (!ain1.getType().getElement().isCompatible(__U16)) {
44066            throw new RSRuntimeException("Type mismatch with U16!");
44067        }
44068        // check ain2
44069        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
44070            throw new RSRuntimeException("Type mismatch with U16_4!");
44071        }
44072        // Verify dimensions
44073        t0 = ain1.getType();
44074        t1 = ain2.getType();
44075        if ((t0.getCount() != t1.getCount()) ||
44076            (t0.getX() != t1.getX()) ||
44077            (t0.getY() != t1.getY()) ||
44078            (t0.getZ() != t1.getZ()) ||
44079            (t0.hasFaces()   != t1.hasFaces()) ||
44080            (t0.hasMipmaps() != t1.hasMipmaps())) {
44081            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44082        }
44083
44084        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44085        aout.setAutoPadding(true);
44086        reduce(mExportReduceIdx_my_ushort_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
44087        return new result_int(aout);
44088    }
44089
44090    private final static int mExportReduceIdx_my_ushort_bool_0 = 666;
44091    // in1 = "a"
44092    // in2 = "b"
44093    public result_int reduce_my_ushort_bool_0(short[] in1, byte[] in2) {
44094        // Verify that "in1" is non-null.
44095        if (in1 == null) {
44096            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44097        }
44098        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
44099        ain1.setAutoPadding(true);
44100        ain1.copyFrom(in1);
44101        // Verify that "in2" is non-null.
44102        if (in2 == null) {
44103            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44104        }
44105        // Verify that input array lengths are the same.
44106        if (in1.length != in2.length) {
44107            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44108        }
44109        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
44110        ain2.setAutoPadding(true);
44111        ain2.copyFrom(in2);
44112
44113        result_int result = reduce_my_ushort_bool_0(ain1, ain2, null);
44114        result.mTempIns = new Allocation[]{ain1, ain2};
44115        return result;
44116    }
44117
44118    // ain1 = "ushort a"
44119    // ain2 = "bool b"
44120    public result_int reduce_my_ushort_bool_0(Allocation ain1, Allocation ain2) {
44121        return reduce_my_ushort_bool_0(ain1, ain2, null);
44122    }
44123
44124    // ain1 = "ushort a"
44125    // ain2 = "bool b"
44126    public result_int reduce_my_ushort_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44127        Type t0, t1;
44128        // check ain1
44129        if (!ain1.getType().getElement().isCompatible(__U16)) {
44130            throw new RSRuntimeException("Type mismatch with U16!");
44131        }
44132        // check ain2
44133        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
44134            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
44135        }
44136        // Verify dimensions
44137        t0 = ain1.getType();
44138        t1 = ain2.getType();
44139        if ((t0.getCount() != t1.getCount()) ||
44140            (t0.getX() != t1.getX()) ||
44141            (t0.getY() != t1.getY()) ||
44142            (t0.getZ() != t1.getZ()) ||
44143            (t0.hasFaces()   != t1.hasFaces()) ||
44144            (t0.hasMipmaps() != t1.hasMipmaps())) {
44145            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44146        }
44147
44148        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44149        aout.setAutoPadding(true);
44150        reduce(mExportReduceIdx_my_ushort_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
44151        return new result_int(aout);
44152    }
44153
44154    private final static int mExportReduceIdx_my_ushort_bool_1 = 667;
44155    // in1 = "a"
44156    // in2 = "b"
44157    public result_int reduce_my_ushort_bool_1(short[] in1, byte[] in2) {
44158        // Verify that "in1" is non-null.
44159        if (in1 == null) {
44160            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44161        }
44162        Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length);
44163        ain1.setAutoPadding(true);
44164        ain1.copyFrom(in1);
44165        // Verify that "in2" is non-null.
44166        if (in2 == null) {
44167            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44168        }
44169        // Verify that input array lengths are the same.
44170        if (in1.length != in2.length) {
44171            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44172        }
44173        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
44174        ain2.setAutoPadding(true);
44175        ain2.copyFrom(in2);
44176
44177        result_int result = reduce_my_ushort_bool_1(ain1, ain2, null);
44178        result.mTempIns = new Allocation[]{ain1, ain2};
44179        return result;
44180    }
44181
44182    // ain1 = "ushort a"
44183    // ain2 = "bool b"
44184    public result_int reduce_my_ushort_bool_1(Allocation ain1, Allocation ain2) {
44185        return reduce_my_ushort_bool_1(ain1, ain2, null);
44186    }
44187
44188    // ain1 = "ushort a"
44189    // ain2 = "bool b"
44190    public result_int reduce_my_ushort_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44191        Type t0, t1;
44192        // check ain1
44193        if (!ain1.getType().getElement().isCompatible(__U16)) {
44194            throw new RSRuntimeException("Type mismatch with U16!");
44195        }
44196        // check ain2
44197        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
44198            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
44199        }
44200        // Verify dimensions
44201        t0 = ain1.getType();
44202        t1 = ain2.getType();
44203        if ((t0.getCount() != t1.getCount()) ||
44204            (t0.getX() != t1.getX()) ||
44205            (t0.getY() != t1.getY()) ||
44206            (t0.getZ() != t1.getZ()) ||
44207            (t0.hasFaces()   != t1.hasFaces()) ||
44208            (t0.hasMipmaps() != t1.hasMipmaps())) {
44209            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44210        }
44211
44212        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44213        aout.setAutoPadding(true);
44214        reduce(mExportReduceIdx_my_ushort_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
44215        return new result_int(aout);
44216    }
44217
44218    private final static int mExportReduceIdx_my_ushort_rs_matrix2x2_0 = 668;
44219    // ain1 = "ushort a"
44220    // ain2 = "rs_matrix2x2 b"
44221    public result_int reduce_my_ushort_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
44222        return reduce_my_ushort_rs_matrix2x2_0(ain1, ain2, null);
44223    }
44224
44225    // ain1 = "ushort a"
44226    // ain2 = "rs_matrix2x2 b"
44227    public result_int reduce_my_ushort_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44228        Type t0, t1;
44229        // check ain1
44230        if (!ain1.getType().getElement().isCompatible(__U16)) {
44231            throw new RSRuntimeException("Type mismatch with U16!");
44232        }
44233        // check ain2
44234        // Verify dimensions
44235        t0 = ain1.getType();
44236        t1 = ain2.getType();
44237        if ((t0.getCount() != t1.getCount()) ||
44238            (t0.getX() != t1.getX()) ||
44239            (t0.getY() != t1.getY()) ||
44240            (t0.getZ() != t1.getZ()) ||
44241            (t0.hasFaces()   != t1.hasFaces()) ||
44242            (t0.hasMipmaps() != t1.hasMipmaps())) {
44243            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44244        }
44245
44246        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44247        aout.setAutoPadding(true);
44248        reduce(mExportReduceIdx_my_ushort_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
44249        return new result_int(aout);
44250    }
44251
44252    private final static int mExportReduceIdx_my_ushort_rs_matrix2x2_1 = 669;
44253    // ain1 = "ushort a"
44254    // ain2 = "rs_matrix2x2 b"
44255    public result_int reduce_my_ushort_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
44256        return reduce_my_ushort_rs_matrix2x2_1(ain1, ain2, null);
44257    }
44258
44259    // ain1 = "ushort a"
44260    // ain2 = "rs_matrix2x2 b"
44261    public result_int reduce_my_ushort_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44262        Type t0, t1;
44263        // check ain1
44264        if (!ain1.getType().getElement().isCompatible(__U16)) {
44265            throw new RSRuntimeException("Type mismatch with U16!");
44266        }
44267        // check ain2
44268        // Verify dimensions
44269        t0 = ain1.getType();
44270        t1 = ain2.getType();
44271        if ((t0.getCount() != t1.getCount()) ||
44272            (t0.getX() != t1.getX()) ||
44273            (t0.getY() != t1.getY()) ||
44274            (t0.getZ() != t1.getZ()) ||
44275            (t0.hasFaces()   != t1.hasFaces()) ||
44276            (t0.hasMipmaps() != t1.hasMipmaps())) {
44277            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44278        }
44279
44280        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44281        aout.setAutoPadding(true);
44282        reduce(mExportReduceIdx_my_ushort_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
44283        return new result_int(aout);
44284    }
44285
44286    private final static int mExportReduceIdx_my_ushort_MyStruct_0 = 670;
44287    // ain1 = "ushort a"
44288    // ain2 = "/* struct <> */ b"
44289    public result_int reduce_my_ushort_MyStruct_0(Allocation ain1, Allocation ain2) {
44290        return reduce_my_ushort_MyStruct_0(ain1, ain2, null);
44291    }
44292
44293    // ain1 = "ushort a"
44294    // ain2 = "/* struct <> */ b"
44295    public result_int reduce_my_ushort_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44296        Type t0, t1;
44297        // check ain1
44298        if (!ain1.getType().getElement().isCompatible(__U16)) {
44299            throw new RSRuntimeException("Type mismatch with U16!");
44300        }
44301        // check ain2
44302        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
44303            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
44304        }
44305        // Verify dimensions
44306        t0 = ain1.getType();
44307        t1 = ain2.getType();
44308        if ((t0.getCount() != t1.getCount()) ||
44309            (t0.getX() != t1.getX()) ||
44310            (t0.getY() != t1.getY()) ||
44311            (t0.getZ() != t1.getZ()) ||
44312            (t0.hasFaces()   != t1.hasFaces()) ||
44313            (t0.hasMipmaps() != t1.hasMipmaps())) {
44314            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44315        }
44316
44317        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44318        aout.setAutoPadding(true);
44319        reduce(mExportReduceIdx_my_ushort_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
44320        return new result_int(aout);
44321    }
44322
44323    private final static int mExportReduceIdx_my_ushort_MyStruct_1 = 671;
44324    // ain1 = "ushort a"
44325    // ain2 = "/* struct <> */ b"
44326    public result_int reduce_my_ushort_MyStruct_1(Allocation ain1, Allocation ain2) {
44327        return reduce_my_ushort_MyStruct_1(ain1, ain2, null);
44328    }
44329
44330    // ain1 = "ushort a"
44331    // ain2 = "/* struct <> */ b"
44332    public result_int reduce_my_ushort_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44333        Type t0, t1;
44334        // check ain1
44335        if (!ain1.getType().getElement().isCompatible(__U16)) {
44336            throw new RSRuntimeException("Type mismatch with U16!");
44337        }
44338        // check ain2
44339        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
44340            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
44341        }
44342        // Verify dimensions
44343        t0 = ain1.getType();
44344        t1 = ain2.getType();
44345        if ((t0.getCount() != t1.getCount()) ||
44346            (t0.getX() != t1.getX()) ||
44347            (t0.getY() != t1.getY()) ||
44348            (t0.getZ() != t1.getZ()) ||
44349            (t0.hasFaces()   != t1.hasFaces()) ||
44350            (t0.hasMipmaps() != t1.hasMipmaps())) {
44351            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44352        }
44353
44354        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44355        aout.setAutoPadding(true);
44356        reduce(mExportReduceIdx_my_ushort_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
44357        return new result_int(aout);
44358    }
44359
44360    private final static int mExportReduceIdx_my_ushort2_half_0 = 672;
44361    // in1 = "a", flattened 2-vectors
44362    // in2 = "b"
44363    public result_int reduce_my_ushort2_half_0(short[] in1, short[] in2) {
44364        // Verify that "in1" is non-null.
44365        if (in1 == null) {
44366            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44367        }
44368        // Verify that the array length is a multiple of the vector size.
44369        if (in1.length % 2 != 0) {
44370            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44371        }
44372        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44373        ain1.setAutoPadding(true);
44374        ain1.copyFrom(in1);
44375        // Verify that "in2" is non-null.
44376        if (in2 == null) {
44377            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44378        }
44379        // Verify that input array lengths are the same.
44380        if (in1.length / 2 != in2.length) {
44381            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44382        }
44383        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
44384        ain2.setAutoPadding(true);
44385        ain2.copyFrom(in2);
44386
44387        result_int result = reduce_my_ushort2_half_0(ain1, ain2, null);
44388        result.mTempIns = new Allocation[]{ain1, ain2};
44389        return result;
44390    }
44391
44392    // ain1 = "ushort2 a"
44393    // ain2 = "half b"
44394    public result_int reduce_my_ushort2_half_0(Allocation ain1, Allocation ain2) {
44395        return reduce_my_ushort2_half_0(ain1, ain2, null);
44396    }
44397
44398    // ain1 = "ushort2 a"
44399    // ain2 = "half b"
44400    public result_int reduce_my_ushort2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44401        Type t0, t1;
44402        // check ain1
44403        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44404            throw new RSRuntimeException("Type mismatch with U16_2!");
44405        }
44406        // check ain2
44407        if (!ain2.getType().getElement().isCompatible(__F16)) {
44408            throw new RSRuntimeException("Type mismatch with F16!");
44409        }
44410        // Verify dimensions
44411        t0 = ain1.getType();
44412        t1 = ain2.getType();
44413        if ((t0.getCount() != t1.getCount()) ||
44414            (t0.getX() != t1.getX()) ||
44415            (t0.getY() != t1.getY()) ||
44416            (t0.getZ() != t1.getZ()) ||
44417            (t0.hasFaces()   != t1.hasFaces()) ||
44418            (t0.hasMipmaps() != t1.hasMipmaps())) {
44419            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44420        }
44421
44422        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44423        aout.setAutoPadding(true);
44424        reduce(mExportReduceIdx_my_ushort2_half_0, new Allocation[]{ain1, ain2}, aout, sc);
44425        return new result_int(aout);
44426    }
44427
44428    private final static int mExportReduceIdx_my_ushort2_half_1 = 673;
44429    // in1 = "a", flattened 2-vectors
44430    // in2 = "b"
44431    public result_int reduce_my_ushort2_half_1(short[] in1, short[] in2) {
44432        // Verify that "in1" is non-null.
44433        if (in1 == null) {
44434            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44435        }
44436        // Verify that the array length is a multiple of the vector size.
44437        if (in1.length % 2 != 0) {
44438            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44439        }
44440        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44441        ain1.setAutoPadding(true);
44442        ain1.copyFrom(in1);
44443        // Verify that "in2" is non-null.
44444        if (in2 == null) {
44445            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44446        }
44447        // Verify that input array lengths are the same.
44448        if (in1.length / 2 != in2.length) {
44449            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44450        }
44451        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
44452        ain2.setAutoPadding(true);
44453        ain2.copyFrom(in2);
44454
44455        result_int result = reduce_my_ushort2_half_1(ain1, ain2, null);
44456        result.mTempIns = new Allocation[]{ain1, ain2};
44457        return result;
44458    }
44459
44460    // ain1 = "ushort2 a"
44461    // ain2 = "half b"
44462    public result_int reduce_my_ushort2_half_1(Allocation ain1, Allocation ain2) {
44463        return reduce_my_ushort2_half_1(ain1, ain2, null);
44464    }
44465
44466    // ain1 = "ushort2 a"
44467    // ain2 = "half b"
44468    public result_int reduce_my_ushort2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44469        Type t0, t1;
44470        // check ain1
44471        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44472            throw new RSRuntimeException("Type mismatch with U16_2!");
44473        }
44474        // check ain2
44475        if (!ain2.getType().getElement().isCompatible(__F16)) {
44476            throw new RSRuntimeException("Type mismatch with F16!");
44477        }
44478        // Verify dimensions
44479        t0 = ain1.getType();
44480        t1 = ain2.getType();
44481        if ((t0.getCount() != t1.getCount()) ||
44482            (t0.getX() != t1.getX()) ||
44483            (t0.getY() != t1.getY()) ||
44484            (t0.getZ() != t1.getZ()) ||
44485            (t0.hasFaces()   != t1.hasFaces()) ||
44486            (t0.hasMipmaps() != t1.hasMipmaps())) {
44487            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44488        }
44489
44490        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44491        aout.setAutoPadding(true);
44492        reduce(mExportReduceIdx_my_ushort2_half_1, new Allocation[]{ain1, ain2}, aout, sc);
44493        return new result_int(aout);
44494    }
44495
44496    private final static int mExportReduceIdx_my_ushort2_half2_0 = 674;
44497    // in1 = "a", flattened 2-vectors
44498    // in2 = "b", flattened 2-vectors
44499    public result_int reduce_my_ushort2_half2_0(short[] in1, short[] in2) {
44500        // Verify that "in1" is non-null.
44501        if (in1 == null) {
44502            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44503        }
44504        // Verify that the array length is a multiple of the vector size.
44505        if (in1.length % 2 != 0) {
44506            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44507        }
44508        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44509        ain1.setAutoPadding(true);
44510        ain1.copyFrom(in1);
44511        // Verify that "in2" is non-null.
44512        if (in2 == null) {
44513            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44514        }
44515        // Verify that the array length is a multiple of the vector size.
44516        if (in2.length % 2 != 0) {
44517            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
44518        }
44519        // Verify that input array lengths are the same.
44520        if (in1.length / 2 != in2.length / 2) {
44521            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44522        }
44523        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
44524        ain2.setAutoPadding(true);
44525        ain2.copyFrom(in2);
44526
44527        result_int result = reduce_my_ushort2_half2_0(ain1, ain2, null);
44528        result.mTempIns = new Allocation[]{ain1, ain2};
44529        return result;
44530    }
44531
44532    // ain1 = "ushort2 a"
44533    // ain2 = "half2 b"
44534    public result_int reduce_my_ushort2_half2_0(Allocation ain1, Allocation ain2) {
44535        return reduce_my_ushort2_half2_0(ain1, ain2, null);
44536    }
44537
44538    // ain1 = "ushort2 a"
44539    // ain2 = "half2 b"
44540    public result_int reduce_my_ushort2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44541        Type t0, t1;
44542        // check ain1
44543        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44544            throw new RSRuntimeException("Type mismatch with U16_2!");
44545        }
44546        // check ain2
44547        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
44548            throw new RSRuntimeException("Type mismatch with F16_2!");
44549        }
44550        // Verify dimensions
44551        t0 = ain1.getType();
44552        t1 = ain2.getType();
44553        if ((t0.getCount() != t1.getCount()) ||
44554            (t0.getX() != t1.getX()) ||
44555            (t0.getY() != t1.getY()) ||
44556            (t0.getZ() != t1.getZ()) ||
44557            (t0.hasFaces()   != t1.hasFaces()) ||
44558            (t0.hasMipmaps() != t1.hasMipmaps())) {
44559            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44560        }
44561
44562        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44563        aout.setAutoPadding(true);
44564        reduce(mExportReduceIdx_my_ushort2_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
44565        return new result_int(aout);
44566    }
44567
44568    private final static int mExportReduceIdx_my_ushort2_half2_1 = 675;
44569    // in1 = "a", flattened 2-vectors
44570    // in2 = "b", flattened 2-vectors
44571    public result_int reduce_my_ushort2_half2_1(short[] in1, short[] in2) {
44572        // Verify that "in1" is non-null.
44573        if (in1 == null) {
44574            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44575        }
44576        // Verify that the array length is a multiple of the vector size.
44577        if (in1.length % 2 != 0) {
44578            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44579        }
44580        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44581        ain1.setAutoPadding(true);
44582        ain1.copyFrom(in1);
44583        // Verify that "in2" is non-null.
44584        if (in2 == null) {
44585            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44586        }
44587        // Verify that the array length is a multiple of the vector size.
44588        if (in2.length % 2 != 0) {
44589            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
44590        }
44591        // Verify that input array lengths are the same.
44592        if (in1.length / 2 != in2.length / 2) {
44593            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44594        }
44595        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
44596        ain2.setAutoPadding(true);
44597        ain2.copyFrom(in2);
44598
44599        result_int result = reduce_my_ushort2_half2_1(ain1, ain2, null);
44600        result.mTempIns = new Allocation[]{ain1, ain2};
44601        return result;
44602    }
44603
44604    // ain1 = "ushort2 a"
44605    // ain2 = "half2 b"
44606    public result_int reduce_my_ushort2_half2_1(Allocation ain1, Allocation ain2) {
44607        return reduce_my_ushort2_half2_1(ain1, ain2, null);
44608    }
44609
44610    // ain1 = "ushort2 a"
44611    // ain2 = "half2 b"
44612    public result_int reduce_my_ushort2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44613        Type t0, t1;
44614        // check ain1
44615        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44616            throw new RSRuntimeException("Type mismatch with U16_2!");
44617        }
44618        // check ain2
44619        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
44620            throw new RSRuntimeException("Type mismatch with F16_2!");
44621        }
44622        // Verify dimensions
44623        t0 = ain1.getType();
44624        t1 = ain2.getType();
44625        if ((t0.getCount() != t1.getCount()) ||
44626            (t0.getX() != t1.getX()) ||
44627            (t0.getY() != t1.getY()) ||
44628            (t0.getZ() != t1.getZ()) ||
44629            (t0.hasFaces()   != t1.hasFaces()) ||
44630            (t0.hasMipmaps() != t1.hasMipmaps())) {
44631            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44632        }
44633
44634        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44635        aout.setAutoPadding(true);
44636        reduce(mExportReduceIdx_my_ushort2_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
44637        return new result_int(aout);
44638    }
44639
44640    private final static int mExportReduceIdx_my_ushort2_half4_0 = 676;
44641    // in1 = "a", flattened 2-vectors
44642    // in2 = "b", flattened 4-vectors
44643    public result_int reduce_my_ushort2_half4_0(short[] in1, short[] in2) {
44644        // Verify that "in1" is non-null.
44645        if (in1 == null) {
44646            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44647        }
44648        // Verify that the array length is a multiple of the vector size.
44649        if (in1.length % 2 != 0) {
44650            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44651        }
44652        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44653        ain1.setAutoPadding(true);
44654        ain1.copyFrom(in1);
44655        // Verify that "in2" is non-null.
44656        if (in2 == null) {
44657            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44658        }
44659        // Verify that the array length is a multiple of the vector size.
44660        if (in2.length % 4 != 0) {
44661            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
44662        }
44663        // Verify that input array lengths are the same.
44664        if (in1.length / 2 != in2.length / 4) {
44665            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44666        }
44667        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
44668        ain2.setAutoPadding(true);
44669        ain2.copyFrom(in2);
44670
44671        result_int result = reduce_my_ushort2_half4_0(ain1, ain2, null);
44672        result.mTempIns = new Allocation[]{ain1, ain2};
44673        return result;
44674    }
44675
44676    // ain1 = "ushort2 a"
44677    // ain2 = "half4 b"
44678    public result_int reduce_my_ushort2_half4_0(Allocation ain1, Allocation ain2) {
44679        return reduce_my_ushort2_half4_0(ain1, ain2, null);
44680    }
44681
44682    // ain1 = "ushort2 a"
44683    // ain2 = "half4 b"
44684    public result_int reduce_my_ushort2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44685        Type t0, t1;
44686        // check ain1
44687        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44688            throw new RSRuntimeException("Type mismatch with U16_2!");
44689        }
44690        // check ain2
44691        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
44692            throw new RSRuntimeException("Type mismatch with F16_4!");
44693        }
44694        // Verify dimensions
44695        t0 = ain1.getType();
44696        t1 = ain2.getType();
44697        if ((t0.getCount() != t1.getCount()) ||
44698            (t0.getX() != t1.getX()) ||
44699            (t0.getY() != t1.getY()) ||
44700            (t0.getZ() != t1.getZ()) ||
44701            (t0.hasFaces()   != t1.hasFaces()) ||
44702            (t0.hasMipmaps() != t1.hasMipmaps())) {
44703            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44704        }
44705
44706        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44707        aout.setAutoPadding(true);
44708        reduce(mExportReduceIdx_my_ushort2_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
44709        return new result_int(aout);
44710    }
44711
44712    private final static int mExportReduceIdx_my_ushort2_half4_1 = 677;
44713    // in1 = "a", flattened 2-vectors
44714    // in2 = "b", flattened 4-vectors
44715    public result_int reduce_my_ushort2_half4_1(short[] in1, short[] in2) {
44716        // Verify that "in1" is non-null.
44717        if (in1 == null) {
44718            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44719        }
44720        // Verify that the array length is a multiple of the vector size.
44721        if (in1.length % 2 != 0) {
44722            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44723        }
44724        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44725        ain1.setAutoPadding(true);
44726        ain1.copyFrom(in1);
44727        // Verify that "in2" is non-null.
44728        if (in2 == null) {
44729            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44730        }
44731        // Verify that the array length is a multiple of the vector size.
44732        if (in2.length % 4 != 0) {
44733            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
44734        }
44735        // Verify that input array lengths are the same.
44736        if (in1.length / 2 != in2.length / 4) {
44737            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44738        }
44739        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
44740        ain2.setAutoPadding(true);
44741        ain2.copyFrom(in2);
44742
44743        result_int result = reduce_my_ushort2_half4_1(ain1, ain2, null);
44744        result.mTempIns = new Allocation[]{ain1, ain2};
44745        return result;
44746    }
44747
44748    // ain1 = "ushort2 a"
44749    // ain2 = "half4 b"
44750    public result_int reduce_my_ushort2_half4_1(Allocation ain1, Allocation ain2) {
44751        return reduce_my_ushort2_half4_1(ain1, ain2, null);
44752    }
44753
44754    // ain1 = "ushort2 a"
44755    // ain2 = "half4 b"
44756    public result_int reduce_my_ushort2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44757        Type t0, t1;
44758        // check ain1
44759        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44760            throw new RSRuntimeException("Type mismatch with U16_2!");
44761        }
44762        // check ain2
44763        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
44764            throw new RSRuntimeException("Type mismatch with F16_4!");
44765        }
44766        // Verify dimensions
44767        t0 = ain1.getType();
44768        t1 = ain2.getType();
44769        if ((t0.getCount() != t1.getCount()) ||
44770            (t0.getX() != t1.getX()) ||
44771            (t0.getY() != t1.getY()) ||
44772            (t0.getZ() != t1.getZ()) ||
44773            (t0.hasFaces()   != t1.hasFaces()) ||
44774            (t0.hasMipmaps() != t1.hasMipmaps())) {
44775            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44776        }
44777
44778        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44779        aout.setAutoPadding(true);
44780        reduce(mExportReduceIdx_my_ushort2_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
44781        return new result_int(aout);
44782    }
44783
44784    private final static int mExportReduceIdx_my_ushort2_float_0 = 678;
44785    // in1 = "a", flattened 2-vectors
44786    // in2 = "b"
44787    public result_int reduce_my_ushort2_float_0(short[] in1, float[] in2) {
44788        // Verify that "in1" is non-null.
44789        if (in1 == null) {
44790            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44791        }
44792        // Verify that the array length is a multiple of the vector size.
44793        if (in1.length % 2 != 0) {
44794            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44795        }
44796        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44797        ain1.setAutoPadding(true);
44798        ain1.copyFrom(in1);
44799        // Verify that "in2" is non-null.
44800        if (in2 == null) {
44801            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44802        }
44803        // Verify that input array lengths are the same.
44804        if (in1.length / 2 != in2.length) {
44805            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44806        }
44807        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
44808        ain2.setAutoPadding(true);
44809        ain2.copyFrom(in2);
44810
44811        result_int result = reduce_my_ushort2_float_0(ain1, ain2, null);
44812        result.mTempIns = new Allocation[]{ain1, ain2};
44813        return result;
44814    }
44815
44816    // ain1 = "ushort2 a"
44817    // ain2 = "float b"
44818    public result_int reduce_my_ushort2_float_0(Allocation ain1, Allocation ain2) {
44819        return reduce_my_ushort2_float_0(ain1, ain2, null);
44820    }
44821
44822    // ain1 = "ushort2 a"
44823    // ain2 = "float b"
44824    public result_int reduce_my_ushort2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44825        Type t0, t1;
44826        // check ain1
44827        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44828            throw new RSRuntimeException("Type mismatch with U16_2!");
44829        }
44830        // check ain2
44831        if (!ain2.getType().getElement().isCompatible(__F32)) {
44832            throw new RSRuntimeException("Type mismatch with F32!");
44833        }
44834        // Verify dimensions
44835        t0 = ain1.getType();
44836        t1 = ain2.getType();
44837        if ((t0.getCount() != t1.getCount()) ||
44838            (t0.getX() != t1.getX()) ||
44839            (t0.getY() != t1.getY()) ||
44840            (t0.getZ() != t1.getZ()) ||
44841            (t0.hasFaces()   != t1.hasFaces()) ||
44842            (t0.hasMipmaps() != t1.hasMipmaps())) {
44843            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44844        }
44845
44846        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44847        aout.setAutoPadding(true);
44848        reduce(mExportReduceIdx_my_ushort2_float_0, new Allocation[]{ain1, ain2}, aout, sc);
44849        return new result_int(aout);
44850    }
44851
44852    private final static int mExportReduceIdx_my_ushort2_float_1 = 679;
44853    // in1 = "a", flattened 2-vectors
44854    // in2 = "b"
44855    public result_int reduce_my_ushort2_float_1(short[] in1, float[] in2) {
44856        // Verify that "in1" is non-null.
44857        if (in1 == null) {
44858            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44859        }
44860        // Verify that the array length is a multiple of the vector size.
44861        if (in1.length % 2 != 0) {
44862            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44863        }
44864        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44865        ain1.setAutoPadding(true);
44866        ain1.copyFrom(in1);
44867        // Verify that "in2" is non-null.
44868        if (in2 == null) {
44869            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44870        }
44871        // Verify that input array lengths are the same.
44872        if (in1.length / 2 != in2.length) {
44873            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44874        }
44875        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
44876        ain2.setAutoPadding(true);
44877        ain2.copyFrom(in2);
44878
44879        result_int result = reduce_my_ushort2_float_1(ain1, ain2, null);
44880        result.mTempIns = new Allocation[]{ain1, ain2};
44881        return result;
44882    }
44883
44884    // ain1 = "ushort2 a"
44885    // ain2 = "float b"
44886    public result_int reduce_my_ushort2_float_1(Allocation ain1, Allocation ain2) {
44887        return reduce_my_ushort2_float_1(ain1, ain2, null);
44888    }
44889
44890    // ain1 = "ushort2 a"
44891    // ain2 = "float b"
44892    public result_int reduce_my_ushort2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44893        Type t0, t1;
44894        // check ain1
44895        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44896            throw new RSRuntimeException("Type mismatch with U16_2!");
44897        }
44898        // check ain2
44899        if (!ain2.getType().getElement().isCompatible(__F32)) {
44900            throw new RSRuntimeException("Type mismatch with F32!");
44901        }
44902        // Verify dimensions
44903        t0 = ain1.getType();
44904        t1 = ain2.getType();
44905        if ((t0.getCount() != t1.getCount()) ||
44906            (t0.getX() != t1.getX()) ||
44907            (t0.getY() != t1.getY()) ||
44908            (t0.getZ() != t1.getZ()) ||
44909            (t0.hasFaces()   != t1.hasFaces()) ||
44910            (t0.hasMipmaps() != t1.hasMipmaps())) {
44911            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44912        }
44913
44914        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44915        aout.setAutoPadding(true);
44916        reduce(mExportReduceIdx_my_ushort2_float_1, new Allocation[]{ain1, ain2}, aout, sc);
44917        return new result_int(aout);
44918    }
44919
44920    private final static int mExportReduceIdx_my_ushort2_float2_0 = 680;
44921    // in1 = "a", flattened 2-vectors
44922    // in2 = "b", flattened 2-vectors
44923    public result_int reduce_my_ushort2_float2_0(short[] in1, float[] in2) {
44924        // Verify that "in1" is non-null.
44925        if (in1 == null) {
44926            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44927        }
44928        // Verify that the array length is a multiple of the vector size.
44929        if (in1.length % 2 != 0) {
44930            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
44931        }
44932        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
44933        ain1.setAutoPadding(true);
44934        ain1.copyFrom(in1);
44935        // Verify that "in2" is non-null.
44936        if (in2 == null) {
44937            throw new RSIllegalArgumentException("Array \"in2\" is null!");
44938        }
44939        // Verify that the array length is a multiple of the vector size.
44940        if (in2.length % 2 != 0) {
44941            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
44942        }
44943        // Verify that input array lengths are the same.
44944        if (in1.length / 2 != in2.length / 2) {
44945            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
44946        }
44947        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
44948        ain2.setAutoPadding(true);
44949        ain2.copyFrom(in2);
44950
44951        result_int result = reduce_my_ushort2_float2_0(ain1, ain2, null);
44952        result.mTempIns = new Allocation[]{ain1, ain2};
44953        return result;
44954    }
44955
44956    // ain1 = "ushort2 a"
44957    // ain2 = "float2 b"
44958    public result_int reduce_my_ushort2_float2_0(Allocation ain1, Allocation ain2) {
44959        return reduce_my_ushort2_float2_0(ain1, ain2, null);
44960    }
44961
44962    // ain1 = "ushort2 a"
44963    // ain2 = "float2 b"
44964    public result_int reduce_my_ushort2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
44965        Type t0, t1;
44966        // check ain1
44967        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
44968            throw new RSRuntimeException("Type mismatch with U16_2!");
44969        }
44970        // check ain2
44971        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
44972            throw new RSRuntimeException("Type mismatch with F32_2!");
44973        }
44974        // Verify dimensions
44975        t0 = ain1.getType();
44976        t1 = ain2.getType();
44977        if ((t0.getCount() != t1.getCount()) ||
44978            (t0.getX() != t1.getX()) ||
44979            (t0.getY() != t1.getY()) ||
44980            (t0.getZ() != t1.getZ()) ||
44981            (t0.hasFaces()   != t1.hasFaces()) ||
44982            (t0.hasMipmaps() != t1.hasMipmaps())) {
44983            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
44984        }
44985
44986        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
44987        aout.setAutoPadding(true);
44988        reduce(mExportReduceIdx_my_ushort2_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
44989        return new result_int(aout);
44990    }
44991
44992    private final static int mExportReduceIdx_my_ushort2_float2_1 = 681;
44993    // in1 = "a", flattened 2-vectors
44994    // in2 = "b", flattened 2-vectors
44995    public result_int reduce_my_ushort2_float2_1(short[] in1, float[] in2) {
44996        // Verify that "in1" is non-null.
44997        if (in1 == null) {
44998            throw new RSIllegalArgumentException("Array \"in1\" is null!");
44999        }
45000        // Verify that the array length is a multiple of the vector size.
45001        if (in1.length % 2 != 0) {
45002            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45003        }
45004        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45005        ain1.setAutoPadding(true);
45006        ain1.copyFrom(in1);
45007        // Verify that "in2" is non-null.
45008        if (in2 == null) {
45009            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45010        }
45011        // Verify that the array length is a multiple of the vector size.
45012        if (in2.length % 2 != 0) {
45013            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
45014        }
45015        // Verify that input array lengths are the same.
45016        if (in1.length / 2 != in2.length / 2) {
45017            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45018        }
45019        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
45020        ain2.setAutoPadding(true);
45021        ain2.copyFrom(in2);
45022
45023        result_int result = reduce_my_ushort2_float2_1(ain1, ain2, null);
45024        result.mTempIns = new Allocation[]{ain1, ain2};
45025        return result;
45026    }
45027
45028    // ain1 = "ushort2 a"
45029    // ain2 = "float2 b"
45030    public result_int reduce_my_ushort2_float2_1(Allocation ain1, Allocation ain2) {
45031        return reduce_my_ushort2_float2_1(ain1, ain2, null);
45032    }
45033
45034    // ain1 = "ushort2 a"
45035    // ain2 = "float2 b"
45036    public result_int reduce_my_ushort2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45037        Type t0, t1;
45038        // check ain1
45039        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45040            throw new RSRuntimeException("Type mismatch with U16_2!");
45041        }
45042        // check ain2
45043        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
45044            throw new RSRuntimeException("Type mismatch with F32_2!");
45045        }
45046        // Verify dimensions
45047        t0 = ain1.getType();
45048        t1 = ain2.getType();
45049        if ((t0.getCount() != t1.getCount()) ||
45050            (t0.getX() != t1.getX()) ||
45051            (t0.getY() != t1.getY()) ||
45052            (t0.getZ() != t1.getZ()) ||
45053            (t0.hasFaces()   != t1.hasFaces()) ||
45054            (t0.hasMipmaps() != t1.hasMipmaps())) {
45055            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45056        }
45057
45058        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45059        aout.setAutoPadding(true);
45060        reduce(mExportReduceIdx_my_ushort2_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
45061        return new result_int(aout);
45062    }
45063
45064    private final static int mExportReduceIdx_my_ushort2_float4_0 = 682;
45065    // in1 = "a", flattened 2-vectors
45066    // in2 = "b", flattened 4-vectors
45067    public result_int reduce_my_ushort2_float4_0(short[] in1, float[] in2) {
45068        // Verify that "in1" is non-null.
45069        if (in1 == null) {
45070            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45071        }
45072        // Verify that the array length is a multiple of the vector size.
45073        if (in1.length % 2 != 0) {
45074            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45075        }
45076        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45077        ain1.setAutoPadding(true);
45078        ain1.copyFrom(in1);
45079        // Verify that "in2" is non-null.
45080        if (in2 == null) {
45081            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45082        }
45083        // Verify that the array length is a multiple of the vector size.
45084        if (in2.length % 4 != 0) {
45085            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
45086        }
45087        // Verify that input array lengths are the same.
45088        if (in1.length / 2 != in2.length / 4) {
45089            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45090        }
45091        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
45092        ain2.setAutoPadding(true);
45093        ain2.copyFrom(in2);
45094
45095        result_int result = reduce_my_ushort2_float4_0(ain1, ain2, null);
45096        result.mTempIns = new Allocation[]{ain1, ain2};
45097        return result;
45098    }
45099
45100    // ain1 = "ushort2 a"
45101    // ain2 = "float4 b"
45102    public result_int reduce_my_ushort2_float4_0(Allocation ain1, Allocation ain2) {
45103        return reduce_my_ushort2_float4_0(ain1, ain2, null);
45104    }
45105
45106    // ain1 = "ushort2 a"
45107    // ain2 = "float4 b"
45108    public result_int reduce_my_ushort2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45109        Type t0, t1;
45110        // check ain1
45111        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45112            throw new RSRuntimeException("Type mismatch with U16_2!");
45113        }
45114        // check ain2
45115        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
45116            throw new RSRuntimeException("Type mismatch with F32_4!");
45117        }
45118        // Verify dimensions
45119        t0 = ain1.getType();
45120        t1 = ain2.getType();
45121        if ((t0.getCount() != t1.getCount()) ||
45122            (t0.getX() != t1.getX()) ||
45123            (t0.getY() != t1.getY()) ||
45124            (t0.getZ() != t1.getZ()) ||
45125            (t0.hasFaces()   != t1.hasFaces()) ||
45126            (t0.hasMipmaps() != t1.hasMipmaps())) {
45127            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45128        }
45129
45130        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45131        aout.setAutoPadding(true);
45132        reduce(mExportReduceIdx_my_ushort2_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
45133        return new result_int(aout);
45134    }
45135
45136    private final static int mExportReduceIdx_my_ushort2_float4_1 = 683;
45137    // in1 = "a", flattened 2-vectors
45138    // in2 = "b", flattened 4-vectors
45139    public result_int reduce_my_ushort2_float4_1(short[] in1, float[] in2) {
45140        // Verify that "in1" is non-null.
45141        if (in1 == null) {
45142            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45143        }
45144        // Verify that the array length is a multiple of the vector size.
45145        if (in1.length % 2 != 0) {
45146            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45147        }
45148        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45149        ain1.setAutoPadding(true);
45150        ain1.copyFrom(in1);
45151        // Verify that "in2" is non-null.
45152        if (in2 == null) {
45153            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45154        }
45155        // Verify that the array length is a multiple of the vector size.
45156        if (in2.length % 4 != 0) {
45157            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
45158        }
45159        // Verify that input array lengths are the same.
45160        if (in1.length / 2 != in2.length / 4) {
45161            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45162        }
45163        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
45164        ain2.setAutoPadding(true);
45165        ain2.copyFrom(in2);
45166
45167        result_int result = reduce_my_ushort2_float4_1(ain1, ain2, null);
45168        result.mTempIns = new Allocation[]{ain1, ain2};
45169        return result;
45170    }
45171
45172    // ain1 = "ushort2 a"
45173    // ain2 = "float4 b"
45174    public result_int reduce_my_ushort2_float4_1(Allocation ain1, Allocation ain2) {
45175        return reduce_my_ushort2_float4_1(ain1, ain2, null);
45176    }
45177
45178    // ain1 = "ushort2 a"
45179    // ain2 = "float4 b"
45180    public result_int reduce_my_ushort2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45181        Type t0, t1;
45182        // check ain1
45183        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45184            throw new RSRuntimeException("Type mismatch with U16_2!");
45185        }
45186        // check ain2
45187        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
45188            throw new RSRuntimeException("Type mismatch with F32_4!");
45189        }
45190        // Verify dimensions
45191        t0 = ain1.getType();
45192        t1 = ain2.getType();
45193        if ((t0.getCount() != t1.getCount()) ||
45194            (t0.getX() != t1.getX()) ||
45195            (t0.getY() != t1.getY()) ||
45196            (t0.getZ() != t1.getZ()) ||
45197            (t0.hasFaces()   != t1.hasFaces()) ||
45198            (t0.hasMipmaps() != t1.hasMipmaps())) {
45199            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45200        }
45201
45202        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45203        aout.setAutoPadding(true);
45204        reduce(mExportReduceIdx_my_ushort2_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
45205        return new result_int(aout);
45206    }
45207
45208    private final static int mExportReduceIdx_my_ushort2_char_0 = 684;
45209    // in1 = "a", flattened 2-vectors
45210    // in2 = "b"
45211    public result_int reduce_my_ushort2_char_0(short[] in1, byte[] in2) {
45212        // Verify that "in1" is non-null.
45213        if (in1 == null) {
45214            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45215        }
45216        // Verify that the array length is a multiple of the vector size.
45217        if (in1.length % 2 != 0) {
45218            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45219        }
45220        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45221        ain1.setAutoPadding(true);
45222        ain1.copyFrom(in1);
45223        // Verify that "in2" is non-null.
45224        if (in2 == null) {
45225            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45226        }
45227        // Verify that input array lengths are the same.
45228        if (in1.length / 2 != in2.length) {
45229            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45230        }
45231        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
45232        ain2.setAutoPadding(true);
45233        ain2.copyFrom(in2);
45234
45235        result_int result = reduce_my_ushort2_char_0(ain1, ain2, null);
45236        result.mTempIns = new Allocation[]{ain1, ain2};
45237        return result;
45238    }
45239
45240    // ain1 = "ushort2 a"
45241    // ain2 = "char b"
45242    public result_int reduce_my_ushort2_char_0(Allocation ain1, Allocation ain2) {
45243        return reduce_my_ushort2_char_0(ain1, ain2, null);
45244    }
45245
45246    // ain1 = "ushort2 a"
45247    // ain2 = "char b"
45248    public result_int reduce_my_ushort2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45249        Type t0, t1;
45250        // check ain1
45251        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45252            throw new RSRuntimeException("Type mismatch with U16_2!");
45253        }
45254        // check ain2
45255        if (!ain2.getType().getElement().isCompatible(__I8)) {
45256            throw new RSRuntimeException("Type mismatch with I8!");
45257        }
45258        // Verify dimensions
45259        t0 = ain1.getType();
45260        t1 = ain2.getType();
45261        if ((t0.getCount() != t1.getCount()) ||
45262            (t0.getX() != t1.getX()) ||
45263            (t0.getY() != t1.getY()) ||
45264            (t0.getZ() != t1.getZ()) ||
45265            (t0.hasFaces()   != t1.hasFaces()) ||
45266            (t0.hasMipmaps() != t1.hasMipmaps())) {
45267            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45268        }
45269
45270        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45271        aout.setAutoPadding(true);
45272        reduce(mExportReduceIdx_my_ushort2_char_0, new Allocation[]{ain1, ain2}, aout, sc);
45273        return new result_int(aout);
45274    }
45275
45276    private final static int mExportReduceIdx_my_ushort2_char_1 = 685;
45277    // in1 = "a", flattened 2-vectors
45278    // in2 = "b"
45279    public result_int reduce_my_ushort2_char_1(short[] in1, byte[] in2) {
45280        // Verify that "in1" is non-null.
45281        if (in1 == null) {
45282            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45283        }
45284        // Verify that the array length is a multiple of the vector size.
45285        if (in1.length % 2 != 0) {
45286            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45287        }
45288        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45289        ain1.setAutoPadding(true);
45290        ain1.copyFrom(in1);
45291        // Verify that "in2" is non-null.
45292        if (in2 == null) {
45293            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45294        }
45295        // Verify that input array lengths are the same.
45296        if (in1.length / 2 != in2.length) {
45297            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45298        }
45299        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
45300        ain2.setAutoPadding(true);
45301        ain2.copyFrom(in2);
45302
45303        result_int result = reduce_my_ushort2_char_1(ain1, ain2, null);
45304        result.mTempIns = new Allocation[]{ain1, ain2};
45305        return result;
45306    }
45307
45308    // ain1 = "ushort2 a"
45309    // ain2 = "char b"
45310    public result_int reduce_my_ushort2_char_1(Allocation ain1, Allocation ain2) {
45311        return reduce_my_ushort2_char_1(ain1, ain2, null);
45312    }
45313
45314    // ain1 = "ushort2 a"
45315    // ain2 = "char b"
45316    public result_int reduce_my_ushort2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45317        Type t0, t1;
45318        // check ain1
45319        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45320            throw new RSRuntimeException("Type mismatch with U16_2!");
45321        }
45322        // check ain2
45323        if (!ain2.getType().getElement().isCompatible(__I8)) {
45324            throw new RSRuntimeException("Type mismatch with I8!");
45325        }
45326        // Verify dimensions
45327        t0 = ain1.getType();
45328        t1 = ain2.getType();
45329        if ((t0.getCount() != t1.getCount()) ||
45330            (t0.getX() != t1.getX()) ||
45331            (t0.getY() != t1.getY()) ||
45332            (t0.getZ() != t1.getZ()) ||
45333            (t0.hasFaces()   != t1.hasFaces()) ||
45334            (t0.hasMipmaps() != t1.hasMipmaps())) {
45335            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45336        }
45337
45338        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45339        aout.setAutoPadding(true);
45340        reduce(mExportReduceIdx_my_ushort2_char_1, new Allocation[]{ain1, ain2}, aout, sc);
45341        return new result_int(aout);
45342    }
45343
45344    private final static int mExportReduceIdx_my_ushort2_char2_0 = 686;
45345    // in1 = "a", flattened 2-vectors
45346    // in2 = "b", flattened 2-vectors
45347    public result_int reduce_my_ushort2_char2_0(short[] in1, byte[] in2) {
45348        // Verify that "in1" is non-null.
45349        if (in1 == null) {
45350            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45351        }
45352        // Verify that the array length is a multiple of the vector size.
45353        if (in1.length % 2 != 0) {
45354            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45355        }
45356        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45357        ain1.setAutoPadding(true);
45358        ain1.copyFrom(in1);
45359        // Verify that "in2" is non-null.
45360        if (in2 == null) {
45361            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45362        }
45363        // Verify that the array length is a multiple of the vector size.
45364        if (in2.length % 2 != 0) {
45365            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
45366        }
45367        // Verify that input array lengths are the same.
45368        if (in1.length / 2 != in2.length / 2) {
45369            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45370        }
45371        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
45372        ain2.setAutoPadding(true);
45373        ain2.copyFrom(in2);
45374
45375        result_int result = reduce_my_ushort2_char2_0(ain1, ain2, null);
45376        result.mTempIns = new Allocation[]{ain1, ain2};
45377        return result;
45378    }
45379
45380    // ain1 = "ushort2 a"
45381    // ain2 = "char2 b"
45382    public result_int reduce_my_ushort2_char2_0(Allocation ain1, Allocation ain2) {
45383        return reduce_my_ushort2_char2_0(ain1, ain2, null);
45384    }
45385
45386    // ain1 = "ushort2 a"
45387    // ain2 = "char2 b"
45388    public result_int reduce_my_ushort2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45389        Type t0, t1;
45390        // check ain1
45391        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45392            throw new RSRuntimeException("Type mismatch with U16_2!");
45393        }
45394        // check ain2
45395        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
45396            throw new RSRuntimeException("Type mismatch with I8_2!");
45397        }
45398        // Verify dimensions
45399        t0 = ain1.getType();
45400        t1 = ain2.getType();
45401        if ((t0.getCount() != t1.getCount()) ||
45402            (t0.getX() != t1.getX()) ||
45403            (t0.getY() != t1.getY()) ||
45404            (t0.getZ() != t1.getZ()) ||
45405            (t0.hasFaces()   != t1.hasFaces()) ||
45406            (t0.hasMipmaps() != t1.hasMipmaps())) {
45407            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45408        }
45409
45410        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45411        aout.setAutoPadding(true);
45412        reduce(mExportReduceIdx_my_ushort2_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
45413        return new result_int(aout);
45414    }
45415
45416    private final static int mExportReduceIdx_my_ushort2_char2_1 = 687;
45417    // in1 = "a", flattened 2-vectors
45418    // in2 = "b", flattened 2-vectors
45419    public result_int reduce_my_ushort2_char2_1(short[] in1, byte[] in2) {
45420        // Verify that "in1" is non-null.
45421        if (in1 == null) {
45422            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45423        }
45424        // Verify that the array length is a multiple of the vector size.
45425        if (in1.length % 2 != 0) {
45426            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45427        }
45428        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45429        ain1.setAutoPadding(true);
45430        ain1.copyFrom(in1);
45431        // Verify that "in2" is non-null.
45432        if (in2 == null) {
45433            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45434        }
45435        // Verify that the array length is a multiple of the vector size.
45436        if (in2.length % 2 != 0) {
45437            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
45438        }
45439        // Verify that input array lengths are the same.
45440        if (in1.length / 2 != in2.length / 2) {
45441            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45442        }
45443        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
45444        ain2.setAutoPadding(true);
45445        ain2.copyFrom(in2);
45446
45447        result_int result = reduce_my_ushort2_char2_1(ain1, ain2, null);
45448        result.mTempIns = new Allocation[]{ain1, ain2};
45449        return result;
45450    }
45451
45452    // ain1 = "ushort2 a"
45453    // ain2 = "char2 b"
45454    public result_int reduce_my_ushort2_char2_1(Allocation ain1, Allocation ain2) {
45455        return reduce_my_ushort2_char2_1(ain1, ain2, null);
45456    }
45457
45458    // ain1 = "ushort2 a"
45459    // ain2 = "char2 b"
45460    public result_int reduce_my_ushort2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45461        Type t0, t1;
45462        // check ain1
45463        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45464            throw new RSRuntimeException("Type mismatch with U16_2!");
45465        }
45466        // check ain2
45467        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
45468            throw new RSRuntimeException("Type mismatch with I8_2!");
45469        }
45470        // Verify dimensions
45471        t0 = ain1.getType();
45472        t1 = ain2.getType();
45473        if ((t0.getCount() != t1.getCount()) ||
45474            (t0.getX() != t1.getX()) ||
45475            (t0.getY() != t1.getY()) ||
45476            (t0.getZ() != t1.getZ()) ||
45477            (t0.hasFaces()   != t1.hasFaces()) ||
45478            (t0.hasMipmaps() != t1.hasMipmaps())) {
45479            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45480        }
45481
45482        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45483        aout.setAutoPadding(true);
45484        reduce(mExportReduceIdx_my_ushort2_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
45485        return new result_int(aout);
45486    }
45487
45488    private final static int mExportReduceIdx_my_ushort2_char4_0 = 688;
45489    // in1 = "a", flattened 2-vectors
45490    // in2 = "b", flattened 4-vectors
45491    public result_int reduce_my_ushort2_char4_0(short[] in1, byte[] in2) {
45492        // Verify that "in1" is non-null.
45493        if (in1 == null) {
45494            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45495        }
45496        // Verify that the array length is a multiple of the vector size.
45497        if (in1.length % 2 != 0) {
45498            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45499        }
45500        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45501        ain1.setAutoPadding(true);
45502        ain1.copyFrom(in1);
45503        // Verify that "in2" is non-null.
45504        if (in2 == null) {
45505            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45506        }
45507        // Verify that the array length is a multiple of the vector size.
45508        if (in2.length % 4 != 0) {
45509            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
45510        }
45511        // Verify that input array lengths are the same.
45512        if (in1.length / 2 != in2.length / 4) {
45513            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45514        }
45515        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
45516        ain2.setAutoPadding(true);
45517        ain2.copyFrom(in2);
45518
45519        result_int result = reduce_my_ushort2_char4_0(ain1, ain2, null);
45520        result.mTempIns = new Allocation[]{ain1, ain2};
45521        return result;
45522    }
45523
45524    // ain1 = "ushort2 a"
45525    // ain2 = "char4 b"
45526    public result_int reduce_my_ushort2_char4_0(Allocation ain1, Allocation ain2) {
45527        return reduce_my_ushort2_char4_0(ain1, ain2, null);
45528    }
45529
45530    // ain1 = "ushort2 a"
45531    // ain2 = "char4 b"
45532    public result_int reduce_my_ushort2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45533        Type t0, t1;
45534        // check ain1
45535        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45536            throw new RSRuntimeException("Type mismatch with U16_2!");
45537        }
45538        // check ain2
45539        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
45540            throw new RSRuntimeException("Type mismatch with I8_4!");
45541        }
45542        // Verify dimensions
45543        t0 = ain1.getType();
45544        t1 = ain2.getType();
45545        if ((t0.getCount() != t1.getCount()) ||
45546            (t0.getX() != t1.getX()) ||
45547            (t0.getY() != t1.getY()) ||
45548            (t0.getZ() != t1.getZ()) ||
45549            (t0.hasFaces()   != t1.hasFaces()) ||
45550            (t0.hasMipmaps() != t1.hasMipmaps())) {
45551            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45552        }
45553
45554        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45555        aout.setAutoPadding(true);
45556        reduce(mExportReduceIdx_my_ushort2_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
45557        return new result_int(aout);
45558    }
45559
45560    private final static int mExportReduceIdx_my_ushort2_char4_1 = 689;
45561    // in1 = "a", flattened 2-vectors
45562    // in2 = "b", flattened 4-vectors
45563    public result_int reduce_my_ushort2_char4_1(short[] in1, byte[] in2) {
45564        // Verify that "in1" is non-null.
45565        if (in1 == null) {
45566            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45567        }
45568        // Verify that the array length is a multiple of the vector size.
45569        if (in1.length % 2 != 0) {
45570            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45571        }
45572        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45573        ain1.setAutoPadding(true);
45574        ain1.copyFrom(in1);
45575        // Verify that "in2" is non-null.
45576        if (in2 == null) {
45577            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45578        }
45579        // Verify that the array length is a multiple of the vector size.
45580        if (in2.length % 4 != 0) {
45581            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
45582        }
45583        // Verify that input array lengths are the same.
45584        if (in1.length / 2 != in2.length / 4) {
45585            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45586        }
45587        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
45588        ain2.setAutoPadding(true);
45589        ain2.copyFrom(in2);
45590
45591        result_int result = reduce_my_ushort2_char4_1(ain1, ain2, null);
45592        result.mTempIns = new Allocation[]{ain1, ain2};
45593        return result;
45594    }
45595
45596    // ain1 = "ushort2 a"
45597    // ain2 = "char4 b"
45598    public result_int reduce_my_ushort2_char4_1(Allocation ain1, Allocation ain2) {
45599        return reduce_my_ushort2_char4_1(ain1, ain2, null);
45600    }
45601
45602    // ain1 = "ushort2 a"
45603    // ain2 = "char4 b"
45604    public result_int reduce_my_ushort2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45605        Type t0, t1;
45606        // check ain1
45607        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45608            throw new RSRuntimeException("Type mismatch with U16_2!");
45609        }
45610        // check ain2
45611        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
45612            throw new RSRuntimeException("Type mismatch with I8_4!");
45613        }
45614        // Verify dimensions
45615        t0 = ain1.getType();
45616        t1 = ain2.getType();
45617        if ((t0.getCount() != t1.getCount()) ||
45618            (t0.getX() != t1.getX()) ||
45619            (t0.getY() != t1.getY()) ||
45620            (t0.getZ() != t1.getZ()) ||
45621            (t0.hasFaces()   != t1.hasFaces()) ||
45622            (t0.hasMipmaps() != t1.hasMipmaps())) {
45623            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45624        }
45625
45626        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45627        aout.setAutoPadding(true);
45628        reduce(mExportReduceIdx_my_ushort2_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
45629        return new result_int(aout);
45630    }
45631
45632    private final static int mExportReduceIdx_my_ushort2_short_0 = 690;
45633    // in1 = "a", flattened 2-vectors
45634    // in2 = "b"
45635    public result_int reduce_my_ushort2_short_0(short[] in1, short[] in2) {
45636        // Verify that "in1" is non-null.
45637        if (in1 == null) {
45638            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45639        }
45640        // Verify that the array length is a multiple of the vector size.
45641        if (in1.length % 2 != 0) {
45642            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45643        }
45644        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45645        ain1.setAutoPadding(true);
45646        ain1.copyFrom(in1);
45647        // Verify that "in2" is non-null.
45648        if (in2 == null) {
45649            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45650        }
45651        // Verify that input array lengths are the same.
45652        if (in1.length / 2 != in2.length) {
45653            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45654        }
45655        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
45656        ain2.setAutoPadding(true);
45657        ain2.copyFrom(in2);
45658
45659        result_int result = reduce_my_ushort2_short_0(ain1, ain2, null);
45660        result.mTempIns = new Allocation[]{ain1, ain2};
45661        return result;
45662    }
45663
45664    // ain1 = "ushort2 a"
45665    // ain2 = "short b"
45666    public result_int reduce_my_ushort2_short_0(Allocation ain1, Allocation ain2) {
45667        return reduce_my_ushort2_short_0(ain1, ain2, null);
45668    }
45669
45670    // ain1 = "ushort2 a"
45671    // ain2 = "short b"
45672    public result_int reduce_my_ushort2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45673        Type t0, t1;
45674        // check ain1
45675        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45676            throw new RSRuntimeException("Type mismatch with U16_2!");
45677        }
45678        // check ain2
45679        if (!ain2.getType().getElement().isCompatible(__I16)) {
45680            throw new RSRuntimeException("Type mismatch with I16!");
45681        }
45682        // Verify dimensions
45683        t0 = ain1.getType();
45684        t1 = ain2.getType();
45685        if ((t0.getCount() != t1.getCount()) ||
45686            (t0.getX() != t1.getX()) ||
45687            (t0.getY() != t1.getY()) ||
45688            (t0.getZ() != t1.getZ()) ||
45689            (t0.hasFaces()   != t1.hasFaces()) ||
45690            (t0.hasMipmaps() != t1.hasMipmaps())) {
45691            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45692        }
45693
45694        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45695        aout.setAutoPadding(true);
45696        reduce(mExportReduceIdx_my_ushort2_short_0, new Allocation[]{ain1, ain2}, aout, sc);
45697        return new result_int(aout);
45698    }
45699
45700    private final static int mExportReduceIdx_my_ushort2_short_1 = 691;
45701    // in1 = "a", flattened 2-vectors
45702    // in2 = "b"
45703    public result_int reduce_my_ushort2_short_1(short[] in1, short[] in2) {
45704        // Verify that "in1" is non-null.
45705        if (in1 == null) {
45706            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45707        }
45708        // Verify that the array length is a multiple of the vector size.
45709        if (in1.length % 2 != 0) {
45710            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45711        }
45712        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45713        ain1.setAutoPadding(true);
45714        ain1.copyFrom(in1);
45715        // Verify that "in2" is non-null.
45716        if (in2 == null) {
45717            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45718        }
45719        // Verify that input array lengths are the same.
45720        if (in1.length / 2 != in2.length) {
45721            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45722        }
45723        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
45724        ain2.setAutoPadding(true);
45725        ain2.copyFrom(in2);
45726
45727        result_int result = reduce_my_ushort2_short_1(ain1, ain2, null);
45728        result.mTempIns = new Allocation[]{ain1, ain2};
45729        return result;
45730    }
45731
45732    // ain1 = "ushort2 a"
45733    // ain2 = "short b"
45734    public result_int reduce_my_ushort2_short_1(Allocation ain1, Allocation ain2) {
45735        return reduce_my_ushort2_short_1(ain1, ain2, null);
45736    }
45737
45738    // ain1 = "ushort2 a"
45739    // ain2 = "short b"
45740    public result_int reduce_my_ushort2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45741        Type t0, t1;
45742        // check ain1
45743        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45744            throw new RSRuntimeException("Type mismatch with U16_2!");
45745        }
45746        // check ain2
45747        if (!ain2.getType().getElement().isCompatible(__I16)) {
45748            throw new RSRuntimeException("Type mismatch with I16!");
45749        }
45750        // Verify dimensions
45751        t0 = ain1.getType();
45752        t1 = ain2.getType();
45753        if ((t0.getCount() != t1.getCount()) ||
45754            (t0.getX() != t1.getX()) ||
45755            (t0.getY() != t1.getY()) ||
45756            (t0.getZ() != t1.getZ()) ||
45757            (t0.hasFaces()   != t1.hasFaces()) ||
45758            (t0.hasMipmaps() != t1.hasMipmaps())) {
45759            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45760        }
45761
45762        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45763        aout.setAutoPadding(true);
45764        reduce(mExportReduceIdx_my_ushort2_short_1, new Allocation[]{ain1, ain2}, aout, sc);
45765        return new result_int(aout);
45766    }
45767
45768    private final static int mExportReduceIdx_my_ushort2_short2_0 = 692;
45769    // in1 = "a", flattened 2-vectors
45770    // in2 = "b", flattened 2-vectors
45771    public result_int reduce_my_ushort2_short2_0(short[] in1, short[] in2) {
45772        // Verify that "in1" is non-null.
45773        if (in1 == null) {
45774            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45775        }
45776        // Verify that the array length is a multiple of the vector size.
45777        if (in1.length % 2 != 0) {
45778            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45779        }
45780        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45781        ain1.setAutoPadding(true);
45782        ain1.copyFrom(in1);
45783        // Verify that "in2" is non-null.
45784        if (in2 == null) {
45785            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45786        }
45787        // Verify that the array length is a multiple of the vector size.
45788        if (in2.length % 2 != 0) {
45789            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
45790        }
45791        // Verify that input array lengths are the same.
45792        if (in1.length / 2 != in2.length / 2) {
45793            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45794        }
45795        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
45796        ain2.setAutoPadding(true);
45797        ain2.copyFrom(in2);
45798
45799        result_int result = reduce_my_ushort2_short2_0(ain1, ain2, null);
45800        result.mTempIns = new Allocation[]{ain1, ain2};
45801        return result;
45802    }
45803
45804    // ain1 = "ushort2 a"
45805    // ain2 = "short2 b"
45806    public result_int reduce_my_ushort2_short2_0(Allocation ain1, Allocation ain2) {
45807        return reduce_my_ushort2_short2_0(ain1, ain2, null);
45808    }
45809
45810    // ain1 = "ushort2 a"
45811    // ain2 = "short2 b"
45812    public result_int reduce_my_ushort2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45813        Type t0, t1;
45814        // check ain1
45815        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45816            throw new RSRuntimeException("Type mismatch with U16_2!");
45817        }
45818        // check ain2
45819        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
45820            throw new RSRuntimeException("Type mismatch with I16_2!");
45821        }
45822        // Verify dimensions
45823        t0 = ain1.getType();
45824        t1 = ain2.getType();
45825        if ((t0.getCount() != t1.getCount()) ||
45826            (t0.getX() != t1.getX()) ||
45827            (t0.getY() != t1.getY()) ||
45828            (t0.getZ() != t1.getZ()) ||
45829            (t0.hasFaces()   != t1.hasFaces()) ||
45830            (t0.hasMipmaps() != t1.hasMipmaps())) {
45831            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45832        }
45833
45834        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45835        aout.setAutoPadding(true);
45836        reduce(mExportReduceIdx_my_ushort2_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
45837        return new result_int(aout);
45838    }
45839
45840    private final static int mExportReduceIdx_my_ushort2_short2_1 = 693;
45841    // in1 = "a", flattened 2-vectors
45842    // in2 = "b", flattened 2-vectors
45843    public result_int reduce_my_ushort2_short2_1(short[] in1, short[] in2) {
45844        // Verify that "in1" is non-null.
45845        if (in1 == null) {
45846            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45847        }
45848        // Verify that the array length is a multiple of the vector size.
45849        if (in1.length % 2 != 0) {
45850            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45851        }
45852        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45853        ain1.setAutoPadding(true);
45854        ain1.copyFrom(in1);
45855        // Verify that "in2" is non-null.
45856        if (in2 == null) {
45857            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45858        }
45859        // Verify that the array length is a multiple of the vector size.
45860        if (in2.length % 2 != 0) {
45861            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
45862        }
45863        // Verify that input array lengths are the same.
45864        if (in1.length / 2 != in2.length / 2) {
45865            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45866        }
45867        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
45868        ain2.setAutoPadding(true);
45869        ain2.copyFrom(in2);
45870
45871        result_int result = reduce_my_ushort2_short2_1(ain1, ain2, null);
45872        result.mTempIns = new Allocation[]{ain1, ain2};
45873        return result;
45874    }
45875
45876    // ain1 = "ushort2 a"
45877    // ain2 = "short2 b"
45878    public result_int reduce_my_ushort2_short2_1(Allocation ain1, Allocation ain2) {
45879        return reduce_my_ushort2_short2_1(ain1, ain2, null);
45880    }
45881
45882    // ain1 = "ushort2 a"
45883    // ain2 = "short2 b"
45884    public result_int reduce_my_ushort2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45885        Type t0, t1;
45886        // check ain1
45887        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45888            throw new RSRuntimeException("Type mismatch with U16_2!");
45889        }
45890        // check ain2
45891        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
45892            throw new RSRuntimeException("Type mismatch with I16_2!");
45893        }
45894        // Verify dimensions
45895        t0 = ain1.getType();
45896        t1 = ain2.getType();
45897        if ((t0.getCount() != t1.getCount()) ||
45898            (t0.getX() != t1.getX()) ||
45899            (t0.getY() != t1.getY()) ||
45900            (t0.getZ() != t1.getZ()) ||
45901            (t0.hasFaces()   != t1.hasFaces()) ||
45902            (t0.hasMipmaps() != t1.hasMipmaps())) {
45903            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45904        }
45905
45906        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45907        aout.setAutoPadding(true);
45908        reduce(mExportReduceIdx_my_ushort2_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
45909        return new result_int(aout);
45910    }
45911
45912    private final static int mExportReduceIdx_my_ushort2_short4_0 = 694;
45913    // in1 = "a", flattened 2-vectors
45914    // in2 = "b", flattened 4-vectors
45915    public result_int reduce_my_ushort2_short4_0(short[] in1, short[] in2) {
45916        // Verify that "in1" is non-null.
45917        if (in1 == null) {
45918            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45919        }
45920        // Verify that the array length is a multiple of the vector size.
45921        if (in1.length % 2 != 0) {
45922            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45923        }
45924        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45925        ain1.setAutoPadding(true);
45926        ain1.copyFrom(in1);
45927        // Verify that "in2" is non-null.
45928        if (in2 == null) {
45929            throw new RSIllegalArgumentException("Array \"in2\" is null!");
45930        }
45931        // Verify that the array length is a multiple of the vector size.
45932        if (in2.length % 4 != 0) {
45933            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
45934        }
45935        // Verify that input array lengths are the same.
45936        if (in1.length / 2 != in2.length / 4) {
45937            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
45938        }
45939        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
45940        ain2.setAutoPadding(true);
45941        ain2.copyFrom(in2);
45942
45943        result_int result = reduce_my_ushort2_short4_0(ain1, ain2, null);
45944        result.mTempIns = new Allocation[]{ain1, ain2};
45945        return result;
45946    }
45947
45948    // ain1 = "ushort2 a"
45949    // ain2 = "short4 b"
45950    public result_int reduce_my_ushort2_short4_0(Allocation ain1, Allocation ain2) {
45951        return reduce_my_ushort2_short4_0(ain1, ain2, null);
45952    }
45953
45954    // ain1 = "ushort2 a"
45955    // ain2 = "short4 b"
45956    public result_int reduce_my_ushort2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
45957        Type t0, t1;
45958        // check ain1
45959        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
45960            throw new RSRuntimeException("Type mismatch with U16_2!");
45961        }
45962        // check ain2
45963        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
45964            throw new RSRuntimeException("Type mismatch with I16_4!");
45965        }
45966        // Verify dimensions
45967        t0 = ain1.getType();
45968        t1 = ain2.getType();
45969        if ((t0.getCount() != t1.getCount()) ||
45970            (t0.getX() != t1.getX()) ||
45971            (t0.getY() != t1.getY()) ||
45972            (t0.getZ() != t1.getZ()) ||
45973            (t0.hasFaces()   != t1.hasFaces()) ||
45974            (t0.hasMipmaps() != t1.hasMipmaps())) {
45975            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
45976        }
45977
45978        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
45979        aout.setAutoPadding(true);
45980        reduce(mExportReduceIdx_my_ushort2_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
45981        return new result_int(aout);
45982    }
45983
45984    private final static int mExportReduceIdx_my_ushort2_short4_1 = 695;
45985    // in1 = "a", flattened 2-vectors
45986    // in2 = "b", flattened 4-vectors
45987    public result_int reduce_my_ushort2_short4_1(short[] in1, short[] in2) {
45988        // Verify that "in1" is non-null.
45989        if (in1 == null) {
45990            throw new RSIllegalArgumentException("Array \"in1\" is null!");
45991        }
45992        // Verify that the array length is a multiple of the vector size.
45993        if (in1.length % 2 != 0) {
45994            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
45995        }
45996        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
45997        ain1.setAutoPadding(true);
45998        ain1.copyFrom(in1);
45999        // Verify that "in2" is non-null.
46000        if (in2 == null) {
46001            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46002        }
46003        // Verify that the array length is a multiple of the vector size.
46004        if (in2.length % 4 != 0) {
46005            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
46006        }
46007        // Verify that input array lengths are the same.
46008        if (in1.length / 2 != in2.length / 4) {
46009            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46010        }
46011        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
46012        ain2.setAutoPadding(true);
46013        ain2.copyFrom(in2);
46014
46015        result_int result = reduce_my_ushort2_short4_1(ain1, ain2, null);
46016        result.mTempIns = new Allocation[]{ain1, ain2};
46017        return result;
46018    }
46019
46020    // ain1 = "ushort2 a"
46021    // ain2 = "short4 b"
46022    public result_int reduce_my_ushort2_short4_1(Allocation ain1, Allocation ain2) {
46023        return reduce_my_ushort2_short4_1(ain1, ain2, null);
46024    }
46025
46026    // ain1 = "ushort2 a"
46027    // ain2 = "short4 b"
46028    public result_int reduce_my_ushort2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46029        Type t0, t1;
46030        // check ain1
46031        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46032            throw new RSRuntimeException("Type mismatch with U16_2!");
46033        }
46034        // check ain2
46035        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
46036            throw new RSRuntimeException("Type mismatch with I16_4!");
46037        }
46038        // Verify dimensions
46039        t0 = ain1.getType();
46040        t1 = ain2.getType();
46041        if ((t0.getCount() != t1.getCount()) ||
46042            (t0.getX() != t1.getX()) ||
46043            (t0.getY() != t1.getY()) ||
46044            (t0.getZ() != t1.getZ()) ||
46045            (t0.hasFaces()   != t1.hasFaces()) ||
46046            (t0.hasMipmaps() != t1.hasMipmaps())) {
46047            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46048        }
46049
46050        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46051        aout.setAutoPadding(true);
46052        reduce(mExportReduceIdx_my_ushort2_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
46053        return new result_int(aout);
46054    }
46055
46056    private final static int mExportReduceIdx_my_ushort2_uchar_0 = 696;
46057    // in1 = "a", flattened 2-vectors
46058    // in2 = "b"
46059    public result_int reduce_my_ushort2_uchar_0(short[] in1, byte[] in2) {
46060        // Verify that "in1" is non-null.
46061        if (in1 == null) {
46062            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46063        }
46064        // Verify that the array length is a multiple of the vector size.
46065        if (in1.length % 2 != 0) {
46066            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46067        }
46068        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46069        ain1.setAutoPadding(true);
46070        ain1.copyFrom(in1);
46071        // Verify that "in2" is non-null.
46072        if (in2 == null) {
46073            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46074        }
46075        // Verify that input array lengths are the same.
46076        if (in1.length / 2 != in2.length) {
46077            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46078        }
46079        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
46080        ain2.setAutoPadding(true);
46081        ain2.copyFrom(in2);
46082
46083        result_int result = reduce_my_ushort2_uchar_0(ain1, ain2, null);
46084        result.mTempIns = new Allocation[]{ain1, ain2};
46085        return result;
46086    }
46087
46088    // ain1 = "ushort2 a"
46089    // ain2 = "uchar b"
46090    public result_int reduce_my_ushort2_uchar_0(Allocation ain1, Allocation ain2) {
46091        return reduce_my_ushort2_uchar_0(ain1, ain2, null);
46092    }
46093
46094    // ain1 = "ushort2 a"
46095    // ain2 = "uchar b"
46096    public result_int reduce_my_ushort2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46097        Type t0, t1;
46098        // check ain1
46099        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46100            throw new RSRuntimeException("Type mismatch with U16_2!");
46101        }
46102        // check ain2
46103        if (!ain2.getType().getElement().isCompatible(__U8)) {
46104            throw new RSRuntimeException("Type mismatch with U8!");
46105        }
46106        // Verify dimensions
46107        t0 = ain1.getType();
46108        t1 = ain2.getType();
46109        if ((t0.getCount() != t1.getCount()) ||
46110            (t0.getX() != t1.getX()) ||
46111            (t0.getY() != t1.getY()) ||
46112            (t0.getZ() != t1.getZ()) ||
46113            (t0.hasFaces()   != t1.hasFaces()) ||
46114            (t0.hasMipmaps() != t1.hasMipmaps())) {
46115            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46116        }
46117
46118        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46119        aout.setAutoPadding(true);
46120        reduce(mExportReduceIdx_my_ushort2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
46121        return new result_int(aout);
46122    }
46123
46124    private final static int mExportReduceIdx_my_ushort2_uchar_1 = 697;
46125    // in1 = "a", flattened 2-vectors
46126    // in2 = "b"
46127    public result_int reduce_my_ushort2_uchar_1(short[] in1, byte[] in2) {
46128        // Verify that "in1" is non-null.
46129        if (in1 == null) {
46130            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46131        }
46132        // Verify that the array length is a multiple of the vector size.
46133        if (in1.length % 2 != 0) {
46134            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46135        }
46136        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46137        ain1.setAutoPadding(true);
46138        ain1.copyFrom(in1);
46139        // Verify that "in2" is non-null.
46140        if (in2 == null) {
46141            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46142        }
46143        // Verify that input array lengths are the same.
46144        if (in1.length / 2 != in2.length) {
46145            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46146        }
46147        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
46148        ain2.setAutoPadding(true);
46149        ain2.copyFrom(in2);
46150
46151        result_int result = reduce_my_ushort2_uchar_1(ain1, ain2, null);
46152        result.mTempIns = new Allocation[]{ain1, ain2};
46153        return result;
46154    }
46155
46156    // ain1 = "ushort2 a"
46157    // ain2 = "uchar b"
46158    public result_int reduce_my_ushort2_uchar_1(Allocation ain1, Allocation ain2) {
46159        return reduce_my_ushort2_uchar_1(ain1, ain2, null);
46160    }
46161
46162    // ain1 = "ushort2 a"
46163    // ain2 = "uchar b"
46164    public result_int reduce_my_ushort2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46165        Type t0, t1;
46166        // check ain1
46167        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46168            throw new RSRuntimeException("Type mismatch with U16_2!");
46169        }
46170        // check ain2
46171        if (!ain2.getType().getElement().isCompatible(__U8)) {
46172            throw new RSRuntimeException("Type mismatch with U8!");
46173        }
46174        // Verify dimensions
46175        t0 = ain1.getType();
46176        t1 = ain2.getType();
46177        if ((t0.getCount() != t1.getCount()) ||
46178            (t0.getX() != t1.getX()) ||
46179            (t0.getY() != t1.getY()) ||
46180            (t0.getZ() != t1.getZ()) ||
46181            (t0.hasFaces()   != t1.hasFaces()) ||
46182            (t0.hasMipmaps() != t1.hasMipmaps())) {
46183            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46184        }
46185
46186        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46187        aout.setAutoPadding(true);
46188        reduce(mExportReduceIdx_my_ushort2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
46189        return new result_int(aout);
46190    }
46191
46192    private final static int mExportReduceIdx_my_ushort2_uchar2_0 = 698;
46193    // in1 = "a", flattened 2-vectors
46194    // in2 = "b", flattened 2-vectors
46195    public result_int reduce_my_ushort2_uchar2_0(short[] in1, byte[] in2) {
46196        // Verify that "in1" is non-null.
46197        if (in1 == null) {
46198            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46199        }
46200        // Verify that the array length is a multiple of the vector size.
46201        if (in1.length % 2 != 0) {
46202            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46203        }
46204        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46205        ain1.setAutoPadding(true);
46206        ain1.copyFrom(in1);
46207        // Verify that "in2" is non-null.
46208        if (in2 == null) {
46209            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46210        }
46211        // Verify that the array length is a multiple of the vector size.
46212        if (in2.length % 2 != 0) {
46213            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
46214        }
46215        // Verify that input array lengths are the same.
46216        if (in1.length / 2 != in2.length / 2) {
46217            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46218        }
46219        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
46220        ain2.setAutoPadding(true);
46221        ain2.copyFrom(in2);
46222
46223        result_int result = reduce_my_ushort2_uchar2_0(ain1, ain2, null);
46224        result.mTempIns = new Allocation[]{ain1, ain2};
46225        return result;
46226    }
46227
46228    // ain1 = "ushort2 a"
46229    // ain2 = "uchar2 b"
46230    public result_int reduce_my_ushort2_uchar2_0(Allocation ain1, Allocation ain2) {
46231        return reduce_my_ushort2_uchar2_0(ain1, ain2, null);
46232    }
46233
46234    // ain1 = "ushort2 a"
46235    // ain2 = "uchar2 b"
46236    public result_int reduce_my_ushort2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46237        Type t0, t1;
46238        // check ain1
46239        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46240            throw new RSRuntimeException("Type mismatch with U16_2!");
46241        }
46242        // check ain2
46243        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
46244            throw new RSRuntimeException("Type mismatch with U8_2!");
46245        }
46246        // Verify dimensions
46247        t0 = ain1.getType();
46248        t1 = ain2.getType();
46249        if ((t0.getCount() != t1.getCount()) ||
46250            (t0.getX() != t1.getX()) ||
46251            (t0.getY() != t1.getY()) ||
46252            (t0.getZ() != t1.getZ()) ||
46253            (t0.hasFaces()   != t1.hasFaces()) ||
46254            (t0.hasMipmaps() != t1.hasMipmaps())) {
46255            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46256        }
46257
46258        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46259        aout.setAutoPadding(true);
46260        reduce(mExportReduceIdx_my_ushort2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
46261        return new result_int(aout);
46262    }
46263
46264    private final static int mExportReduceIdx_my_ushort2_uchar2_1 = 699;
46265    // in1 = "a", flattened 2-vectors
46266    // in2 = "b", flattened 2-vectors
46267    public result_int reduce_my_ushort2_uchar2_1(short[] in1, byte[] in2) {
46268        // Verify that "in1" is non-null.
46269        if (in1 == null) {
46270            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46271        }
46272        // Verify that the array length is a multiple of the vector size.
46273        if (in1.length % 2 != 0) {
46274            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46275        }
46276        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46277        ain1.setAutoPadding(true);
46278        ain1.copyFrom(in1);
46279        // Verify that "in2" is non-null.
46280        if (in2 == null) {
46281            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46282        }
46283        // Verify that the array length is a multiple of the vector size.
46284        if (in2.length % 2 != 0) {
46285            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
46286        }
46287        // Verify that input array lengths are the same.
46288        if (in1.length / 2 != in2.length / 2) {
46289            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46290        }
46291        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
46292        ain2.setAutoPadding(true);
46293        ain2.copyFrom(in2);
46294
46295        result_int result = reduce_my_ushort2_uchar2_1(ain1, ain2, null);
46296        result.mTempIns = new Allocation[]{ain1, ain2};
46297        return result;
46298    }
46299
46300    // ain1 = "ushort2 a"
46301    // ain2 = "uchar2 b"
46302    public result_int reduce_my_ushort2_uchar2_1(Allocation ain1, Allocation ain2) {
46303        return reduce_my_ushort2_uchar2_1(ain1, ain2, null);
46304    }
46305
46306    // ain1 = "ushort2 a"
46307    // ain2 = "uchar2 b"
46308    public result_int reduce_my_ushort2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46309        Type t0, t1;
46310        // check ain1
46311        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46312            throw new RSRuntimeException("Type mismatch with U16_2!");
46313        }
46314        // check ain2
46315        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
46316            throw new RSRuntimeException("Type mismatch with U8_2!");
46317        }
46318        // Verify dimensions
46319        t0 = ain1.getType();
46320        t1 = ain2.getType();
46321        if ((t0.getCount() != t1.getCount()) ||
46322            (t0.getX() != t1.getX()) ||
46323            (t0.getY() != t1.getY()) ||
46324            (t0.getZ() != t1.getZ()) ||
46325            (t0.hasFaces()   != t1.hasFaces()) ||
46326            (t0.hasMipmaps() != t1.hasMipmaps())) {
46327            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46328        }
46329
46330        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46331        aout.setAutoPadding(true);
46332        reduce(mExportReduceIdx_my_ushort2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
46333        return new result_int(aout);
46334    }
46335
46336    private final static int mExportReduceIdx_my_ushort2_uchar4_0 = 700;
46337    // in1 = "a", flattened 2-vectors
46338    // in2 = "b", flattened 4-vectors
46339    public result_int reduce_my_ushort2_uchar4_0(short[] in1, byte[] in2) {
46340        // Verify that "in1" is non-null.
46341        if (in1 == null) {
46342            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46343        }
46344        // Verify that the array length is a multiple of the vector size.
46345        if (in1.length % 2 != 0) {
46346            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46347        }
46348        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46349        ain1.setAutoPadding(true);
46350        ain1.copyFrom(in1);
46351        // Verify that "in2" is non-null.
46352        if (in2 == null) {
46353            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46354        }
46355        // Verify that the array length is a multiple of the vector size.
46356        if (in2.length % 4 != 0) {
46357            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
46358        }
46359        // Verify that input array lengths are the same.
46360        if (in1.length / 2 != in2.length / 4) {
46361            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46362        }
46363        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
46364        ain2.setAutoPadding(true);
46365        ain2.copyFrom(in2);
46366
46367        result_int result = reduce_my_ushort2_uchar4_0(ain1, ain2, null);
46368        result.mTempIns = new Allocation[]{ain1, ain2};
46369        return result;
46370    }
46371
46372    // ain1 = "ushort2 a"
46373    // ain2 = "uchar4 b"
46374    public result_int reduce_my_ushort2_uchar4_0(Allocation ain1, Allocation ain2) {
46375        return reduce_my_ushort2_uchar4_0(ain1, ain2, null);
46376    }
46377
46378    // ain1 = "ushort2 a"
46379    // ain2 = "uchar4 b"
46380    public result_int reduce_my_ushort2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46381        Type t0, t1;
46382        // check ain1
46383        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46384            throw new RSRuntimeException("Type mismatch with U16_2!");
46385        }
46386        // check ain2
46387        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
46388            throw new RSRuntimeException("Type mismatch with U8_4!");
46389        }
46390        // Verify dimensions
46391        t0 = ain1.getType();
46392        t1 = ain2.getType();
46393        if ((t0.getCount() != t1.getCount()) ||
46394            (t0.getX() != t1.getX()) ||
46395            (t0.getY() != t1.getY()) ||
46396            (t0.getZ() != t1.getZ()) ||
46397            (t0.hasFaces()   != t1.hasFaces()) ||
46398            (t0.hasMipmaps() != t1.hasMipmaps())) {
46399            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46400        }
46401
46402        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46403        aout.setAutoPadding(true);
46404        reduce(mExportReduceIdx_my_ushort2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
46405        return new result_int(aout);
46406    }
46407
46408    private final static int mExportReduceIdx_my_ushort2_uchar4_1 = 701;
46409    // in1 = "a", flattened 2-vectors
46410    // in2 = "b", flattened 4-vectors
46411    public result_int reduce_my_ushort2_uchar4_1(short[] in1, byte[] in2) {
46412        // Verify that "in1" is non-null.
46413        if (in1 == null) {
46414            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46415        }
46416        // Verify that the array length is a multiple of the vector size.
46417        if (in1.length % 2 != 0) {
46418            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46419        }
46420        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46421        ain1.setAutoPadding(true);
46422        ain1.copyFrom(in1);
46423        // Verify that "in2" is non-null.
46424        if (in2 == null) {
46425            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46426        }
46427        // Verify that the array length is a multiple of the vector size.
46428        if (in2.length % 4 != 0) {
46429            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
46430        }
46431        // Verify that input array lengths are the same.
46432        if (in1.length / 2 != in2.length / 4) {
46433            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46434        }
46435        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
46436        ain2.setAutoPadding(true);
46437        ain2.copyFrom(in2);
46438
46439        result_int result = reduce_my_ushort2_uchar4_1(ain1, ain2, null);
46440        result.mTempIns = new Allocation[]{ain1, ain2};
46441        return result;
46442    }
46443
46444    // ain1 = "ushort2 a"
46445    // ain2 = "uchar4 b"
46446    public result_int reduce_my_ushort2_uchar4_1(Allocation ain1, Allocation ain2) {
46447        return reduce_my_ushort2_uchar4_1(ain1, ain2, null);
46448    }
46449
46450    // ain1 = "ushort2 a"
46451    // ain2 = "uchar4 b"
46452    public result_int reduce_my_ushort2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46453        Type t0, t1;
46454        // check ain1
46455        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46456            throw new RSRuntimeException("Type mismatch with U16_2!");
46457        }
46458        // check ain2
46459        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
46460            throw new RSRuntimeException("Type mismatch with U8_4!");
46461        }
46462        // Verify dimensions
46463        t0 = ain1.getType();
46464        t1 = ain2.getType();
46465        if ((t0.getCount() != t1.getCount()) ||
46466            (t0.getX() != t1.getX()) ||
46467            (t0.getY() != t1.getY()) ||
46468            (t0.getZ() != t1.getZ()) ||
46469            (t0.hasFaces()   != t1.hasFaces()) ||
46470            (t0.hasMipmaps() != t1.hasMipmaps())) {
46471            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46472        }
46473
46474        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46475        aout.setAutoPadding(true);
46476        reduce(mExportReduceIdx_my_ushort2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
46477        return new result_int(aout);
46478    }
46479
46480    private final static int mExportReduceIdx_my_ushort2_ushort_0 = 702;
46481    // in1 = "a", flattened 2-vectors
46482    // in2 = "b"
46483    public result_int reduce_my_ushort2_ushort_0(short[] in1, short[] in2) {
46484        // Verify that "in1" is non-null.
46485        if (in1 == null) {
46486            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46487        }
46488        // Verify that the array length is a multiple of the vector size.
46489        if (in1.length % 2 != 0) {
46490            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46491        }
46492        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46493        ain1.setAutoPadding(true);
46494        ain1.copyFrom(in1);
46495        // Verify that "in2" is non-null.
46496        if (in2 == null) {
46497            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46498        }
46499        // Verify that input array lengths are the same.
46500        if (in1.length / 2 != in2.length) {
46501            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46502        }
46503        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
46504        ain2.setAutoPadding(true);
46505        ain2.copyFrom(in2);
46506
46507        result_int result = reduce_my_ushort2_ushort_0(ain1, ain2, null);
46508        result.mTempIns = new Allocation[]{ain1, ain2};
46509        return result;
46510    }
46511
46512    // ain1 = "ushort2 a"
46513    // ain2 = "ushort b"
46514    public result_int reduce_my_ushort2_ushort_0(Allocation ain1, Allocation ain2) {
46515        return reduce_my_ushort2_ushort_0(ain1, ain2, null);
46516    }
46517
46518    // ain1 = "ushort2 a"
46519    // ain2 = "ushort b"
46520    public result_int reduce_my_ushort2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46521        Type t0, t1;
46522        // check ain1
46523        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46524            throw new RSRuntimeException("Type mismatch with U16_2!");
46525        }
46526        // check ain2
46527        if (!ain2.getType().getElement().isCompatible(__U16)) {
46528            throw new RSRuntimeException("Type mismatch with U16!");
46529        }
46530        // Verify dimensions
46531        t0 = ain1.getType();
46532        t1 = ain2.getType();
46533        if ((t0.getCount() != t1.getCount()) ||
46534            (t0.getX() != t1.getX()) ||
46535            (t0.getY() != t1.getY()) ||
46536            (t0.getZ() != t1.getZ()) ||
46537            (t0.hasFaces()   != t1.hasFaces()) ||
46538            (t0.hasMipmaps() != t1.hasMipmaps())) {
46539            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46540        }
46541
46542        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46543        aout.setAutoPadding(true);
46544        reduce(mExportReduceIdx_my_ushort2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
46545        return new result_int(aout);
46546    }
46547
46548    private final static int mExportReduceIdx_my_ushort2_ushort_1 = 703;
46549    // in1 = "a", flattened 2-vectors
46550    // in2 = "b"
46551    public result_int reduce_my_ushort2_ushort_1(short[] in1, short[] in2) {
46552        // Verify that "in1" is non-null.
46553        if (in1 == null) {
46554            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46555        }
46556        // Verify that the array length is a multiple of the vector size.
46557        if (in1.length % 2 != 0) {
46558            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46559        }
46560        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46561        ain1.setAutoPadding(true);
46562        ain1.copyFrom(in1);
46563        // Verify that "in2" is non-null.
46564        if (in2 == null) {
46565            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46566        }
46567        // Verify that input array lengths are the same.
46568        if (in1.length / 2 != in2.length) {
46569            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46570        }
46571        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
46572        ain2.setAutoPadding(true);
46573        ain2.copyFrom(in2);
46574
46575        result_int result = reduce_my_ushort2_ushort_1(ain1, ain2, null);
46576        result.mTempIns = new Allocation[]{ain1, ain2};
46577        return result;
46578    }
46579
46580    // ain1 = "ushort2 a"
46581    // ain2 = "ushort b"
46582    public result_int reduce_my_ushort2_ushort_1(Allocation ain1, Allocation ain2) {
46583        return reduce_my_ushort2_ushort_1(ain1, ain2, null);
46584    }
46585
46586    // ain1 = "ushort2 a"
46587    // ain2 = "ushort b"
46588    public result_int reduce_my_ushort2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46589        Type t0, t1;
46590        // check ain1
46591        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46592            throw new RSRuntimeException("Type mismatch with U16_2!");
46593        }
46594        // check ain2
46595        if (!ain2.getType().getElement().isCompatible(__U16)) {
46596            throw new RSRuntimeException("Type mismatch with U16!");
46597        }
46598        // Verify dimensions
46599        t0 = ain1.getType();
46600        t1 = ain2.getType();
46601        if ((t0.getCount() != t1.getCount()) ||
46602            (t0.getX() != t1.getX()) ||
46603            (t0.getY() != t1.getY()) ||
46604            (t0.getZ() != t1.getZ()) ||
46605            (t0.hasFaces()   != t1.hasFaces()) ||
46606            (t0.hasMipmaps() != t1.hasMipmaps())) {
46607            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46608        }
46609
46610        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46611        aout.setAutoPadding(true);
46612        reduce(mExportReduceIdx_my_ushort2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
46613        return new result_int(aout);
46614    }
46615
46616    private final static int mExportReduceIdx_my_ushort2_ushort2_0 = 704;
46617    // in1 = "a", flattened 2-vectors
46618    // in2 = "b", flattened 2-vectors
46619    public result_int reduce_my_ushort2_ushort2_0(short[] in1, short[] in2) {
46620        // Verify that "in1" is non-null.
46621        if (in1 == null) {
46622            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46623        }
46624        // Verify that the array length is a multiple of the vector size.
46625        if (in1.length % 2 != 0) {
46626            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46627        }
46628        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46629        ain1.setAutoPadding(true);
46630        ain1.copyFrom(in1);
46631        // Verify that "in2" is non-null.
46632        if (in2 == null) {
46633            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46634        }
46635        // Verify that the array length is a multiple of the vector size.
46636        if (in2.length % 2 != 0) {
46637            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
46638        }
46639        // Verify that input array lengths are the same.
46640        if (in1.length / 2 != in2.length / 2) {
46641            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46642        }
46643        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
46644        ain2.setAutoPadding(true);
46645        ain2.copyFrom(in2);
46646
46647        result_int result = reduce_my_ushort2_ushort2_0(ain1, ain2, null);
46648        result.mTempIns = new Allocation[]{ain1, ain2};
46649        return result;
46650    }
46651
46652    // ain1 = "ushort2 a"
46653    // ain2 = "ushort2 b"
46654    public result_int reduce_my_ushort2_ushort2_0(Allocation ain1, Allocation ain2) {
46655        return reduce_my_ushort2_ushort2_0(ain1, ain2, null);
46656    }
46657
46658    // ain1 = "ushort2 a"
46659    // ain2 = "ushort2 b"
46660    public result_int reduce_my_ushort2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46661        Type t0, t1;
46662        // check ain1
46663        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46664            throw new RSRuntimeException("Type mismatch with U16_2!");
46665        }
46666        // check ain2
46667        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
46668            throw new RSRuntimeException("Type mismatch with U16_2!");
46669        }
46670        // Verify dimensions
46671        t0 = ain1.getType();
46672        t1 = ain2.getType();
46673        if ((t0.getCount() != t1.getCount()) ||
46674            (t0.getX() != t1.getX()) ||
46675            (t0.getY() != t1.getY()) ||
46676            (t0.getZ() != t1.getZ()) ||
46677            (t0.hasFaces()   != t1.hasFaces()) ||
46678            (t0.hasMipmaps() != t1.hasMipmaps())) {
46679            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46680        }
46681
46682        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46683        aout.setAutoPadding(true);
46684        reduce(mExportReduceIdx_my_ushort2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
46685        return new result_int(aout);
46686    }
46687
46688    private final static int mExportReduceIdx_my_ushort2_ushort2_1 = 705;
46689    // in1 = "a", flattened 2-vectors
46690    // in2 = "b", flattened 2-vectors
46691    public result_int reduce_my_ushort2_ushort2_1(short[] in1, short[] in2) {
46692        // Verify that "in1" is non-null.
46693        if (in1 == null) {
46694            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46695        }
46696        // Verify that the array length is a multiple of the vector size.
46697        if (in1.length % 2 != 0) {
46698            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46699        }
46700        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46701        ain1.setAutoPadding(true);
46702        ain1.copyFrom(in1);
46703        // Verify that "in2" is non-null.
46704        if (in2 == null) {
46705            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46706        }
46707        // Verify that the array length is a multiple of the vector size.
46708        if (in2.length % 2 != 0) {
46709            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
46710        }
46711        // Verify that input array lengths are the same.
46712        if (in1.length / 2 != in2.length / 2) {
46713            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46714        }
46715        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
46716        ain2.setAutoPadding(true);
46717        ain2.copyFrom(in2);
46718
46719        result_int result = reduce_my_ushort2_ushort2_1(ain1, ain2, null);
46720        result.mTempIns = new Allocation[]{ain1, ain2};
46721        return result;
46722    }
46723
46724    // ain1 = "ushort2 a"
46725    // ain2 = "ushort2 b"
46726    public result_int reduce_my_ushort2_ushort2_1(Allocation ain1, Allocation ain2) {
46727        return reduce_my_ushort2_ushort2_1(ain1, ain2, null);
46728    }
46729
46730    // ain1 = "ushort2 a"
46731    // ain2 = "ushort2 b"
46732    public result_int reduce_my_ushort2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46733        Type t0, t1;
46734        // check ain1
46735        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46736            throw new RSRuntimeException("Type mismatch with U16_2!");
46737        }
46738        // check ain2
46739        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
46740            throw new RSRuntimeException("Type mismatch with U16_2!");
46741        }
46742        // Verify dimensions
46743        t0 = ain1.getType();
46744        t1 = ain2.getType();
46745        if ((t0.getCount() != t1.getCount()) ||
46746            (t0.getX() != t1.getX()) ||
46747            (t0.getY() != t1.getY()) ||
46748            (t0.getZ() != t1.getZ()) ||
46749            (t0.hasFaces()   != t1.hasFaces()) ||
46750            (t0.hasMipmaps() != t1.hasMipmaps())) {
46751            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46752        }
46753
46754        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46755        aout.setAutoPadding(true);
46756        reduce(mExportReduceIdx_my_ushort2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
46757        return new result_int(aout);
46758    }
46759
46760    private final static int mExportReduceIdx_my_ushort2_ushort4_0 = 706;
46761    // in1 = "a", flattened 2-vectors
46762    // in2 = "b", flattened 4-vectors
46763    public result_int reduce_my_ushort2_ushort4_0(short[] in1, short[] in2) {
46764        // Verify that "in1" is non-null.
46765        if (in1 == null) {
46766            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46767        }
46768        // Verify that the array length is a multiple of the vector size.
46769        if (in1.length % 2 != 0) {
46770            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46771        }
46772        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46773        ain1.setAutoPadding(true);
46774        ain1.copyFrom(in1);
46775        // Verify that "in2" is non-null.
46776        if (in2 == null) {
46777            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46778        }
46779        // Verify that the array length is a multiple of the vector size.
46780        if (in2.length % 4 != 0) {
46781            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
46782        }
46783        // Verify that input array lengths are the same.
46784        if (in1.length / 2 != in2.length / 4) {
46785            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46786        }
46787        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
46788        ain2.setAutoPadding(true);
46789        ain2.copyFrom(in2);
46790
46791        result_int result = reduce_my_ushort2_ushort4_0(ain1, ain2, null);
46792        result.mTempIns = new Allocation[]{ain1, ain2};
46793        return result;
46794    }
46795
46796    // ain1 = "ushort2 a"
46797    // ain2 = "ushort4 b"
46798    public result_int reduce_my_ushort2_ushort4_0(Allocation ain1, Allocation ain2) {
46799        return reduce_my_ushort2_ushort4_0(ain1, ain2, null);
46800    }
46801
46802    // ain1 = "ushort2 a"
46803    // ain2 = "ushort4 b"
46804    public result_int reduce_my_ushort2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46805        Type t0, t1;
46806        // check ain1
46807        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46808            throw new RSRuntimeException("Type mismatch with U16_2!");
46809        }
46810        // check ain2
46811        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
46812            throw new RSRuntimeException("Type mismatch with U16_4!");
46813        }
46814        // Verify dimensions
46815        t0 = ain1.getType();
46816        t1 = ain2.getType();
46817        if ((t0.getCount() != t1.getCount()) ||
46818            (t0.getX() != t1.getX()) ||
46819            (t0.getY() != t1.getY()) ||
46820            (t0.getZ() != t1.getZ()) ||
46821            (t0.hasFaces()   != t1.hasFaces()) ||
46822            (t0.hasMipmaps() != t1.hasMipmaps())) {
46823            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46824        }
46825
46826        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46827        aout.setAutoPadding(true);
46828        reduce(mExportReduceIdx_my_ushort2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
46829        return new result_int(aout);
46830    }
46831
46832    private final static int mExportReduceIdx_my_ushort2_ushort4_1 = 707;
46833    // in1 = "a", flattened 2-vectors
46834    // in2 = "b", flattened 4-vectors
46835    public result_int reduce_my_ushort2_ushort4_1(short[] in1, short[] in2) {
46836        // Verify that "in1" is non-null.
46837        if (in1 == null) {
46838            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46839        }
46840        // Verify that the array length is a multiple of the vector size.
46841        if (in1.length % 2 != 0) {
46842            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46843        }
46844        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46845        ain1.setAutoPadding(true);
46846        ain1.copyFrom(in1);
46847        // Verify that "in2" is non-null.
46848        if (in2 == null) {
46849            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46850        }
46851        // Verify that the array length is a multiple of the vector size.
46852        if (in2.length % 4 != 0) {
46853            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
46854        }
46855        // Verify that input array lengths are the same.
46856        if (in1.length / 2 != in2.length / 4) {
46857            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46858        }
46859        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
46860        ain2.setAutoPadding(true);
46861        ain2.copyFrom(in2);
46862
46863        result_int result = reduce_my_ushort2_ushort4_1(ain1, ain2, null);
46864        result.mTempIns = new Allocation[]{ain1, ain2};
46865        return result;
46866    }
46867
46868    // ain1 = "ushort2 a"
46869    // ain2 = "ushort4 b"
46870    public result_int reduce_my_ushort2_ushort4_1(Allocation ain1, Allocation ain2) {
46871        return reduce_my_ushort2_ushort4_1(ain1, ain2, null);
46872    }
46873
46874    // ain1 = "ushort2 a"
46875    // ain2 = "ushort4 b"
46876    public result_int reduce_my_ushort2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46877        Type t0, t1;
46878        // check ain1
46879        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46880            throw new RSRuntimeException("Type mismatch with U16_2!");
46881        }
46882        // check ain2
46883        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
46884            throw new RSRuntimeException("Type mismatch with U16_4!");
46885        }
46886        // Verify dimensions
46887        t0 = ain1.getType();
46888        t1 = ain2.getType();
46889        if ((t0.getCount() != t1.getCount()) ||
46890            (t0.getX() != t1.getX()) ||
46891            (t0.getY() != t1.getY()) ||
46892            (t0.getZ() != t1.getZ()) ||
46893            (t0.hasFaces()   != t1.hasFaces()) ||
46894            (t0.hasMipmaps() != t1.hasMipmaps())) {
46895            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46896        }
46897
46898        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46899        aout.setAutoPadding(true);
46900        reduce(mExportReduceIdx_my_ushort2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
46901        return new result_int(aout);
46902    }
46903
46904    private final static int mExportReduceIdx_my_ushort2_bool_0 = 708;
46905    // in1 = "a", flattened 2-vectors
46906    // in2 = "b"
46907    public result_int reduce_my_ushort2_bool_0(short[] in1, byte[] in2) {
46908        // Verify that "in1" is non-null.
46909        if (in1 == null) {
46910            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46911        }
46912        // Verify that the array length is a multiple of the vector size.
46913        if (in1.length % 2 != 0) {
46914            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46915        }
46916        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46917        ain1.setAutoPadding(true);
46918        ain1.copyFrom(in1);
46919        // Verify that "in2" is non-null.
46920        if (in2 == null) {
46921            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46922        }
46923        // Verify that input array lengths are the same.
46924        if (in1.length / 2 != in2.length) {
46925            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46926        }
46927        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
46928        ain2.setAutoPadding(true);
46929        ain2.copyFrom(in2);
46930
46931        result_int result = reduce_my_ushort2_bool_0(ain1, ain2, null);
46932        result.mTempIns = new Allocation[]{ain1, ain2};
46933        return result;
46934    }
46935
46936    // ain1 = "ushort2 a"
46937    // ain2 = "bool b"
46938    public result_int reduce_my_ushort2_bool_0(Allocation ain1, Allocation ain2) {
46939        return reduce_my_ushort2_bool_0(ain1, ain2, null);
46940    }
46941
46942    // ain1 = "ushort2 a"
46943    // ain2 = "bool b"
46944    public result_int reduce_my_ushort2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
46945        Type t0, t1;
46946        // check ain1
46947        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
46948            throw new RSRuntimeException("Type mismatch with U16_2!");
46949        }
46950        // check ain2
46951        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
46952            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
46953        }
46954        // Verify dimensions
46955        t0 = ain1.getType();
46956        t1 = ain2.getType();
46957        if ((t0.getCount() != t1.getCount()) ||
46958            (t0.getX() != t1.getX()) ||
46959            (t0.getY() != t1.getY()) ||
46960            (t0.getZ() != t1.getZ()) ||
46961            (t0.hasFaces()   != t1.hasFaces()) ||
46962            (t0.hasMipmaps() != t1.hasMipmaps())) {
46963            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
46964        }
46965
46966        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
46967        aout.setAutoPadding(true);
46968        reduce(mExportReduceIdx_my_ushort2_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
46969        return new result_int(aout);
46970    }
46971
46972    private final static int mExportReduceIdx_my_ushort2_bool_1 = 709;
46973    // in1 = "a", flattened 2-vectors
46974    // in2 = "b"
46975    public result_int reduce_my_ushort2_bool_1(short[] in1, byte[] in2) {
46976        // Verify that "in1" is non-null.
46977        if (in1 == null) {
46978            throw new RSIllegalArgumentException("Array \"in1\" is null!");
46979        }
46980        // Verify that the array length is a multiple of the vector size.
46981        if (in1.length % 2 != 0) {
46982            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!");
46983        }
46984        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2);
46985        ain1.setAutoPadding(true);
46986        ain1.copyFrom(in1);
46987        // Verify that "in2" is non-null.
46988        if (in2 == null) {
46989            throw new RSIllegalArgumentException("Array \"in2\" is null!");
46990        }
46991        // Verify that input array lengths are the same.
46992        if (in1.length / 2 != in2.length) {
46993            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
46994        }
46995        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
46996        ain2.setAutoPadding(true);
46997        ain2.copyFrom(in2);
46998
46999        result_int result = reduce_my_ushort2_bool_1(ain1, ain2, null);
47000        result.mTempIns = new Allocation[]{ain1, ain2};
47001        return result;
47002    }
47003
47004    // ain1 = "ushort2 a"
47005    // ain2 = "bool b"
47006    public result_int reduce_my_ushort2_bool_1(Allocation ain1, Allocation ain2) {
47007        return reduce_my_ushort2_bool_1(ain1, ain2, null);
47008    }
47009
47010    // ain1 = "ushort2 a"
47011    // ain2 = "bool b"
47012    public result_int reduce_my_ushort2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47013        Type t0, t1;
47014        // check ain1
47015        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
47016            throw new RSRuntimeException("Type mismatch with U16_2!");
47017        }
47018        // check ain2
47019        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
47020            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
47021        }
47022        // Verify dimensions
47023        t0 = ain1.getType();
47024        t1 = ain2.getType();
47025        if ((t0.getCount() != t1.getCount()) ||
47026            (t0.getX() != t1.getX()) ||
47027            (t0.getY() != t1.getY()) ||
47028            (t0.getZ() != t1.getZ()) ||
47029            (t0.hasFaces()   != t1.hasFaces()) ||
47030            (t0.hasMipmaps() != t1.hasMipmaps())) {
47031            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47032        }
47033
47034        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47035        aout.setAutoPadding(true);
47036        reduce(mExportReduceIdx_my_ushort2_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
47037        return new result_int(aout);
47038    }
47039
47040    private final static int mExportReduceIdx_my_ushort2_rs_matrix2x2_0 = 710;
47041    // ain1 = "ushort2 a"
47042    // ain2 = "rs_matrix2x2 b"
47043    public result_int reduce_my_ushort2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
47044        return reduce_my_ushort2_rs_matrix2x2_0(ain1, ain2, null);
47045    }
47046
47047    // ain1 = "ushort2 a"
47048    // ain2 = "rs_matrix2x2 b"
47049    public result_int reduce_my_ushort2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47050        Type t0, t1;
47051        // check ain1
47052        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
47053            throw new RSRuntimeException("Type mismatch with U16_2!");
47054        }
47055        // check ain2
47056        // Verify dimensions
47057        t0 = ain1.getType();
47058        t1 = ain2.getType();
47059        if ((t0.getCount() != t1.getCount()) ||
47060            (t0.getX() != t1.getX()) ||
47061            (t0.getY() != t1.getY()) ||
47062            (t0.getZ() != t1.getZ()) ||
47063            (t0.hasFaces()   != t1.hasFaces()) ||
47064            (t0.hasMipmaps() != t1.hasMipmaps())) {
47065            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47066        }
47067
47068        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47069        aout.setAutoPadding(true);
47070        reduce(mExportReduceIdx_my_ushort2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
47071        return new result_int(aout);
47072    }
47073
47074    private final static int mExportReduceIdx_my_ushort2_rs_matrix2x2_1 = 711;
47075    // ain1 = "ushort2 a"
47076    // ain2 = "rs_matrix2x2 b"
47077    public result_int reduce_my_ushort2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
47078        return reduce_my_ushort2_rs_matrix2x2_1(ain1, ain2, null);
47079    }
47080
47081    // ain1 = "ushort2 a"
47082    // ain2 = "rs_matrix2x2 b"
47083    public result_int reduce_my_ushort2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47084        Type t0, t1;
47085        // check ain1
47086        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
47087            throw new RSRuntimeException("Type mismatch with U16_2!");
47088        }
47089        // check ain2
47090        // Verify dimensions
47091        t0 = ain1.getType();
47092        t1 = ain2.getType();
47093        if ((t0.getCount() != t1.getCount()) ||
47094            (t0.getX() != t1.getX()) ||
47095            (t0.getY() != t1.getY()) ||
47096            (t0.getZ() != t1.getZ()) ||
47097            (t0.hasFaces()   != t1.hasFaces()) ||
47098            (t0.hasMipmaps() != t1.hasMipmaps())) {
47099            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47100        }
47101
47102        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47103        aout.setAutoPadding(true);
47104        reduce(mExportReduceIdx_my_ushort2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
47105        return new result_int(aout);
47106    }
47107
47108    private final static int mExportReduceIdx_my_ushort2_MyStruct_0 = 712;
47109    // ain1 = "ushort2 a"
47110    // ain2 = "/* struct <> */ b"
47111    public result_int reduce_my_ushort2_MyStruct_0(Allocation ain1, Allocation ain2) {
47112        return reduce_my_ushort2_MyStruct_0(ain1, ain2, null);
47113    }
47114
47115    // ain1 = "ushort2 a"
47116    // ain2 = "/* struct <> */ b"
47117    public result_int reduce_my_ushort2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47118        Type t0, t1;
47119        // check ain1
47120        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
47121            throw new RSRuntimeException("Type mismatch with U16_2!");
47122        }
47123        // check ain2
47124        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
47125            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
47126        }
47127        // Verify dimensions
47128        t0 = ain1.getType();
47129        t1 = ain2.getType();
47130        if ((t0.getCount() != t1.getCount()) ||
47131            (t0.getX() != t1.getX()) ||
47132            (t0.getY() != t1.getY()) ||
47133            (t0.getZ() != t1.getZ()) ||
47134            (t0.hasFaces()   != t1.hasFaces()) ||
47135            (t0.hasMipmaps() != t1.hasMipmaps())) {
47136            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47137        }
47138
47139        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47140        aout.setAutoPadding(true);
47141        reduce(mExportReduceIdx_my_ushort2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
47142        return new result_int(aout);
47143    }
47144
47145    private final static int mExportReduceIdx_my_ushort2_MyStruct_1 = 713;
47146    // ain1 = "ushort2 a"
47147    // ain2 = "/* struct <> */ b"
47148    public result_int reduce_my_ushort2_MyStruct_1(Allocation ain1, Allocation ain2) {
47149        return reduce_my_ushort2_MyStruct_1(ain1, ain2, null);
47150    }
47151
47152    // ain1 = "ushort2 a"
47153    // ain2 = "/* struct <> */ b"
47154    public result_int reduce_my_ushort2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47155        Type t0, t1;
47156        // check ain1
47157        if (!ain1.getType().getElement().isCompatible(__U16_2)) {
47158            throw new RSRuntimeException("Type mismatch with U16_2!");
47159        }
47160        // check ain2
47161        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
47162            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
47163        }
47164        // Verify dimensions
47165        t0 = ain1.getType();
47166        t1 = ain2.getType();
47167        if ((t0.getCount() != t1.getCount()) ||
47168            (t0.getX() != t1.getX()) ||
47169            (t0.getY() != t1.getY()) ||
47170            (t0.getZ() != t1.getZ()) ||
47171            (t0.hasFaces()   != t1.hasFaces()) ||
47172            (t0.hasMipmaps() != t1.hasMipmaps())) {
47173            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47174        }
47175
47176        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47177        aout.setAutoPadding(true);
47178        reduce(mExportReduceIdx_my_ushort2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
47179        return new result_int(aout);
47180    }
47181
47182    private final static int mExportReduceIdx_my_ushort4_half_0 = 714;
47183    // in1 = "a", flattened 4-vectors
47184    // in2 = "b"
47185    public result_int reduce_my_ushort4_half_0(short[] in1, short[] in2) {
47186        // Verify that "in1" is non-null.
47187        if (in1 == null) {
47188            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47189        }
47190        // Verify that the array length is a multiple of the vector size.
47191        if (in1.length % 4 != 0) {
47192            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47193        }
47194        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47195        ain1.setAutoPadding(true);
47196        ain1.copyFrom(in1);
47197        // Verify that "in2" is non-null.
47198        if (in2 == null) {
47199            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47200        }
47201        // Verify that input array lengths are the same.
47202        if (in1.length / 4 != in2.length) {
47203            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47204        }
47205        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
47206        ain2.setAutoPadding(true);
47207        ain2.copyFrom(in2);
47208
47209        result_int result = reduce_my_ushort4_half_0(ain1, ain2, null);
47210        result.mTempIns = new Allocation[]{ain1, ain2};
47211        return result;
47212    }
47213
47214    // ain1 = "ushort4 a"
47215    // ain2 = "half b"
47216    public result_int reduce_my_ushort4_half_0(Allocation ain1, Allocation ain2) {
47217        return reduce_my_ushort4_half_0(ain1, ain2, null);
47218    }
47219
47220    // ain1 = "ushort4 a"
47221    // ain2 = "half b"
47222    public result_int reduce_my_ushort4_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47223        Type t0, t1;
47224        // check ain1
47225        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47226            throw new RSRuntimeException("Type mismatch with U16_4!");
47227        }
47228        // check ain2
47229        if (!ain2.getType().getElement().isCompatible(__F16)) {
47230            throw new RSRuntimeException("Type mismatch with F16!");
47231        }
47232        // Verify dimensions
47233        t0 = ain1.getType();
47234        t1 = ain2.getType();
47235        if ((t0.getCount() != t1.getCount()) ||
47236            (t0.getX() != t1.getX()) ||
47237            (t0.getY() != t1.getY()) ||
47238            (t0.getZ() != t1.getZ()) ||
47239            (t0.hasFaces()   != t1.hasFaces()) ||
47240            (t0.hasMipmaps() != t1.hasMipmaps())) {
47241            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47242        }
47243
47244        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47245        aout.setAutoPadding(true);
47246        reduce(mExportReduceIdx_my_ushort4_half_0, new Allocation[]{ain1, ain2}, aout, sc);
47247        return new result_int(aout);
47248    }
47249
47250    private final static int mExportReduceIdx_my_ushort4_half_1 = 715;
47251    // in1 = "a", flattened 4-vectors
47252    // in2 = "b"
47253    public result_int reduce_my_ushort4_half_1(short[] in1, short[] in2) {
47254        // Verify that "in1" is non-null.
47255        if (in1 == null) {
47256            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47257        }
47258        // Verify that the array length is a multiple of the vector size.
47259        if (in1.length % 4 != 0) {
47260            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47261        }
47262        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47263        ain1.setAutoPadding(true);
47264        ain1.copyFrom(in1);
47265        // Verify that "in2" is non-null.
47266        if (in2 == null) {
47267            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47268        }
47269        // Verify that input array lengths are the same.
47270        if (in1.length / 4 != in2.length) {
47271            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47272        }
47273        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
47274        ain2.setAutoPadding(true);
47275        ain2.copyFrom(in2);
47276
47277        result_int result = reduce_my_ushort4_half_1(ain1, ain2, null);
47278        result.mTempIns = new Allocation[]{ain1, ain2};
47279        return result;
47280    }
47281
47282    // ain1 = "ushort4 a"
47283    // ain2 = "half b"
47284    public result_int reduce_my_ushort4_half_1(Allocation ain1, Allocation ain2) {
47285        return reduce_my_ushort4_half_1(ain1, ain2, null);
47286    }
47287
47288    // ain1 = "ushort4 a"
47289    // ain2 = "half b"
47290    public result_int reduce_my_ushort4_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47291        Type t0, t1;
47292        // check ain1
47293        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47294            throw new RSRuntimeException("Type mismatch with U16_4!");
47295        }
47296        // check ain2
47297        if (!ain2.getType().getElement().isCompatible(__F16)) {
47298            throw new RSRuntimeException("Type mismatch with F16!");
47299        }
47300        // Verify dimensions
47301        t0 = ain1.getType();
47302        t1 = ain2.getType();
47303        if ((t0.getCount() != t1.getCount()) ||
47304            (t0.getX() != t1.getX()) ||
47305            (t0.getY() != t1.getY()) ||
47306            (t0.getZ() != t1.getZ()) ||
47307            (t0.hasFaces()   != t1.hasFaces()) ||
47308            (t0.hasMipmaps() != t1.hasMipmaps())) {
47309            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47310        }
47311
47312        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47313        aout.setAutoPadding(true);
47314        reduce(mExportReduceIdx_my_ushort4_half_1, new Allocation[]{ain1, ain2}, aout, sc);
47315        return new result_int(aout);
47316    }
47317
47318    private final static int mExportReduceIdx_my_ushort4_half2_0 = 716;
47319    // in1 = "a", flattened 4-vectors
47320    // in2 = "b", flattened 2-vectors
47321    public result_int reduce_my_ushort4_half2_0(short[] in1, short[] in2) {
47322        // Verify that "in1" is non-null.
47323        if (in1 == null) {
47324            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47325        }
47326        // Verify that the array length is a multiple of the vector size.
47327        if (in1.length % 4 != 0) {
47328            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47329        }
47330        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47331        ain1.setAutoPadding(true);
47332        ain1.copyFrom(in1);
47333        // Verify that "in2" is non-null.
47334        if (in2 == null) {
47335            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47336        }
47337        // Verify that the array length is a multiple of the vector size.
47338        if (in2.length % 2 != 0) {
47339            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
47340        }
47341        // Verify that input array lengths are the same.
47342        if (in1.length / 4 != in2.length / 2) {
47343            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47344        }
47345        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
47346        ain2.setAutoPadding(true);
47347        ain2.copyFrom(in2);
47348
47349        result_int result = reduce_my_ushort4_half2_0(ain1, ain2, null);
47350        result.mTempIns = new Allocation[]{ain1, ain2};
47351        return result;
47352    }
47353
47354    // ain1 = "ushort4 a"
47355    // ain2 = "half2 b"
47356    public result_int reduce_my_ushort4_half2_0(Allocation ain1, Allocation ain2) {
47357        return reduce_my_ushort4_half2_0(ain1, ain2, null);
47358    }
47359
47360    // ain1 = "ushort4 a"
47361    // ain2 = "half2 b"
47362    public result_int reduce_my_ushort4_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47363        Type t0, t1;
47364        // check ain1
47365        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47366            throw new RSRuntimeException("Type mismatch with U16_4!");
47367        }
47368        // check ain2
47369        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
47370            throw new RSRuntimeException("Type mismatch with F16_2!");
47371        }
47372        // Verify dimensions
47373        t0 = ain1.getType();
47374        t1 = ain2.getType();
47375        if ((t0.getCount() != t1.getCount()) ||
47376            (t0.getX() != t1.getX()) ||
47377            (t0.getY() != t1.getY()) ||
47378            (t0.getZ() != t1.getZ()) ||
47379            (t0.hasFaces()   != t1.hasFaces()) ||
47380            (t0.hasMipmaps() != t1.hasMipmaps())) {
47381            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47382        }
47383
47384        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47385        aout.setAutoPadding(true);
47386        reduce(mExportReduceIdx_my_ushort4_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
47387        return new result_int(aout);
47388    }
47389
47390    private final static int mExportReduceIdx_my_ushort4_half2_1 = 717;
47391    // in1 = "a", flattened 4-vectors
47392    // in2 = "b", flattened 2-vectors
47393    public result_int reduce_my_ushort4_half2_1(short[] in1, short[] in2) {
47394        // Verify that "in1" is non-null.
47395        if (in1 == null) {
47396            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47397        }
47398        // Verify that the array length is a multiple of the vector size.
47399        if (in1.length % 4 != 0) {
47400            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47401        }
47402        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47403        ain1.setAutoPadding(true);
47404        ain1.copyFrom(in1);
47405        // Verify that "in2" is non-null.
47406        if (in2 == null) {
47407            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47408        }
47409        // Verify that the array length is a multiple of the vector size.
47410        if (in2.length % 2 != 0) {
47411            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
47412        }
47413        // Verify that input array lengths are the same.
47414        if (in1.length / 4 != in2.length / 2) {
47415            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47416        }
47417        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
47418        ain2.setAutoPadding(true);
47419        ain2.copyFrom(in2);
47420
47421        result_int result = reduce_my_ushort4_half2_1(ain1, ain2, null);
47422        result.mTempIns = new Allocation[]{ain1, ain2};
47423        return result;
47424    }
47425
47426    // ain1 = "ushort4 a"
47427    // ain2 = "half2 b"
47428    public result_int reduce_my_ushort4_half2_1(Allocation ain1, Allocation ain2) {
47429        return reduce_my_ushort4_half2_1(ain1, ain2, null);
47430    }
47431
47432    // ain1 = "ushort4 a"
47433    // ain2 = "half2 b"
47434    public result_int reduce_my_ushort4_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47435        Type t0, t1;
47436        // check ain1
47437        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47438            throw new RSRuntimeException("Type mismatch with U16_4!");
47439        }
47440        // check ain2
47441        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
47442            throw new RSRuntimeException("Type mismatch with F16_2!");
47443        }
47444        // Verify dimensions
47445        t0 = ain1.getType();
47446        t1 = ain2.getType();
47447        if ((t0.getCount() != t1.getCount()) ||
47448            (t0.getX() != t1.getX()) ||
47449            (t0.getY() != t1.getY()) ||
47450            (t0.getZ() != t1.getZ()) ||
47451            (t0.hasFaces()   != t1.hasFaces()) ||
47452            (t0.hasMipmaps() != t1.hasMipmaps())) {
47453            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47454        }
47455
47456        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47457        aout.setAutoPadding(true);
47458        reduce(mExportReduceIdx_my_ushort4_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
47459        return new result_int(aout);
47460    }
47461
47462    private final static int mExportReduceIdx_my_ushort4_half4_0 = 718;
47463    // in1 = "a", flattened 4-vectors
47464    // in2 = "b", flattened 4-vectors
47465    public result_int reduce_my_ushort4_half4_0(short[] in1, short[] in2) {
47466        // Verify that "in1" is non-null.
47467        if (in1 == null) {
47468            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47469        }
47470        // Verify that the array length is a multiple of the vector size.
47471        if (in1.length % 4 != 0) {
47472            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47473        }
47474        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47475        ain1.setAutoPadding(true);
47476        ain1.copyFrom(in1);
47477        // Verify that "in2" is non-null.
47478        if (in2 == null) {
47479            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47480        }
47481        // Verify that the array length is a multiple of the vector size.
47482        if (in2.length % 4 != 0) {
47483            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
47484        }
47485        // Verify that input array lengths are the same.
47486        if (in1.length / 4 != in2.length / 4) {
47487            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47488        }
47489        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
47490        ain2.setAutoPadding(true);
47491        ain2.copyFrom(in2);
47492
47493        result_int result = reduce_my_ushort4_half4_0(ain1, ain2, null);
47494        result.mTempIns = new Allocation[]{ain1, ain2};
47495        return result;
47496    }
47497
47498    // ain1 = "ushort4 a"
47499    // ain2 = "half4 b"
47500    public result_int reduce_my_ushort4_half4_0(Allocation ain1, Allocation ain2) {
47501        return reduce_my_ushort4_half4_0(ain1, ain2, null);
47502    }
47503
47504    // ain1 = "ushort4 a"
47505    // ain2 = "half4 b"
47506    public result_int reduce_my_ushort4_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47507        Type t0, t1;
47508        // check ain1
47509        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47510            throw new RSRuntimeException("Type mismatch with U16_4!");
47511        }
47512        // check ain2
47513        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
47514            throw new RSRuntimeException("Type mismatch with F16_4!");
47515        }
47516        // Verify dimensions
47517        t0 = ain1.getType();
47518        t1 = ain2.getType();
47519        if ((t0.getCount() != t1.getCount()) ||
47520            (t0.getX() != t1.getX()) ||
47521            (t0.getY() != t1.getY()) ||
47522            (t0.getZ() != t1.getZ()) ||
47523            (t0.hasFaces()   != t1.hasFaces()) ||
47524            (t0.hasMipmaps() != t1.hasMipmaps())) {
47525            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47526        }
47527
47528        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47529        aout.setAutoPadding(true);
47530        reduce(mExportReduceIdx_my_ushort4_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
47531        return new result_int(aout);
47532    }
47533
47534    private final static int mExportReduceIdx_my_ushort4_half4_1 = 719;
47535    // in1 = "a", flattened 4-vectors
47536    // in2 = "b", flattened 4-vectors
47537    public result_int reduce_my_ushort4_half4_1(short[] in1, short[] in2) {
47538        // Verify that "in1" is non-null.
47539        if (in1 == null) {
47540            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47541        }
47542        // Verify that the array length is a multiple of the vector size.
47543        if (in1.length % 4 != 0) {
47544            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47545        }
47546        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47547        ain1.setAutoPadding(true);
47548        ain1.copyFrom(in1);
47549        // Verify that "in2" is non-null.
47550        if (in2 == null) {
47551            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47552        }
47553        // Verify that the array length is a multiple of the vector size.
47554        if (in2.length % 4 != 0) {
47555            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
47556        }
47557        // Verify that input array lengths are the same.
47558        if (in1.length / 4 != in2.length / 4) {
47559            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47560        }
47561        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
47562        ain2.setAutoPadding(true);
47563        ain2.copyFrom(in2);
47564
47565        result_int result = reduce_my_ushort4_half4_1(ain1, ain2, null);
47566        result.mTempIns = new Allocation[]{ain1, ain2};
47567        return result;
47568    }
47569
47570    // ain1 = "ushort4 a"
47571    // ain2 = "half4 b"
47572    public result_int reduce_my_ushort4_half4_1(Allocation ain1, Allocation ain2) {
47573        return reduce_my_ushort4_half4_1(ain1, ain2, null);
47574    }
47575
47576    // ain1 = "ushort4 a"
47577    // ain2 = "half4 b"
47578    public result_int reduce_my_ushort4_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47579        Type t0, t1;
47580        // check ain1
47581        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47582            throw new RSRuntimeException("Type mismatch with U16_4!");
47583        }
47584        // check ain2
47585        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
47586            throw new RSRuntimeException("Type mismatch with F16_4!");
47587        }
47588        // Verify dimensions
47589        t0 = ain1.getType();
47590        t1 = ain2.getType();
47591        if ((t0.getCount() != t1.getCount()) ||
47592            (t0.getX() != t1.getX()) ||
47593            (t0.getY() != t1.getY()) ||
47594            (t0.getZ() != t1.getZ()) ||
47595            (t0.hasFaces()   != t1.hasFaces()) ||
47596            (t0.hasMipmaps() != t1.hasMipmaps())) {
47597            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47598        }
47599
47600        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47601        aout.setAutoPadding(true);
47602        reduce(mExportReduceIdx_my_ushort4_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
47603        return new result_int(aout);
47604    }
47605
47606    private final static int mExportReduceIdx_my_ushort4_float_0 = 720;
47607    // in1 = "a", flattened 4-vectors
47608    // in2 = "b"
47609    public result_int reduce_my_ushort4_float_0(short[] in1, float[] in2) {
47610        // Verify that "in1" is non-null.
47611        if (in1 == null) {
47612            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47613        }
47614        // Verify that the array length is a multiple of the vector size.
47615        if (in1.length % 4 != 0) {
47616            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47617        }
47618        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47619        ain1.setAutoPadding(true);
47620        ain1.copyFrom(in1);
47621        // Verify that "in2" is non-null.
47622        if (in2 == null) {
47623            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47624        }
47625        // Verify that input array lengths are the same.
47626        if (in1.length / 4 != in2.length) {
47627            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47628        }
47629        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
47630        ain2.setAutoPadding(true);
47631        ain2.copyFrom(in2);
47632
47633        result_int result = reduce_my_ushort4_float_0(ain1, ain2, null);
47634        result.mTempIns = new Allocation[]{ain1, ain2};
47635        return result;
47636    }
47637
47638    // ain1 = "ushort4 a"
47639    // ain2 = "float b"
47640    public result_int reduce_my_ushort4_float_0(Allocation ain1, Allocation ain2) {
47641        return reduce_my_ushort4_float_0(ain1, ain2, null);
47642    }
47643
47644    // ain1 = "ushort4 a"
47645    // ain2 = "float b"
47646    public result_int reduce_my_ushort4_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47647        Type t0, t1;
47648        // check ain1
47649        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47650            throw new RSRuntimeException("Type mismatch with U16_4!");
47651        }
47652        // check ain2
47653        if (!ain2.getType().getElement().isCompatible(__F32)) {
47654            throw new RSRuntimeException("Type mismatch with F32!");
47655        }
47656        // Verify dimensions
47657        t0 = ain1.getType();
47658        t1 = ain2.getType();
47659        if ((t0.getCount() != t1.getCount()) ||
47660            (t0.getX() != t1.getX()) ||
47661            (t0.getY() != t1.getY()) ||
47662            (t0.getZ() != t1.getZ()) ||
47663            (t0.hasFaces()   != t1.hasFaces()) ||
47664            (t0.hasMipmaps() != t1.hasMipmaps())) {
47665            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47666        }
47667
47668        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47669        aout.setAutoPadding(true);
47670        reduce(mExportReduceIdx_my_ushort4_float_0, new Allocation[]{ain1, ain2}, aout, sc);
47671        return new result_int(aout);
47672    }
47673
47674    private final static int mExportReduceIdx_my_ushort4_float_1 = 721;
47675    // in1 = "a", flattened 4-vectors
47676    // in2 = "b"
47677    public result_int reduce_my_ushort4_float_1(short[] in1, float[] in2) {
47678        // Verify that "in1" is non-null.
47679        if (in1 == null) {
47680            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47681        }
47682        // Verify that the array length is a multiple of the vector size.
47683        if (in1.length % 4 != 0) {
47684            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47685        }
47686        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47687        ain1.setAutoPadding(true);
47688        ain1.copyFrom(in1);
47689        // Verify that "in2" is non-null.
47690        if (in2 == null) {
47691            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47692        }
47693        // Verify that input array lengths are the same.
47694        if (in1.length / 4 != in2.length) {
47695            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47696        }
47697        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
47698        ain2.setAutoPadding(true);
47699        ain2.copyFrom(in2);
47700
47701        result_int result = reduce_my_ushort4_float_1(ain1, ain2, null);
47702        result.mTempIns = new Allocation[]{ain1, ain2};
47703        return result;
47704    }
47705
47706    // ain1 = "ushort4 a"
47707    // ain2 = "float b"
47708    public result_int reduce_my_ushort4_float_1(Allocation ain1, Allocation ain2) {
47709        return reduce_my_ushort4_float_1(ain1, ain2, null);
47710    }
47711
47712    // ain1 = "ushort4 a"
47713    // ain2 = "float b"
47714    public result_int reduce_my_ushort4_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47715        Type t0, t1;
47716        // check ain1
47717        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47718            throw new RSRuntimeException("Type mismatch with U16_4!");
47719        }
47720        // check ain2
47721        if (!ain2.getType().getElement().isCompatible(__F32)) {
47722            throw new RSRuntimeException("Type mismatch with F32!");
47723        }
47724        // Verify dimensions
47725        t0 = ain1.getType();
47726        t1 = ain2.getType();
47727        if ((t0.getCount() != t1.getCount()) ||
47728            (t0.getX() != t1.getX()) ||
47729            (t0.getY() != t1.getY()) ||
47730            (t0.getZ() != t1.getZ()) ||
47731            (t0.hasFaces()   != t1.hasFaces()) ||
47732            (t0.hasMipmaps() != t1.hasMipmaps())) {
47733            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47734        }
47735
47736        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47737        aout.setAutoPadding(true);
47738        reduce(mExportReduceIdx_my_ushort4_float_1, new Allocation[]{ain1, ain2}, aout, sc);
47739        return new result_int(aout);
47740    }
47741
47742    private final static int mExportReduceIdx_my_ushort4_float2_0 = 722;
47743    // in1 = "a", flattened 4-vectors
47744    // in2 = "b", flattened 2-vectors
47745    public result_int reduce_my_ushort4_float2_0(short[] in1, float[] in2) {
47746        // Verify that "in1" is non-null.
47747        if (in1 == null) {
47748            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47749        }
47750        // Verify that the array length is a multiple of the vector size.
47751        if (in1.length % 4 != 0) {
47752            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47753        }
47754        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47755        ain1.setAutoPadding(true);
47756        ain1.copyFrom(in1);
47757        // Verify that "in2" is non-null.
47758        if (in2 == null) {
47759            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47760        }
47761        // Verify that the array length is a multiple of the vector size.
47762        if (in2.length % 2 != 0) {
47763            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
47764        }
47765        // Verify that input array lengths are the same.
47766        if (in1.length / 4 != in2.length / 2) {
47767            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47768        }
47769        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
47770        ain2.setAutoPadding(true);
47771        ain2.copyFrom(in2);
47772
47773        result_int result = reduce_my_ushort4_float2_0(ain1, ain2, null);
47774        result.mTempIns = new Allocation[]{ain1, ain2};
47775        return result;
47776    }
47777
47778    // ain1 = "ushort4 a"
47779    // ain2 = "float2 b"
47780    public result_int reduce_my_ushort4_float2_0(Allocation ain1, Allocation ain2) {
47781        return reduce_my_ushort4_float2_0(ain1, ain2, null);
47782    }
47783
47784    // ain1 = "ushort4 a"
47785    // ain2 = "float2 b"
47786    public result_int reduce_my_ushort4_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47787        Type t0, t1;
47788        // check ain1
47789        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47790            throw new RSRuntimeException("Type mismatch with U16_4!");
47791        }
47792        // check ain2
47793        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
47794            throw new RSRuntimeException("Type mismatch with F32_2!");
47795        }
47796        // Verify dimensions
47797        t0 = ain1.getType();
47798        t1 = ain2.getType();
47799        if ((t0.getCount() != t1.getCount()) ||
47800            (t0.getX() != t1.getX()) ||
47801            (t0.getY() != t1.getY()) ||
47802            (t0.getZ() != t1.getZ()) ||
47803            (t0.hasFaces()   != t1.hasFaces()) ||
47804            (t0.hasMipmaps() != t1.hasMipmaps())) {
47805            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47806        }
47807
47808        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47809        aout.setAutoPadding(true);
47810        reduce(mExportReduceIdx_my_ushort4_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
47811        return new result_int(aout);
47812    }
47813
47814    private final static int mExportReduceIdx_my_ushort4_float2_1 = 723;
47815    // in1 = "a", flattened 4-vectors
47816    // in2 = "b", flattened 2-vectors
47817    public result_int reduce_my_ushort4_float2_1(short[] in1, float[] in2) {
47818        // Verify that "in1" is non-null.
47819        if (in1 == null) {
47820            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47821        }
47822        // Verify that the array length is a multiple of the vector size.
47823        if (in1.length % 4 != 0) {
47824            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47825        }
47826        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47827        ain1.setAutoPadding(true);
47828        ain1.copyFrom(in1);
47829        // Verify that "in2" is non-null.
47830        if (in2 == null) {
47831            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47832        }
47833        // Verify that the array length is a multiple of the vector size.
47834        if (in2.length % 2 != 0) {
47835            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
47836        }
47837        // Verify that input array lengths are the same.
47838        if (in1.length / 4 != in2.length / 2) {
47839            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47840        }
47841        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
47842        ain2.setAutoPadding(true);
47843        ain2.copyFrom(in2);
47844
47845        result_int result = reduce_my_ushort4_float2_1(ain1, ain2, null);
47846        result.mTempIns = new Allocation[]{ain1, ain2};
47847        return result;
47848    }
47849
47850    // ain1 = "ushort4 a"
47851    // ain2 = "float2 b"
47852    public result_int reduce_my_ushort4_float2_1(Allocation ain1, Allocation ain2) {
47853        return reduce_my_ushort4_float2_1(ain1, ain2, null);
47854    }
47855
47856    // ain1 = "ushort4 a"
47857    // ain2 = "float2 b"
47858    public result_int reduce_my_ushort4_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47859        Type t0, t1;
47860        // check ain1
47861        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47862            throw new RSRuntimeException("Type mismatch with U16_4!");
47863        }
47864        // check ain2
47865        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
47866            throw new RSRuntimeException("Type mismatch with F32_2!");
47867        }
47868        // Verify dimensions
47869        t0 = ain1.getType();
47870        t1 = ain2.getType();
47871        if ((t0.getCount() != t1.getCount()) ||
47872            (t0.getX() != t1.getX()) ||
47873            (t0.getY() != t1.getY()) ||
47874            (t0.getZ() != t1.getZ()) ||
47875            (t0.hasFaces()   != t1.hasFaces()) ||
47876            (t0.hasMipmaps() != t1.hasMipmaps())) {
47877            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47878        }
47879
47880        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47881        aout.setAutoPadding(true);
47882        reduce(mExportReduceIdx_my_ushort4_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
47883        return new result_int(aout);
47884    }
47885
47886    private final static int mExportReduceIdx_my_ushort4_float4_0 = 724;
47887    // in1 = "a", flattened 4-vectors
47888    // in2 = "b", flattened 4-vectors
47889    public result_int reduce_my_ushort4_float4_0(short[] in1, float[] in2) {
47890        // Verify that "in1" is non-null.
47891        if (in1 == null) {
47892            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47893        }
47894        // Verify that the array length is a multiple of the vector size.
47895        if (in1.length % 4 != 0) {
47896            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47897        }
47898        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47899        ain1.setAutoPadding(true);
47900        ain1.copyFrom(in1);
47901        // Verify that "in2" is non-null.
47902        if (in2 == null) {
47903            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47904        }
47905        // Verify that the array length is a multiple of the vector size.
47906        if (in2.length % 4 != 0) {
47907            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
47908        }
47909        // Verify that input array lengths are the same.
47910        if (in1.length / 4 != in2.length / 4) {
47911            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47912        }
47913        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
47914        ain2.setAutoPadding(true);
47915        ain2.copyFrom(in2);
47916
47917        result_int result = reduce_my_ushort4_float4_0(ain1, ain2, null);
47918        result.mTempIns = new Allocation[]{ain1, ain2};
47919        return result;
47920    }
47921
47922    // ain1 = "ushort4 a"
47923    // ain2 = "float4 b"
47924    public result_int reduce_my_ushort4_float4_0(Allocation ain1, Allocation ain2) {
47925        return reduce_my_ushort4_float4_0(ain1, ain2, null);
47926    }
47927
47928    // ain1 = "ushort4 a"
47929    // ain2 = "float4 b"
47930    public result_int reduce_my_ushort4_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
47931        Type t0, t1;
47932        // check ain1
47933        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
47934            throw new RSRuntimeException("Type mismatch with U16_4!");
47935        }
47936        // check ain2
47937        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
47938            throw new RSRuntimeException("Type mismatch with F32_4!");
47939        }
47940        // Verify dimensions
47941        t0 = ain1.getType();
47942        t1 = ain2.getType();
47943        if ((t0.getCount() != t1.getCount()) ||
47944            (t0.getX() != t1.getX()) ||
47945            (t0.getY() != t1.getY()) ||
47946            (t0.getZ() != t1.getZ()) ||
47947            (t0.hasFaces()   != t1.hasFaces()) ||
47948            (t0.hasMipmaps() != t1.hasMipmaps())) {
47949            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
47950        }
47951
47952        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
47953        aout.setAutoPadding(true);
47954        reduce(mExportReduceIdx_my_ushort4_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
47955        return new result_int(aout);
47956    }
47957
47958    private final static int mExportReduceIdx_my_ushort4_float4_1 = 725;
47959    // in1 = "a", flattened 4-vectors
47960    // in2 = "b", flattened 4-vectors
47961    public result_int reduce_my_ushort4_float4_1(short[] in1, float[] in2) {
47962        // Verify that "in1" is non-null.
47963        if (in1 == null) {
47964            throw new RSIllegalArgumentException("Array \"in1\" is null!");
47965        }
47966        // Verify that the array length is a multiple of the vector size.
47967        if (in1.length % 4 != 0) {
47968            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
47969        }
47970        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
47971        ain1.setAutoPadding(true);
47972        ain1.copyFrom(in1);
47973        // Verify that "in2" is non-null.
47974        if (in2 == null) {
47975            throw new RSIllegalArgumentException("Array \"in2\" is null!");
47976        }
47977        // Verify that the array length is a multiple of the vector size.
47978        if (in2.length % 4 != 0) {
47979            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
47980        }
47981        // Verify that input array lengths are the same.
47982        if (in1.length / 4 != in2.length / 4) {
47983            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
47984        }
47985        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
47986        ain2.setAutoPadding(true);
47987        ain2.copyFrom(in2);
47988
47989        result_int result = reduce_my_ushort4_float4_1(ain1, ain2, null);
47990        result.mTempIns = new Allocation[]{ain1, ain2};
47991        return result;
47992    }
47993
47994    // ain1 = "ushort4 a"
47995    // ain2 = "float4 b"
47996    public result_int reduce_my_ushort4_float4_1(Allocation ain1, Allocation ain2) {
47997        return reduce_my_ushort4_float4_1(ain1, ain2, null);
47998    }
47999
48000    // ain1 = "ushort4 a"
48001    // ain2 = "float4 b"
48002    public result_int reduce_my_ushort4_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48003        Type t0, t1;
48004        // check ain1
48005        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48006            throw new RSRuntimeException("Type mismatch with U16_4!");
48007        }
48008        // check ain2
48009        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
48010            throw new RSRuntimeException("Type mismatch with F32_4!");
48011        }
48012        // Verify dimensions
48013        t0 = ain1.getType();
48014        t1 = ain2.getType();
48015        if ((t0.getCount() != t1.getCount()) ||
48016            (t0.getX() != t1.getX()) ||
48017            (t0.getY() != t1.getY()) ||
48018            (t0.getZ() != t1.getZ()) ||
48019            (t0.hasFaces()   != t1.hasFaces()) ||
48020            (t0.hasMipmaps() != t1.hasMipmaps())) {
48021            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48022        }
48023
48024        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48025        aout.setAutoPadding(true);
48026        reduce(mExportReduceIdx_my_ushort4_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
48027        return new result_int(aout);
48028    }
48029
48030    private final static int mExportReduceIdx_my_ushort4_char_0 = 726;
48031    // in1 = "a", flattened 4-vectors
48032    // in2 = "b"
48033    public result_int reduce_my_ushort4_char_0(short[] in1, byte[] in2) {
48034        // Verify that "in1" is non-null.
48035        if (in1 == null) {
48036            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48037        }
48038        // Verify that the array length is a multiple of the vector size.
48039        if (in1.length % 4 != 0) {
48040            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48041        }
48042        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48043        ain1.setAutoPadding(true);
48044        ain1.copyFrom(in1);
48045        // Verify that "in2" is non-null.
48046        if (in2 == null) {
48047            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48048        }
48049        // Verify that input array lengths are the same.
48050        if (in1.length / 4 != in2.length) {
48051            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48052        }
48053        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
48054        ain2.setAutoPadding(true);
48055        ain2.copyFrom(in2);
48056
48057        result_int result = reduce_my_ushort4_char_0(ain1, ain2, null);
48058        result.mTempIns = new Allocation[]{ain1, ain2};
48059        return result;
48060    }
48061
48062    // ain1 = "ushort4 a"
48063    // ain2 = "char b"
48064    public result_int reduce_my_ushort4_char_0(Allocation ain1, Allocation ain2) {
48065        return reduce_my_ushort4_char_0(ain1, ain2, null);
48066    }
48067
48068    // ain1 = "ushort4 a"
48069    // ain2 = "char b"
48070    public result_int reduce_my_ushort4_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48071        Type t0, t1;
48072        // check ain1
48073        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48074            throw new RSRuntimeException("Type mismatch with U16_4!");
48075        }
48076        // check ain2
48077        if (!ain2.getType().getElement().isCompatible(__I8)) {
48078            throw new RSRuntimeException("Type mismatch with I8!");
48079        }
48080        // Verify dimensions
48081        t0 = ain1.getType();
48082        t1 = ain2.getType();
48083        if ((t0.getCount() != t1.getCount()) ||
48084            (t0.getX() != t1.getX()) ||
48085            (t0.getY() != t1.getY()) ||
48086            (t0.getZ() != t1.getZ()) ||
48087            (t0.hasFaces()   != t1.hasFaces()) ||
48088            (t0.hasMipmaps() != t1.hasMipmaps())) {
48089            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48090        }
48091
48092        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48093        aout.setAutoPadding(true);
48094        reduce(mExportReduceIdx_my_ushort4_char_0, new Allocation[]{ain1, ain2}, aout, sc);
48095        return new result_int(aout);
48096    }
48097
48098    private final static int mExportReduceIdx_my_ushort4_char_1 = 727;
48099    // in1 = "a", flattened 4-vectors
48100    // in2 = "b"
48101    public result_int reduce_my_ushort4_char_1(short[] in1, byte[] in2) {
48102        // Verify that "in1" is non-null.
48103        if (in1 == null) {
48104            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48105        }
48106        // Verify that the array length is a multiple of the vector size.
48107        if (in1.length % 4 != 0) {
48108            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48109        }
48110        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48111        ain1.setAutoPadding(true);
48112        ain1.copyFrom(in1);
48113        // Verify that "in2" is non-null.
48114        if (in2 == null) {
48115            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48116        }
48117        // Verify that input array lengths are the same.
48118        if (in1.length / 4 != in2.length) {
48119            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48120        }
48121        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
48122        ain2.setAutoPadding(true);
48123        ain2.copyFrom(in2);
48124
48125        result_int result = reduce_my_ushort4_char_1(ain1, ain2, null);
48126        result.mTempIns = new Allocation[]{ain1, ain2};
48127        return result;
48128    }
48129
48130    // ain1 = "ushort4 a"
48131    // ain2 = "char b"
48132    public result_int reduce_my_ushort4_char_1(Allocation ain1, Allocation ain2) {
48133        return reduce_my_ushort4_char_1(ain1, ain2, null);
48134    }
48135
48136    // ain1 = "ushort4 a"
48137    // ain2 = "char b"
48138    public result_int reduce_my_ushort4_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48139        Type t0, t1;
48140        // check ain1
48141        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48142            throw new RSRuntimeException("Type mismatch with U16_4!");
48143        }
48144        // check ain2
48145        if (!ain2.getType().getElement().isCompatible(__I8)) {
48146            throw new RSRuntimeException("Type mismatch with I8!");
48147        }
48148        // Verify dimensions
48149        t0 = ain1.getType();
48150        t1 = ain2.getType();
48151        if ((t0.getCount() != t1.getCount()) ||
48152            (t0.getX() != t1.getX()) ||
48153            (t0.getY() != t1.getY()) ||
48154            (t0.getZ() != t1.getZ()) ||
48155            (t0.hasFaces()   != t1.hasFaces()) ||
48156            (t0.hasMipmaps() != t1.hasMipmaps())) {
48157            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48158        }
48159
48160        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48161        aout.setAutoPadding(true);
48162        reduce(mExportReduceIdx_my_ushort4_char_1, new Allocation[]{ain1, ain2}, aout, sc);
48163        return new result_int(aout);
48164    }
48165
48166    private final static int mExportReduceIdx_my_ushort4_char2_0 = 728;
48167    // in1 = "a", flattened 4-vectors
48168    // in2 = "b", flattened 2-vectors
48169    public result_int reduce_my_ushort4_char2_0(short[] in1, byte[] in2) {
48170        // Verify that "in1" is non-null.
48171        if (in1 == null) {
48172            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48173        }
48174        // Verify that the array length is a multiple of the vector size.
48175        if (in1.length % 4 != 0) {
48176            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48177        }
48178        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48179        ain1.setAutoPadding(true);
48180        ain1.copyFrom(in1);
48181        // Verify that "in2" is non-null.
48182        if (in2 == null) {
48183            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48184        }
48185        // Verify that the array length is a multiple of the vector size.
48186        if (in2.length % 2 != 0) {
48187            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
48188        }
48189        // Verify that input array lengths are the same.
48190        if (in1.length / 4 != in2.length / 2) {
48191            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48192        }
48193        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
48194        ain2.setAutoPadding(true);
48195        ain2.copyFrom(in2);
48196
48197        result_int result = reduce_my_ushort4_char2_0(ain1, ain2, null);
48198        result.mTempIns = new Allocation[]{ain1, ain2};
48199        return result;
48200    }
48201
48202    // ain1 = "ushort4 a"
48203    // ain2 = "char2 b"
48204    public result_int reduce_my_ushort4_char2_0(Allocation ain1, Allocation ain2) {
48205        return reduce_my_ushort4_char2_0(ain1, ain2, null);
48206    }
48207
48208    // ain1 = "ushort4 a"
48209    // ain2 = "char2 b"
48210    public result_int reduce_my_ushort4_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48211        Type t0, t1;
48212        // check ain1
48213        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48214            throw new RSRuntimeException("Type mismatch with U16_4!");
48215        }
48216        // check ain2
48217        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
48218            throw new RSRuntimeException("Type mismatch with I8_2!");
48219        }
48220        // Verify dimensions
48221        t0 = ain1.getType();
48222        t1 = ain2.getType();
48223        if ((t0.getCount() != t1.getCount()) ||
48224            (t0.getX() != t1.getX()) ||
48225            (t0.getY() != t1.getY()) ||
48226            (t0.getZ() != t1.getZ()) ||
48227            (t0.hasFaces()   != t1.hasFaces()) ||
48228            (t0.hasMipmaps() != t1.hasMipmaps())) {
48229            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48230        }
48231
48232        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48233        aout.setAutoPadding(true);
48234        reduce(mExportReduceIdx_my_ushort4_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
48235        return new result_int(aout);
48236    }
48237
48238    private final static int mExportReduceIdx_my_ushort4_char2_1 = 729;
48239    // in1 = "a", flattened 4-vectors
48240    // in2 = "b", flattened 2-vectors
48241    public result_int reduce_my_ushort4_char2_1(short[] in1, byte[] in2) {
48242        // Verify that "in1" is non-null.
48243        if (in1 == null) {
48244            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48245        }
48246        // Verify that the array length is a multiple of the vector size.
48247        if (in1.length % 4 != 0) {
48248            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48249        }
48250        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48251        ain1.setAutoPadding(true);
48252        ain1.copyFrom(in1);
48253        // Verify that "in2" is non-null.
48254        if (in2 == null) {
48255            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48256        }
48257        // Verify that the array length is a multiple of the vector size.
48258        if (in2.length % 2 != 0) {
48259            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
48260        }
48261        // Verify that input array lengths are the same.
48262        if (in1.length / 4 != in2.length / 2) {
48263            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48264        }
48265        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
48266        ain2.setAutoPadding(true);
48267        ain2.copyFrom(in2);
48268
48269        result_int result = reduce_my_ushort4_char2_1(ain1, ain2, null);
48270        result.mTempIns = new Allocation[]{ain1, ain2};
48271        return result;
48272    }
48273
48274    // ain1 = "ushort4 a"
48275    // ain2 = "char2 b"
48276    public result_int reduce_my_ushort4_char2_1(Allocation ain1, Allocation ain2) {
48277        return reduce_my_ushort4_char2_1(ain1, ain2, null);
48278    }
48279
48280    // ain1 = "ushort4 a"
48281    // ain2 = "char2 b"
48282    public result_int reduce_my_ushort4_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48283        Type t0, t1;
48284        // check ain1
48285        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48286            throw new RSRuntimeException("Type mismatch with U16_4!");
48287        }
48288        // check ain2
48289        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
48290            throw new RSRuntimeException("Type mismatch with I8_2!");
48291        }
48292        // Verify dimensions
48293        t0 = ain1.getType();
48294        t1 = ain2.getType();
48295        if ((t0.getCount() != t1.getCount()) ||
48296            (t0.getX() != t1.getX()) ||
48297            (t0.getY() != t1.getY()) ||
48298            (t0.getZ() != t1.getZ()) ||
48299            (t0.hasFaces()   != t1.hasFaces()) ||
48300            (t0.hasMipmaps() != t1.hasMipmaps())) {
48301            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48302        }
48303
48304        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48305        aout.setAutoPadding(true);
48306        reduce(mExportReduceIdx_my_ushort4_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
48307        return new result_int(aout);
48308    }
48309
48310    private final static int mExportReduceIdx_my_ushort4_char4_0 = 730;
48311    // in1 = "a", flattened 4-vectors
48312    // in2 = "b", flattened 4-vectors
48313    public result_int reduce_my_ushort4_char4_0(short[] in1, byte[] in2) {
48314        // Verify that "in1" is non-null.
48315        if (in1 == null) {
48316            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48317        }
48318        // Verify that the array length is a multiple of the vector size.
48319        if (in1.length % 4 != 0) {
48320            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48321        }
48322        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48323        ain1.setAutoPadding(true);
48324        ain1.copyFrom(in1);
48325        // Verify that "in2" is non-null.
48326        if (in2 == null) {
48327            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48328        }
48329        // Verify that the array length is a multiple of the vector size.
48330        if (in2.length % 4 != 0) {
48331            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
48332        }
48333        // Verify that input array lengths are the same.
48334        if (in1.length / 4 != in2.length / 4) {
48335            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48336        }
48337        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
48338        ain2.setAutoPadding(true);
48339        ain2.copyFrom(in2);
48340
48341        result_int result = reduce_my_ushort4_char4_0(ain1, ain2, null);
48342        result.mTempIns = new Allocation[]{ain1, ain2};
48343        return result;
48344    }
48345
48346    // ain1 = "ushort4 a"
48347    // ain2 = "char4 b"
48348    public result_int reduce_my_ushort4_char4_0(Allocation ain1, Allocation ain2) {
48349        return reduce_my_ushort4_char4_0(ain1, ain2, null);
48350    }
48351
48352    // ain1 = "ushort4 a"
48353    // ain2 = "char4 b"
48354    public result_int reduce_my_ushort4_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48355        Type t0, t1;
48356        // check ain1
48357        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48358            throw new RSRuntimeException("Type mismatch with U16_4!");
48359        }
48360        // check ain2
48361        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
48362            throw new RSRuntimeException("Type mismatch with I8_4!");
48363        }
48364        // Verify dimensions
48365        t0 = ain1.getType();
48366        t1 = ain2.getType();
48367        if ((t0.getCount() != t1.getCount()) ||
48368            (t0.getX() != t1.getX()) ||
48369            (t0.getY() != t1.getY()) ||
48370            (t0.getZ() != t1.getZ()) ||
48371            (t0.hasFaces()   != t1.hasFaces()) ||
48372            (t0.hasMipmaps() != t1.hasMipmaps())) {
48373            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48374        }
48375
48376        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48377        aout.setAutoPadding(true);
48378        reduce(mExportReduceIdx_my_ushort4_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
48379        return new result_int(aout);
48380    }
48381
48382    private final static int mExportReduceIdx_my_ushort4_char4_1 = 731;
48383    // in1 = "a", flattened 4-vectors
48384    // in2 = "b", flattened 4-vectors
48385    public result_int reduce_my_ushort4_char4_1(short[] in1, byte[] in2) {
48386        // Verify that "in1" is non-null.
48387        if (in1 == null) {
48388            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48389        }
48390        // Verify that the array length is a multiple of the vector size.
48391        if (in1.length % 4 != 0) {
48392            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48393        }
48394        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48395        ain1.setAutoPadding(true);
48396        ain1.copyFrom(in1);
48397        // Verify that "in2" is non-null.
48398        if (in2 == null) {
48399            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48400        }
48401        // Verify that the array length is a multiple of the vector size.
48402        if (in2.length % 4 != 0) {
48403            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
48404        }
48405        // Verify that input array lengths are the same.
48406        if (in1.length / 4 != in2.length / 4) {
48407            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48408        }
48409        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
48410        ain2.setAutoPadding(true);
48411        ain2.copyFrom(in2);
48412
48413        result_int result = reduce_my_ushort4_char4_1(ain1, ain2, null);
48414        result.mTempIns = new Allocation[]{ain1, ain2};
48415        return result;
48416    }
48417
48418    // ain1 = "ushort4 a"
48419    // ain2 = "char4 b"
48420    public result_int reduce_my_ushort4_char4_1(Allocation ain1, Allocation ain2) {
48421        return reduce_my_ushort4_char4_1(ain1, ain2, null);
48422    }
48423
48424    // ain1 = "ushort4 a"
48425    // ain2 = "char4 b"
48426    public result_int reduce_my_ushort4_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48427        Type t0, t1;
48428        // check ain1
48429        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48430            throw new RSRuntimeException("Type mismatch with U16_4!");
48431        }
48432        // check ain2
48433        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
48434            throw new RSRuntimeException("Type mismatch with I8_4!");
48435        }
48436        // Verify dimensions
48437        t0 = ain1.getType();
48438        t1 = ain2.getType();
48439        if ((t0.getCount() != t1.getCount()) ||
48440            (t0.getX() != t1.getX()) ||
48441            (t0.getY() != t1.getY()) ||
48442            (t0.getZ() != t1.getZ()) ||
48443            (t0.hasFaces()   != t1.hasFaces()) ||
48444            (t0.hasMipmaps() != t1.hasMipmaps())) {
48445            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48446        }
48447
48448        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48449        aout.setAutoPadding(true);
48450        reduce(mExportReduceIdx_my_ushort4_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
48451        return new result_int(aout);
48452    }
48453
48454    private final static int mExportReduceIdx_my_ushort4_short_0 = 732;
48455    // in1 = "a", flattened 4-vectors
48456    // in2 = "b"
48457    public result_int reduce_my_ushort4_short_0(short[] in1, short[] in2) {
48458        // Verify that "in1" is non-null.
48459        if (in1 == null) {
48460            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48461        }
48462        // Verify that the array length is a multiple of the vector size.
48463        if (in1.length % 4 != 0) {
48464            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48465        }
48466        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48467        ain1.setAutoPadding(true);
48468        ain1.copyFrom(in1);
48469        // Verify that "in2" is non-null.
48470        if (in2 == null) {
48471            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48472        }
48473        // Verify that input array lengths are the same.
48474        if (in1.length / 4 != in2.length) {
48475            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48476        }
48477        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
48478        ain2.setAutoPadding(true);
48479        ain2.copyFrom(in2);
48480
48481        result_int result = reduce_my_ushort4_short_0(ain1, ain2, null);
48482        result.mTempIns = new Allocation[]{ain1, ain2};
48483        return result;
48484    }
48485
48486    // ain1 = "ushort4 a"
48487    // ain2 = "short b"
48488    public result_int reduce_my_ushort4_short_0(Allocation ain1, Allocation ain2) {
48489        return reduce_my_ushort4_short_0(ain1, ain2, null);
48490    }
48491
48492    // ain1 = "ushort4 a"
48493    // ain2 = "short b"
48494    public result_int reduce_my_ushort4_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48495        Type t0, t1;
48496        // check ain1
48497        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48498            throw new RSRuntimeException("Type mismatch with U16_4!");
48499        }
48500        // check ain2
48501        if (!ain2.getType().getElement().isCompatible(__I16)) {
48502            throw new RSRuntimeException("Type mismatch with I16!");
48503        }
48504        // Verify dimensions
48505        t0 = ain1.getType();
48506        t1 = ain2.getType();
48507        if ((t0.getCount() != t1.getCount()) ||
48508            (t0.getX() != t1.getX()) ||
48509            (t0.getY() != t1.getY()) ||
48510            (t0.getZ() != t1.getZ()) ||
48511            (t0.hasFaces()   != t1.hasFaces()) ||
48512            (t0.hasMipmaps() != t1.hasMipmaps())) {
48513            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48514        }
48515
48516        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48517        aout.setAutoPadding(true);
48518        reduce(mExportReduceIdx_my_ushort4_short_0, new Allocation[]{ain1, ain2}, aout, sc);
48519        return new result_int(aout);
48520    }
48521
48522    private final static int mExportReduceIdx_my_ushort4_short_1 = 733;
48523    // in1 = "a", flattened 4-vectors
48524    // in2 = "b"
48525    public result_int reduce_my_ushort4_short_1(short[] in1, short[] in2) {
48526        // Verify that "in1" is non-null.
48527        if (in1 == null) {
48528            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48529        }
48530        // Verify that the array length is a multiple of the vector size.
48531        if (in1.length % 4 != 0) {
48532            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48533        }
48534        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48535        ain1.setAutoPadding(true);
48536        ain1.copyFrom(in1);
48537        // Verify that "in2" is non-null.
48538        if (in2 == null) {
48539            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48540        }
48541        // Verify that input array lengths are the same.
48542        if (in1.length / 4 != in2.length) {
48543            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48544        }
48545        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
48546        ain2.setAutoPadding(true);
48547        ain2.copyFrom(in2);
48548
48549        result_int result = reduce_my_ushort4_short_1(ain1, ain2, null);
48550        result.mTempIns = new Allocation[]{ain1, ain2};
48551        return result;
48552    }
48553
48554    // ain1 = "ushort4 a"
48555    // ain2 = "short b"
48556    public result_int reduce_my_ushort4_short_1(Allocation ain1, Allocation ain2) {
48557        return reduce_my_ushort4_short_1(ain1, ain2, null);
48558    }
48559
48560    // ain1 = "ushort4 a"
48561    // ain2 = "short b"
48562    public result_int reduce_my_ushort4_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48563        Type t0, t1;
48564        // check ain1
48565        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48566            throw new RSRuntimeException("Type mismatch with U16_4!");
48567        }
48568        // check ain2
48569        if (!ain2.getType().getElement().isCompatible(__I16)) {
48570            throw new RSRuntimeException("Type mismatch with I16!");
48571        }
48572        // Verify dimensions
48573        t0 = ain1.getType();
48574        t1 = ain2.getType();
48575        if ((t0.getCount() != t1.getCount()) ||
48576            (t0.getX() != t1.getX()) ||
48577            (t0.getY() != t1.getY()) ||
48578            (t0.getZ() != t1.getZ()) ||
48579            (t0.hasFaces()   != t1.hasFaces()) ||
48580            (t0.hasMipmaps() != t1.hasMipmaps())) {
48581            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48582        }
48583
48584        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48585        aout.setAutoPadding(true);
48586        reduce(mExportReduceIdx_my_ushort4_short_1, new Allocation[]{ain1, ain2}, aout, sc);
48587        return new result_int(aout);
48588    }
48589
48590    private final static int mExportReduceIdx_my_ushort4_short2_0 = 734;
48591    // in1 = "a", flattened 4-vectors
48592    // in2 = "b", flattened 2-vectors
48593    public result_int reduce_my_ushort4_short2_0(short[] in1, short[] in2) {
48594        // Verify that "in1" is non-null.
48595        if (in1 == null) {
48596            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48597        }
48598        // Verify that the array length is a multiple of the vector size.
48599        if (in1.length % 4 != 0) {
48600            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48601        }
48602        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48603        ain1.setAutoPadding(true);
48604        ain1.copyFrom(in1);
48605        // Verify that "in2" is non-null.
48606        if (in2 == null) {
48607            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48608        }
48609        // Verify that the array length is a multiple of the vector size.
48610        if (in2.length % 2 != 0) {
48611            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
48612        }
48613        // Verify that input array lengths are the same.
48614        if (in1.length / 4 != in2.length / 2) {
48615            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48616        }
48617        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
48618        ain2.setAutoPadding(true);
48619        ain2.copyFrom(in2);
48620
48621        result_int result = reduce_my_ushort4_short2_0(ain1, ain2, null);
48622        result.mTempIns = new Allocation[]{ain1, ain2};
48623        return result;
48624    }
48625
48626    // ain1 = "ushort4 a"
48627    // ain2 = "short2 b"
48628    public result_int reduce_my_ushort4_short2_0(Allocation ain1, Allocation ain2) {
48629        return reduce_my_ushort4_short2_0(ain1, ain2, null);
48630    }
48631
48632    // ain1 = "ushort4 a"
48633    // ain2 = "short2 b"
48634    public result_int reduce_my_ushort4_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48635        Type t0, t1;
48636        // check ain1
48637        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48638            throw new RSRuntimeException("Type mismatch with U16_4!");
48639        }
48640        // check ain2
48641        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
48642            throw new RSRuntimeException("Type mismatch with I16_2!");
48643        }
48644        // Verify dimensions
48645        t0 = ain1.getType();
48646        t1 = ain2.getType();
48647        if ((t0.getCount() != t1.getCount()) ||
48648            (t0.getX() != t1.getX()) ||
48649            (t0.getY() != t1.getY()) ||
48650            (t0.getZ() != t1.getZ()) ||
48651            (t0.hasFaces()   != t1.hasFaces()) ||
48652            (t0.hasMipmaps() != t1.hasMipmaps())) {
48653            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48654        }
48655
48656        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48657        aout.setAutoPadding(true);
48658        reduce(mExportReduceIdx_my_ushort4_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
48659        return new result_int(aout);
48660    }
48661
48662    private final static int mExportReduceIdx_my_ushort4_short2_1 = 735;
48663    // in1 = "a", flattened 4-vectors
48664    // in2 = "b", flattened 2-vectors
48665    public result_int reduce_my_ushort4_short2_1(short[] in1, short[] in2) {
48666        // Verify that "in1" is non-null.
48667        if (in1 == null) {
48668            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48669        }
48670        // Verify that the array length is a multiple of the vector size.
48671        if (in1.length % 4 != 0) {
48672            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48673        }
48674        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48675        ain1.setAutoPadding(true);
48676        ain1.copyFrom(in1);
48677        // Verify that "in2" is non-null.
48678        if (in2 == null) {
48679            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48680        }
48681        // Verify that the array length is a multiple of the vector size.
48682        if (in2.length % 2 != 0) {
48683            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
48684        }
48685        // Verify that input array lengths are the same.
48686        if (in1.length / 4 != in2.length / 2) {
48687            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48688        }
48689        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
48690        ain2.setAutoPadding(true);
48691        ain2.copyFrom(in2);
48692
48693        result_int result = reduce_my_ushort4_short2_1(ain1, ain2, null);
48694        result.mTempIns = new Allocation[]{ain1, ain2};
48695        return result;
48696    }
48697
48698    // ain1 = "ushort4 a"
48699    // ain2 = "short2 b"
48700    public result_int reduce_my_ushort4_short2_1(Allocation ain1, Allocation ain2) {
48701        return reduce_my_ushort4_short2_1(ain1, ain2, null);
48702    }
48703
48704    // ain1 = "ushort4 a"
48705    // ain2 = "short2 b"
48706    public result_int reduce_my_ushort4_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48707        Type t0, t1;
48708        // check ain1
48709        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48710            throw new RSRuntimeException("Type mismatch with U16_4!");
48711        }
48712        // check ain2
48713        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
48714            throw new RSRuntimeException("Type mismatch with I16_2!");
48715        }
48716        // Verify dimensions
48717        t0 = ain1.getType();
48718        t1 = ain2.getType();
48719        if ((t0.getCount() != t1.getCount()) ||
48720            (t0.getX() != t1.getX()) ||
48721            (t0.getY() != t1.getY()) ||
48722            (t0.getZ() != t1.getZ()) ||
48723            (t0.hasFaces()   != t1.hasFaces()) ||
48724            (t0.hasMipmaps() != t1.hasMipmaps())) {
48725            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48726        }
48727
48728        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48729        aout.setAutoPadding(true);
48730        reduce(mExportReduceIdx_my_ushort4_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
48731        return new result_int(aout);
48732    }
48733
48734    private final static int mExportReduceIdx_my_ushort4_short4_0 = 736;
48735    // in1 = "a", flattened 4-vectors
48736    // in2 = "b", flattened 4-vectors
48737    public result_int reduce_my_ushort4_short4_0(short[] in1, short[] in2) {
48738        // Verify that "in1" is non-null.
48739        if (in1 == null) {
48740            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48741        }
48742        // Verify that the array length is a multiple of the vector size.
48743        if (in1.length % 4 != 0) {
48744            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48745        }
48746        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48747        ain1.setAutoPadding(true);
48748        ain1.copyFrom(in1);
48749        // Verify that "in2" is non-null.
48750        if (in2 == null) {
48751            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48752        }
48753        // Verify that the array length is a multiple of the vector size.
48754        if (in2.length % 4 != 0) {
48755            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
48756        }
48757        // Verify that input array lengths are the same.
48758        if (in1.length / 4 != in2.length / 4) {
48759            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48760        }
48761        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
48762        ain2.setAutoPadding(true);
48763        ain2.copyFrom(in2);
48764
48765        result_int result = reduce_my_ushort4_short4_0(ain1, ain2, null);
48766        result.mTempIns = new Allocation[]{ain1, ain2};
48767        return result;
48768    }
48769
48770    // ain1 = "ushort4 a"
48771    // ain2 = "short4 b"
48772    public result_int reduce_my_ushort4_short4_0(Allocation ain1, Allocation ain2) {
48773        return reduce_my_ushort4_short4_0(ain1, ain2, null);
48774    }
48775
48776    // ain1 = "ushort4 a"
48777    // ain2 = "short4 b"
48778    public result_int reduce_my_ushort4_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48779        Type t0, t1;
48780        // check ain1
48781        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48782            throw new RSRuntimeException("Type mismatch with U16_4!");
48783        }
48784        // check ain2
48785        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
48786            throw new RSRuntimeException("Type mismatch with I16_4!");
48787        }
48788        // Verify dimensions
48789        t0 = ain1.getType();
48790        t1 = ain2.getType();
48791        if ((t0.getCount() != t1.getCount()) ||
48792            (t0.getX() != t1.getX()) ||
48793            (t0.getY() != t1.getY()) ||
48794            (t0.getZ() != t1.getZ()) ||
48795            (t0.hasFaces()   != t1.hasFaces()) ||
48796            (t0.hasMipmaps() != t1.hasMipmaps())) {
48797            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48798        }
48799
48800        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48801        aout.setAutoPadding(true);
48802        reduce(mExportReduceIdx_my_ushort4_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
48803        return new result_int(aout);
48804    }
48805
48806    private final static int mExportReduceIdx_my_ushort4_short4_1 = 737;
48807    // in1 = "a", flattened 4-vectors
48808    // in2 = "b", flattened 4-vectors
48809    public result_int reduce_my_ushort4_short4_1(short[] in1, short[] in2) {
48810        // Verify that "in1" is non-null.
48811        if (in1 == null) {
48812            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48813        }
48814        // Verify that the array length is a multiple of the vector size.
48815        if (in1.length % 4 != 0) {
48816            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48817        }
48818        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48819        ain1.setAutoPadding(true);
48820        ain1.copyFrom(in1);
48821        // Verify that "in2" is non-null.
48822        if (in2 == null) {
48823            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48824        }
48825        // Verify that the array length is a multiple of the vector size.
48826        if (in2.length % 4 != 0) {
48827            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
48828        }
48829        // Verify that input array lengths are the same.
48830        if (in1.length / 4 != in2.length / 4) {
48831            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48832        }
48833        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
48834        ain2.setAutoPadding(true);
48835        ain2.copyFrom(in2);
48836
48837        result_int result = reduce_my_ushort4_short4_1(ain1, ain2, null);
48838        result.mTempIns = new Allocation[]{ain1, ain2};
48839        return result;
48840    }
48841
48842    // ain1 = "ushort4 a"
48843    // ain2 = "short4 b"
48844    public result_int reduce_my_ushort4_short4_1(Allocation ain1, Allocation ain2) {
48845        return reduce_my_ushort4_short4_1(ain1, ain2, null);
48846    }
48847
48848    // ain1 = "ushort4 a"
48849    // ain2 = "short4 b"
48850    public result_int reduce_my_ushort4_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48851        Type t0, t1;
48852        // check ain1
48853        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48854            throw new RSRuntimeException("Type mismatch with U16_4!");
48855        }
48856        // check ain2
48857        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
48858            throw new RSRuntimeException("Type mismatch with I16_4!");
48859        }
48860        // Verify dimensions
48861        t0 = ain1.getType();
48862        t1 = ain2.getType();
48863        if ((t0.getCount() != t1.getCount()) ||
48864            (t0.getX() != t1.getX()) ||
48865            (t0.getY() != t1.getY()) ||
48866            (t0.getZ() != t1.getZ()) ||
48867            (t0.hasFaces()   != t1.hasFaces()) ||
48868            (t0.hasMipmaps() != t1.hasMipmaps())) {
48869            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48870        }
48871
48872        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48873        aout.setAutoPadding(true);
48874        reduce(mExportReduceIdx_my_ushort4_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
48875        return new result_int(aout);
48876    }
48877
48878    private final static int mExportReduceIdx_my_ushort4_uchar_0 = 738;
48879    // in1 = "a", flattened 4-vectors
48880    // in2 = "b"
48881    public result_int reduce_my_ushort4_uchar_0(short[] in1, byte[] in2) {
48882        // Verify that "in1" is non-null.
48883        if (in1 == null) {
48884            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48885        }
48886        // Verify that the array length is a multiple of the vector size.
48887        if (in1.length % 4 != 0) {
48888            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48889        }
48890        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48891        ain1.setAutoPadding(true);
48892        ain1.copyFrom(in1);
48893        // Verify that "in2" is non-null.
48894        if (in2 == null) {
48895            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48896        }
48897        // Verify that input array lengths are the same.
48898        if (in1.length / 4 != in2.length) {
48899            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48900        }
48901        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
48902        ain2.setAutoPadding(true);
48903        ain2.copyFrom(in2);
48904
48905        result_int result = reduce_my_ushort4_uchar_0(ain1, ain2, null);
48906        result.mTempIns = new Allocation[]{ain1, ain2};
48907        return result;
48908    }
48909
48910    // ain1 = "ushort4 a"
48911    // ain2 = "uchar b"
48912    public result_int reduce_my_ushort4_uchar_0(Allocation ain1, Allocation ain2) {
48913        return reduce_my_ushort4_uchar_0(ain1, ain2, null);
48914    }
48915
48916    // ain1 = "ushort4 a"
48917    // ain2 = "uchar b"
48918    public result_int reduce_my_ushort4_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48919        Type t0, t1;
48920        // check ain1
48921        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48922            throw new RSRuntimeException("Type mismatch with U16_4!");
48923        }
48924        // check ain2
48925        if (!ain2.getType().getElement().isCompatible(__U8)) {
48926            throw new RSRuntimeException("Type mismatch with U8!");
48927        }
48928        // Verify dimensions
48929        t0 = ain1.getType();
48930        t1 = ain2.getType();
48931        if ((t0.getCount() != t1.getCount()) ||
48932            (t0.getX() != t1.getX()) ||
48933            (t0.getY() != t1.getY()) ||
48934            (t0.getZ() != t1.getZ()) ||
48935            (t0.hasFaces()   != t1.hasFaces()) ||
48936            (t0.hasMipmaps() != t1.hasMipmaps())) {
48937            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
48938        }
48939
48940        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
48941        aout.setAutoPadding(true);
48942        reduce(mExportReduceIdx_my_ushort4_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
48943        return new result_int(aout);
48944    }
48945
48946    private final static int mExportReduceIdx_my_ushort4_uchar_1 = 739;
48947    // in1 = "a", flattened 4-vectors
48948    // in2 = "b"
48949    public result_int reduce_my_ushort4_uchar_1(short[] in1, byte[] in2) {
48950        // Verify that "in1" is non-null.
48951        if (in1 == null) {
48952            throw new RSIllegalArgumentException("Array \"in1\" is null!");
48953        }
48954        // Verify that the array length is a multiple of the vector size.
48955        if (in1.length % 4 != 0) {
48956            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
48957        }
48958        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
48959        ain1.setAutoPadding(true);
48960        ain1.copyFrom(in1);
48961        // Verify that "in2" is non-null.
48962        if (in2 == null) {
48963            throw new RSIllegalArgumentException("Array \"in2\" is null!");
48964        }
48965        // Verify that input array lengths are the same.
48966        if (in1.length / 4 != in2.length) {
48967            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
48968        }
48969        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
48970        ain2.setAutoPadding(true);
48971        ain2.copyFrom(in2);
48972
48973        result_int result = reduce_my_ushort4_uchar_1(ain1, ain2, null);
48974        result.mTempIns = new Allocation[]{ain1, ain2};
48975        return result;
48976    }
48977
48978    // ain1 = "ushort4 a"
48979    // ain2 = "uchar b"
48980    public result_int reduce_my_ushort4_uchar_1(Allocation ain1, Allocation ain2) {
48981        return reduce_my_ushort4_uchar_1(ain1, ain2, null);
48982    }
48983
48984    // ain1 = "ushort4 a"
48985    // ain2 = "uchar b"
48986    public result_int reduce_my_ushort4_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
48987        Type t0, t1;
48988        // check ain1
48989        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
48990            throw new RSRuntimeException("Type mismatch with U16_4!");
48991        }
48992        // check ain2
48993        if (!ain2.getType().getElement().isCompatible(__U8)) {
48994            throw new RSRuntimeException("Type mismatch with U8!");
48995        }
48996        // Verify dimensions
48997        t0 = ain1.getType();
48998        t1 = ain2.getType();
48999        if ((t0.getCount() != t1.getCount()) ||
49000            (t0.getX() != t1.getX()) ||
49001            (t0.getY() != t1.getY()) ||
49002            (t0.getZ() != t1.getZ()) ||
49003            (t0.hasFaces()   != t1.hasFaces()) ||
49004            (t0.hasMipmaps() != t1.hasMipmaps())) {
49005            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49006        }
49007
49008        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49009        aout.setAutoPadding(true);
49010        reduce(mExportReduceIdx_my_ushort4_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
49011        return new result_int(aout);
49012    }
49013
49014    private final static int mExportReduceIdx_my_ushort4_uchar2_0 = 740;
49015    // in1 = "a", flattened 4-vectors
49016    // in2 = "b", flattened 2-vectors
49017    public result_int reduce_my_ushort4_uchar2_0(short[] in1, byte[] in2) {
49018        // Verify that "in1" is non-null.
49019        if (in1 == null) {
49020            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49021        }
49022        // Verify that the array length is a multiple of the vector size.
49023        if (in1.length % 4 != 0) {
49024            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49025        }
49026        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49027        ain1.setAutoPadding(true);
49028        ain1.copyFrom(in1);
49029        // Verify that "in2" is non-null.
49030        if (in2 == null) {
49031            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49032        }
49033        // Verify that the array length is a multiple of the vector size.
49034        if (in2.length % 2 != 0) {
49035            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
49036        }
49037        // Verify that input array lengths are the same.
49038        if (in1.length / 4 != in2.length / 2) {
49039            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49040        }
49041        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
49042        ain2.setAutoPadding(true);
49043        ain2.copyFrom(in2);
49044
49045        result_int result = reduce_my_ushort4_uchar2_0(ain1, ain2, null);
49046        result.mTempIns = new Allocation[]{ain1, ain2};
49047        return result;
49048    }
49049
49050    // ain1 = "ushort4 a"
49051    // ain2 = "uchar2 b"
49052    public result_int reduce_my_ushort4_uchar2_0(Allocation ain1, Allocation ain2) {
49053        return reduce_my_ushort4_uchar2_0(ain1, ain2, null);
49054    }
49055
49056    // ain1 = "ushort4 a"
49057    // ain2 = "uchar2 b"
49058    public result_int reduce_my_ushort4_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49059        Type t0, t1;
49060        // check ain1
49061        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49062            throw new RSRuntimeException("Type mismatch with U16_4!");
49063        }
49064        // check ain2
49065        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
49066            throw new RSRuntimeException("Type mismatch with U8_2!");
49067        }
49068        // Verify dimensions
49069        t0 = ain1.getType();
49070        t1 = ain2.getType();
49071        if ((t0.getCount() != t1.getCount()) ||
49072            (t0.getX() != t1.getX()) ||
49073            (t0.getY() != t1.getY()) ||
49074            (t0.getZ() != t1.getZ()) ||
49075            (t0.hasFaces()   != t1.hasFaces()) ||
49076            (t0.hasMipmaps() != t1.hasMipmaps())) {
49077            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49078        }
49079
49080        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49081        aout.setAutoPadding(true);
49082        reduce(mExportReduceIdx_my_ushort4_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
49083        return new result_int(aout);
49084    }
49085
49086    private final static int mExportReduceIdx_my_ushort4_uchar2_1 = 741;
49087    // in1 = "a", flattened 4-vectors
49088    // in2 = "b", flattened 2-vectors
49089    public result_int reduce_my_ushort4_uchar2_1(short[] in1, byte[] in2) {
49090        // Verify that "in1" is non-null.
49091        if (in1 == null) {
49092            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49093        }
49094        // Verify that the array length is a multiple of the vector size.
49095        if (in1.length % 4 != 0) {
49096            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49097        }
49098        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49099        ain1.setAutoPadding(true);
49100        ain1.copyFrom(in1);
49101        // Verify that "in2" is non-null.
49102        if (in2 == null) {
49103            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49104        }
49105        // Verify that the array length is a multiple of the vector size.
49106        if (in2.length % 2 != 0) {
49107            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
49108        }
49109        // Verify that input array lengths are the same.
49110        if (in1.length / 4 != in2.length / 2) {
49111            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49112        }
49113        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
49114        ain2.setAutoPadding(true);
49115        ain2.copyFrom(in2);
49116
49117        result_int result = reduce_my_ushort4_uchar2_1(ain1, ain2, null);
49118        result.mTempIns = new Allocation[]{ain1, ain2};
49119        return result;
49120    }
49121
49122    // ain1 = "ushort4 a"
49123    // ain2 = "uchar2 b"
49124    public result_int reduce_my_ushort4_uchar2_1(Allocation ain1, Allocation ain2) {
49125        return reduce_my_ushort4_uchar2_1(ain1, ain2, null);
49126    }
49127
49128    // ain1 = "ushort4 a"
49129    // ain2 = "uchar2 b"
49130    public result_int reduce_my_ushort4_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49131        Type t0, t1;
49132        // check ain1
49133        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49134            throw new RSRuntimeException("Type mismatch with U16_4!");
49135        }
49136        // check ain2
49137        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
49138            throw new RSRuntimeException("Type mismatch with U8_2!");
49139        }
49140        // Verify dimensions
49141        t0 = ain1.getType();
49142        t1 = ain2.getType();
49143        if ((t0.getCount() != t1.getCount()) ||
49144            (t0.getX() != t1.getX()) ||
49145            (t0.getY() != t1.getY()) ||
49146            (t0.getZ() != t1.getZ()) ||
49147            (t0.hasFaces()   != t1.hasFaces()) ||
49148            (t0.hasMipmaps() != t1.hasMipmaps())) {
49149            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49150        }
49151
49152        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49153        aout.setAutoPadding(true);
49154        reduce(mExportReduceIdx_my_ushort4_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
49155        return new result_int(aout);
49156    }
49157
49158    private final static int mExportReduceIdx_my_ushort4_uchar4_0 = 742;
49159    // in1 = "a", flattened 4-vectors
49160    // in2 = "b", flattened 4-vectors
49161    public result_int reduce_my_ushort4_uchar4_0(short[] in1, byte[] in2) {
49162        // Verify that "in1" is non-null.
49163        if (in1 == null) {
49164            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49165        }
49166        // Verify that the array length is a multiple of the vector size.
49167        if (in1.length % 4 != 0) {
49168            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49169        }
49170        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49171        ain1.setAutoPadding(true);
49172        ain1.copyFrom(in1);
49173        // Verify that "in2" is non-null.
49174        if (in2 == null) {
49175            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49176        }
49177        // Verify that the array length is a multiple of the vector size.
49178        if (in2.length % 4 != 0) {
49179            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
49180        }
49181        // Verify that input array lengths are the same.
49182        if (in1.length / 4 != in2.length / 4) {
49183            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49184        }
49185        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
49186        ain2.setAutoPadding(true);
49187        ain2.copyFrom(in2);
49188
49189        result_int result = reduce_my_ushort4_uchar4_0(ain1, ain2, null);
49190        result.mTempIns = new Allocation[]{ain1, ain2};
49191        return result;
49192    }
49193
49194    // ain1 = "ushort4 a"
49195    // ain2 = "uchar4 b"
49196    public result_int reduce_my_ushort4_uchar4_0(Allocation ain1, Allocation ain2) {
49197        return reduce_my_ushort4_uchar4_0(ain1, ain2, null);
49198    }
49199
49200    // ain1 = "ushort4 a"
49201    // ain2 = "uchar4 b"
49202    public result_int reduce_my_ushort4_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49203        Type t0, t1;
49204        // check ain1
49205        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49206            throw new RSRuntimeException("Type mismatch with U16_4!");
49207        }
49208        // check ain2
49209        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
49210            throw new RSRuntimeException("Type mismatch with U8_4!");
49211        }
49212        // Verify dimensions
49213        t0 = ain1.getType();
49214        t1 = ain2.getType();
49215        if ((t0.getCount() != t1.getCount()) ||
49216            (t0.getX() != t1.getX()) ||
49217            (t0.getY() != t1.getY()) ||
49218            (t0.getZ() != t1.getZ()) ||
49219            (t0.hasFaces()   != t1.hasFaces()) ||
49220            (t0.hasMipmaps() != t1.hasMipmaps())) {
49221            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49222        }
49223
49224        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49225        aout.setAutoPadding(true);
49226        reduce(mExportReduceIdx_my_ushort4_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
49227        return new result_int(aout);
49228    }
49229
49230    private final static int mExportReduceIdx_my_ushort4_uchar4_1 = 743;
49231    // in1 = "a", flattened 4-vectors
49232    // in2 = "b", flattened 4-vectors
49233    public result_int reduce_my_ushort4_uchar4_1(short[] in1, byte[] in2) {
49234        // Verify that "in1" is non-null.
49235        if (in1 == null) {
49236            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49237        }
49238        // Verify that the array length is a multiple of the vector size.
49239        if (in1.length % 4 != 0) {
49240            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49241        }
49242        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49243        ain1.setAutoPadding(true);
49244        ain1.copyFrom(in1);
49245        // Verify that "in2" is non-null.
49246        if (in2 == null) {
49247            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49248        }
49249        // Verify that the array length is a multiple of the vector size.
49250        if (in2.length % 4 != 0) {
49251            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
49252        }
49253        // Verify that input array lengths are the same.
49254        if (in1.length / 4 != in2.length / 4) {
49255            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49256        }
49257        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
49258        ain2.setAutoPadding(true);
49259        ain2.copyFrom(in2);
49260
49261        result_int result = reduce_my_ushort4_uchar4_1(ain1, ain2, null);
49262        result.mTempIns = new Allocation[]{ain1, ain2};
49263        return result;
49264    }
49265
49266    // ain1 = "ushort4 a"
49267    // ain2 = "uchar4 b"
49268    public result_int reduce_my_ushort4_uchar4_1(Allocation ain1, Allocation ain2) {
49269        return reduce_my_ushort4_uchar4_1(ain1, ain2, null);
49270    }
49271
49272    // ain1 = "ushort4 a"
49273    // ain2 = "uchar4 b"
49274    public result_int reduce_my_ushort4_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49275        Type t0, t1;
49276        // check ain1
49277        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49278            throw new RSRuntimeException("Type mismatch with U16_4!");
49279        }
49280        // check ain2
49281        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
49282            throw new RSRuntimeException("Type mismatch with U8_4!");
49283        }
49284        // Verify dimensions
49285        t0 = ain1.getType();
49286        t1 = ain2.getType();
49287        if ((t0.getCount() != t1.getCount()) ||
49288            (t0.getX() != t1.getX()) ||
49289            (t0.getY() != t1.getY()) ||
49290            (t0.getZ() != t1.getZ()) ||
49291            (t0.hasFaces()   != t1.hasFaces()) ||
49292            (t0.hasMipmaps() != t1.hasMipmaps())) {
49293            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49294        }
49295
49296        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49297        aout.setAutoPadding(true);
49298        reduce(mExportReduceIdx_my_ushort4_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
49299        return new result_int(aout);
49300    }
49301
49302    private final static int mExportReduceIdx_my_ushort4_ushort_0 = 744;
49303    // in1 = "a", flattened 4-vectors
49304    // in2 = "b"
49305    public result_int reduce_my_ushort4_ushort_0(short[] in1, short[] in2) {
49306        // Verify that "in1" is non-null.
49307        if (in1 == null) {
49308            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49309        }
49310        // Verify that the array length is a multiple of the vector size.
49311        if (in1.length % 4 != 0) {
49312            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49313        }
49314        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49315        ain1.setAutoPadding(true);
49316        ain1.copyFrom(in1);
49317        // Verify that "in2" is non-null.
49318        if (in2 == null) {
49319            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49320        }
49321        // Verify that input array lengths are the same.
49322        if (in1.length / 4 != in2.length) {
49323            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49324        }
49325        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
49326        ain2.setAutoPadding(true);
49327        ain2.copyFrom(in2);
49328
49329        result_int result = reduce_my_ushort4_ushort_0(ain1, ain2, null);
49330        result.mTempIns = new Allocation[]{ain1, ain2};
49331        return result;
49332    }
49333
49334    // ain1 = "ushort4 a"
49335    // ain2 = "ushort b"
49336    public result_int reduce_my_ushort4_ushort_0(Allocation ain1, Allocation ain2) {
49337        return reduce_my_ushort4_ushort_0(ain1, ain2, null);
49338    }
49339
49340    // ain1 = "ushort4 a"
49341    // ain2 = "ushort b"
49342    public result_int reduce_my_ushort4_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49343        Type t0, t1;
49344        // check ain1
49345        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49346            throw new RSRuntimeException("Type mismatch with U16_4!");
49347        }
49348        // check ain2
49349        if (!ain2.getType().getElement().isCompatible(__U16)) {
49350            throw new RSRuntimeException("Type mismatch with U16!");
49351        }
49352        // Verify dimensions
49353        t0 = ain1.getType();
49354        t1 = ain2.getType();
49355        if ((t0.getCount() != t1.getCount()) ||
49356            (t0.getX() != t1.getX()) ||
49357            (t0.getY() != t1.getY()) ||
49358            (t0.getZ() != t1.getZ()) ||
49359            (t0.hasFaces()   != t1.hasFaces()) ||
49360            (t0.hasMipmaps() != t1.hasMipmaps())) {
49361            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49362        }
49363
49364        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49365        aout.setAutoPadding(true);
49366        reduce(mExportReduceIdx_my_ushort4_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
49367        return new result_int(aout);
49368    }
49369
49370    private final static int mExportReduceIdx_my_ushort4_ushort_1 = 745;
49371    // in1 = "a", flattened 4-vectors
49372    // in2 = "b"
49373    public result_int reduce_my_ushort4_ushort_1(short[] in1, short[] in2) {
49374        // Verify that "in1" is non-null.
49375        if (in1 == null) {
49376            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49377        }
49378        // Verify that the array length is a multiple of the vector size.
49379        if (in1.length % 4 != 0) {
49380            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49381        }
49382        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49383        ain1.setAutoPadding(true);
49384        ain1.copyFrom(in1);
49385        // Verify that "in2" is non-null.
49386        if (in2 == null) {
49387            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49388        }
49389        // Verify that input array lengths are the same.
49390        if (in1.length / 4 != in2.length) {
49391            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49392        }
49393        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
49394        ain2.setAutoPadding(true);
49395        ain2.copyFrom(in2);
49396
49397        result_int result = reduce_my_ushort4_ushort_1(ain1, ain2, null);
49398        result.mTempIns = new Allocation[]{ain1, ain2};
49399        return result;
49400    }
49401
49402    // ain1 = "ushort4 a"
49403    // ain2 = "ushort b"
49404    public result_int reduce_my_ushort4_ushort_1(Allocation ain1, Allocation ain2) {
49405        return reduce_my_ushort4_ushort_1(ain1, ain2, null);
49406    }
49407
49408    // ain1 = "ushort4 a"
49409    // ain2 = "ushort b"
49410    public result_int reduce_my_ushort4_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49411        Type t0, t1;
49412        // check ain1
49413        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49414            throw new RSRuntimeException("Type mismatch with U16_4!");
49415        }
49416        // check ain2
49417        if (!ain2.getType().getElement().isCompatible(__U16)) {
49418            throw new RSRuntimeException("Type mismatch with U16!");
49419        }
49420        // Verify dimensions
49421        t0 = ain1.getType();
49422        t1 = ain2.getType();
49423        if ((t0.getCount() != t1.getCount()) ||
49424            (t0.getX() != t1.getX()) ||
49425            (t0.getY() != t1.getY()) ||
49426            (t0.getZ() != t1.getZ()) ||
49427            (t0.hasFaces()   != t1.hasFaces()) ||
49428            (t0.hasMipmaps() != t1.hasMipmaps())) {
49429            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49430        }
49431
49432        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49433        aout.setAutoPadding(true);
49434        reduce(mExportReduceIdx_my_ushort4_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
49435        return new result_int(aout);
49436    }
49437
49438    private final static int mExportReduceIdx_my_ushort4_ushort2_0 = 746;
49439    // in1 = "a", flattened 4-vectors
49440    // in2 = "b", flattened 2-vectors
49441    public result_int reduce_my_ushort4_ushort2_0(short[] in1, short[] in2) {
49442        // Verify that "in1" is non-null.
49443        if (in1 == null) {
49444            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49445        }
49446        // Verify that the array length is a multiple of the vector size.
49447        if (in1.length % 4 != 0) {
49448            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49449        }
49450        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49451        ain1.setAutoPadding(true);
49452        ain1.copyFrom(in1);
49453        // Verify that "in2" is non-null.
49454        if (in2 == null) {
49455            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49456        }
49457        // Verify that the array length is a multiple of the vector size.
49458        if (in2.length % 2 != 0) {
49459            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
49460        }
49461        // Verify that input array lengths are the same.
49462        if (in1.length / 4 != in2.length / 2) {
49463            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49464        }
49465        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
49466        ain2.setAutoPadding(true);
49467        ain2.copyFrom(in2);
49468
49469        result_int result = reduce_my_ushort4_ushort2_0(ain1, ain2, null);
49470        result.mTempIns = new Allocation[]{ain1, ain2};
49471        return result;
49472    }
49473
49474    // ain1 = "ushort4 a"
49475    // ain2 = "ushort2 b"
49476    public result_int reduce_my_ushort4_ushort2_0(Allocation ain1, Allocation ain2) {
49477        return reduce_my_ushort4_ushort2_0(ain1, ain2, null);
49478    }
49479
49480    // ain1 = "ushort4 a"
49481    // ain2 = "ushort2 b"
49482    public result_int reduce_my_ushort4_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49483        Type t0, t1;
49484        // check ain1
49485        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49486            throw new RSRuntimeException("Type mismatch with U16_4!");
49487        }
49488        // check ain2
49489        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
49490            throw new RSRuntimeException("Type mismatch with U16_2!");
49491        }
49492        // Verify dimensions
49493        t0 = ain1.getType();
49494        t1 = ain2.getType();
49495        if ((t0.getCount() != t1.getCount()) ||
49496            (t0.getX() != t1.getX()) ||
49497            (t0.getY() != t1.getY()) ||
49498            (t0.getZ() != t1.getZ()) ||
49499            (t0.hasFaces()   != t1.hasFaces()) ||
49500            (t0.hasMipmaps() != t1.hasMipmaps())) {
49501            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49502        }
49503
49504        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49505        aout.setAutoPadding(true);
49506        reduce(mExportReduceIdx_my_ushort4_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
49507        return new result_int(aout);
49508    }
49509
49510    private final static int mExportReduceIdx_my_ushort4_ushort2_1 = 747;
49511    // in1 = "a", flattened 4-vectors
49512    // in2 = "b", flattened 2-vectors
49513    public result_int reduce_my_ushort4_ushort2_1(short[] in1, short[] in2) {
49514        // Verify that "in1" is non-null.
49515        if (in1 == null) {
49516            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49517        }
49518        // Verify that the array length is a multiple of the vector size.
49519        if (in1.length % 4 != 0) {
49520            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49521        }
49522        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49523        ain1.setAutoPadding(true);
49524        ain1.copyFrom(in1);
49525        // Verify that "in2" is non-null.
49526        if (in2 == null) {
49527            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49528        }
49529        // Verify that the array length is a multiple of the vector size.
49530        if (in2.length % 2 != 0) {
49531            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
49532        }
49533        // Verify that input array lengths are the same.
49534        if (in1.length / 4 != in2.length / 2) {
49535            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49536        }
49537        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
49538        ain2.setAutoPadding(true);
49539        ain2.copyFrom(in2);
49540
49541        result_int result = reduce_my_ushort4_ushort2_1(ain1, ain2, null);
49542        result.mTempIns = new Allocation[]{ain1, ain2};
49543        return result;
49544    }
49545
49546    // ain1 = "ushort4 a"
49547    // ain2 = "ushort2 b"
49548    public result_int reduce_my_ushort4_ushort2_1(Allocation ain1, Allocation ain2) {
49549        return reduce_my_ushort4_ushort2_1(ain1, ain2, null);
49550    }
49551
49552    // ain1 = "ushort4 a"
49553    // ain2 = "ushort2 b"
49554    public result_int reduce_my_ushort4_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49555        Type t0, t1;
49556        // check ain1
49557        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49558            throw new RSRuntimeException("Type mismatch with U16_4!");
49559        }
49560        // check ain2
49561        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
49562            throw new RSRuntimeException("Type mismatch with U16_2!");
49563        }
49564        // Verify dimensions
49565        t0 = ain1.getType();
49566        t1 = ain2.getType();
49567        if ((t0.getCount() != t1.getCount()) ||
49568            (t0.getX() != t1.getX()) ||
49569            (t0.getY() != t1.getY()) ||
49570            (t0.getZ() != t1.getZ()) ||
49571            (t0.hasFaces()   != t1.hasFaces()) ||
49572            (t0.hasMipmaps() != t1.hasMipmaps())) {
49573            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49574        }
49575
49576        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49577        aout.setAutoPadding(true);
49578        reduce(mExportReduceIdx_my_ushort4_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
49579        return new result_int(aout);
49580    }
49581
49582    private final static int mExportReduceIdx_my_ushort4_ushort4_0 = 748;
49583    // in1 = "a", flattened 4-vectors
49584    // in2 = "b", flattened 4-vectors
49585    public result_int reduce_my_ushort4_ushort4_0(short[] in1, short[] in2) {
49586        // Verify that "in1" is non-null.
49587        if (in1 == null) {
49588            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49589        }
49590        // Verify that the array length is a multiple of the vector size.
49591        if (in1.length % 4 != 0) {
49592            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49593        }
49594        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49595        ain1.setAutoPadding(true);
49596        ain1.copyFrom(in1);
49597        // Verify that "in2" is non-null.
49598        if (in2 == null) {
49599            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49600        }
49601        // Verify that the array length is a multiple of the vector size.
49602        if (in2.length % 4 != 0) {
49603            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
49604        }
49605        // Verify that input array lengths are the same.
49606        if (in1.length / 4 != in2.length / 4) {
49607            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49608        }
49609        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
49610        ain2.setAutoPadding(true);
49611        ain2.copyFrom(in2);
49612
49613        result_int result = reduce_my_ushort4_ushort4_0(ain1, ain2, null);
49614        result.mTempIns = new Allocation[]{ain1, ain2};
49615        return result;
49616    }
49617
49618    // ain1 = "ushort4 a"
49619    // ain2 = "ushort4 b"
49620    public result_int reduce_my_ushort4_ushort4_0(Allocation ain1, Allocation ain2) {
49621        return reduce_my_ushort4_ushort4_0(ain1, ain2, null);
49622    }
49623
49624    // ain1 = "ushort4 a"
49625    // ain2 = "ushort4 b"
49626    public result_int reduce_my_ushort4_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49627        Type t0, t1;
49628        // check ain1
49629        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49630            throw new RSRuntimeException("Type mismatch with U16_4!");
49631        }
49632        // check ain2
49633        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
49634            throw new RSRuntimeException("Type mismatch with U16_4!");
49635        }
49636        // Verify dimensions
49637        t0 = ain1.getType();
49638        t1 = ain2.getType();
49639        if ((t0.getCount() != t1.getCount()) ||
49640            (t0.getX() != t1.getX()) ||
49641            (t0.getY() != t1.getY()) ||
49642            (t0.getZ() != t1.getZ()) ||
49643            (t0.hasFaces()   != t1.hasFaces()) ||
49644            (t0.hasMipmaps() != t1.hasMipmaps())) {
49645            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49646        }
49647
49648        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49649        aout.setAutoPadding(true);
49650        reduce(mExportReduceIdx_my_ushort4_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
49651        return new result_int(aout);
49652    }
49653
49654    private final static int mExportReduceIdx_my_ushort4_ushort4_1 = 749;
49655    // in1 = "a", flattened 4-vectors
49656    // in2 = "b", flattened 4-vectors
49657    public result_int reduce_my_ushort4_ushort4_1(short[] in1, short[] in2) {
49658        // Verify that "in1" is non-null.
49659        if (in1 == null) {
49660            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49661        }
49662        // Verify that the array length is a multiple of the vector size.
49663        if (in1.length % 4 != 0) {
49664            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49665        }
49666        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49667        ain1.setAutoPadding(true);
49668        ain1.copyFrom(in1);
49669        // Verify that "in2" is non-null.
49670        if (in2 == null) {
49671            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49672        }
49673        // Verify that the array length is a multiple of the vector size.
49674        if (in2.length % 4 != 0) {
49675            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
49676        }
49677        // Verify that input array lengths are the same.
49678        if (in1.length / 4 != in2.length / 4) {
49679            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49680        }
49681        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
49682        ain2.setAutoPadding(true);
49683        ain2.copyFrom(in2);
49684
49685        result_int result = reduce_my_ushort4_ushort4_1(ain1, ain2, null);
49686        result.mTempIns = new Allocation[]{ain1, ain2};
49687        return result;
49688    }
49689
49690    // ain1 = "ushort4 a"
49691    // ain2 = "ushort4 b"
49692    public result_int reduce_my_ushort4_ushort4_1(Allocation ain1, Allocation ain2) {
49693        return reduce_my_ushort4_ushort4_1(ain1, ain2, null);
49694    }
49695
49696    // ain1 = "ushort4 a"
49697    // ain2 = "ushort4 b"
49698    public result_int reduce_my_ushort4_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49699        Type t0, t1;
49700        // check ain1
49701        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49702            throw new RSRuntimeException("Type mismatch with U16_4!");
49703        }
49704        // check ain2
49705        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
49706            throw new RSRuntimeException("Type mismatch with U16_4!");
49707        }
49708        // Verify dimensions
49709        t0 = ain1.getType();
49710        t1 = ain2.getType();
49711        if ((t0.getCount() != t1.getCount()) ||
49712            (t0.getX() != t1.getX()) ||
49713            (t0.getY() != t1.getY()) ||
49714            (t0.getZ() != t1.getZ()) ||
49715            (t0.hasFaces()   != t1.hasFaces()) ||
49716            (t0.hasMipmaps() != t1.hasMipmaps())) {
49717            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49718        }
49719
49720        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49721        aout.setAutoPadding(true);
49722        reduce(mExportReduceIdx_my_ushort4_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
49723        return new result_int(aout);
49724    }
49725
49726    private final static int mExportReduceIdx_my_ushort4_bool_0 = 750;
49727    // in1 = "a", flattened 4-vectors
49728    // in2 = "b"
49729    public result_int reduce_my_ushort4_bool_0(short[] in1, byte[] in2) {
49730        // Verify that "in1" is non-null.
49731        if (in1 == null) {
49732            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49733        }
49734        // Verify that the array length is a multiple of the vector size.
49735        if (in1.length % 4 != 0) {
49736            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49737        }
49738        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49739        ain1.setAutoPadding(true);
49740        ain1.copyFrom(in1);
49741        // Verify that "in2" is non-null.
49742        if (in2 == null) {
49743            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49744        }
49745        // Verify that input array lengths are the same.
49746        if (in1.length / 4 != in2.length) {
49747            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49748        }
49749        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
49750        ain2.setAutoPadding(true);
49751        ain2.copyFrom(in2);
49752
49753        result_int result = reduce_my_ushort4_bool_0(ain1, ain2, null);
49754        result.mTempIns = new Allocation[]{ain1, ain2};
49755        return result;
49756    }
49757
49758    // ain1 = "ushort4 a"
49759    // ain2 = "bool b"
49760    public result_int reduce_my_ushort4_bool_0(Allocation ain1, Allocation ain2) {
49761        return reduce_my_ushort4_bool_0(ain1, ain2, null);
49762    }
49763
49764    // ain1 = "ushort4 a"
49765    // ain2 = "bool b"
49766    public result_int reduce_my_ushort4_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49767        Type t0, t1;
49768        // check ain1
49769        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49770            throw new RSRuntimeException("Type mismatch with U16_4!");
49771        }
49772        // check ain2
49773        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
49774            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
49775        }
49776        // Verify dimensions
49777        t0 = ain1.getType();
49778        t1 = ain2.getType();
49779        if ((t0.getCount() != t1.getCount()) ||
49780            (t0.getX() != t1.getX()) ||
49781            (t0.getY() != t1.getY()) ||
49782            (t0.getZ() != t1.getZ()) ||
49783            (t0.hasFaces()   != t1.hasFaces()) ||
49784            (t0.hasMipmaps() != t1.hasMipmaps())) {
49785            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49786        }
49787
49788        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49789        aout.setAutoPadding(true);
49790        reduce(mExportReduceIdx_my_ushort4_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
49791        return new result_int(aout);
49792    }
49793
49794    private final static int mExportReduceIdx_my_ushort4_bool_1 = 751;
49795    // in1 = "a", flattened 4-vectors
49796    // in2 = "b"
49797    public result_int reduce_my_ushort4_bool_1(short[] in1, byte[] in2) {
49798        // Verify that "in1" is non-null.
49799        if (in1 == null) {
49800            throw new RSIllegalArgumentException("Array \"in1\" is null!");
49801        }
49802        // Verify that the array length is a multiple of the vector size.
49803        if (in1.length % 4 != 0) {
49804            throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!");
49805        }
49806        Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4);
49807        ain1.setAutoPadding(true);
49808        ain1.copyFrom(in1);
49809        // Verify that "in2" is non-null.
49810        if (in2 == null) {
49811            throw new RSIllegalArgumentException("Array \"in2\" is null!");
49812        }
49813        // Verify that input array lengths are the same.
49814        if (in1.length / 4 != in2.length) {
49815            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
49816        }
49817        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
49818        ain2.setAutoPadding(true);
49819        ain2.copyFrom(in2);
49820
49821        result_int result = reduce_my_ushort4_bool_1(ain1, ain2, null);
49822        result.mTempIns = new Allocation[]{ain1, ain2};
49823        return result;
49824    }
49825
49826    // ain1 = "ushort4 a"
49827    // ain2 = "bool b"
49828    public result_int reduce_my_ushort4_bool_1(Allocation ain1, Allocation ain2) {
49829        return reduce_my_ushort4_bool_1(ain1, ain2, null);
49830    }
49831
49832    // ain1 = "ushort4 a"
49833    // ain2 = "bool b"
49834    public result_int reduce_my_ushort4_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49835        Type t0, t1;
49836        // check ain1
49837        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49838            throw new RSRuntimeException("Type mismatch with U16_4!");
49839        }
49840        // check ain2
49841        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
49842            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
49843        }
49844        // Verify dimensions
49845        t0 = ain1.getType();
49846        t1 = ain2.getType();
49847        if ((t0.getCount() != t1.getCount()) ||
49848            (t0.getX() != t1.getX()) ||
49849            (t0.getY() != t1.getY()) ||
49850            (t0.getZ() != t1.getZ()) ||
49851            (t0.hasFaces()   != t1.hasFaces()) ||
49852            (t0.hasMipmaps() != t1.hasMipmaps())) {
49853            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49854        }
49855
49856        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49857        aout.setAutoPadding(true);
49858        reduce(mExportReduceIdx_my_ushort4_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
49859        return new result_int(aout);
49860    }
49861
49862    private final static int mExportReduceIdx_my_ushort4_rs_matrix2x2_0 = 752;
49863    // ain1 = "ushort4 a"
49864    // ain2 = "rs_matrix2x2 b"
49865    public result_int reduce_my_ushort4_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
49866        return reduce_my_ushort4_rs_matrix2x2_0(ain1, ain2, null);
49867    }
49868
49869    // ain1 = "ushort4 a"
49870    // ain2 = "rs_matrix2x2 b"
49871    public result_int reduce_my_ushort4_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49872        Type t0, t1;
49873        // check ain1
49874        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49875            throw new RSRuntimeException("Type mismatch with U16_4!");
49876        }
49877        // check ain2
49878        // Verify dimensions
49879        t0 = ain1.getType();
49880        t1 = ain2.getType();
49881        if ((t0.getCount() != t1.getCount()) ||
49882            (t0.getX() != t1.getX()) ||
49883            (t0.getY() != t1.getY()) ||
49884            (t0.getZ() != t1.getZ()) ||
49885            (t0.hasFaces()   != t1.hasFaces()) ||
49886            (t0.hasMipmaps() != t1.hasMipmaps())) {
49887            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49888        }
49889
49890        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49891        aout.setAutoPadding(true);
49892        reduce(mExportReduceIdx_my_ushort4_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
49893        return new result_int(aout);
49894    }
49895
49896    private final static int mExportReduceIdx_my_ushort4_rs_matrix2x2_1 = 753;
49897    // ain1 = "ushort4 a"
49898    // ain2 = "rs_matrix2x2 b"
49899    public result_int reduce_my_ushort4_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
49900        return reduce_my_ushort4_rs_matrix2x2_1(ain1, ain2, null);
49901    }
49902
49903    // ain1 = "ushort4 a"
49904    // ain2 = "rs_matrix2x2 b"
49905    public result_int reduce_my_ushort4_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49906        Type t0, t1;
49907        // check ain1
49908        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49909            throw new RSRuntimeException("Type mismatch with U16_4!");
49910        }
49911        // check ain2
49912        // Verify dimensions
49913        t0 = ain1.getType();
49914        t1 = ain2.getType();
49915        if ((t0.getCount() != t1.getCount()) ||
49916            (t0.getX() != t1.getX()) ||
49917            (t0.getY() != t1.getY()) ||
49918            (t0.getZ() != t1.getZ()) ||
49919            (t0.hasFaces()   != t1.hasFaces()) ||
49920            (t0.hasMipmaps() != t1.hasMipmaps())) {
49921            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49922        }
49923
49924        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49925        aout.setAutoPadding(true);
49926        reduce(mExportReduceIdx_my_ushort4_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
49927        return new result_int(aout);
49928    }
49929
49930    private final static int mExportReduceIdx_my_ushort4_MyStruct_0 = 754;
49931    // ain1 = "ushort4 a"
49932    // ain2 = "/* struct <> */ b"
49933    public result_int reduce_my_ushort4_MyStruct_0(Allocation ain1, Allocation ain2) {
49934        return reduce_my_ushort4_MyStruct_0(ain1, ain2, null);
49935    }
49936
49937    // ain1 = "ushort4 a"
49938    // ain2 = "/* struct <> */ b"
49939    public result_int reduce_my_ushort4_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49940        Type t0, t1;
49941        // check ain1
49942        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49943            throw new RSRuntimeException("Type mismatch with U16_4!");
49944        }
49945        // check ain2
49946        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
49947            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
49948        }
49949        // Verify dimensions
49950        t0 = ain1.getType();
49951        t1 = ain2.getType();
49952        if ((t0.getCount() != t1.getCount()) ||
49953            (t0.getX() != t1.getX()) ||
49954            (t0.getY() != t1.getY()) ||
49955            (t0.getZ() != t1.getZ()) ||
49956            (t0.hasFaces()   != t1.hasFaces()) ||
49957            (t0.hasMipmaps() != t1.hasMipmaps())) {
49958            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49959        }
49960
49961        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49962        aout.setAutoPadding(true);
49963        reduce(mExportReduceIdx_my_ushort4_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
49964        return new result_int(aout);
49965    }
49966
49967    private final static int mExportReduceIdx_my_ushort4_MyStruct_1 = 755;
49968    // ain1 = "ushort4 a"
49969    // ain2 = "/* struct <> */ b"
49970    public result_int reduce_my_ushort4_MyStruct_1(Allocation ain1, Allocation ain2) {
49971        return reduce_my_ushort4_MyStruct_1(ain1, ain2, null);
49972    }
49973
49974    // ain1 = "ushort4 a"
49975    // ain2 = "/* struct <> */ b"
49976    public result_int reduce_my_ushort4_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
49977        Type t0, t1;
49978        // check ain1
49979        if (!ain1.getType().getElement().isCompatible(__U16_4)) {
49980            throw new RSRuntimeException("Type mismatch with U16_4!");
49981        }
49982        // check ain2
49983        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
49984            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
49985        }
49986        // Verify dimensions
49987        t0 = ain1.getType();
49988        t1 = ain2.getType();
49989        if ((t0.getCount() != t1.getCount()) ||
49990            (t0.getX() != t1.getX()) ||
49991            (t0.getY() != t1.getY()) ||
49992            (t0.getZ() != t1.getZ()) ||
49993            (t0.hasFaces()   != t1.hasFaces()) ||
49994            (t0.hasMipmaps() != t1.hasMipmaps())) {
49995            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
49996        }
49997
49998        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
49999        aout.setAutoPadding(true);
50000        reduce(mExportReduceIdx_my_ushort4_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
50001        return new result_int(aout);
50002    }
50003
50004    private final static int mExportReduceIdx_my_bool_half_0 = 756;
50005    // in1 = "a"
50006    // in2 = "b"
50007    public result_int reduce_my_bool_half_0(byte[] in1, short[] in2) {
50008        // Verify that "in1" is non-null.
50009        if (in1 == null) {
50010            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50011        }
50012        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50013        ain1.setAutoPadding(true);
50014        ain1.copyFrom(in1);
50015        // Verify that "in2" is non-null.
50016        if (in2 == null) {
50017            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50018        }
50019        // Verify that input array lengths are the same.
50020        if (in1.length != in2.length) {
50021            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50022        }
50023        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
50024        ain2.setAutoPadding(true);
50025        ain2.copyFrom(in2);
50026
50027        result_int result = reduce_my_bool_half_0(ain1, ain2, null);
50028        result.mTempIns = new Allocation[]{ain1, ain2};
50029        return result;
50030    }
50031
50032    // ain1 = "bool a"
50033    // ain2 = "half b"
50034    public result_int reduce_my_bool_half_0(Allocation ain1, Allocation ain2) {
50035        return reduce_my_bool_half_0(ain1, ain2, null);
50036    }
50037
50038    // ain1 = "bool a"
50039    // ain2 = "half b"
50040    public result_int reduce_my_bool_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50041        Type t0, t1;
50042        // check ain1
50043        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50044            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50045        }
50046        // check ain2
50047        if (!ain2.getType().getElement().isCompatible(__F16)) {
50048            throw new RSRuntimeException("Type mismatch with F16!");
50049        }
50050        // Verify dimensions
50051        t0 = ain1.getType();
50052        t1 = ain2.getType();
50053        if ((t0.getCount() != t1.getCount()) ||
50054            (t0.getX() != t1.getX()) ||
50055            (t0.getY() != t1.getY()) ||
50056            (t0.getZ() != t1.getZ()) ||
50057            (t0.hasFaces()   != t1.hasFaces()) ||
50058            (t0.hasMipmaps() != t1.hasMipmaps())) {
50059            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50060        }
50061
50062        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50063        aout.setAutoPadding(true);
50064        reduce(mExportReduceIdx_my_bool_half_0, new Allocation[]{ain1, ain2}, aout, sc);
50065        return new result_int(aout);
50066    }
50067
50068    private final static int mExportReduceIdx_my_bool_half_1 = 757;
50069    // in1 = "a"
50070    // in2 = "b"
50071    public result_int reduce_my_bool_half_1(byte[] in1, short[] in2) {
50072        // Verify that "in1" is non-null.
50073        if (in1 == null) {
50074            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50075        }
50076        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50077        ain1.setAutoPadding(true);
50078        ain1.copyFrom(in1);
50079        // Verify that "in2" is non-null.
50080        if (in2 == null) {
50081            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50082        }
50083        // Verify that input array lengths are the same.
50084        if (in1.length != in2.length) {
50085            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50086        }
50087        Allocation ain2 = Allocation.createSized(mRSLocal, __F16, in2.length);
50088        ain2.setAutoPadding(true);
50089        ain2.copyFrom(in2);
50090
50091        result_int result = reduce_my_bool_half_1(ain1, ain2, null);
50092        result.mTempIns = new Allocation[]{ain1, ain2};
50093        return result;
50094    }
50095
50096    // ain1 = "bool a"
50097    // ain2 = "half b"
50098    public result_int reduce_my_bool_half_1(Allocation ain1, Allocation ain2) {
50099        return reduce_my_bool_half_1(ain1, ain2, null);
50100    }
50101
50102    // ain1 = "bool a"
50103    // ain2 = "half b"
50104    public result_int reduce_my_bool_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50105        Type t0, t1;
50106        // check ain1
50107        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50108            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50109        }
50110        // check ain2
50111        if (!ain2.getType().getElement().isCompatible(__F16)) {
50112            throw new RSRuntimeException("Type mismatch with F16!");
50113        }
50114        // Verify dimensions
50115        t0 = ain1.getType();
50116        t1 = ain2.getType();
50117        if ((t0.getCount() != t1.getCount()) ||
50118            (t0.getX() != t1.getX()) ||
50119            (t0.getY() != t1.getY()) ||
50120            (t0.getZ() != t1.getZ()) ||
50121            (t0.hasFaces()   != t1.hasFaces()) ||
50122            (t0.hasMipmaps() != t1.hasMipmaps())) {
50123            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50124        }
50125
50126        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50127        aout.setAutoPadding(true);
50128        reduce(mExportReduceIdx_my_bool_half_1, new Allocation[]{ain1, ain2}, aout, sc);
50129        return new result_int(aout);
50130    }
50131
50132    private final static int mExportReduceIdx_my_bool_half2_0 = 758;
50133    // in1 = "a"
50134    // in2 = "b", flattened 2-vectors
50135    public result_int reduce_my_bool_half2_0(byte[] in1, short[] in2) {
50136        // Verify that "in1" is non-null.
50137        if (in1 == null) {
50138            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50139        }
50140        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50141        ain1.setAutoPadding(true);
50142        ain1.copyFrom(in1);
50143        // Verify that "in2" is non-null.
50144        if (in2 == null) {
50145            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50146        }
50147        // Verify that the array length is a multiple of the vector size.
50148        if (in2.length % 2 != 0) {
50149            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
50150        }
50151        // Verify that input array lengths are the same.
50152        if (in1.length != in2.length / 2) {
50153            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50154        }
50155        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
50156        ain2.setAutoPadding(true);
50157        ain2.copyFrom(in2);
50158
50159        result_int result = reduce_my_bool_half2_0(ain1, ain2, null);
50160        result.mTempIns = new Allocation[]{ain1, ain2};
50161        return result;
50162    }
50163
50164    // ain1 = "bool a"
50165    // ain2 = "half2 b"
50166    public result_int reduce_my_bool_half2_0(Allocation ain1, Allocation ain2) {
50167        return reduce_my_bool_half2_0(ain1, ain2, null);
50168    }
50169
50170    // ain1 = "bool a"
50171    // ain2 = "half2 b"
50172    public result_int reduce_my_bool_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50173        Type t0, t1;
50174        // check ain1
50175        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50176            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50177        }
50178        // check ain2
50179        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
50180            throw new RSRuntimeException("Type mismatch with F16_2!");
50181        }
50182        // Verify dimensions
50183        t0 = ain1.getType();
50184        t1 = ain2.getType();
50185        if ((t0.getCount() != t1.getCount()) ||
50186            (t0.getX() != t1.getX()) ||
50187            (t0.getY() != t1.getY()) ||
50188            (t0.getZ() != t1.getZ()) ||
50189            (t0.hasFaces()   != t1.hasFaces()) ||
50190            (t0.hasMipmaps() != t1.hasMipmaps())) {
50191            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50192        }
50193
50194        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50195        aout.setAutoPadding(true);
50196        reduce(mExportReduceIdx_my_bool_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
50197        return new result_int(aout);
50198    }
50199
50200    private final static int mExportReduceIdx_my_bool_half2_1 = 759;
50201    // in1 = "a"
50202    // in2 = "b", flattened 2-vectors
50203    public result_int reduce_my_bool_half2_1(byte[] in1, short[] in2) {
50204        // Verify that "in1" is non-null.
50205        if (in1 == null) {
50206            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50207        }
50208        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50209        ain1.setAutoPadding(true);
50210        ain1.copyFrom(in1);
50211        // Verify that "in2" is non-null.
50212        if (in2 == null) {
50213            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50214        }
50215        // Verify that the array length is a multiple of the vector size.
50216        if (in2.length % 2 != 0) {
50217            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
50218        }
50219        // Verify that input array lengths are the same.
50220        if (in1.length != in2.length / 2) {
50221            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50222        }
50223        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_2, in2.length / 2);
50224        ain2.setAutoPadding(true);
50225        ain2.copyFrom(in2);
50226
50227        result_int result = reduce_my_bool_half2_1(ain1, ain2, null);
50228        result.mTempIns = new Allocation[]{ain1, ain2};
50229        return result;
50230    }
50231
50232    // ain1 = "bool a"
50233    // ain2 = "half2 b"
50234    public result_int reduce_my_bool_half2_1(Allocation ain1, Allocation ain2) {
50235        return reduce_my_bool_half2_1(ain1, ain2, null);
50236    }
50237
50238    // ain1 = "bool a"
50239    // ain2 = "half2 b"
50240    public result_int reduce_my_bool_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50241        Type t0, t1;
50242        // check ain1
50243        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50244            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50245        }
50246        // check ain2
50247        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
50248            throw new RSRuntimeException("Type mismatch with F16_2!");
50249        }
50250        // Verify dimensions
50251        t0 = ain1.getType();
50252        t1 = ain2.getType();
50253        if ((t0.getCount() != t1.getCount()) ||
50254            (t0.getX() != t1.getX()) ||
50255            (t0.getY() != t1.getY()) ||
50256            (t0.getZ() != t1.getZ()) ||
50257            (t0.hasFaces()   != t1.hasFaces()) ||
50258            (t0.hasMipmaps() != t1.hasMipmaps())) {
50259            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50260        }
50261
50262        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50263        aout.setAutoPadding(true);
50264        reduce(mExportReduceIdx_my_bool_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
50265        return new result_int(aout);
50266    }
50267
50268    private final static int mExportReduceIdx_my_bool_half4_0 = 760;
50269    // in1 = "a"
50270    // in2 = "b", flattened 4-vectors
50271    public result_int reduce_my_bool_half4_0(byte[] in1, short[] in2) {
50272        // Verify that "in1" is non-null.
50273        if (in1 == null) {
50274            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50275        }
50276        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50277        ain1.setAutoPadding(true);
50278        ain1.copyFrom(in1);
50279        // Verify that "in2" is non-null.
50280        if (in2 == null) {
50281            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50282        }
50283        // Verify that the array length is a multiple of the vector size.
50284        if (in2.length % 4 != 0) {
50285            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
50286        }
50287        // Verify that input array lengths are the same.
50288        if (in1.length != in2.length / 4) {
50289            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50290        }
50291        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
50292        ain2.setAutoPadding(true);
50293        ain2.copyFrom(in2);
50294
50295        result_int result = reduce_my_bool_half4_0(ain1, ain2, null);
50296        result.mTempIns = new Allocation[]{ain1, ain2};
50297        return result;
50298    }
50299
50300    // ain1 = "bool a"
50301    // ain2 = "half4 b"
50302    public result_int reduce_my_bool_half4_0(Allocation ain1, Allocation ain2) {
50303        return reduce_my_bool_half4_0(ain1, ain2, null);
50304    }
50305
50306    // ain1 = "bool a"
50307    // ain2 = "half4 b"
50308    public result_int reduce_my_bool_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50309        Type t0, t1;
50310        // check ain1
50311        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50312            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50313        }
50314        // check ain2
50315        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
50316            throw new RSRuntimeException("Type mismatch with F16_4!");
50317        }
50318        // Verify dimensions
50319        t0 = ain1.getType();
50320        t1 = ain2.getType();
50321        if ((t0.getCount() != t1.getCount()) ||
50322            (t0.getX() != t1.getX()) ||
50323            (t0.getY() != t1.getY()) ||
50324            (t0.getZ() != t1.getZ()) ||
50325            (t0.hasFaces()   != t1.hasFaces()) ||
50326            (t0.hasMipmaps() != t1.hasMipmaps())) {
50327            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50328        }
50329
50330        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50331        aout.setAutoPadding(true);
50332        reduce(mExportReduceIdx_my_bool_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
50333        return new result_int(aout);
50334    }
50335
50336    private final static int mExportReduceIdx_my_bool_half4_1 = 761;
50337    // in1 = "a"
50338    // in2 = "b", flattened 4-vectors
50339    public result_int reduce_my_bool_half4_1(byte[] in1, short[] in2) {
50340        // Verify that "in1" is non-null.
50341        if (in1 == null) {
50342            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50343        }
50344        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50345        ain1.setAutoPadding(true);
50346        ain1.copyFrom(in1);
50347        // Verify that "in2" is non-null.
50348        if (in2 == null) {
50349            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50350        }
50351        // Verify that the array length is a multiple of the vector size.
50352        if (in2.length % 4 != 0) {
50353            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
50354        }
50355        // Verify that input array lengths are the same.
50356        if (in1.length != in2.length / 4) {
50357            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50358        }
50359        Allocation ain2 = Allocation.createSized(mRSLocal, __F16_4, in2.length / 4);
50360        ain2.setAutoPadding(true);
50361        ain2.copyFrom(in2);
50362
50363        result_int result = reduce_my_bool_half4_1(ain1, ain2, null);
50364        result.mTempIns = new Allocation[]{ain1, ain2};
50365        return result;
50366    }
50367
50368    // ain1 = "bool a"
50369    // ain2 = "half4 b"
50370    public result_int reduce_my_bool_half4_1(Allocation ain1, Allocation ain2) {
50371        return reduce_my_bool_half4_1(ain1, ain2, null);
50372    }
50373
50374    // ain1 = "bool a"
50375    // ain2 = "half4 b"
50376    public result_int reduce_my_bool_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50377        Type t0, t1;
50378        // check ain1
50379        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50380            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50381        }
50382        // check ain2
50383        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
50384            throw new RSRuntimeException("Type mismatch with F16_4!");
50385        }
50386        // Verify dimensions
50387        t0 = ain1.getType();
50388        t1 = ain2.getType();
50389        if ((t0.getCount() != t1.getCount()) ||
50390            (t0.getX() != t1.getX()) ||
50391            (t0.getY() != t1.getY()) ||
50392            (t0.getZ() != t1.getZ()) ||
50393            (t0.hasFaces()   != t1.hasFaces()) ||
50394            (t0.hasMipmaps() != t1.hasMipmaps())) {
50395            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50396        }
50397
50398        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50399        aout.setAutoPadding(true);
50400        reduce(mExportReduceIdx_my_bool_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
50401        return new result_int(aout);
50402    }
50403
50404    private final static int mExportReduceIdx_my_bool_float_0 = 762;
50405    // in1 = "a"
50406    // in2 = "b"
50407    public result_int reduce_my_bool_float_0(byte[] in1, float[] in2) {
50408        // Verify that "in1" is non-null.
50409        if (in1 == null) {
50410            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50411        }
50412        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50413        ain1.setAutoPadding(true);
50414        ain1.copyFrom(in1);
50415        // Verify that "in2" is non-null.
50416        if (in2 == null) {
50417            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50418        }
50419        // Verify that input array lengths are the same.
50420        if (in1.length != in2.length) {
50421            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50422        }
50423        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
50424        ain2.setAutoPadding(true);
50425        ain2.copyFrom(in2);
50426
50427        result_int result = reduce_my_bool_float_0(ain1, ain2, null);
50428        result.mTempIns = new Allocation[]{ain1, ain2};
50429        return result;
50430    }
50431
50432    // ain1 = "bool a"
50433    // ain2 = "float b"
50434    public result_int reduce_my_bool_float_0(Allocation ain1, Allocation ain2) {
50435        return reduce_my_bool_float_0(ain1, ain2, null);
50436    }
50437
50438    // ain1 = "bool a"
50439    // ain2 = "float b"
50440    public result_int reduce_my_bool_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50441        Type t0, t1;
50442        // check ain1
50443        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50444            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50445        }
50446        // check ain2
50447        if (!ain2.getType().getElement().isCompatible(__F32)) {
50448            throw new RSRuntimeException("Type mismatch with F32!");
50449        }
50450        // Verify dimensions
50451        t0 = ain1.getType();
50452        t1 = ain2.getType();
50453        if ((t0.getCount() != t1.getCount()) ||
50454            (t0.getX() != t1.getX()) ||
50455            (t0.getY() != t1.getY()) ||
50456            (t0.getZ() != t1.getZ()) ||
50457            (t0.hasFaces()   != t1.hasFaces()) ||
50458            (t0.hasMipmaps() != t1.hasMipmaps())) {
50459            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50460        }
50461
50462        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50463        aout.setAutoPadding(true);
50464        reduce(mExportReduceIdx_my_bool_float_0, new Allocation[]{ain1, ain2}, aout, sc);
50465        return new result_int(aout);
50466    }
50467
50468    private final static int mExportReduceIdx_my_bool_float_1 = 763;
50469    // in1 = "a"
50470    // in2 = "b"
50471    public result_int reduce_my_bool_float_1(byte[] in1, float[] in2) {
50472        // Verify that "in1" is non-null.
50473        if (in1 == null) {
50474            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50475        }
50476        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50477        ain1.setAutoPadding(true);
50478        ain1.copyFrom(in1);
50479        // Verify that "in2" is non-null.
50480        if (in2 == null) {
50481            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50482        }
50483        // Verify that input array lengths are the same.
50484        if (in1.length != in2.length) {
50485            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50486        }
50487        Allocation ain2 = Allocation.createSized(mRSLocal, __F32, in2.length);
50488        ain2.setAutoPadding(true);
50489        ain2.copyFrom(in2);
50490
50491        result_int result = reduce_my_bool_float_1(ain1, ain2, null);
50492        result.mTempIns = new Allocation[]{ain1, ain2};
50493        return result;
50494    }
50495
50496    // ain1 = "bool a"
50497    // ain2 = "float b"
50498    public result_int reduce_my_bool_float_1(Allocation ain1, Allocation ain2) {
50499        return reduce_my_bool_float_1(ain1, ain2, null);
50500    }
50501
50502    // ain1 = "bool a"
50503    // ain2 = "float b"
50504    public result_int reduce_my_bool_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50505        Type t0, t1;
50506        // check ain1
50507        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50508            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50509        }
50510        // check ain2
50511        if (!ain2.getType().getElement().isCompatible(__F32)) {
50512            throw new RSRuntimeException("Type mismatch with F32!");
50513        }
50514        // Verify dimensions
50515        t0 = ain1.getType();
50516        t1 = ain2.getType();
50517        if ((t0.getCount() != t1.getCount()) ||
50518            (t0.getX() != t1.getX()) ||
50519            (t0.getY() != t1.getY()) ||
50520            (t0.getZ() != t1.getZ()) ||
50521            (t0.hasFaces()   != t1.hasFaces()) ||
50522            (t0.hasMipmaps() != t1.hasMipmaps())) {
50523            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50524        }
50525
50526        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50527        aout.setAutoPadding(true);
50528        reduce(mExportReduceIdx_my_bool_float_1, new Allocation[]{ain1, ain2}, aout, sc);
50529        return new result_int(aout);
50530    }
50531
50532    private final static int mExportReduceIdx_my_bool_float2_0 = 764;
50533    // in1 = "a"
50534    // in2 = "b", flattened 2-vectors
50535    public result_int reduce_my_bool_float2_0(byte[] in1, float[] in2) {
50536        // Verify that "in1" is non-null.
50537        if (in1 == null) {
50538            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50539        }
50540        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50541        ain1.setAutoPadding(true);
50542        ain1.copyFrom(in1);
50543        // Verify that "in2" is non-null.
50544        if (in2 == null) {
50545            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50546        }
50547        // Verify that the array length is a multiple of the vector size.
50548        if (in2.length % 2 != 0) {
50549            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
50550        }
50551        // Verify that input array lengths are the same.
50552        if (in1.length != in2.length / 2) {
50553            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50554        }
50555        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
50556        ain2.setAutoPadding(true);
50557        ain2.copyFrom(in2);
50558
50559        result_int result = reduce_my_bool_float2_0(ain1, ain2, null);
50560        result.mTempIns = new Allocation[]{ain1, ain2};
50561        return result;
50562    }
50563
50564    // ain1 = "bool a"
50565    // ain2 = "float2 b"
50566    public result_int reduce_my_bool_float2_0(Allocation ain1, Allocation ain2) {
50567        return reduce_my_bool_float2_0(ain1, ain2, null);
50568    }
50569
50570    // ain1 = "bool a"
50571    // ain2 = "float2 b"
50572    public result_int reduce_my_bool_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50573        Type t0, t1;
50574        // check ain1
50575        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50576            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50577        }
50578        // check ain2
50579        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
50580            throw new RSRuntimeException("Type mismatch with F32_2!");
50581        }
50582        // Verify dimensions
50583        t0 = ain1.getType();
50584        t1 = ain2.getType();
50585        if ((t0.getCount() != t1.getCount()) ||
50586            (t0.getX() != t1.getX()) ||
50587            (t0.getY() != t1.getY()) ||
50588            (t0.getZ() != t1.getZ()) ||
50589            (t0.hasFaces()   != t1.hasFaces()) ||
50590            (t0.hasMipmaps() != t1.hasMipmaps())) {
50591            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50592        }
50593
50594        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50595        aout.setAutoPadding(true);
50596        reduce(mExportReduceIdx_my_bool_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
50597        return new result_int(aout);
50598    }
50599
50600    private final static int mExportReduceIdx_my_bool_float2_1 = 765;
50601    // in1 = "a"
50602    // in2 = "b", flattened 2-vectors
50603    public result_int reduce_my_bool_float2_1(byte[] in1, float[] in2) {
50604        // Verify that "in1" is non-null.
50605        if (in1 == null) {
50606            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50607        }
50608        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50609        ain1.setAutoPadding(true);
50610        ain1.copyFrom(in1);
50611        // Verify that "in2" is non-null.
50612        if (in2 == null) {
50613            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50614        }
50615        // Verify that the array length is a multiple of the vector size.
50616        if (in2.length % 2 != 0) {
50617            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
50618        }
50619        // Verify that input array lengths are the same.
50620        if (in1.length != in2.length / 2) {
50621            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50622        }
50623        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_2, in2.length / 2);
50624        ain2.setAutoPadding(true);
50625        ain2.copyFrom(in2);
50626
50627        result_int result = reduce_my_bool_float2_1(ain1, ain2, null);
50628        result.mTempIns = new Allocation[]{ain1, ain2};
50629        return result;
50630    }
50631
50632    // ain1 = "bool a"
50633    // ain2 = "float2 b"
50634    public result_int reduce_my_bool_float2_1(Allocation ain1, Allocation ain2) {
50635        return reduce_my_bool_float2_1(ain1, ain2, null);
50636    }
50637
50638    // ain1 = "bool a"
50639    // ain2 = "float2 b"
50640    public result_int reduce_my_bool_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50641        Type t0, t1;
50642        // check ain1
50643        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50644            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50645        }
50646        // check ain2
50647        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
50648            throw new RSRuntimeException("Type mismatch with F32_2!");
50649        }
50650        // Verify dimensions
50651        t0 = ain1.getType();
50652        t1 = ain2.getType();
50653        if ((t0.getCount() != t1.getCount()) ||
50654            (t0.getX() != t1.getX()) ||
50655            (t0.getY() != t1.getY()) ||
50656            (t0.getZ() != t1.getZ()) ||
50657            (t0.hasFaces()   != t1.hasFaces()) ||
50658            (t0.hasMipmaps() != t1.hasMipmaps())) {
50659            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50660        }
50661
50662        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50663        aout.setAutoPadding(true);
50664        reduce(mExportReduceIdx_my_bool_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
50665        return new result_int(aout);
50666    }
50667
50668    private final static int mExportReduceIdx_my_bool_float4_0 = 766;
50669    // in1 = "a"
50670    // in2 = "b", flattened 4-vectors
50671    public result_int reduce_my_bool_float4_0(byte[] in1, float[] in2) {
50672        // Verify that "in1" is non-null.
50673        if (in1 == null) {
50674            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50675        }
50676        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50677        ain1.setAutoPadding(true);
50678        ain1.copyFrom(in1);
50679        // Verify that "in2" is non-null.
50680        if (in2 == null) {
50681            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50682        }
50683        // Verify that the array length is a multiple of the vector size.
50684        if (in2.length % 4 != 0) {
50685            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
50686        }
50687        // Verify that input array lengths are the same.
50688        if (in1.length != in2.length / 4) {
50689            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50690        }
50691        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
50692        ain2.setAutoPadding(true);
50693        ain2.copyFrom(in2);
50694
50695        result_int result = reduce_my_bool_float4_0(ain1, ain2, null);
50696        result.mTempIns = new Allocation[]{ain1, ain2};
50697        return result;
50698    }
50699
50700    // ain1 = "bool a"
50701    // ain2 = "float4 b"
50702    public result_int reduce_my_bool_float4_0(Allocation ain1, Allocation ain2) {
50703        return reduce_my_bool_float4_0(ain1, ain2, null);
50704    }
50705
50706    // ain1 = "bool a"
50707    // ain2 = "float4 b"
50708    public result_int reduce_my_bool_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50709        Type t0, t1;
50710        // check ain1
50711        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50712            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50713        }
50714        // check ain2
50715        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
50716            throw new RSRuntimeException("Type mismatch with F32_4!");
50717        }
50718        // Verify dimensions
50719        t0 = ain1.getType();
50720        t1 = ain2.getType();
50721        if ((t0.getCount() != t1.getCount()) ||
50722            (t0.getX() != t1.getX()) ||
50723            (t0.getY() != t1.getY()) ||
50724            (t0.getZ() != t1.getZ()) ||
50725            (t0.hasFaces()   != t1.hasFaces()) ||
50726            (t0.hasMipmaps() != t1.hasMipmaps())) {
50727            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50728        }
50729
50730        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50731        aout.setAutoPadding(true);
50732        reduce(mExportReduceIdx_my_bool_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
50733        return new result_int(aout);
50734    }
50735
50736    private final static int mExportReduceIdx_my_bool_float4_1 = 767;
50737    // in1 = "a"
50738    // in2 = "b", flattened 4-vectors
50739    public result_int reduce_my_bool_float4_1(byte[] in1, float[] in2) {
50740        // Verify that "in1" is non-null.
50741        if (in1 == null) {
50742            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50743        }
50744        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50745        ain1.setAutoPadding(true);
50746        ain1.copyFrom(in1);
50747        // Verify that "in2" is non-null.
50748        if (in2 == null) {
50749            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50750        }
50751        // Verify that the array length is a multiple of the vector size.
50752        if (in2.length % 4 != 0) {
50753            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
50754        }
50755        // Verify that input array lengths are the same.
50756        if (in1.length != in2.length / 4) {
50757            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50758        }
50759        Allocation ain2 = Allocation.createSized(mRSLocal, __F32_4, in2.length / 4);
50760        ain2.setAutoPadding(true);
50761        ain2.copyFrom(in2);
50762
50763        result_int result = reduce_my_bool_float4_1(ain1, ain2, null);
50764        result.mTempIns = new Allocation[]{ain1, ain2};
50765        return result;
50766    }
50767
50768    // ain1 = "bool a"
50769    // ain2 = "float4 b"
50770    public result_int reduce_my_bool_float4_1(Allocation ain1, Allocation ain2) {
50771        return reduce_my_bool_float4_1(ain1, ain2, null);
50772    }
50773
50774    // ain1 = "bool a"
50775    // ain2 = "float4 b"
50776    public result_int reduce_my_bool_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50777        Type t0, t1;
50778        // check ain1
50779        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50780            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50781        }
50782        // check ain2
50783        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
50784            throw new RSRuntimeException("Type mismatch with F32_4!");
50785        }
50786        // Verify dimensions
50787        t0 = ain1.getType();
50788        t1 = ain2.getType();
50789        if ((t0.getCount() != t1.getCount()) ||
50790            (t0.getX() != t1.getX()) ||
50791            (t0.getY() != t1.getY()) ||
50792            (t0.getZ() != t1.getZ()) ||
50793            (t0.hasFaces()   != t1.hasFaces()) ||
50794            (t0.hasMipmaps() != t1.hasMipmaps())) {
50795            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50796        }
50797
50798        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50799        aout.setAutoPadding(true);
50800        reduce(mExportReduceIdx_my_bool_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
50801        return new result_int(aout);
50802    }
50803
50804    private final static int mExportReduceIdx_my_bool_char_0 = 768;
50805    // in1 = "a"
50806    // in2 = "b"
50807    public result_int reduce_my_bool_char_0(byte[] in1, byte[] in2) {
50808        // Verify that "in1" is non-null.
50809        if (in1 == null) {
50810            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50811        }
50812        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50813        ain1.setAutoPadding(true);
50814        ain1.copyFrom(in1);
50815        // Verify that "in2" is non-null.
50816        if (in2 == null) {
50817            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50818        }
50819        // Verify that input array lengths are the same.
50820        if (in1.length != in2.length) {
50821            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50822        }
50823        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
50824        ain2.setAutoPadding(true);
50825        ain2.copyFrom(in2);
50826
50827        result_int result = reduce_my_bool_char_0(ain1, ain2, null);
50828        result.mTempIns = new Allocation[]{ain1, ain2};
50829        return result;
50830    }
50831
50832    // ain1 = "bool a"
50833    // ain2 = "char b"
50834    public result_int reduce_my_bool_char_0(Allocation ain1, Allocation ain2) {
50835        return reduce_my_bool_char_0(ain1, ain2, null);
50836    }
50837
50838    // ain1 = "bool a"
50839    // ain2 = "char b"
50840    public result_int reduce_my_bool_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50841        Type t0, t1;
50842        // check ain1
50843        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50844            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50845        }
50846        // check ain2
50847        if (!ain2.getType().getElement().isCompatible(__I8)) {
50848            throw new RSRuntimeException("Type mismatch with I8!");
50849        }
50850        // Verify dimensions
50851        t0 = ain1.getType();
50852        t1 = ain2.getType();
50853        if ((t0.getCount() != t1.getCount()) ||
50854            (t0.getX() != t1.getX()) ||
50855            (t0.getY() != t1.getY()) ||
50856            (t0.getZ() != t1.getZ()) ||
50857            (t0.hasFaces()   != t1.hasFaces()) ||
50858            (t0.hasMipmaps() != t1.hasMipmaps())) {
50859            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50860        }
50861
50862        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50863        aout.setAutoPadding(true);
50864        reduce(mExportReduceIdx_my_bool_char_0, new Allocation[]{ain1, ain2}, aout, sc);
50865        return new result_int(aout);
50866    }
50867
50868    private final static int mExportReduceIdx_my_bool_char_1 = 769;
50869    // in1 = "a"
50870    // in2 = "b"
50871    public result_int reduce_my_bool_char_1(byte[] in1, byte[] in2) {
50872        // Verify that "in1" is non-null.
50873        if (in1 == null) {
50874            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50875        }
50876        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50877        ain1.setAutoPadding(true);
50878        ain1.copyFrom(in1);
50879        // Verify that "in2" is non-null.
50880        if (in2 == null) {
50881            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50882        }
50883        // Verify that input array lengths are the same.
50884        if (in1.length != in2.length) {
50885            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50886        }
50887        Allocation ain2 = Allocation.createSized(mRSLocal, __I8, in2.length);
50888        ain2.setAutoPadding(true);
50889        ain2.copyFrom(in2);
50890
50891        result_int result = reduce_my_bool_char_1(ain1, ain2, null);
50892        result.mTempIns = new Allocation[]{ain1, ain2};
50893        return result;
50894    }
50895
50896    // ain1 = "bool a"
50897    // ain2 = "char b"
50898    public result_int reduce_my_bool_char_1(Allocation ain1, Allocation ain2) {
50899        return reduce_my_bool_char_1(ain1, ain2, null);
50900    }
50901
50902    // ain1 = "bool a"
50903    // ain2 = "char b"
50904    public result_int reduce_my_bool_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50905        Type t0, t1;
50906        // check ain1
50907        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50908            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50909        }
50910        // check ain2
50911        if (!ain2.getType().getElement().isCompatible(__I8)) {
50912            throw new RSRuntimeException("Type mismatch with I8!");
50913        }
50914        // Verify dimensions
50915        t0 = ain1.getType();
50916        t1 = ain2.getType();
50917        if ((t0.getCount() != t1.getCount()) ||
50918            (t0.getX() != t1.getX()) ||
50919            (t0.getY() != t1.getY()) ||
50920            (t0.getZ() != t1.getZ()) ||
50921            (t0.hasFaces()   != t1.hasFaces()) ||
50922            (t0.hasMipmaps() != t1.hasMipmaps())) {
50923            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50924        }
50925
50926        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50927        aout.setAutoPadding(true);
50928        reduce(mExportReduceIdx_my_bool_char_1, new Allocation[]{ain1, ain2}, aout, sc);
50929        return new result_int(aout);
50930    }
50931
50932    private final static int mExportReduceIdx_my_bool_char2_0 = 770;
50933    // in1 = "a"
50934    // in2 = "b", flattened 2-vectors
50935    public result_int reduce_my_bool_char2_0(byte[] in1, byte[] in2) {
50936        // Verify that "in1" is non-null.
50937        if (in1 == null) {
50938            throw new RSIllegalArgumentException("Array \"in1\" is null!");
50939        }
50940        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
50941        ain1.setAutoPadding(true);
50942        ain1.copyFrom(in1);
50943        // Verify that "in2" is non-null.
50944        if (in2 == null) {
50945            throw new RSIllegalArgumentException("Array \"in2\" is null!");
50946        }
50947        // Verify that the array length is a multiple of the vector size.
50948        if (in2.length % 2 != 0) {
50949            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
50950        }
50951        // Verify that input array lengths are the same.
50952        if (in1.length != in2.length / 2) {
50953            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
50954        }
50955        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
50956        ain2.setAutoPadding(true);
50957        ain2.copyFrom(in2);
50958
50959        result_int result = reduce_my_bool_char2_0(ain1, ain2, null);
50960        result.mTempIns = new Allocation[]{ain1, ain2};
50961        return result;
50962    }
50963
50964    // ain1 = "bool a"
50965    // ain2 = "char2 b"
50966    public result_int reduce_my_bool_char2_0(Allocation ain1, Allocation ain2) {
50967        return reduce_my_bool_char2_0(ain1, ain2, null);
50968    }
50969
50970    // ain1 = "bool a"
50971    // ain2 = "char2 b"
50972    public result_int reduce_my_bool_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
50973        Type t0, t1;
50974        // check ain1
50975        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
50976            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
50977        }
50978        // check ain2
50979        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
50980            throw new RSRuntimeException("Type mismatch with I8_2!");
50981        }
50982        // Verify dimensions
50983        t0 = ain1.getType();
50984        t1 = ain2.getType();
50985        if ((t0.getCount() != t1.getCount()) ||
50986            (t0.getX() != t1.getX()) ||
50987            (t0.getY() != t1.getY()) ||
50988            (t0.getZ() != t1.getZ()) ||
50989            (t0.hasFaces()   != t1.hasFaces()) ||
50990            (t0.hasMipmaps() != t1.hasMipmaps())) {
50991            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
50992        }
50993
50994        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
50995        aout.setAutoPadding(true);
50996        reduce(mExportReduceIdx_my_bool_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
50997        return new result_int(aout);
50998    }
50999
51000    private final static int mExportReduceIdx_my_bool_char2_1 = 771;
51001    // in1 = "a"
51002    // in2 = "b", flattened 2-vectors
51003    public result_int reduce_my_bool_char2_1(byte[] in1, byte[] in2) {
51004        // Verify that "in1" is non-null.
51005        if (in1 == null) {
51006            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51007        }
51008        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51009        ain1.setAutoPadding(true);
51010        ain1.copyFrom(in1);
51011        // Verify that "in2" is non-null.
51012        if (in2 == null) {
51013            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51014        }
51015        // Verify that the array length is a multiple of the vector size.
51016        if (in2.length % 2 != 0) {
51017            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
51018        }
51019        // Verify that input array lengths are the same.
51020        if (in1.length != in2.length / 2) {
51021            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51022        }
51023        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_2, in2.length / 2);
51024        ain2.setAutoPadding(true);
51025        ain2.copyFrom(in2);
51026
51027        result_int result = reduce_my_bool_char2_1(ain1, ain2, null);
51028        result.mTempIns = new Allocation[]{ain1, ain2};
51029        return result;
51030    }
51031
51032    // ain1 = "bool a"
51033    // ain2 = "char2 b"
51034    public result_int reduce_my_bool_char2_1(Allocation ain1, Allocation ain2) {
51035        return reduce_my_bool_char2_1(ain1, ain2, null);
51036    }
51037
51038    // ain1 = "bool a"
51039    // ain2 = "char2 b"
51040    public result_int reduce_my_bool_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51041        Type t0, t1;
51042        // check ain1
51043        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51044            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51045        }
51046        // check ain2
51047        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
51048            throw new RSRuntimeException("Type mismatch with I8_2!");
51049        }
51050        // Verify dimensions
51051        t0 = ain1.getType();
51052        t1 = ain2.getType();
51053        if ((t0.getCount() != t1.getCount()) ||
51054            (t0.getX() != t1.getX()) ||
51055            (t0.getY() != t1.getY()) ||
51056            (t0.getZ() != t1.getZ()) ||
51057            (t0.hasFaces()   != t1.hasFaces()) ||
51058            (t0.hasMipmaps() != t1.hasMipmaps())) {
51059            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51060        }
51061
51062        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51063        aout.setAutoPadding(true);
51064        reduce(mExportReduceIdx_my_bool_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
51065        return new result_int(aout);
51066    }
51067
51068    private final static int mExportReduceIdx_my_bool_char4_0 = 772;
51069    // in1 = "a"
51070    // in2 = "b", flattened 4-vectors
51071    public result_int reduce_my_bool_char4_0(byte[] in1, byte[] in2) {
51072        // Verify that "in1" is non-null.
51073        if (in1 == null) {
51074            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51075        }
51076        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51077        ain1.setAutoPadding(true);
51078        ain1.copyFrom(in1);
51079        // Verify that "in2" is non-null.
51080        if (in2 == null) {
51081            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51082        }
51083        // Verify that the array length is a multiple of the vector size.
51084        if (in2.length % 4 != 0) {
51085            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
51086        }
51087        // Verify that input array lengths are the same.
51088        if (in1.length != in2.length / 4) {
51089            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51090        }
51091        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
51092        ain2.setAutoPadding(true);
51093        ain2.copyFrom(in2);
51094
51095        result_int result = reduce_my_bool_char4_0(ain1, ain2, null);
51096        result.mTempIns = new Allocation[]{ain1, ain2};
51097        return result;
51098    }
51099
51100    // ain1 = "bool a"
51101    // ain2 = "char4 b"
51102    public result_int reduce_my_bool_char4_0(Allocation ain1, Allocation ain2) {
51103        return reduce_my_bool_char4_0(ain1, ain2, null);
51104    }
51105
51106    // ain1 = "bool a"
51107    // ain2 = "char4 b"
51108    public result_int reduce_my_bool_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51109        Type t0, t1;
51110        // check ain1
51111        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51112            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51113        }
51114        // check ain2
51115        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
51116            throw new RSRuntimeException("Type mismatch with I8_4!");
51117        }
51118        // Verify dimensions
51119        t0 = ain1.getType();
51120        t1 = ain2.getType();
51121        if ((t0.getCount() != t1.getCount()) ||
51122            (t0.getX() != t1.getX()) ||
51123            (t0.getY() != t1.getY()) ||
51124            (t0.getZ() != t1.getZ()) ||
51125            (t0.hasFaces()   != t1.hasFaces()) ||
51126            (t0.hasMipmaps() != t1.hasMipmaps())) {
51127            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51128        }
51129
51130        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51131        aout.setAutoPadding(true);
51132        reduce(mExportReduceIdx_my_bool_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
51133        return new result_int(aout);
51134    }
51135
51136    private final static int mExportReduceIdx_my_bool_char4_1 = 773;
51137    // in1 = "a"
51138    // in2 = "b", flattened 4-vectors
51139    public result_int reduce_my_bool_char4_1(byte[] in1, byte[] in2) {
51140        // Verify that "in1" is non-null.
51141        if (in1 == null) {
51142            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51143        }
51144        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51145        ain1.setAutoPadding(true);
51146        ain1.copyFrom(in1);
51147        // Verify that "in2" is non-null.
51148        if (in2 == null) {
51149            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51150        }
51151        // Verify that the array length is a multiple of the vector size.
51152        if (in2.length % 4 != 0) {
51153            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
51154        }
51155        // Verify that input array lengths are the same.
51156        if (in1.length != in2.length / 4) {
51157            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51158        }
51159        Allocation ain2 = Allocation.createSized(mRSLocal, __I8_4, in2.length / 4);
51160        ain2.setAutoPadding(true);
51161        ain2.copyFrom(in2);
51162
51163        result_int result = reduce_my_bool_char4_1(ain1, ain2, null);
51164        result.mTempIns = new Allocation[]{ain1, ain2};
51165        return result;
51166    }
51167
51168    // ain1 = "bool a"
51169    // ain2 = "char4 b"
51170    public result_int reduce_my_bool_char4_1(Allocation ain1, Allocation ain2) {
51171        return reduce_my_bool_char4_1(ain1, ain2, null);
51172    }
51173
51174    // ain1 = "bool a"
51175    // ain2 = "char4 b"
51176    public result_int reduce_my_bool_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51177        Type t0, t1;
51178        // check ain1
51179        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51180            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51181        }
51182        // check ain2
51183        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
51184            throw new RSRuntimeException("Type mismatch with I8_4!");
51185        }
51186        // Verify dimensions
51187        t0 = ain1.getType();
51188        t1 = ain2.getType();
51189        if ((t0.getCount() != t1.getCount()) ||
51190            (t0.getX() != t1.getX()) ||
51191            (t0.getY() != t1.getY()) ||
51192            (t0.getZ() != t1.getZ()) ||
51193            (t0.hasFaces()   != t1.hasFaces()) ||
51194            (t0.hasMipmaps() != t1.hasMipmaps())) {
51195            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51196        }
51197
51198        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51199        aout.setAutoPadding(true);
51200        reduce(mExportReduceIdx_my_bool_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
51201        return new result_int(aout);
51202    }
51203
51204    private final static int mExportReduceIdx_my_bool_short_0 = 774;
51205    // in1 = "a"
51206    // in2 = "b"
51207    public result_int reduce_my_bool_short_0(byte[] in1, short[] in2) {
51208        // Verify that "in1" is non-null.
51209        if (in1 == null) {
51210            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51211        }
51212        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51213        ain1.setAutoPadding(true);
51214        ain1.copyFrom(in1);
51215        // Verify that "in2" is non-null.
51216        if (in2 == null) {
51217            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51218        }
51219        // Verify that input array lengths are the same.
51220        if (in1.length != in2.length) {
51221            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51222        }
51223        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
51224        ain2.setAutoPadding(true);
51225        ain2.copyFrom(in2);
51226
51227        result_int result = reduce_my_bool_short_0(ain1, ain2, null);
51228        result.mTempIns = new Allocation[]{ain1, ain2};
51229        return result;
51230    }
51231
51232    // ain1 = "bool a"
51233    // ain2 = "short b"
51234    public result_int reduce_my_bool_short_0(Allocation ain1, Allocation ain2) {
51235        return reduce_my_bool_short_0(ain1, ain2, null);
51236    }
51237
51238    // ain1 = "bool a"
51239    // ain2 = "short b"
51240    public result_int reduce_my_bool_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51241        Type t0, t1;
51242        // check ain1
51243        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51244            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51245        }
51246        // check ain2
51247        if (!ain2.getType().getElement().isCompatible(__I16)) {
51248            throw new RSRuntimeException("Type mismatch with I16!");
51249        }
51250        // Verify dimensions
51251        t0 = ain1.getType();
51252        t1 = ain2.getType();
51253        if ((t0.getCount() != t1.getCount()) ||
51254            (t0.getX() != t1.getX()) ||
51255            (t0.getY() != t1.getY()) ||
51256            (t0.getZ() != t1.getZ()) ||
51257            (t0.hasFaces()   != t1.hasFaces()) ||
51258            (t0.hasMipmaps() != t1.hasMipmaps())) {
51259            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51260        }
51261
51262        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51263        aout.setAutoPadding(true);
51264        reduce(mExportReduceIdx_my_bool_short_0, new Allocation[]{ain1, ain2}, aout, sc);
51265        return new result_int(aout);
51266    }
51267
51268    private final static int mExportReduceIdx_my_bool_short_1 = 775;
51269    // in1 = "a"
51270    // in2 = "b"
51271    public result_int reduce_my_bool_short_1(byte[] in1, short[] in2) {
51272        // Verify that "in1" is non-null.
51273        if (in1 == null) {
51274            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51275        }
51276        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51277        ain1.setAutoPadding(true);
51278        ain1.copyFrom(in1);
51279        // Verify that "in2" is non-null.
51280        if (in2 == null) {
51281            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51282        }
51283        // Verify that input array lengths are the same.
51284        if (in1.length != in2.length) {
51285            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51286        }
51287        Allocation ain2 = Allocation.createSized(mRSLocal, __I16, in2.length);
51288        ain2.setAutoPadding(true);
51289        ain2.copyFrom(in2);
51290
51291        result_int result = reduce_my_bool_short_1(ain1, ain2, null);
51292        result.mTempIns = new Allocation[]{ain1, ain2};
51293        return result;
51294    }
51295
51296    // ain1 = "bool a"
51297    // ain2 = "short b"
51298    public result_int reduce_my_bool_short_1(Allocation ain1, Allocation ain2) {
51299        return reduce_my_bool_short_1(ain1, ain2, null);
51300    }
51301
51302    // ain1 = "bool a"
51303    // ain2 = "short b"
51304    public result_int reduce_my_bool_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51305        Type t0, t1;
51306        // check ain1
51307        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51308            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51309        }
51310        // check ain2
51311        if (!ain2.getType().getElement().isCompatible(__I16)) {
51312            throw new RSRuntimeException("Type mismatch with I16!");
51313        }
51314        // Verify dimensions
51315        t0 = ain1.getType();
51316        t1 = ain2.getType();
51317        if ((t0.getCount() != t1.getCount()) ||
51318            (t0.getX() != t1.getX()) ||
51319            (t0.getY() != t1.getY()) ||
51320            (t0.getZ() != t1.getZ()) ||
51321            (t0.hasFaces()   != t1.hasFaces()) ||
51322            (t0.hasMipmaps() != t1.hasMipmaps())) {
51323            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51324        }
51325
51326        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51327        aout.setAutoPadding(true);
51328        reduce(mExportReduceIdx_my_bool_short_1, new Allocation[]{ain1, ain2}, aout, sc);
51329        return new result_int(aout);
51330    }
51331
51332    private final static int mExportReduceIdx_my_bool_short2_0 = 776;
51333    // in1 = "a"
51334    // in2 = "b", flattened 2-vectors
51335    public result_int reduce_my_bool_short2_0(byte[] in1, short[] in2) {
51336        // Verify that "in1" is non-null.
51337        if (in1 == null) {
51338            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51339        }
51340        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51341        ain1.setAutoPadding(true);
51342        ain1.copyFrom(in1);
51343        // Verify that "in2" is non-null.
51344        if (in2 == null) {
51345            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51346        }
51347        // Verify that the array length is a multiple of the vector size.
51348        if (in2.length % 2 != 0) {
51349            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
51350        }
51351        // Verify that input array lengths are the same.
51352        if (in1.length != in2.length / 2) {
51353            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51354        }
51355        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
51356        ain2.setAutoPadding(true);
51357        ain2.copyFrom(in2);
51358
51359        result_int result = reduce_my_bool_short2_0(ain1, ain2, null);
51360        result.mTempIns = new Allocation[]{ain1, ain2};
51361        return result;
51362    }
51363
51364    // ain1 = "bool a"
51365    // ain2 = "short2 b"
51366    public result_int reduce_my_bool_short2_0(Allocation ain1, Allocation ain2) {
51367        return reduce_my_bool_short2_0(ain1, ain2, null);
51368    }
51369
51370    // ain1 = "bool a"
51371    // ain2 = "short2 b"
51372    public result_int reduce_my_bool_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51373        Type t0, t1;
51374        // check ain1
51375        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51376            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51377        }
51378        // check ain2
51379        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
51380            throw new RSRuntimeException("Type mismatch with I16_2!");
51381        }
51382        // Verify dimensions
51383        t0 = ain1.getType();
51384        t1 = ain2.getType();
51385        if ((t0.getCount() != t1.getCount()) ||
51386            (t0.getX() != t1.getX()) ||
51387            (t0.getY() != t1.getY()) ||
51388            (t0.getZ() != t1.getZ()) ||
51389            (t0.hasFaces()   != t1.hasFaces()) ||
51390            (t0.hasMipmaps() != t1.hasMipmaps())) {
51391            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51392        }
51393
51394        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51395        aout.setAutoPadding(true);
51396        reduce(mExportReduceIdx_my_bool_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
51397        return new result_int(aout);
51398    }
51399
51400    private final static int mExportReduceIdx_my_bool_short2_1 = 777;
51401    // in1 = "a"
51402    // in2 = "b", flattened 2-vectors
51403    public result_int reduce_my_bool_short2_1(byte[] in1, short[] in2) {
51404        // Verify that "in1" is non-null.
51405        if (in1 == null) {
51406            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51407        }
51408        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51409        ain1.setAutoPadding(true);
51410        ain1.copyFrom(in1);
51411        // Verify that "in2" is non-null.
51412        if (in2 == null) {
51413            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51414        }
51415        // Verify that the array length is a multiple of the vector size.
51416        if (in2.length % 2 != 0) {
51417            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
51418        }
51419        // Verify that input array lengths are the same.
51420        if (in1.length != in2.length / 2) {
51421            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51422        }
51423        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_2, in2.length / 2);
51424        ain2.setAutoPadding(true);
51425        ain2.copyFrom(in2);
51426
51427        result_int result = reduce_my_bool_short2_1(ain1, ain2, null);
51428        result.mTempIns = new Allocation[]{ain1, ain2};
51429        return result;
51430    }
51431
51432    // ain1 = "bool a"
51433    // ain2 = "short2 b"
51434    public result_int reduce_my_bool_short2_1(Allocation ain1, Allocation ain2) {
51435        return reduce_my_bool_short2_1(ain1, ain2, null);
51436    }
51437
51438    // ain1 = "bool a"
51439    // ain2 = "short2 b"
51440    public result_int reduce_my_bool_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51441        Type t0, t1;
51442        // check ain1
51443        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51444            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51445        }
51446        // check ain2
51447        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
51448            throw new RSRuntimeException("Type mismatch with I16_2!");
51449        }
51450        // Verify dimensions
51451        t0 = ain1.getType();
51452        t1 = ain2.getType();
51453        if ((t0.getCount() != t1.getCount()) ||
51454            (t0.getX() != t1.getX()) ||
51455            (t0.getY() != t1.getY()) ||
51456            (t0.getZ() != t1.getZ()) ||
51457            (t0.hasFaces()   != t1.hasFaces()) ||
51458            (t0.hasMipmaps() != t1.hasMipmaps())) {
51459            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51460        }
51461
51462        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51463        aout.setAutoPadding(true);
51464        reduce(mExportReduceIdx_my_bool_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
51465        return new result_int(aout);
51466    }
51467
51468    private final static int mExportReduceIdx_my_bool_short4_0 = 778;
51469    // in1 = "a"
51470    // in2 = "b", flattened 4-vectors
51471    public result_int reduce_my_bool_short4_0(byte[] in1, short[] in2) {
51472        // Verify that "in1" is non-null.
51473        if (in1 == null) {
51474            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51475        }
51476        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51477        ain1.setAutoPadding(true);
51478        ain1.copyFrom(in1);
51479        // Verify that "in2" is non-null.
51480        if (in2 == null) {
51481            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51482        }
51483        // Verify that the array length is a multiple of the vector size.
51484        if (in2.length % 4 != 0) {
51485            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
51486        }
51487        // Verify that input array lengths are the same.
51488        if (in1.length != in2.length / 4) {
51489            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51490        }
51491        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
51492        ain2.setAutoPadding(true);
51493        ain2.copyFrom(in2);
51494
51495        result_int result = reduce_my_bool_short4_0(ain1, ain2, null);
51496        result.mTempIns = new Allocation[]{ain1, ain2};
51497        return result;
51498    }
51499
51500    // ain1 = "bool a"
51501    // ain2 = "short4 b"
51502    public result_int reduce_my_bool_short4_0(Allocation ain1, Allocation ain2) {
51503        return reduce_my_bool_short4_0(ain1, ain2, null);
51504    }
51505
51506    // ain1 = "bool a"
51507    // ain2 = "short4 b"
51508    public result_int reduce_my_bool_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51509        Type t0, t1;
51510        // check ain1
51511        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51512            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51513        }
51514        // check ain2
51515        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
51516            throw new RSRuntimeException("Type mismatch with I16_4!");
51517        }
51518        // Verify dimensions
51519        t0 = ain1.getType();
51520        t1 = ain2.getType();
51521        if ((t0.getCount() != t1.getCount()) ||
51522            (t0.getX() != t1.getX()) ||
51523            (t0.getY() != t1.getY()) ||
51524            (t0.getZ() != t1.getZ()) ||
51525            (t0.hasFaces()   != t1.hasFaces()) ||
51526            (t0.hasMipmaps() != t1.hasMipmaps())) {
51527            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51528        }
51529
51530        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51531        aout.setAutoPadding(true);
51532        reduce(mExportReduceIdx_my_bool_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
51533        return new result_int(aout);
51534    }
51535
51536    private final static int mExportReduceIdx_my_bool_short4_1 = 779;
51537    // in1 = "a"
51538    // in2 = "b", flattened 4-vectors
51539    public result_int reduce_my_bool_short4_1(byte[] in1, short[] in2) {
51540        // Verify that "in1" is non-null.
51541        if (in1 == null) {
51542            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51543        }
51544        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51545        ain1.setAutoPadding(true);
51546        ain1.copyFrom(in1);
51547        // Verify that "in2" is non-null.
51548        if (in2 == null) {
51549            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51550        }
51551        // Verify that the array length is a multiple of the vector size.
51552        if (in2.length % 4 != 0) {
51553            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
51554        }
51555        // Verify that input array lengths are the same.
51556        if (in1.length != in2.length / 4) {
51557            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51558        }
51559        Allocation ain2 = Allocation.createSized(mRSLocal, __I16_4, in2.length / 4);
51560        ain2.setAutoPadding(true);
51561        ain2.copyFrom(in2);
51562
51563        result_int result = reduce_my_bool_short4_1(ain1, ain2, null);
51564        result.mTempIns = new Allocation[]{ain1, ain2};
51565        return result;
51566    }
51567
51568    // ain1 = "bool a"
51569    // ain2 = "short4 b"
51570    public result_int reduce_my_bool_short4_1(Allocation ain1, Allocation ain2) {
51571        return reduce_my_bool_short4_1(ain1, ain2, null);
51572    }
51573
51574    // ain1 = "bool a"
51575    // ain2 = "short4 b"
51576    public result_int reduce_my_bool_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51577        Type t0, t1;
51578        // check ain1
51579        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51580            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51581        }
51582        // check ain2
51583        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
51584            throw new RSRuntimeException("Type mismatch with I16_4!");
51585        }
51586        // Verify dimensions
51587        t0 = ain1.getType();
51588        t1 = ain2.getType();
51589        if ((t0.getCount() != t1.getCount()) ||
51590            (t0.getX() != t1.getX()) ||
51591            (t0.getY() != t1.getY()) ||
51592            (t0.getZ() != t1.getZ()) ||
51593            (t0.hasFaces()   != t1.hasFaces()) ||
51594            (t0.hasMipmaps() != t1.hasMipmaps())) {
51595            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51596        }
51597
51598        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51599        aout.setAutoPadding(true);
51600        reduce(mExportReduceIdx_my_bool_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
51601        return new result_int(aout);
51602    }
51603
51604    private final static int mExportReduceIdx_my_bool_uchar_0 = 780;
51605    // in1 = "a"
51606    // in2 = "b"
51607    public result_int reduce_my_bool_uchar_0(byte[] in1, byte[] in2) {
51608        // Verify that "in1" is non-null.
51609        if (in1 == null) {
51610            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51611        }
51612        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51613        ain1.setAutoPadding(true);
51614        ain1.copyFrom(in1);
51615        // Verify that "in2" is non-null.
51616        if (in2 == null) {
51617            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51618        }
51619        // Verify that input array lengths are the same.
51620        if (in1.length != in2.length) {
51621            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51622        }
51623        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
51624        ain2.setAutoPadding(true);
51625        ain2.copyFrom(in2);
51626
51627        result_int result = reduce_my_bool_uchar_0(ain1, ain2, null);
51628        result.mTempIns = new Allocation[]{ain1, ain2};
51629        return result;
51630    }
51631
51632    // ain1 = "bool a"
51633    // ain2 = "uchar b"
51634    public result_int reduce_my_bool_uchar_0(Allocation ain1, Allocation ain2) {
51635        return reduce_my_bool_uchar_0(ain1, ain2, null);
51636    }
51637
51638    // ain1 = "bool a"
51639    // ain2 = "uchar b"
51640    public result_int reduce_my_bool_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51641        Type t0, t1;
51642        // check ain1
51643        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51644            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51645        }
51646        // check ain2
51647        if (!ain2.getType().getElement().isCompatible(__U8)) {
51648            throw new RSRuntimeException("Type mismatch with U8!");
51649        }
51650        // Verify dimensions
51651        t0 = ain1.getType();
51652        t1 = ain2.getType();
51653        if ((t0.getCount() != t1.getCount()) ||
51654            (t0.getX() != t1.getX()) ||
51655            (t0.getY() != t1.getY()) ||
51656            (t0.getZ() != t1.getZ()) ||
51657            (t0.hasFaces()   != t1.hasFaces()) ||
51658            (t0.hasMipmaps() != t1.hasMipmaps())) {
51659            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51660        }
51661
51662        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51663        aout.setAutoPadding(true);
51664        reduce(mExportReduceIdx_my_bool_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
51665        return new result_int(aout);
51666    }
51667
51668    private final static int mExportReduceIdx_my_bool_uchar_1 = 781;
51669    // in1 = "a"
51670    // in2 = "b"
51671    public result_int reduce_my_bool_uchar_1(byte[] in1, byte[] in2) {
51672        // Verify that "in1" is non-null.
51673        if (in1 == null) {
51674            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51675        }
51676        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51677        ain1.setAutoPadding(true);
51678        ain1.copyFrom(in1);
51679        // Verify that "in2" is non-null.
51680        if (in2 == null) {
51681            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51682        }
51683        // Verify that input array lengths are the same.
51684        if (in1.length != in2.length) {
51685            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51686        }
51687        Allocation ain2 = Allocation.createSized(mRSLocal, __U8, in2.length);
51688        ain2.setAutoPadding(true);
51689        ain2.copyFrom(in2);
51690
51691        result_int result = reduce_my_bool_uchar_1(ain1, ain2, null);
51692        result.mTempIns = new Allocation[]{ain1, ain2};
51693        return result;
51694    }
51695
51696    // ain1 = "bool a"
51697    // ain2 = "uchar b"
51698    public result_int reduce_my_bool_uchar_1(Allocation ain1, Allocation ain2) {
51699        return reduce_my_bool_uchar_1(ain1, ain2, null);
51700    }
51701
51702    // ain1 = "bool a"
51703    // ain2 = "uchar b"
51704    public result_int reduce_my_bool_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51705        Type t0, t1;
51706        // check ain1
51707        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51708            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51709        }
51710        // check ain2
51711        if (!ain2.getType().getElement().isCompatible(__U8)) {
51712            throw new RSRuntimeException("Type mismatch with U8!");
51713        }
51714        // Verify dimensions
51715        t0 = ain1.getType();
51716        t1 = ain2.getType();
51717        if ((t0.getCount() != t1.getCount()) ||
51718            (t0.getX() != t1.getX()) ||
51719            (t0.getY() != t1.getY()) ||
51720            (t0.getZ() != t1.getZ()) ||
51721            (t0.hasFaces()   != t1.hasFaces()) ||
51722            (t0.hasMipmaps() != t1.hasMipmaps())) {
51723            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51724        }
51725
51726        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51727        aout.setAutoPadding(true);
51728        reduce(mExportReduceIdx_my_bool_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
51729        return new result_int(aout);
51730    }
51731
51732    private final static int mExportReduceIdx_my_bool_uchar2_0 = 782;
51733    // in1 = "a"
51734    // in2 = "b", flattened 2-vectors
51735    public result_int reduce_my_bool_uchar2_0(byte[] in1, byte[] in2) {
51736        // Verify that "in1" is non-null.
51737        if (in1 == null) {
51738            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51739        }
51740        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51741        ain1.setAutoPadding(true);
51742        ain1.copyFrom(in1);
51743        // Verify that "in2" is non-null.
51744        if (in2 == null) {
51745            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51746        }
51747        // Verify that the array length is a multiple of the vector size.
51748        if (in2.length % 2 != 0) {
51749            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
51750        }
51751        // Verify that input array lengths are the same.
51752        if (in1.length != in2.length / 2) {
51753            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51754        }
51755        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
51756        ain2.setAutoPadding(true);
51757        ain2.copyFrom(in2);
51758
51759        result_int result = reduce_my_bool_uchar2_0(ain1, ain2, null);
51760        result.mTempIns = new Allocation[]{ain1, ain2};
51761        return result;
51762    }
51763
51764    // ain1 = "bool a"
51765    // ain2 = "uchar2 b"
51766    public result_int reduce_my_bool_uchar2_0(Allocation ain1, Allocation ain2) {
51767        return reduce_my_bool_uchar2_0(ain1, ain2, null);
51768    }
51769
51770    // ain1 = "bool a"
51771    // ain2 = "uchar2 b"
51772    public result_int reduce_my_bool_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51773        Type t0, t1;
51774        // check ain1
51775        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51776            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51777        }
51778        // check ain2
51779        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
51780            throw new RSRuntimeException("Type mismatch with U8_2!");
51781        }
51782        // Verify dimensions
51783        t0 = ain1.getType();
51784        t1 = ain2.getType();
51785        if ((t0.getCount() != t1.getCount()) ||
51786            (t0.getX() != t1.getX()) ||
51787            (t0.getY() != t1.getY()) ||
51788            (t0.getZ() != t1.getZ()) ||
51789            (t0.hasFaces()   != t1.hasFaces()) ||
51790            (t0.hasMipmaps() != t1.hasMipmaps())) {
51791            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51792        }
51793
51794        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51795        aout.setAutoPadding(true);
51796        reduce(mExportReduceIdx_my_bool_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
51797        return new result_int(aout);
51798    }
51799
51800    private final static int mExportReduceIdx_my_bool_uchar2_1 = 783;
51801    // in1 = "a"
51802    // in2 = "b", flattened 2-vectors
51803    public result_int reduce_my_bool_uchar2_1(byte[] in1, byte[] in2) {
51804        // Verify that "in1" is non-null.
51805        if (in1 == null) {
51806            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51807        }
51808        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51809        ain1.setAutoPadding(true);
51810        ain1.copyFrom(in1);
51811        // Verify that "in2" is non-null.
51812        if (in2 == null) {
51813            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51814        }
51815        // Verify that the array length is a multiple of the vector size.
51816        if (in2.length % 2 != 0) {
51817            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
51818        }
51819        // Verify that input array lengths are the same.
51820        if (in1.length != in2.length / 2) {
51821            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51822        }
51823        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_2, in2.length / 2);
51824        ain2.setAutoPadding(true);
51825        ain2.copyFrom(in2);
51826
51827        result_int result = reduce_my_bool_uchar2_1(ain1, ain2, null);
51828        result.mTempIns = new Allocation[]{ain1, ain2};
51829        return result;
51830    }
51831
51832    // ain1 = "bool a"
51833    // ain2 = "uchar2 b"
51834    public result_int reduce_my_bool_uchar2_1(Allocation ain1, Allocation ain2) {
51835        return reduce_my_bool_uchar2_1(ain1, ain2, null);
51836    }
51837
51838    // ain1 = "bool a"
51839    // ain2 = "uchar2 b"
51840    public result_int reduce_my_bool_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51841        Type t0, t1;
51842        // check ain1
51843        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51844            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51845        }
51846        // check ain2
51847        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
51848            throw new RSRuntimeException("Type mismatch with U8_2!");
51849        }
51850        // Verify dimensions
51851        t0 = ain1.getType();
51852        t1 = ain2.getType();
51853        if ((t0.getCount() != t1.getCount()) ||
51854            (t0.getX() != t1.getX()) ||
51855            (t0.getY() != t1.getY()) ||
51856            (t0.getZ() != t1.getZ()) ||
51857            (t0.hasFaces()   != t1.hasFaces()) ||
51858            (t0.hasMipmaps() != t1.hasMipmaps())) {
51859            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51860        }
51861
51862        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51863        aout.setAutoPadding(true);
51864        reduce(mExportReduceIdx_my_bool_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
51865        return new result_int(aout);
51866    }
51867
51868    private final static int mExportReduceIdx_my_bool_uchar4_0 = 784;
51869    // in1 = "a"
51870    // in2 = "b", flattened 4-vectors
51871    public result_int reduce_my_bool_uchar4_0(byte[] in1, byte[] in2) {
51872        // Verify that "in1" is non-null.
51873        if (in1 == null) {
51874            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51875        }
51876        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51877        ain1.setAutoPadding(true);
51878        ain1.copyFrom(in1);
51879        // Verify that "in2" is non-null.
51880        if (in2 == null) {
51881            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51882        }
51883        // Verify that the array length is a multiple of the vector size.
51884        if (in2.length % 4 != 0) {
51885            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
51886        }
51887        // Verify that input array lengths are the same.
51888        if (in1.length != in2.length / 4) {
51889            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51890        }
51891        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
51892        ain2.setAutoPadding(true);
51893        ain2.copyFrom(in2);
51894
51895        result_int result = reduce_my_bool_uchar4_0(ain1, ain2, null);
51896        result.mTempIns = new Allocation[]{ain1, ain2};
51897        return result;
51898    }
51899
51900    // ain1 = "bool a"
51901    // ain2 = "uchar4 b"
51902    public result_int reduce_my_bool_uchar4_0(Allocation ain1, Allocation ain2) {
51903        return reduce_my_bool_uchar4_0(ain1, ain2, null);
51904    }
51905
51906    // ain1 = "bool a"
51907    // ain2 = "uchar4 b"
51908    public result_int reduce_my_bool_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51909        Type t0, t1;
51910        // check ain1
51911        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51912            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51913        }
51914        // check ain2
51915        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
51916            throw new RSRuntimeException("Type mismatch with U8_4!");
51917        }
51918        // Verify dimensions
51919        t0 = ain1.getType();
51920        t1 = ain2.getType();
51921        if ((t0.getCount() != t1.getCount()) ||
51922            (t0.getX() != t1.getX()) ||
51923            (t0.getY() != t1.getY()) ||
51924            (t0.getZ() != t1.getZ()) ||
51925            (t0.hasFaces()   != t1.hasFaces()) ||
51926            (t0.hasMipmaps() != t1.hasMipmaps())) {
51927            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51928        }
51929
51930        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51931        aout.setAutoPadding(true);
51932        reduce(mExportReduceIdx_my_bool_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
51933        return new result_int(aout);
51934    }
51935
51936    private final static int mExportReduceIdx_my_bool_uchar4_1 = 785;
51937    // in1 = "a"
51938    // in2 = "b", flattened 4-vectors
51939    public result_int reduce_my_bool_uchar4_1(byte[] in1, byte[] in2) {
51940        // Verify that "in1" is non-null.
51941        if (in1 == null) {
51942            throw new RSIllegalArgumentException("Array \"in1\" is null!");
51943        }
51944        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
51945        ain1.setAutoPadding(true);
51946        ain1.copyFrom(in1);
51947        // Verify that "in2" is non-null.
51948        if (in2 == null) {
51949            throw new RSIllegalArgumentException("Array \"in2\" is null!");
51950        }
51951        // Verify that the array length is a multiple of the vector size.
51952        if (in2.length % 4 != 0) {
51953            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
51954        }
51955        // Verify that input array lengths are the same.
51956        if (in1.length != in2.length / 4) {
51957            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
51958        }
51959        Allocation ain2 = Allocation.createSized(mRSLocal, __U8_4, in2.length / 4);
51960        ain2.setAutoPadding(true);
51961        ain2.copyFrom(in2);
51962
51963        result_int result = reduce_my_bool_uchar4_1(ain1, ain2, null);
51964        result.mTempIns = new Allocation[]{ain1, ain2};
51965        return result;
51966    }
51967
51968    // ain1 = "bool a"
51969    // ain2 = "uchar4 b"
51970    public result_int reduce_my_bool_uchar4_1(Allocation ain1, Allocation ain2) {
51971        return reduce_my_bool_uchar4_1(ain1, ain2, null);
51972    }
51973
51974    // ain1 = "bool a"
51975    // ain2 = "uchar4 b"
51976    public result_int reduce_my_bool_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
51977        Type t0, t1;
51978        // check ain1
51979        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
51980            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
51981        }
51982        // check ain2
51983        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
51984            throw new RSRuntimeException("Type mismatch with U8_4!");
51985        }
51986        // Verify dimensions
51987        t0 = ain1.getType();
51988        t1 = ain2.getType();
51989        if ((t0.getCount() != t1.getCount()) ||
51990            (t0.getX() != t1.getX()) ||
51991            (t0.getY() != t1.getY()) ||
51992            (t0.getZ() != t1.getZ()) ||
51993            (t0.hasFaces()   != t1.hasFaces()) ||
51994            (t0.hasMipmaps() != t1.hasMipmaps())) {
51995            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
51996        }
51997
51998        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
51999        aout.setAutoPadding(true);
52000        reduce(mExportReduceIdx_my_bool_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
52001        return new result_int(aout);
52002    }
52003
52004    private final static int mExportReduceIdx_my_bool_ushort_0 = 786;
52005    // in1 = "a"
52006    // in2 = "b"
52007    public result_int reduce_my_bool_ushort_0(byte[] in1, short[] in2) {
52008        // Verify that "in1" is non-null.
52009        if (in1 == null) {
52010            throw new RSIllegalArgumentException("Array \"in1\" is null!");
52011        }
52012        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
52013        ain1.setAutoPadding(true);
52014        ain1.copyFrom(in1);
52015        // Verify that "in2" is non-null.
52016        if (in2 == null) {
52017            throw new RSIllegalArgumentException("Array \"in2\" is null!");
52018        }
52019        // Verify that input array lengths are the same.
52020        if (in1.length != in2.length) {
52021            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
52022        }
52023        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
52024        ain2.setAutoPadding(true);
52025        ain2.copyFrom(in2);
52026
52027        result_int result = reduce_my_bool_ushort_0(ain1, ain2, null);
52028        result.mTempIns = new Allocation[]{ain1, ain2};
52029        return result;
52030    }
52031
52032    // ain1 = "bool a"
52033    // ain2 = "ushort b"
52034    public result_int reduce_my_bool_ushort_0(Allocation ain1, Allocation ain2) {
52035        return reduce_my_bool_ushort_0(ain1, ain2, null);
52036    }
52037
52038    // ain1 = "bool a"
52039    // ain2 = "ushort b"
52040    public result_int reduce_my_bool_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52041        Type t0, t1;
52042        // check ain1
52043        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52044            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52045        }
52046        // check ain2
52047        if (!ain2.getType().getElement().isCompatible(__U16)) {
52048            throw new RSRuntimeException("Type mismatch with U16!");
52049        }
52050        // Verify dimensions
52051        t0 = ain1.getType();
52052        t1 = ain2.getType();
52053        if ((t0.getCount() != t1.getCount()) ||
52054            (t0.getX() != t1.getX()) ||
52055            (t0.getY() != t1.getY()) ||
52056            (t0.getZ() != t1.getZ()) ||
52057            (t0.hasFaces()   != t1.hasFaces()) ||
52058            (t0.hasMipmaps() != t1.hasMipmaps())) {
52059            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52060        }
52061
52062        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52063        aout.setAutoPadding(true);
52064        reduce(mExportReduceIdx_my_bool_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
52065        return new result_int(aout);
52066    }
52067
52068    private final static int mExportReduceIdx_my_bool_ushort_1 = 787;
52069    // in1 = "a"
52070    // in2 = "b"
52071    public result_int reduce_my_bool_ushort_1(byte[] in1, short[] in2) {
52072        // Verify that "in1" is non-null.
52073        if (in1 == null) {
52074            throw new RSIllegalArgumentException("Array \"in1\" is null!");
52075        }
52076        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
52077        ain1.setAutoPadding(true);
52078        ain1.copyFrom(in1);
52079        // Verify that "in2" is non-null.
52080        if (in2 == null) {
52081            throw new RSIllegalArgumentException("Array \"in2\" is null!");
52082        }
52083        // Verify that input array lengths are the same.
52084        if (in1.length != in2.length) {
52085            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
52086        }
52087        Allocation ain2 = Allocation.createSized(mRSLocal, __U16, in2.length);
52088        ain2.setAutoPadding(true);
52089        ain2.copyFrom(in2);
52090
52091        result_int result = reduce_my_bool_ushort_1(ain1, ain2, null);
52092        result.mTempIns = new Allocation[]{ain1, ain2};
52093        return result;
52094    }
52095
52096    // ain1 = "bool a"
52097    // ain2 = "ushort b"
52098    public result_int reduce_my_bool_ushort_1(Allocation ain1, Allocation ain2) {
52099        return reduce_my_bool_ushort_1(ain1, ain2, null);
52100    }
52101
52102    // ain1 = "bool a"
52103    // ain2 = "ushort b"
52104    public result_int reduce_my_bool_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52105        Type t0, t1;
52106        // check ain1
52107        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52108            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52109        }
52110        // check ain2
52111        if (!ain2.getType().getElement().isCompatible(__U16)) {
52112            throw new RSRuntimeException("Type mismatch with U16!");
52113        }
52114        // Verify dimensions
52115        t0 = ain1.getType();
52116        t1 = ain2.getType();
52117        if ((t0.getCount() != t1.getCount()) ||
52118            (t0.getX() != t1.getX()) ||
52119            (t0.getY() != t1.getY()) ||
52120            (t0.getZ() != t1.getZ()) ||
52121            (t0.hasFaces()   != t1.hasFaces()) ||
52122            (t0.hasMipmaps() != t1.hasMipmaps())) {
52123            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52124        }
52125
52126        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52127        aout.setAutoPadding(true);
52128        reduce(mExportReduceIdx_my_bool_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
52129        return new result_int(aout);
52130    }
52131
52132    private final static int mExportReduceIdx_my_bool_ushort2_0 = 788;
52133    // in1 = "a"
52134    // in2 = "b", flattened 2-vectors
52135    public result_int reduce_my_bool_ushort2_0(byte[] in1, short[] in2) {
52136        // Verify that "in1" is non-null.
52137        if (in1 == null) {
52138            throw new RSIllegalArgumentException("Array \"in1\" is null!");
52139        }
52140        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
52141        ain1.setAutoPadding(true);
52142        ain1.copyFrom(in1);
52143        // Verify that "in2" is non-null.
52144        if (in2 == null) {
52145            throw new RSIllegalArgumentException("Array \"in2\" is null!");
52146        }
52147        // Verify that the array length is a multiple of the vector size.
52148        if (in2.length % 2 != 0) {
52149            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
52150        }
52151        // Verify that input array lengths are the same.
52152        if (in1.length != in2.length / 2) {
52153            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
52154        }
52155        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
52156        ain2.setAutoPadding(true);
52157        ain2.copyFrom(in2);
52158
52159        result_int result = reduce_my_bool_ushort2_0(ain1, ain2, null);
52160        result.mTempIns = new Allocation[]{ain1, ain2};
52161        return result;
52162    }
52163
52164    // ain1 = "bool a"
52165    // ain2 = "ushort2 b"
52166    public result_int reduce_my_bool_ushort2_0(Allocation ain1, Allocation ain2) {
52167        return reduce_my_bool_ushort2_0(ain1, ain2, null);
52168    }
52169
52170    // ain1 = "bool a"
52171    // ain2 = "ushort2 b"
52172    public result_int reduce_my_bool_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52173        Type t0, t1;
52174        // check ain1
52175        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52176            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52177        }
52178        // check ain2
52179        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
52180            throw new RSRuntimeException("Type mismatch with U16_2!");
52181        }
52182        // Verify dimensions
52183        t0 = ain1.getType();
52184        t1 = ain2.getType();
52185        if ((t0.getCount() != t1.getCount()) ||
52186            (t0.getX() != t1.getX()) ||
52187            (t0.getY() != t1.getY()) ||
52188            (t0.getZ() != t1.getZ()) ||
52189            (t0.hasFaces()   != t1.hasFaces()) ||
52190            (t0.hasMipmaps() != t1.hasMipmaps())) {
52191            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52192        }
52193
52194        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52195        aout.setAutoPadding(true);
52196        reduce(mExportReduceIdx_my_bool_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
52197        return new result_int(aout);
52198    }
52199
52200    private final static int mExportReduceIdx_my_bool_ushort2_1 = 789;
52201    // in1 = "a"
52202    // in2 = "b", flattened 2-vectors
52203    public result_int reduce_my_bool_ushort2_1(byte[] in1, short[] in2) {
52204        // Verify that "in1" is non-null.
52205        if (in1 == null) {
52206            throw new RSIllegalArgumentException("Array \"in1\" is null!");
52207        }
52208        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
52209        ain1.setAutoPadding(true);
52210        ain1.copyFrom(in1);
52211        // Verify that "in2" is non-null.
52212        if (in2 == null) {
52213            throw new RSIllegalArgumentException("Array \"in2\" is null!");
52214        }
52215        // Verify that the array length is a multiple of the vector size.
52216        if (in2.length % 2 != 0) {
52217            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 2 in length!");
52218        }
52219        // Verify that input array lengths are the same.
52220        if (in1.length != in2.length / 2) {
52221            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
52222        }
52223        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_2, in2.length / 2);
52224        ain2.setAutoPadding(true);
52225        ain2.copyFrom(in2);
52226
52227        result_int result = reduce_my_bool_ushort2_1(ain1, ain2, null);
52228        result.mTempIns = new Allocation[]{ain1, ain2};
52229        return result;
52230    }
52231
52232    // ain1 = "bool a"
52233    // ain2 = "ushort2 b"
52234    public result_int reduce_my_bool_ushort2_1(Allocation ain1, Allocation ain2) {
52235        return reduce_my_bool_ushort2_1(ain1, ain2, null);
52236    }
52237
52238    // ain1 = "bool a"
52239    // ain2 = "ushort2 b"
52240    public result_int reduce_my_bool_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52241        Type t0, t1;
52242        // check ain1
52243        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52244            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52245        }
52246        // check ain2
52247        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
52248            throw new RSRuntimeException("Type mismatch with U16_2!");
52249        }
52250        // Verify dimensions
52251        t0 = ain1.getType();
52252        t1 = ain2.getType();
52253        if ((t0.getCount() != t1.getCount()) ||
52254            (t0.getX() != t1.getX()) ||
52255            (t0.getY() != t1.getY()) ||
52256            (t0.getZ() != t1.getZ()) ||
52257            (t0.hasFaces()   != t1.hasFaces()) ||
52258            (t0.hasMipmaps() != t1.hasMipmaps())) {
52259            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52260        }
52261
52262        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52263        aout.setAutoPadding(true);
52264        reduce(mExportReduceIdx_my_bool_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
52265        return new result_int(aout);
52266    }
52267
52268    private final static int mExportReduceIdx_my_bool_ushort4_0 = 790;
52269    // in1 = "a"
52270    // in2 = "b", flattened 4-vectors
52271    public result_int reduce_my_bool_ushort4_0(byte[] in1, short[] in2) {
52272        // Verify that "in1" is non-null.
52273        if (in1 == null) {
52274            throw new RSIllegalArgumentException("Array \"in1\" is null!");
52275        }
52276        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
52277        ain1.setAutoPadding(true);
52278        ain1.copyFrom(in1);
52279        // Verify that "in2" is non-null.
52280        if (in2 == null) {
52281            throw new RSIllegalArgumentException("Array \"in2\" is null!");
52282        }
52283        // Verify that the array length is a multiple of the vector size.
52284        if (in2.length % 4 != 0) {
52285            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
52286        }
52287        // Verify that input array lengths are the same.
52288        if (in1.length != in2.length / 4) {
52289            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
52290        }
52291        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
52292        ain2.setAutoPadding(true);
52293        ain2.copyFrom(in2);
52294
52295        result_int result = reduce_my_bool_ushort4_0(ain1, ain2, null);
52296        result.mTempIns = new Allocation[]{ain1, ain2};
52297        return result;
52298    }
52299
52300    // ain1 = "bool a"
52301    // ain2 = "ushort4 b"
52302    public result_int reduce_my_bool_ushort4_0(Allocation ain1, Allocation ain2) {
52303        return reduce_my_bool_ushort4_0(ain1, ain2, null);
52304    }
52305
52306    // ain1 = "bool a"
52307    // ain2 = "ushort4 b"
52308    public result_int reduce_my_bool_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52309        Type t0, t1;
52310        // check ain1
52311        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52312            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52313        }
52314        // check ain2
52315        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
52316            throw new RSRuntimeException("Type mismatch with U16_4!");
52317        }
52318        // Verify dimensions
52319        t0 = ain1.getType();
52320        t1 = ain2.getType();
52321        if ((t0.getCount() != t1.getCount()) ||
52322            (t0.getX() != t1.getX()) ||
52323            (t0.getY() != t1.getY()) ||
52324            (t0.getZ() != t1.getZ()) ||
52325            (t0.hasFaces()   != t1.hasFaces()) ||
52326            (t0.hasMipmaps() != t1.hasMipmaps())) {
52327            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52328        }
52329
52330        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52331        aout.setAutoPadding(true);
52332        reduce(mExportReduceIdx_my_bool_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
52333        return new result_int(aout);
52334    }
52335
52336    private final static int mExportReduceIdx_my_bool_ushort4_1 = 791;
52337    // in1 = "a"
52338    // in2 = "b", flattened 4-vectors
52339    public result_int reduce_my_bool_ushort4_1(byte[] in1, short[] in2) {
52340        // Verify that "in1" is non-null.
52341        if (in1 == null) {
52342            throw new RSIllegalArgumentException("Array \"in1\" is null!");
52343        }
52344        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
52345        ain1.setAutoPadding(true);
52346        ain1.copyFrom(in1);
52347        // Verify that "in2" is non-null.
52348        if (in2 == null) {
52349            throw new RSIllegalArgumentException("Array \"in2\" is null!");
52350        }
52351        // Verify that the array length is a multiple of the vector size.
52352        if (in2.length % 4 != 0) {
52353            throw new RSIllegalArgumentException("Array \"in2\" is not a multiple of 4 in length!");
52354        }
52355        // Verify that input array lengths are the same.
52356        if (in1.length != in2.length / 4) {
52357            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
52358        }
52359        Allocation ain2 = Allocation.createSized(mRSLocal, __U16_4, in2.length / 4);
52360        ain2.setAutoPadding(true);
52361        ain2.copyFrom(in2);
52362
52363        result_int result = reduce_my_bool_ushort4_1(ain1, ain2, null);
52364        result.mTempIns = new Allocation[]{ain1, ain2};
52365        return result;
52366    }
52367
52368    // ain1 = "bool a"
52369    // ain2 = "ushort4 b"
52370    public result_int reduce_my_bool_ushort4_1(Allocation ain1, Allocation ain2) {
52371        return reduce_my_bool_ushort4_1(ain1, ain2, null);
52372    }
52373
52374    // ain1 = "bool a"
52375    // ain2 = "ushort4 b"
52376    public result_int reduce_my_bool_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52377        Type t0, t1;
52378        // check ain1
52379        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52380            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52381        }
52382        // check ain2
52383        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
52384            throw new RSRuntimeException("Type mismatch with U16_4!");
52385        }
52386        // Verify dimensions
52387        t0 = ain1.getType();
52388        t1 = ain2.getType();
52389        if ((t0.getCount() != t1.getCount()) ||
52390            (t0.getX() != t1.getX()) ||
52391            (t0.getY() != t1.getY()) ||
52392            (t0.getZ() != t1.getZ()) ||
52393            (t0.hasFaces()   != t1.hasFaces()) ||
52394            (t0.hasMipmaps() != t1.hasMipmaps())) {
52395            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52396        }
52397
52398        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52399        aout.setAutoPadding(true);
52400        reduce(mExportReduceIdx_my_bool_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
52401        return new result_int(aout);
52402    }
52403
52404    private final static int mExportReduceIdx_my_bool_bool_0 = 792;
52405    // in1 = "a"
52406    // in2 = "b"
52407    public result_int reduce_my_bool_bool_0(byte[] in1, byte[] in2) {
52408        // Verify that "in1" is non-null.
52409        if (in1 == null) {
52410            throw new RSIllegalArgumentException("Array \"in1\" is null!");
52411        }
52412        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
52413        ain1.setAutoPadding(true);
52414        ain1.copyFrom(in1);
52415        // Verify that "in2" is non-null.
52416        if (in2 == null) {
52417            throw new RSIllegalArgumentException("Array \"in2\" is null!");
52418        }
52419        // Verify that input array lengths are the same.
52420        if (in1.length != in2.length) {
52421            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
52422        }
52423        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
52424        ain2.setAutoPadding(true);
52425        ain2.copyFrom(in2);
52426
52427        result_int result = reduce_my_bool_bool_0(ain1, ain2, null);
52428        result.mTempIns = new Allocation[]{ain1, ain2};
52429        return result;
52430    }
52431
52432    // ain1 = "bool a"
52433    // ain2 = "bool b"
52434    public result_int reduce_my_bool_bool_0(Allocation ain1, Allocation ain2) {
52435        return reduce_my_bool_bool_0(ain1, ain2, null);
52436    }
52437
52438    // ain1 = "bool a"
52439    // ain2 = "bool b"
52440    public result_int reduce_my_bool_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52441        Type t0, t1;
52442        // check ain1
52443        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52444            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52445        }
52446        // check ain2
52447        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
52448            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52449        }
52450        // Verify dimensions
52451        t0 = ain1.getType();
52452        t1 = ain2.getType();
52453        if ((t0.getCount() != t1.getCount()) ||
52454            (t0.getX() != t1.getX()) ||
52455            (t0.getY() != t1.getY()) ||
52456            (t0.getZ() != t1.getZ()) ||
52457            (t0.hasFaces()   != t1.hasFaces()) ||
52458            (t0.hasMipmaps() != t1.hasMipmaps())) {
52459            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52460        }
52461
52462        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52463        aout.setAutoPadding(true);
52464        reduce(mExportReduceIdx_my_bool_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
52465        return new result_int(aout);
52466    }
52467
52468    private final static int mExportReduceIdx_my_bool_bool_1 = 793;
52469    // in1 = "a"
52470    // in2 = "b"
52471    public result_int reduce_my_bool_bool_1(byte[] in1, byte[] in2) {
52472        // Verify that "in1" is non-null.
52473        if (in1 == null) {
52474            throw new RSIllegalArgumentException("Array \"in1\" is null!");
52475        }
52476        Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length);
52477        ain1.setAutoPadding(true);
52478        ain1.copyFrom(in1);
52479        // Verify that "in2" is non-null.
52480        if (in2 == null) {
52481            throw new RSIllegalArgumentException("Array \"in2\" is null!");
52482        }
52483        // Verify that input array lengths are the same.
52484        if (in1.length != in2.length) {
52485            throw new RSRuntimeException("Array length mismatch between parameters \"in1\" and \"in2\"!");
52486        }
52487        Allocation ain2 = Allocation.createSized(mRSLocal, __BOOLEAN, in2.length);
52488        ain2.setAutoPadding(true);
52489        ain2.copyFrom(in2);
52490
52491        result_int result = reduce_my_bool_bool_1(ain1, ain2, null);
52492        result.mTempIns = new Allocation[]{ain1, ain2};
52493        return result;
52494    }
52495
52496    // ain1 = "bool a"
52497    // ain2 = "bool b"
52498    public result_int reduce_my_bool_bool_1(Allocation ain1, Allocation ain2) {
52499        return reduce_my_bool_bool_1(ain1, ain2, null);
52500    }
52501
52502    // ain1 = "bool a"
52503    // ain2 = "bool b"
52504    public result_int reduce_my_bool_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52505        Type t0, t1;
52506        // check ain1
52507        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52508            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52509        }
52510        // check ain2
52511        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
52512            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52513        }
52514        // Verify dimensions
52515        t0 = ain1.getType();
52516        t1 = ain2.getType();
52517        if ((t0.getCount() != t1.getCount()) ||
52518            (t0.getX() != t1.getX()) ||
52519            (t0.getY() != t1.getY()) ||
52520            (t0.getZ() != t1.getZ()) ||
52521            (t0.hasFaces()   != t1.hasFaces()) ||
52522            (t0.hasMipmaps() != t1.hasMipmaps())) {
52523            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52524        }
52525
52526        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52527        aout.setAutoPadding(true);
52528        reduce(mExportReduceIdx_my_bool_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
52529        return new result_int(aout);
52530    }
52531
52532    private final static int mExportReduceIdx_my_bool_rs_matrix2x2_0 = 794;
52533    // ain1 = "bool a"
52534    // ain2 = "rs_matrix2x2 b"
52535    public result_int reduce_my_bool_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
52536        return reduce_my_bool_rs_matrix2x2_0(ain1, ain2, null);
52537    }
52538
52539    // ain1 = "bool a"
52540    // ain2 = "rs_matrix2x2 b"
52541    public result_int reduce_my_bool_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52542        Type t0, t1;
52543        // check ain1
52544        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52545            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52546        }
52547        // check ain2
52548        // Verify dimensions
52549        t0 = ain1.getType();
52550        t1 = ain2.getType();
52551        if ((t0.getCount() != t1.getCount()) ||
52552            (t0.getX() != t1.getX()) ||
52553            (t0.getY() != t1.getY()) ||
52554            (t0.getZ() != t1.getZ()) ||
52555            (t0.hasFaces()   != t1.hasFaces()) ||
52556            (t0.hasMipmaps() != t1.hasMipmaps())) {
52557            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52558        }
52559
52560        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52561        aout.setAutoPadding(true);
52562        reduce(mExportReduceIdx_my_bool_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
52563        return new result_int(aout);
52564    }
52565
52566    private final static int mExportReduceIdx_my_bool_rs_matrix2x2_1 = 795;
52567    // ain1 = "bool a"
52568    // ain2 = "rs_matrix2x2 b"
52569    public result_int reduce_my_bool_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
52570        return reduce_my_bool_rs_matrix2x2_1(ain1, ain2, null);
52571    }
52572
52573    // ain1 = "bool a"
52574    // ain2 = "rs_matrix2x2 b"
52575    public result_int reduce_my_bool_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52576        Type t0, t1;
52577        // check ain1
52578        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52579            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52580        }
52581        // check ain2
52582        // Verify dimensions
52583        t0 = ain1.getType();
52584        t1 = ain2.getType();
52585        if ((t0.getCount() != t1.getCount()) ||
52586            (t0.getX() != t1.getX()) ||
52587            (t0.getY() != t1.getY()) ||
52588            (t0.getZ() != t1.getZ()) ||
52589            (t0.hasFaces()   != t1.hasFaces()) ||
52590            (t0.hasMipmaps() != t1.hasMipmaps())) {
52591            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52592        }
52593
52594        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52595        aout.setAutoPadding(true);
52596        reduce(mExportReduceIdx_my_bool_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
52597        return new result_int(aout);
52598    }
52599
52600    private final static int mExportReduceIdx_my_bool_MyStruct_0 = 796;
52601    // ain1 = "bool a"
52602    // ain2 = "/* struct <> */ b"
52603    public result_int reduce_my_bool_MyStruct_0(Allocation ain1, Allocation ain2) {
52604        return reduce_my_bool_MyStruct_0(ain1, ain2, null);
52605    }
52606
52607    // ain1 = "bool a"
52608    // ain2 = "/* struct <> */ b"
52609    public result_int reduce_my_bool_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52610        Type t0, t1;
52611        // check ain1
52612        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52613            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52614        }
52615        // check ain2
52616        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
52617            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
52618        }
52619        // Verify dimensions
52620        t0 = ain1.getType();
52621        t1 = ain2.getType();
52622        if ((t0.getCount() != t1.getCount()) ||
52623            (t0.getX() != t1.getX()) ||
52624            (t0.getY() != t1.getY()) ||
52625            (t0.getZ() != t1.getZ()) ||
52626            (t0.hasFaces()   != t1.hasFaces()) ||
52627            (t0.hasMipmaps() != t1.hasMipmaps())) {
52628            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52629        }
52630
52631        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52632        aout.setAutoPadding(true);
52633        reduce(mExportReduceIdx_my_bool_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
52634        return new result_int(aout);
52635    }
52636
52637    private final static int mExportReduceIdx_my_bool_MyStruct_1 = 797;
52638    // ain1 = "bool a"
52639    // ain2 = "/* struct <> */ b"
52640    public result_int reduce_my_bool_MyStruct_1(Allocation ain1, Allocation ain2) {
52641        return reduce_my_bool_MyStruct_1(ain1, ain2, null);
52642    }
52643
52644    // ain1 = "bool a"
52645    // ain2 = "/* struct <> */ b"
52646    public result_int reduce_my_bool_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52647        Type t0, t1;
52648        // check ain1
52649        if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) {
52650            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
52651        }
52652        // check ain2
52653        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
52654            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
52655        }
52656        // Verify dimensions
52657        t0 = ain1.getType();
52658        t1 = ain2.getType();
52659        if ((t0.getCount() != t1.getCount()) ||
52660            (t0.getX() != t1.getX()) ||
52661            (t0.getY() != t1.getY()) ||
52662            (t0.getZ() != t1.getZ()) ||
52663            (t0.hasFaces()   != t1.hasFaces()) ||
52664            (t0.hasMipmaps() != t1.hasMipmaps())) {
52665            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52666        }
52667
52668        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52669        aout.setAutoPadding(true);
52670        reduce(mExportReduceIdx_my_bool_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
52671        return new result_int(aout);
52672    }
52673
52674    private final static int mExportReduceIdx_my_rs_matrix2x2_half_0 = 798;
52675    // ain1 = "rs_matrix2x2 a"
52676    // ain2 = "half b"
52677    public result_int reduce_my_rs_matrix2x2_half_0(Allocation ain1, Allocation ain2) {
52678        return reduce_my_rs_matrix2x2_half_0(ain1, ain2, null);
52679    }
52680
52681    // ain1 = "rs_matrix2x2 a"
52682    // ain2 = "half b"
52683    public result_int reduce_my_rs_matrix2x2_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52684        Type t0, t1;
52685        // check ain1
52686        // check ain2
52687        if (!ain2.getType().getElement().isCompatible(__F16)) {
52688            throw new RSRuntimeException("Type mismatch with F16!");
52689        }
52690        // Verify dimensions
52691        t0 = ain1.getType();
52692        t1 = ain2.getType();
52693        if ((t0.getCount() != t1.getCount()) ||
52694            (t0.getX() != t1.getX()) ||
52695            (t0.getY() != t1.getY()) ||
52696            (t0.getZ() != t1.getZ()) ||
52697            (t0.hasFaces()   != t1.hasFaces()) ||
52698            (t0.hasMipmaps() != t1.hasMipmaps())) {
52699            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52700        }
52701
52702        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52703        aout.setAutoPadding(true);
52704        reduce(mExportReduceIdx_my_rs_matrix2x2_half_0, new Allocation[]{ain1, ain2}, aout, sc);
52705        return new result_int(aout);
52706    }
52707
52708    private final static int mExportReduceIdx_my_rs_matrix2x2_half_1 = 799;
52709    // ain1 = "rs_matrix2x2 a"
52710    // ain2 = "half b"
52711    public result_int reduce_my_rs_matrix2x2_half_1(Allocation ain1, Allocation ain2) {
52712        return reduce_my_rs_matrix2x2_half_1(ain1, ain2, null);
52713    }
52714
52715    // ain1 = "rs_matrix2x2 a"
52716    // ain2 = "half b"
52717    public result_int reduce_my_rs_matrix2x2_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52718        Type t0, t1;
52719        // check ain1
52720        // check ain2
52721        if (!ain2.getType().getElement().isCompatible(__F16)) {
52722            throw new RSRuntimeException("Type mismatch with F16!");
52723        }
52724        // Verify dimensions
52725        t0 = ain1.getType();
52726        t1 = ain2.getType();
52727        if ((t0.getCount() != t1.getCount()) ||
52728            (t0.getX() != t1.getX()) ||
52729            (t0.getY() != t1.getY()) ||
52730            (t0.getZ() != t1.getZ()) ||
52731            (t0.hasFaces()   != t1.hasFaces()) ||
52732            (t0.hasMipmaps() != t1.hasMipmaps())) {
52733            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52734        }
52735
52736        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52737        aout.setAutoPadding(true);
52738        reduce(mExportReduceIdx_my_rs_matrix2x2_half_1, new Allocation[]{ain1, ain2}, aout, sc);
52739        return new result_int(aout);
52740    }
52741
52742    private final static int mExportReduceIdx_my_rs_matrix2x2_half2_0 = 800;
52743    // ain1 = "rs_matrix2x2 a"
52744    // ain2 = "half2 b"
52745    public result_int reduce_my_rs_matrix2x2_half2_0(Allocation ain1, Allocation ain2) {
52746        return reduce_my_rs_matrix2x2_half2_0(ain1, ain2, null);
52747    }
52748
52749    // ain1 = "rs_matrix2x2 a"
52750    // ain2 = "half2 b"
52751    public result_int reduce_my_rs_matrix2x2_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52752        Type t0, t1;
52753        // check ain1
52754        // check ain2
52755        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
52756            throw new RSRuntimeException("Type mismatch with F16_2!");
52757        }
52758        // Verify dimensions
52759        t0 = ain1.getType();
52760        t1 = ain2.getType();
52761        if ((t0.getCount() != t1.getCount()) ||
52762            (t0.getX() != t1.getX()) ||
52763            (t0.getY() != t1.getY()) ||
52764            (t0.getZ() != t1.getZ()) ||
52765            (t0.hasFaces()   != t1.hasFaces()) ||
52766            (t0.hasMipmaps() != t1.hasMipmaps())) {
52767            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52768        }
52769
52770        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52771        aout.setAutoPadding(true);
52772        reduce(mExportReduceIdx_my_rs_matrix2x2_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
52773        return new result_int(aout);
52774    }
52775
52776    private final static int mExportReduceIdx_my_rs_matrix2x2_half2_1 = 801;
52777    // ain1 = "rs_matrix2x2 a"
52778    // ain2 = "half2 b"
52779    public result_int reduce_my_rs_matrix2x2_half2_1(Allocation ain1, Allocation ain2) {
52780        return reduce_my_rs_matrix2x2_half2_1(ain1, ain2, null);
52781    }
52782
52783    // ain1 = "rs_matrix2x2 a"
52784    // ain2 = "half2 b"
52785    public result_int reduce_my_rs_matrix2x2_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52786        Type t0, t1;
52787        // check ain1
52788        // check ain2
52789        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
52790            throw new RSRuntimeException("Type mismatch with F16_2!");
52791        }
52792        // Verify dimensions
52793        t0 = ain1.getType();
52794        t1 = ain2.getType();
52795        if ((t0.getCount() != t1.getCount()) ||
52796            (t0.getX() != t1.getX()) ||
52797            (t0.getY() != t1.getY()) ||
52798            (t0.getZ() != t1.getZ()) ||
52799            (t0.hasFaces()   != t1.hasFaces()) ||
52800            (t0.hasMipmaps() != t1.hasMipmaps())) {
52801            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52802        }
52803
52804        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52805        aout.setAutoPadding(true);
52806        reduce(mExportReduceIdx_my_rs_matrix2x2_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
52807        return new result_int(aout);
52808    }
52809
52810    private final static int mExportReduceIdx_my_rs_matrix2x2_half4_0 = 802;
52811    // ain1 = "rs_matrix2x2 a"
52812    // ain2 = "half4 b"
52813    public result_int reduce_my_rs_matrix2x2_half4_0(Allocation ain1, Allocation ain2) {
52814        return reduce_my_rs_matrix2x2_half4_0(ain1, ain2, null);
52815    }
52816
52817    // ain1 = "rs_matrix2x2 a"
52818    // ain2 = "half4 b"
52819    public result_int reduce_my_rs_matrix2x2_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52820        Type t0, t1;
52821        // check ain1
52822        // check ain2
52823        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
52824            throw new RSRuntimeException("Type mismatch with F16_4!");
52825        }
52826        // Verify dimensions
52827        t0 = ain1.getType();
52828        t1 = ain2.getType();
52829        if ((t0.getCount() != t1.getCount()) ||
52830            (t0.getX() != t1.getX()) ||
52831            (t0.getY() != t1.getY()) ||
52832            (t0.getZ() != t1.getZ()) ||
52833            (t0.hasFaces()   != t1.hasFaces()) ||
52834            (t0.hasMipmaps() != t1.hasMipmaps())) {
52835            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52836        }
52837
52838        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52839        aout.setAutoPadding(true);
52840        reduce(mExportReduceIdx_my_rs_matrix2x2_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
52841        return new result_int(aout);
52842    }
52843
52844    private final static int mExportReduceIdx_my_rs_matrix2x2_half4_1 = 803;
52845    // ain1 = "rs_matrix2x2 a"
52846    // ain2 = "half4 b"
52847    public result_int reduce_my_rs_matrix2x2_half4_1(Allocation ain1, Allocation ain2) {
52848        return reduce_my_rs_matrix2x2_half4_1(ain1, ain2, null);
52849    }
52850
52851    // ain1 = "rs_matrix2x2 a"
52852    // ain2 = "half4 b"
52853    public result_int reduce_my_rs_matrix2x2_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52854        Type t0, t1;
52855        // check ain1
52856        // check ain2
52857        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
52858            throw new RSRuntimeException("Type mismatch with F16_4!");
52859        }
52860        // Verify dimensions
52861        t0 = ain1.getType();
52862        t1 = ain2.getType();
52863        if ((t0.getCount() != t1.getCount()) ||
52864            (t0.getX() != t1.getX()) ||
52865            (t0.getY() != t1.getY()) ||
52866            (t0.getZ() != t1.getZ()) ||
52867            (t0.hasFaces()   != t1.hasFaces()) ||
52868            (t0.hasMipmaps() != t1.hasMipmaps())) {
52869            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52870        }
52871
52872        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52873        aout.setAutoPadding(true);
52874        reduce(mExportReduceIdx_my_rs_matrix2x2_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
52875        return new result_int(aout);
52876    }
52877
52878    private final static int mExportReduceIdx_my_rs_matrix2x2_float_0 = 804;
52879    // ain1 = "rs_matrix2x2 a"
52880    // ain2 = "float b"
52881    public result_int reduce_my_rs_matrix2x2_float_0(Allocation ain1, Allocation ain2) {
52882        return reduce_my_rs_matrix2x2_float_0(ain1, ain2, null);
52883    }
52884
52885    // ain1 = "rs_matrix2x2 a"
52886    // ain2 = "float b"
52887    public result_int reduce_my_rs_matrix2x2_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52888        Type t0, t1;
52889        // check ain1
52890        // check ain2
52891        if (!ain2.getType().getElement().isCompatible(__F32)) {
52892            throw new RSRuntimeException("Type mismatch with F32!");
52893        }
52894        // Verify dimensions
52895        t0 = ain1.getType();
52896        t1 = ain2.getType();
52897        if ((t0.getCount() != t1.getCount()) ||
52898            (t0.getX() != t1.getX()) ||
52899            (t0.getY() != t1.getY()) ||
52900            (t0.getZ() != t1.getZ()) ||
52901            (t0.hasFaces()   != t1.hasFaces()) ||
52902            (t0.hasMipmaps() != t1.hasMipmaps())) {
52903            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52904        }
52905
52906        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52907        aout.setAutoPadding(true);
52908        reduce(mExportReduceIdx_my_rs_matrix2x2_float_0, new Allocation[]{ain1, ain2}, aout, sc);
52909        return new result_int(aout);
52910    }
52911
52912    private final static int mExportReduceIdx_my_rs_matrix2x2_float_1 = 805;
52913    // ain1 = "rs_matrix2x2 a"
52914    // ain2 = "float b"
52915    public result_int reduce_my_rs_matrix2x2_float_1(Allocation ain1, Allocation ain2) {
52916        return reduce_my_rs_matrix2x2_float_1(ain1, ain2, null);
52917    }
52918
52919    // ain1 = "rs_matrix2x2 a"
52920    // ain2 = "float b"
52921    public result_int reduce_my_rs_matrix2x2_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52922        Type t0, t1;
52923        // check ain1
52924        // check ain2
52925        if (!ain2.getType().getElement().isCompatible(__F32)) {
52926            throw new RSRuntimeException("Type mismatch with F32!");
52927        }
52928        // Verify dimensions
52929        t0 = ain1.getType();
52930        t1 = ain2.getType();
52931        if ((t0.getCount() != t1.getCount()) ||
52932            (t0.getX() != t1.getX()) ||
52933            (t0.getY() != t1.getY()) ||
52934            (t0.getZ() != t1.getZ()) ||
52935            (t0.hasFaces()   != t1.hasFaces()) ||
52936            (t0.hasMipmaps() != t1.hasMipmaps())) {
52937            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52938        }
52939
52940        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52941        aout.setAutoPadding(true);
52942        reduce(mExportReduceIdx_my_rs_matrix2x2_float_1, new Allocation[]{ain1, ain2}, aout, sc);
52943        return new result_int(aout);
52944    }
52945
52946    private final static int mExportReduceIdx_my_rs_matrix2x2_float2_0 = 806;
52947    // ain1 = "rs_matrix2x2 a"
52948    // ain2 = "float2 b"
52949    public result_int reduce_my_rs_matrix2x2_float2_0(Allocation ain1, Allocation ain2) {
52950        return reduce_my_rs_matrix2x2_float2_0(ain1, ain2, null);
52951    }
52952
52953    // ain1 = "rs_matrix2x2 a"
52954    // ain2 = "float2 b"
52955    public result_int reduce_my_rs_matrix2x2_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52956        Type t0, t1;
52957        // check ain1
52958        // check ain2
52959        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
52960            throw new RSRuntimeException("Type mismatch with F32_2!");
52961        }
52962        // Verify dimensions
52963        t0 = ain1.getType();
52964        t1 = ain2.getType();
52965        if ((t0.getCount() != t1.getCount()) ||
52966            (t0.getX() != t1.getX()) ||
52967            (t0.getY() != t1.getY()) ||
52968            (t0.getZ() != t1.getZ()) ||
52969            (t0.hasFaces()   != t1.hasFaces()) ||
52970            (t0.hasMipmaps() != t1.hasMipmaps())) {
52971            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
52972        }
52973
52974        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
52975        aout.setAutoPadding(true);
52976        reduce(mExportReduceIdx_my_rs_matrix2x2_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
52977        return new result_int(aout);
52978    }
52979
52980    private final static int mExportReduceIdx_my_rs_matrix2x2_float2_1 = 807;
52981    // ain1 = "rs_matrix2x2 a"
52982    // ain2 = "float2 b"
52983    public result_int reduce_my_rs_matrix2x2_float2_1(Allocation ain1, Allocation ain2) {
52984        return reduce_my_rs_matrix2x2_float2_1(ain1, ain2, null);
52985    }
52986
52987    // ain1 = "rs_matrix2x2 a"
52988    // ain2 = "float2 b"
52989    public result_int reduce_my_rs_matrix2x2_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
52990        Type t0, t1;
52991        // check ain1
52992        // check ain2
52993        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
52994            throw new RSRuntimeException("Type mismatch with F32_2!");
52995        }
52996        // Verify dimensions
52997        t0 = ain1.getType();
52998        t1 = ain2.getType();
52999        if ((t0.getCount() != t1.getCount()) ||
53000            (t0.getX() != t1.getX()) ||
53001            (t0.getY() != t1.getY()) ||
53002            (t0.getZ() != t1.getZ()) ||
53003            (t0.hasFaces()   != t1.hasFaces()) ||
53004            (t0.hasMipmaps() != t1.hasMipmaps())) {
53005            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53006        }
53007
53008        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53009        aout.setAutoPadding(true);
53010        reduce(mExportReduceIdx_my_rs_matrix2x2_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
53011        return new result_int(aout);
53012    }
53013
53014    private final static int mExportReduceIdx_my_rs_matrix2x2_float4_0 = 808;
53015    // ain1 = "rs_matrix2x2 a"
53016    // ain2 = "float4 b"
53017    public result_int reduce_my_rs_matrix2x2_float4_0(Allocation ain1, Allocation ain2) {
53018        return reduce_my_rs_matrix2x2_float4_0(ain1, ain2, null);
53019    }
53020
53021    // ain1 = "rs_matrix2x2 a"
53022    // ain2 = "float4 b"
53023    public result_int reduce_my_rs_matrix2x2_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53024        Type t0, t1;
53025        // check ain1
53026        // check ain2
53027        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
53028            throw new RSRuntimeException("Type mismatch with F32_4!");
53029        }
53030        // Verify dimensions
53031        t0 = ain1.getType();
53032        t1 = ain2.getType();
53033        if ((t0.getCount() != t1.getCount()) ||
53034            (t0.getX() != t1.getX()) ||
53035            (t0.getY() != t1.getY()) ||
53036            (t0.getZ() != t1.getZ()) ||
53037            (t0.hasFaces()   != t1.hasFaces()) ||
53038            (t0.hasMipmaps() != t1.hasMipmaps())) {
53039            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53040        }
53041
53042        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53043        aout.setAutoPadding(true);
53044        reduce(mExportReduceIdx_my_rs_matrix2x2_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
53045        return new result_int(aout);
53046    }
53047
53048    private final static int mExportReduceIdx_my_rs_matrix2x2_float4_1 = 809;
53049    // ain1 = "rs_matrix2x2 a"
53050    // ain2 = "float4 b"
53051    public result_int reduce_my_rs_matrix2x2_float4_1(Allocation ain1, Allocation ain2) {
53052        return reduce_my_rs_matrix2x2_float4_1(ain1, ain2, null);
53053    }
53054
53055    // ain1 = "rs_matrix2x2 a"
53056    // ain2 = "float4 b"
53057    public result_int reduce_my_rs_matrix2x2_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53058        Type t0, t1;
53059        // check ain1
53060        // check ain2
53061        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
53062            throw new RSRuntimeException("Type mismatch with F32_4!");
53063        }
53064        // Verify dimensions
53065        t0 = ain1.getType();
53066        t1 = ain2.getType();
53067        if ((t0.getCount() != t1.getCount()) ||
53068            (t0.getX() != t1.getX()) ||
53069            (t0.getY() != t1.getY()) ||
53070            (t0.getZ() != t1.getZ()) ||
53071            (t0.hasFaces()   != t1.hasFaces()) ||
53072            (t0.hasMipmaps() != t1.hasMipmaps())) {
53073            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53074        }
53075
53076        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53077        aout.setAutoPadding(true);
53078        reduce(mExportReduceIdx_my_rs_matrix2x2_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
53079        return new result_int(aout);
53080    }
53081
53082    private final static int mExportReduceIdx_my_rs_matrix2x2_char_0 = 810;
53083    // ain1 = "rs_matrix2x2 a"
53084    // ain2 = "char b"
53085    public result_int reduce_my_rs_matrix2x2_char_0(Allocation ain1, Allocation ain2) {
53086        return reduce_my_rs_matrix2x2_char_0(ain1, ain2, null);
53087    }
53088
53089    // ain1 = "rs_matrix2x2 a"
53090    // ain2 = "char b"
53091    public result_int reduce_my_rs_matrix2x2_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53092        Type t0, t1;
53093        // check ain1
53094        // check ain2
53095        if (!ain2.getType().getElement().isCompatible(__I8)) {
53096            throw new RSRuntimeException("Type mismatch with I8!");
53097        }
53098        // Verify dimensions
53099        t0 = ain1.getType();
53100        t1 = ain2.getType();
53101        if ((t0.getCount() != t1.getCount()) ||
53102            (t0.getX() != t1.getX()) ||
53103            (t0.getY() != t1.getY()) ||
53104            (t0.getZ() != t1.getZ()) ||
53105            (t0.hasFaces()   != t1.hasFaces()) ||
53106            (t0.hasMipmaps() != t1.hasMipmaps())) {
53107            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53108        }
53109
53110        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53111        aout.setAutoPadding(true);
53112        reduce(mExportReduceIdx_my_rs_matrix2x2_char_0, new Allocation[]{ain1, ain2}, aout, sc);
53113        return new result_int(aout);
53114    }
53115
53116    private final static int mExportReduceIdx_my_rs_matrix2x2_char_1 = 811;
53117    // ain1 = "rs_matrix2x2 a"
53118    // ain2 = "char b"
53119    public result_int reduce_my_rs_matrix2x2_char_1(Allocation ain1, Allocation ain2) {
53120        return reduce_my_rs_matrix2x2_char_1(ain1, ain2, null);
53121    }
53122
53123    // ain1 = "rs_matrix2x2 a"
53124    // ain2 = "char b"
53125    public result_int reduce_my_rs_matrix2x2_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53126        Type t0, t1;
53127        // check ain1
53128        // check ain2
53129        if (!ain2.getType().getElement().isCompatible(__I8)) {
53130            throw new RSRuntimeException("Type mismatch with I8!");
53131        }
53132        // Verify dimensions
53133        t0 = ain1.getType();
53134        t1 = ain2.getType();
53135        if ((t0.getCount() != t1.getCount()) ||
53136            (t0.getX() != t1.getX()) ||
53137            (t0.getY() != t1.getY()) ||
53138            (t0.getZ() != t1.getZ()) ||
53139            (t0.hasFaces()   != t1.hasFaces()) ||
53140            (t0.hasMipmaps() != t1.hasMipmaps())) {
53141            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53142        }
53143
53144        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53145        aout.setAutoPadding(true);
53146        reduce(mExportReduceIdx_my_rs_matrix2x2_char_1, new Allocation[]{ain1, ain2}, aout, sc);
53147        return new result_int(aout);
53148    }
53149
53150    private final static int mExportReduceIdx_my_rs_matrix2x2_char2_0 = 812;
53151    // ain1 = "rs_matrix2x2 a"
53152    // ain2 = "char2 b"
53153    public result_int reduce_my_rs_matrix2x2_char2_0(Allocation ain1, Allocation ain2) {
53154        return reduce_my_rs_matrix2x2_char2_0(ain1, ain2, null);
53155    }
53156
53157    // ain1 = "rs_matrix2x2 a"
53158    // ain2 = "char2 b"
53159    public result_int reduce_my_rs_matrix2x2_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53160        Type t0, t1;
53161        // check ain1
53162        // check ain2
53163        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
53164            throw new RSRuntimeException("Type mismatch with I8_2!");
53165        }
53166        // Verify dimensions
53167        t0 = ain1.getType();
53168        t1 = ain2.getType();
53169        if ((t0.getCount() != t1.getCount()) ||
53170            (t0.getX() != t1.getX()) ||
53171            (t0.getY() != t1.getY()) ||
53172            (t0.getZ() != t1.getZ()) ||
53173            (t0.hasFaces()   != t1.hasFaces()) ||
53174            (t0.hasMipmaps() != t1.hasMipmaps())) {
53175            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53176        }
53177
53178        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53179        aout.setAutoPadding(true);
53180        reduce(mExportReduceIdx_my_rs_matrix2x2_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
53181        return new result_int(aout);
53182    }
53183
53184    private final static int mExportReduceIdx_my_rs_matrix2x2_char2_1 = 813;
53185    // ain1 = "rs_matrix2x2 a"
53186    // ain2 = "char2 b"
53187    public result_int reduce_my_rs_matrix2x2_char2_1(Allocation ain1, Allocation ain2) {
53188        return reduce_my_rs_matrix2x2_char2_1(ain1, ain2, null);
53189    }
53190
53191    // ain1 = "rs_matrix2x2 a"
53192    // ain2 = "char2 b"
53193    public result_int reduce_my_rs_matrix2x2_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53194        Type t0, t1;
53195        // check ain1
53196        // check ain2
53197        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
53198            throw new RSRuntimeException("Type mismatch with I8_2!");
53199        }
53200        // Verify dimensions
53201        t0 = ain1.getType();
53202        t1 = ain2.getType();
53203        if ((t0.getCount() != t1.getCount()) ||
53204            (t0.getX() != t1.getX()) ||
53205            (t0.getY() != t1.getY()) ||
53206            (t0.getZ() != t1.getZ()) ||
53207            (t0.hasFaces()   != t1.hasFaces()) ||
53208            (t0.hasMipmaps() != t1.hasMipmaps())) {
53209            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53210        }
53211
53212        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53213        aout.setAutoPadding(true);
53214        reduce(mExportReduceIdx_my_rs_matrix2x2_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
53215        return new result_int(aout);
53216    }
53217
53218    private final static int mExportReduceIdx_my_rs_matrix2x2_char4_0 = 814;
53219    // ain1 = "rs_matrix2x2 a"
53220    // ain2 = "char4 b"
53221    public result_int reduce_my_rs_matrix2x2_char4_0(Allocation ain1, Allocation ain2) {
53222        return reduce_my_rs_matrix2x2_char4_0(ain1, ain2, null);
53223    }
53224
53225    // ain1 = "rs_matrix2x2 a"
53226    // ain2 = "char4 b"
53227    public result_int reduce_my_rs_matrix2x2_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53228        Type t0, t1;
53229        // check ain1
53230        // check ain2
53231        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
53232            throw new RSRuntimeException("Type mismatch with I8_4!");
53233        }
53234        // Verify dimensions
53235        t0 = ain1.getType();
53236        t1 = ain2.getType();
53237        if ((t0.getCount() != t1.getCount()) ||
53238            (t0.getX() != t1.getX()) ||
53239            (t0.getY() != t1.getY()) ||
53240            (t0.getZ() != t1.getZ()) ||
53241            (t0.hasFaces()   != t1.hasFaces()) ||
53242            (t0.hasMipmaps() != t1.hasMipmaps())) {
53243            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53244        }
53245
53246        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53247        aout.setAutoPadding(true);
53248        reduce(mExportReduceIdx_my_rs_matrix2x2_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
53249        return new result_int(aout);
53250    }
53251
53252    private final static int mExportReduceIdx_my_rs_matrix2x2_char4_1 = 815;
53253    // ain1 = "rs_matrix2x2 a"
53254    // ain2 = "char4 b"
53255    public result_int reduce_my_rs_matrix2x2_char4_1(Allocation ain1, Allocation ain2) {
53256        return reduce_my_rs_matrix2x2_char4_1(ain1, ain2, null);
53257    }
53258
53259    // ain1 = "rs_matrix2x2 a"
53260    // ain2 = "char4 b"
53261    public result_int reduce_my_rs_matrix2x2_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53262        Type t0, t1;
53263        // check ain1
53264        // check ain2
53265        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
53266            throw new RSRuntimeException("Type mismatch with I8_4!");
53267        }
53268        // Verify dimensions
53269        t0 = ain1.getType();
53270        t1 = ain2.getType();
53271        if ((t0.getCount() != t1.getCount()) ||
53272            (t0.getX() != t1.getX()) ||
53273            (t0.getY() != t1.getY()) ||
53274            (t0.getZ() != t1.getZ()) ||
53275            (t0.hasFaces()   != t1.hasFaces()) ||
53276            (t0.hasMipmaps() != t1.hasMipmaps())) {
53277            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53278        }
53279
53280        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53281        aout.setAutoPadding(true);
53282        reduce(mExportReduceIdx_my_rs_matrix2x2_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
53283        return new result_int(aout);
53284    }
53285
53286    private final static int mExportReduceIdx_my_rs_matrix2x2_short_0 = 816;
53287    // ain1 = "rs_matrix2x2 a"
53288    // ain2 = "short b"
53289    public result_int reduce_my_rs_matrix2x2_short_0(Allocation ain1, Allocation ain2) {
53290        return reduce_my_rs_matrix2x2_short_0(ain1, ain2, null);
53291    }
53292
53293    // ain1 = "rs_matrix2x2 a"
53294    // ain2 = "short b"
53295    public result_int reduce_my_rs_matrix2x2_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53296        Type t0, t1;
53297        // check ain1
53298        // check ain2
53299        if (!ain2.getType().getElement().isCompatible(__I16)) {
53300            throw new RSRuntimeException("Type mismatch with I16!");
53301        }
53302        // Verify dimensions
53303        t0 = ain1.getType();
53304        t1 = ain2.getType();
53305        if ((t0.getCount() != t1.getCount()) ||
53306            (t0.getX() != t1.getX()) ||
53307            (t0.getY() != t1.getY()) ||
53308            (t0.getZ() != t1.getZ()) ||
53309            (t0.hasFaces()   != t1.hasFaces()) ||
53310            (t0.hasMipmaps() != t1.hasMipmaps())) {
53311            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53312        }
53313
53314        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53315        aout.setAutoPadding(true);
53316        reduce(mExportReduceIdx_my_rs_matrix2x2_short_0, new Allocation[]{ain1, ain2}, aout, sc);
53317        return new result_int(aout);
53318    }
53319
53320    private final static int mExportReduceIdx_my_rs_matrix2x2_short_1 = 817;
53321    // ain1 = "rs_matrix2x2 a"
53322    // ain2 = "short b"
53323    public result_int reduce_my_rs_matrix2x2_short_1(Allocation ain1, Allocation ain2) {
53324        return reduce_my_rs_matrix2x2_short_1(ain1, ain2, null);
53325    }
53326
53327    // ain1 = "rs_matrix2x2 a"
53328    // ain2 = "short b"
53329    public result_int reduce_my_rs_matrix2x2_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53330        Type t0, t1;
53331        // check ain1
53332        // check ain2
53333        if (!ain2.getType().getElement().isCompatible(__I16)) {
53334            throw new RSRuntimeException("Type mismatch with I16!");
53335        }
53336        // Verify dimensions
53337        t0 = ain1.getType();
53338        t1 = ain2.getType();
53339        if ((t0.getCount() != t1.getCount()) ||
53340            (t0.getX() != t1.getX()) ||
53341            (t0.getY() != t1.getY()) ||
53342            (t0.getZ() != t1.getZ()) ||
53343            (t0.hasFaces()   != t1.hasFaces()) ||
53344            (t0.hasMipmaps() != t1.hasMipmaps())) {
53345            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53346        }
53347
53348        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53349        aout.setAutoPadding(true);
53350        reduce(mExportReduceIdx_my_rs_matrix2x2_short_1, new Allocation[]{ain1, ain2}, aout, sc);
53351        return new result_int(aout);
53352    }
53353
53354    private final static int mExportReduceIdx_my_rs_matrix2x2_short2_0 = 818;
53355    // ain1 = "rs_matrix2x2 a"
53356    // ain2 = "short2 b"
53357    public result_int reduce_my_rs_matrix2x2_short2_0(Allocation ain1, Allocation ain2) {
53358        return reduce_my_rs_matrix2x2_short2_0(ain1, ain2, null);
53359    }
53360
53361    // ain1 = "rs_matrix2x2 a"
53362    // ain2 = "short2 b"
53363    public result_int reduce_my_rs_matrix2x2_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53364        Type t0, t1;
53365        // check ain1
53366        // check ain2
53367        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
53368            throw new RSRuntimeException("Type mismatch with I16_2!");
53369        }
53370        // Verify dimensions
53371        t0 = ain1.getType();
53372        t1 = ain2.getType();
53373        if ((t0.getCount() != t1.getCount()) ||
53374            (t0.getX() != t1.getX()) ||
53375            (t0.getY() != t1.getY()) ||
53376            (t0.getZ() != t1.getZ()) ||
53377            (t0.hasFaces()   != t1.hasFaces()) ||
53378            (t0.hasMipmaps() != t1.hasMipmaps())) {
53379            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53380        }
53381
53382        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53383        aout.setAutoPadding(true);
53384        reduce(mExportReduceIdx_my_rs_matrix2x2_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
53385        return new result_int(aout);
53386    }
53387
53388    private final static int mExportReduceIdx_my_rs_matrix2x2_short2_1 = 819;
53389    // ain1 = "rs_matrix2x2 a"
53390    // ain2 = "short2 b"
53391    public result_int reduce_my_rs_matrix2x2_short2_1(Allocation ain1, Allocation ain2) {
53392        return reduce_my_rs_matrix2x2_short2_1(ain1, ain2, null);
53393    }
53394
53395    // ain1 = "rs_matrix2x2 a"
53396    // ain2 = "short2 b"
53397    public result_int reduce_my_rs_matrix2x2_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53398        Type t0, t1;
53399        // check ain1
53400        // check ain2
53401        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
53402            throw new RSRuntimeException("Type mismatch with I16_2!");
53403        }
53404        // Verify dimensions
53405        t0 = ain1.getType();
53406        t1 = ain2.getType();
53407        if ((t0.getCount() != t1.getCount()) ||
53408            (t0.getX() != t1.getX()) ||
53409            (t0.getY() != t1.getY()) ||
53410            (t0.getZ() != t1.getZ()) ||
53411            (t0.hasFaces()   != t1.hasFaces()) ||
53412            (t0.hasMipmaps() != t1.hasMipmaps())) {
53413            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53414        }
53415
53416        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53417        aout.setAutoPadding(true);
53418        reduce(mExportReduceIdx_my_rs_matrix2x2_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
53419        return new result_int(aout);
53420    }
53421
53422    private final static int mExportReduceIdx_my_rs_matrix2x2_short4_0 = 820;
53423    // ain1 = "rs_matrix2x2 a"
53424    // ain2 = "short4 b"
53425    public result_int reduce_my_rs_matrix2x2_short4_0(Allocation ain1, Allocation ain2) {
53426        return reduce_my_rs_matrix2x2_short4_0(ain1, ain2, null);
53427    }
53428
53429    // ain1 = "rs_matrix2x2 a"
53430    // ain2 = "short4 b"
53431    public result_int reduce_my_rs_matrix2x2_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53432        Type t0, t1;
53433        // check ain1
53434        // check ain2
53435        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
53436            throw new RSRuntimeException("Type mismatch with I16_4!");
53437        }
53438        // Verify dimensions
53439        t0 = ain1.getType();
53440        t1 = ain2.getType();
53441        if ((t0.getCount() != t1.getCount()) ||
53442            (t0.getX() != t1.getX()) ||
53443            (t0.getY() != t1.getY()) ||
53444            (t0.getZ() != t1.getZ()) ||
53445            (t0.hasFaces()   != t1.hasFaces()) ||
53446            (t0.hasMipmaps() != t1.hasMipmaps())) {
53447            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53448        }
53449
53450        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53451        aout.setAutoPadding(true);
53452        reduce(mExportReduceIdx_my_rs_matrix2x2_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
53453        return new result_int(aout);
53454    }
53455
53456    private final static int mExportReduceIdx_my_rs_matrix2x2_short4_1 = 821;
53457    // ain1 = "rs_matrix2x2 a"
53458    // ain2 = "short4 b"
53459    public result_int reduce_my_rs_matrix2x2_short4_1(Allocation ain1, Allocation ain2) {
53460        return reduce_my_rs_matrix2x2_short4_1(ain1, ain2, null);
53461    }
53462
53463    // ain1 = "rs_matrix2x2 a"
53464    // ain2 = "short4 b"
53465    public result_int reduce_my_rs_matrix2x2_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53466        Type t0, t1;
53467        // check ain1
53468        // check ain2
53469        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
53470            throw new RSRuntimeException("Type mismatch with I16_4!");
53471        }
53472        // Verify dimensions
53473        t0 = ain1.getType();
53474        t1 = ain2.getType();
53475        if ((t0.getCount() != t1.getCount()) ||
53476            (t0.getX() != t1.getX()) ||
53477            (t0.getY() != t1.getY()) ||
53478            (t0.getZ() != t1.getZ()) ||
53479            (t0.hasFaces()   != t1.hasFaces()) ||
53480            (t0.hasMipmaps() != t1.hasMipmaps())) {
53481            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53482        }
53483
53484        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53485        aout.setAutoPadding(true);
53486        reduce(mExportReduceIdx_my_rs_matrix2x2_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
53487        return new result_int(aout);
53488    }
53489
53490    private final static int mExportReduceIdx_my_rs_matrix2x2_uchar_0 = 822;
53491    // ain1 = "rs_matrix2x2 a"
53492    // ain2 = "uchar b"
53493    public result_int reduce_my_rs_matrix2x2_uchar_0(Allocation ain1, Allocation ain2) {
53494        return reduce_my_rs_matrix2x2_uchar_0(ain1, ain2, null);
53495    }
53496
53497    // ain1 = "rs_matrix2x2 a"
53498    // ain2 = "uchar b"
53499    public result_int reduce_my_rs_matrix2x2_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53500        Type t0, t1;
53501        // check ain1
53502        // check ain2
53503        if (!ain2.getType().getElement().isCompatible(__U8)) {
53504            throw new RSRuntimeException("Type mismatch with U8!");
53505        }
53506        // Verify dimensions
53507        t0 = ain1.getType();
53508        t1 = ain2.getType();
53509        if ((t0.getCount() != t1.getCount()) ||
53510            (t0.getX() != t1.getX()) ||
53511            (t0.getY() != t1.getY()) ||
53512            (t0.getZ() != t1.getZ()) ||
53513            (t0.hasFaces()   != t1.hasFaces()) ||
53514            (t0.hasMipmaps() != t1.hasMipmaps())) {
53515            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53516        }
53517
53518        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53519        aout.setAutoPadding(true);
53520        reduce(mExportReduceIdx_my_rs_matrix2x2_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
53521        return new result_int(aout);
53522    }
53523
53524    private final static int mExportReduceIdx_my_rs_matrix2x2_uchar_1 = 823;
53525    // ain1 = "rs_matrix2x2 a"
53526    // ain2 = "uchar b"
53527    public result_int reduce_my_rs_matrix2x2_uchar_1(Allocation ain1, Allocation ain2) {
53528        return reduce_my_rs_matrix2x2_uchar_1(ain1, ain2, null);
53529    }
53530
53531    // ain1 = "rs_matrix2x2 a"
53532    // ain2 = "uchar b"
53533    public result_int reduce_my_rs_matrix2x2_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53534        Type t0, t1;
53535        // check ain1
53536        // check ain2
53537        if (!ain2.getType().getElement().isCompatible(__U8)) {
53538            throw new RSRuntimeException("Type mismatch with U8!");
53539        }
53540        // Verify dimensions
53541        t0 = ain1.getType();
53542        t1 = ain2.getType();
53543        if ((t0.getCount() != t1.getCount()) ||
53544            (t0.getX() != t1.getX()) ||
53545            (t0.getY() != t1.getY()) ||
53546            (t0.getZ() != t1.getZ()) ||
53547            (t0.hasFaces()   != t1.hasFaces()) ||
53548            (t0.hasMipmaps() != t1.hasMipmaps())) {
53549            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53550        }
53551
53552        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53553        aout.setAutoPadding(true);
53554        reduce(mExportReduceIdx_my_rs_matrix2x2_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
53555        return new result_int(aout);
53556    }
53557
53558    private final static int mExportReduceIdx_my_rs_matrix2x2_uchar2_0 = 824;
53559    // ain1 = "rs_matrix2x2 a"
53560    // ain2 = "uchar2 b"
53561    public result_int reduce_my_rs_matrix2x2_uchar2_0(Allocation ain1, Allocation ain2) {
53562        return reduce_my_rs_matrix2x2_uchar2_0(ain1, ain2, null);
53563    }
53564
53565    // ain1 = "rs_matrix2x2 a"
53566    // ain2 = "uchar2 b"
53567    public result_int reduce_my_rs_matrix2x2_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53568        Type t0, t1;
53569        // check ain1
53570        // check ain2
53571        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
53572            throw new RSRuntimeException("Type mismatch with U8_2!");
53573        }
53574        // Verify dimensions
53575        t0 = ain1.getType();
53576        t1 = ain2.getType();
53577        if ((t0.getCount() != t1.getCount()) ||
53578            (t0.getX() != t1.getX()) ||
53579            (t0.getY() != t1.getY()) ||
53580            (t0.getZ() != t1.getZ()) ||
53581            (t0.hasFaces()   != t1.hasFaces()) ||
53582            (t0.hasMipmaps() != t1.hasMipmaps())) {
53583            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53584        }
53585
53586        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53587        aout.setAutoPadding(true);
53588        reduce(mExportReduceIdx_my_rs_matrix2x2_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
53589        return new result_int(aout);
53590    }
53591
53592    private final static int mExportReduceIdx_my_rs_matrix2x2_uchar2_1 = 825;
53593    // ain1 = "rs_matrix2x2 a"
53594    // ain2 = "uchar2 b"
53595    public result_int reduce_my_rs_matrix2x2_uchar2_1(Allocation ain1, Allocation ain2) {
53596        return reduce_my_rs_matrix2x2_uchar2_1(ain1, ain2, null);
53597    }
53598
53599    // ain1 = "rs_matrix2x2 a"
53600    // ain2 = "uchar2 b"
53601    public result_int reduce_my_rs_matrix2x2_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53602        Type t0, t1;
53603        // check ain1
53604        // check ain2
53605        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
53606            throw new RSRuntimeException("Type mismatch with U8_2!");
53607        }
53608        // Verify dimensions
53609        t0 = ain1.getType();
53610        t1 = ain2.getType();
53611        if ((t0.getCount() != t1.getCount()) ||
53612            (t0.getX() != t1.getX()) ||
53613            (t0.getY() != t1.getY()) ||
53614            (t0.getZ() != t1.getZ()) ||
53615            (t0.hasFaces()   != t1.hasFaces()) ||
53616            (t0.hasMipmaps() != t1.hasMipmaps())) {
53617            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53618        }
53619
53620        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53621        aout.setAutoPadding(true);
53622        reduce(mExportReduceIdx_my_rs_matrix2x2_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
53623        return new result_int(aout);
53624    }
53625
53626    private final static int mExportReduceIdx_my_rs_matrix2x2_uchar4_0 = 826;
53627    // ain1 = "rs_matrix2x2 a"
53628    // ain2 = "uchar4 b"
53629    public result_int reduce_my_rs_matrix2x2_uchar4_0(Allocation ain1, Allocation ain2) {
53630        return reduce_my_rs_matrix2x2_uchar4_0(ain1, ain2, null);
53631    }
53632
53633    // ain1 = "rs_matrix2x2 a"
53634    // ain2 = "uchar4 b"
53635    public result_int reduce_my_rs_matrix2x2_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53636        Type t0, t1;
53637        // check ain1
53638        // check ain2
53639        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
53640            throw new RSRuntimeException("Type mismatch with U8_4!");
53641        }
53642        // Verify dimensions
53643        t0 = ain1.getType();
53644        t1 = ain2.getType();
53645        if ((t0.getCount() != t1.getCount()) ||
53646            (t0.getX() != t1.getX()) ||
53647            (t0.getY() != t1.getY()) ||
53648            (t0.getZ() != t1.getZ()) ||
53649            (t0.hasFaces()   != t1.hasFaces()) ||
53650            (t0.hasMipmaps() != t1.hasMipmaps())) {
53651            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53652        }
53653
53654        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53655        aout.setAutoPadding(true);
53656        reduce(mExportReduceIdx_my_rs_matrix2x2_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
53657        return new result_int(aout);
53658    }
53659
53660    private final static int mExportReduceIdx_my_rs_matrix2x2_uchar4_1 = 827;
53661    // ain1 = "rs_matrix2x2 a"
53662    // ain2 = "uchar4 b"
53663    public result_int reduce_my_rs_matrix2x2_uchar4_1(Allocation ain1, Allocation ain2) {
53664        return reduce_my_rs_matrix2x2_uchar4_1(ain1, ain2, null);
53665    }
53666
53667    // ain1 = "rs_matrix2x2 a"
53668    // ain2 = "uchar4 b"
53669    public result_int reduce_my_rs_matrix2x2_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53670        Type t0, t1;
53671        // check ain1
53672        // check ain2
53673        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
53674            throw new RSRuntimeException("Type mismatch with U8_4!");
53675        }
53676        // Verify dimensions
53677        t0 = ain1.getType();
53678        t1 = ain2.getType();
53679        if ((t0.getCount() != t1.getCount()) ||
53680            (t0.getX() != t1.getX()) ||
53681            (t0.getY() != t1.getY()) ||
53682            (t0.getZ() != t1.getZ()) ||
53683            (t0.hasFaces()   != t1.hasFaces()) ||
53684            (t0.hasMipmaps() != t1.hasMipmaps())) {
53685            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53686        }
53687
53688        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53689        aout.setAutoPadding(true);
53690        reduce(mExportReduceIdx_my_rs_matrix2x2_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
53691        return new result_int(aout);
53692    }
53693
53694    private final static int mExportReduceIdx_my_rs_matrix2x2_ushort_0 = 828;
53695    // ain1 = "rs_matrix2x2 a"
53696    // ain2 = "ushort b"
53697    public result_int reduce_my_rs_matrix2x2_ushort_0(Allocation ain1, Allocation ain2) {
53698        return reduce_my_rs_matrix2x2_ushort_0(ain1, ain2, null);
53699    }
53700
53701    // ain1 = "rs_matrix2x2 a"
53702    // ain2 = "ushort b"
53703    public result_int reduce_my_rs_matrix2x2_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53704        Type t0, t1;
53705        // check ain1
53706        // check ain2
53707        if (!ain2.getType().getElement().isCompatible(__U16)) {
53708            throw new RSRuntimeException("Type mismatch with U16!");
53709        }
53710        // Verify dimensions
53711        t0 = ain1.getType();
53712        t1 = ain2.getType();
53713        if ((t0.getCount() != t1.getCount()) ||
53714            (t0.getX() != t1.getX()) ||
53715            (t0.getY() != t1.getY()) ||
53716            (t0.getZ() != t1.getZ()) ||
53717            (t0.hasFaces()   != t1.hasFaces()) ||
53718            (t0.hasMipmaps() != t1.hasMipmaps())) {
53719            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53720        }
53721
53722        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53723        aout.setAutoPadding(true);
53724        reduce(mExportReduceIdx_my_rs_matrix2x2_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
53725        return new result_int(aout);
53726    }
53727
53728    private final static int mExportReduceIdx_my_rs_matrix2x2_ushort_1 = 829;
53729    // ain1 = "rs_matrix2x2 a"
53730    // ain2 = "ushort b"
53731    public result_int reduce_my_rs_matrix2x2_ushort_1(Allocation ain1, Allocation ain2) {
53732        return reduce_my_rs_matrix2x2_ushort_1(ain1, ain2, null);
53733    }
53734
53735    // ain1 = "rs_matrix2x2 a"
53736    // ain2 = "ushort b"
53737    public result_int reduce_my_rs_matrix2x2_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53738        Type t0, t1;
53739        // check ain1
53740        // check ain2
53741        if (!ain2.getType().getElement().isCompatible(__U16)) {
53742            throw new RSRuntimeException("Type mismatch with U16!");
53743        }
53744        // Verify dimensions
53745        t0 = ain1.getType();
53746        t1 = ain2.getType();
53747        if ((t0.getCount() != t1.getCount()) ||
53748            (t0.getX() != t1.getX()) ||
53749            (t0.getY() != t1.getY()) ||
53750            (t0.getZ() != t1.getZ()) ||
53751            (t0.hasFaces()   != t1.hasFaces()) ||
53752            (t0.hasMipmaps() != t1.hasMipmaps())) {
53753            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53754        }
53755
53756        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53757        aout.setAutoPadding(true);
53758        reduce(mExportReduceIdx_my_rs_matrix2x2_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
53759        return new result_int(aout);
53760    }
53761
53762    private final static int mExportReduceIdx_my_rs_matrix2x2_ushort2_0 = 830;
53763    // ain1 = "rs_matrix2x2 a"
53764    // ain2 = "ushort2 b"
53765    public result_int reduce_my_rs_matrix2x2_ushort2_0(Allocation ain1, Allocation ain2) {
53766        return reduce_my_rs_matrix2x2_ushort2_0(ain1, ain2, null);
53767    }
53768
53769    // ain1 = "rs_matrix2x2 a"
53770    // ain2 = "ushort2 b"
53771    public result_int reduce_my_rs_matrix2x2_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53772        Type t0, t1;
53773        // check ain1
53774        // check ain2
53775        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
53776            throw new RSRuntimeException("Type mismatch with U16_2!");
53777        }
53778        // Verify dimensions
53779        t0 = ain1.getType();
53780        t1 = ain2.getType();
53781        if ((t0.getCount() != t1.getCount()) ||
53782            (t0.getX() != t1.getX()) ||
53783            (t0.getY() != t1.getY()) ||
53784            (t0.getZ() != t1.getZ()) ||
53785            (t0.hasFaces()   != t1.hasFaces()) ||
53786            (t0.hasMipmaps() != t1.hasMipmaps())) {
53787            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53788        }
53789
53790        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53791        aout.setAutoPadding(true);
53792        reduce(mExportReduceIdx_my_rs_matrix2x2_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
53793        return new result_int(aout);
53794    }
53795
53796    private final static int mExportReduceIdx_my_rs_matrix2x2_ushort2_1 = 831;
53797    // ain1 = "rs_matrix2x2 a"
53798    // ain2 = "ushort2 b"
53799    public result_int reduce_my_rs_matrix2x2_ushort2_1(Allocation ain1, Allocation ain2) {
53800        return reduce_my_rs_matrix2x2_ushort2_1(ain1, ain2, null);
53801    }
53802
53803    // ain1 = "rs_matrix2x2 a"
53804    // ain2 = "ushort2 b"
53805    public result_int reduce_my_rs_matrix2x2_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53806        Type t0, t1;
53807        // check ain1
53808        // check ain2
53809        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
53810            throw new RSRuntimeException("Type mismatch with U16_2!");
53811        }
53812        // Verify dimensions
53813        t0 = ain1.getType();
53814        t1 = ain2.getType();
53815        if ((t0.getCount() != t1.getCount()) ||
53816            (t0.getX() != t1.getX()) ||
53817            (t0.getY() != t1.getY()) ||
53818            (t0.getZ() != t1.getZ()) ||
53819            (t0.hasFaces()   != t1.hasFaces()) ||
53820            (t0.hasMipmaps() != t1.hasMipmaps())) {
53821            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53822        }
53823
53824        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53825        aout.setAutoPadding(true);
53826        reduce(mExportReduceIdx_my_rs_matrix2x2_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
53827        return new result_int(aout);
53828    }
53829
53830    private final static int mExportReduceIdx_my_rs_matrix2x2_ushort4_0 = 832;
53831    // ain1 = "rs_matrix2x2 a"
53832    // ain2 = "ushort4 b"
53833    public result_int reduce_my_rs_matrix2x2_ushort4_0(Allocation ain1, Allocation ain2) {
53834        return reduce_my_rs_matrix2x2_ushort4_0(ain1, ain2, null);
53835    }
53836
53837    // ain1 = "rs_matrix2x2 a"
53838    // ain2 = "ushort4 b"
53839    public result_int reduce_my_rs_matrix2x2_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53840        Type t0, t1;
53841        // check ain1
53842        // check ain2
53843        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
53844            throw new RSRuntimeException("Type mismatch with U16_4!");
53845        }
53846        // Verify dimensions
53847        t0 = ain1.getType();
53848        t1 = ain2.getType();
53849        if ((t0.getCount() != t1.getCount()) ||
53850            (t0.getX() != t1.getX()) ||
53851            (t0.getY() != t1.getY()) ||
53852            (t0.getZ() != t1.getZ()) ||
53853            (t0.hasFaces()   != t1.hasFaces()) ||
53854            (t0.hasMipmaps() != t1.hasMipmaps())) {
53855            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53856        }
53857
53858        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53859        aout.setAutoPadding(true);
53860        reduce(mExportReduceIdx_my_rs_matrix2x2_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
53861        return new result_int(aout);
53862    }
53863
53864    private final static int mExportReduceIdx_my_rs_matrix2x2_ushort4_1 = 833;
53865    // ain1 = "rs_matrix2x2 a"
53866    // ain2 = "ushort4 b"
53867    public result_int reduce_my_rs_matrix2x2_ushort4_1(Allocation ain1, Allocation ain2) {
53868        return reduce_my_rs_matrix2x2_ushort4_1(ain1, ain2, null);
53869    }
53870
53871    // ain1 = "rs_matrix2x2 a"
53872    // ain2 = "ushort4 b"
53873    public result_int reduce_my_rs_matrix2x2_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53874        Type t0, t1;
53875        // check ain1
53876        // check ain2
53877        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
53878            throw new RSRuntimeException("Type mismatch with U16_4!");
53879        }
53880        // Verify dimensions
53881        t0 = ain1.getType();
53882        t1 = ain2.getType();
53883        if ((t0.getCount() != t1.getCount()) ||
53884            (t0.getX() != t1.getX()) ||
53885            (t0.getY() != t1.getY()) ||
53886            (t0.getZ() != t1.getZ()) ||
53887            (t0.hasFaces()   != t1.hasFaces()) ||
53888            (t0.hasMipmaps() != t1.hasMipmaps())) {
53889            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53890        }
53891
53892        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53893        aout.setAutoPadding(true);
53894        reduce(mExportReduceIdx_my_rs_matrix2x2_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
53895        return new result_int(aout);
53896    }
53897
53898    private final static int mExportReduceIdx_my_rs_matrix2x2_bool_0 = 834;
53899    // ain1 = "rs_matrix2x2 a"
53900    // ain2 = "bool b"
53901    public result_int reduce_my_rs_matrix2x2_bool_0(Allocation ain1, Allocation ain2) {
53902        return reduce_my_rs_matrix2x2_bool_0(ain1, ain2, null);
53903    }
53904
53905    // ain1 = "rs_matrix2x2 a"
53906    // ain2 = "bool b"
53907    public result_int reduce_my_rs_matrix2x2_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53908        Type t0, t1;
53909        // check ain1
53910        // check ain2
53911        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
53912            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
53913        }
53914        // Verify dimensions
53915        t0 = ain1.getType();
53916        t1 = ain2.getType();
53917        if ((t0.getCount() != t1.getCount()) ||
53918            (t0.getX() != t1.getX()) ||
53919            (t0.getY() != t1.getY()) ||
53920            (t0.getZ() != t1.getZ()) ||
53921            (t0.hasFaces()   != t1.hasFaces()) ||
53922            (t0.hasMipmaps() != t1.hasMipmaps())) {
53923            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53924        }
53925
53926        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53927        aout.setAutoPadding(true);
53928        reduce(mExportReduceIdx_my_rs_matrix2x2_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
53929        return new result_int(aout);
53930    }
53931
53932    private final static int mExportReduceIdx_my_rs_matrix2x2_bool_1 = 835;
53933    // ain1 = "rs_matrix2x2 a"
53934    // ain2 = "bool b"
53935    public result_int reduce_my_rs_matrix2x2_bool_1(Allocation ain1, Allocation ain2) {
53936        return reduce_my_rs_matrix2x2_bool_1(ain1, ain2, null);
53937    }
53938
53939    // ain1 = "rs_matrix2x2 a"
53940    // ain2 = "bool b"
53941    public result_int reduce_my_rs_matrix2x2_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53942        Type t0, t1;
53943        // check ain1
53944        // check ain2
53945        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
53946            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
53947        }
53948        // Verify dimensions
53949        t0 = ain1.getType();
53950        t1 = ain2.getType();
53951        if ((t0.getCount() != t1.getCount()) ||
53952            (t0.getX() != t1.getX()) ||
53953            (t0.getY() != t1.getY()) ||
53954            (t0.getZ() != t1.getZ()) ||
53955            (t0.hasFaces()   != t1.hasFaces()) ||
53956            (t0.hasMipmaps() != t1.hasMipmaps())) {
53957            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53958        }
53959
53960        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53961        aout.setAutoPadding(true);
53962        reduce(mExportReduceIdx_my_rs_matrix2x2_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
53963        return new result_int(aout);
53964    }
53965
53966    private final static int mExportReduceIdx_my_rs_matrix2x2_rs_matrix2x2_0 = 836;
53967    // ain1 = "rs_matrix2x2 a"
53968    // ain2 = "rs_matrix2x2 b"
53969    public result_int reduce_my_rs_matrix2x2_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
53970        return reduce_my_rs_matrix2x2_rs_matrix2x2_0(ain1, ain2, null);
53971    }
53972
53973    // ain1 = "rs_matrix2x2 a"
53974    // ain2 = "rs_matrix2x2 b"
53975    public result_int reduce_my_rs_matrix2x2_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
53976        Type t0, t1;
53977        // check ain1
53978        // check ain2
53979        // Verify dimensions
53980        t0 = ain1.getType();
53981        t1 = ain2.getType();
53982        if ((t0.getCount() != t1.getCount()) ||
53983            (t0.getX() != t1.getX()) ||
53984            (t0.getY() != t1.getY()) ||
53985            (t0.getZ() != t1.getZ()) ||
53986            (t0.hasFaces()   != t1.hasFaces()) ||
53987            (t0.hasMipmaps() != t1.hasMipmaps())) {
53988            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
53989        }
53990
53991        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
53992        aout.setAutoPadding(true);
53993        reduce(mExportReduceIdx_my_rs_matrix2x2_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
53994        return new result_int(aout);
53995    }
53996
53997    private final static int mExportReduceIdx_my_rs_matrix2x2_rs_matrix2x2_1 = 837;
53998    // ain1 = "rs_matrix2x2 a"
53999    // ain2 = "rs_matrix2x2 b"
54000    public result_int reduce_my_rs_matrix2x2_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
54001        return reduce_my_rs_matrix2x2_rs_matrix2x2_1(ain1, ain2, null);
54002    }
54003
54004    // ain1 = "rs_matrix2x2 a"
54005    // ain2 = "rs_matrix2x2 b"
54006    public result_int reduce_my_rs_matrix2x2_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54007        Type t0, t1;
54008        // check ain1
54009        // check ain2
54010        // Verify dimensions
54011        t0 = ain1.getType();
54012        t1 = ain2.getType();
54013        if ((t0.getCount() != t1.getCount()) ||
54014            (t0.getX() != t1.getX()) ||
54015            (t0.getY() != t1.getY()) ||
54016            (t0.getZ() != t1.getZ()) ||
54017            (t0.hasFaces()   != t1.hasFaces()) ||
54018            (t0.hasMipmaps() != t1.hasMipmaps())) {
54019            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54020        }
54021
54022        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54023        aout.setAutoPadding(true);
54024        reduce(mExportReduceIdx_my_rs_matrix2x2_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
54025        return new result_int(aout);
54026    }
54027
54028    private final static int mExportReduceIdx_my_rs_matrix2x2_MyStruct_0 = 838;
54029    // ain1 = "rs_matrix2x2 a"
54030    // ain2 = "/* struct <> */ b"
54031    public result_int reduce_my_rs_matrix2x2_MyStruct_0(Allocation ain1, Allocation ain2) {
54032        return reduce_my_rs_matrix2x2_MyStruct_0(ain1, ain2, null);
54033    }
54034
54035    // ain1 = "rs_matrix2x2 a"
54036    // ain2 = "/* struct <> */ b"
54037    public result_int reduce_my_rs_matrix2x2_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54038        Type t0, t1;
54039        // check ain1
54040        // check ain2
54041        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54042            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54043        }
54044        // Verify dimensions
54045        t0 = ain1.getType();
54046        t1 = ain2.getType();
54047        if ((t0.getCount() != t1.getCount()) ||
54048            (t0.getX() != t1.getX()) ||
54049            (t0.getY() != t1.getY()) ||
54050            (t0.getZ() != t1.getZ()) ||
54051            (t0.hasFaces()   != t1.hasFaces()) ||
54052            (t0.hasMipmaps() != t1.hasMipmaps())) {
54053            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54054        }
54055
54056        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54057        aout.setAutoPadding(true);
54058        reduce(mExportReduceIdx_my_rs_matrix2x2_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
54059        return new result_int(aout);
54060    }
54061
54062    private final static int mExportReduceIdx_my_rs_matrix2x2_MyStruct_1 = 839;
54063    // ain1 = "rs_matrix2x2 a"
54064    // ain2 = "/* struct <> */ b"
54065    public result_int reduce_my_rs_matrix2x2_MyStruct_1(Allocation ain1, Allocation ain2) {
54066        return reduce_my_rs_matrix2x2_MyStruct_1(ain1, ain2, null);
54067    }
54068
54069    // ain1 = "rs_matrix2x2 a"
54070    // ain2 = "/* struct <> */ b"
54071    public result_int reduce_my_rs_matrix2x2_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54072        Type t0, t1;
54073        // check ain1
54074        // check ain2
54075        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54076            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54077        }
54078        // Verify dimensions
54079        t0 = ain1.getType();
54080        t1 = ain2.getType();
54081        if ((t0.getCount() != t1.getCount()) ||
54082            (t0.getX() != t1.getX()) ||
54083            (t0.getY() != t1.getY()) ||
54084            (t0.getZ() != t1.getZ()) ||
54085            (t0.hasFaces()   != t1.hasFaces()) ||
54086            (t0.hasMipmaps() != t1.hasMipmaps())) {
54087            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54088        }
54089
54090        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54091        aout.setAutoPadding(true);
54092        reduce(mExportReduceIdx_my_rs_matrix2x2_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
54093        return new result_int(aout);
54094    }
54095
54096    private final static int mExportReduceIdx_my_MyStruct_half_0 = 840;
54097    // ain1 = "/* struct <> */ a"
54098    // ain2 = "half b"
54099    public result_int reduce_my_MyStruct_half_0(Allocation ain1, Allocation ain2) {
54100        return reduce_my_MyStruct_half_0(ain1, ain2, null);
54101    }
54102
54103    // ain1 = "/* struct <> */ a"
54104    // ain2 = "half b"
54105    public result_int reduce_my_MyStruct_half_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54106        Type t0, t1;
54107        // check ain1
54108        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54109            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54110        }
54111        // check ain2
54112        if (!ain2.getType().getElement().isCompatible(__F16)) {
54113            throw new RSRuntimeException("Type mismatch with F16!");
54114        }
54115        // Verify dimensions
54116        t0 = ain1.getType();
54117        t1 = ain2.getType();
54118        if ((t0.getCount() != t1.getCount()) ||
54119            (t0.getX() != t1.getX()) ||
54120            (t0.getY() != t1.getY()) ||
54121            (t0.getZ() != t1.getZ()) ||
54122            (t0.hasFaces()   != t1.hasFaces()) ||
54123            (t0.hasMipmaps() != t1.hasMipmaps())) {
54124            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54125        }
54126
54127        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54128        aout.setAutoPadding(true);
54129        reduce(mExportReduceIdx_my_MyStruct_half_0, new Allocation[]{ain1, ain2}, aout, sc);
54130        return new result_int(aout);
54131    }
54132
54133    private final static int mExportReduceIdx_my_MyStruct_half_1 = 841;
54134    // ain1 = "/* struct <> */ a"
54135    // ain2 = "half b"
54136    public result_int reduce_my_MyStruct_half_1(Allocation ain1, Allocation ain2) {
54137        return reduce_my_MyStruct_half_1(ain1, ain2, null);
54138    }
54139
54140    // ain1 = "/* struct <> */ a"
54141    // ain2 = "half b"
54142    public result_int reduce_my_MyStruct_half_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54143        Type t0, t1;
54144        // check ain1
54145        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54146            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54147        }
54148        // check ain2
54149        if (!ain2.getType().getElement().isCompatible(__F16)) {
54150            throw new RSRuntimeException("Type mismatch with F16!");
54151        }
54152        // Verify dimensions
54153        t0 = ain1.getType();
54154        t1 = ain2.getType();
54155        if ((t0.getCount() != t1.getCount()) ||
54156            (t0.getX() != t1.getX()) ||
54157            (t0.getY() != t1.getY()) ||
54158            (t0.getZ() != t1.getZ()) ||
54159            (t0.hasFaces()   != t1.hasFaces()) ||
54160            (t0.hasMipmaps() != t1.hasMipmaps())) {
54161            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54162        }
54163
54164        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54165        aout.setAutoPadding(true);
54166        reduce(mExportReduceIdx_my_MyStruct_half_1, new Allocation[]{ain1, ain2}, aout, sc);
54167        return new result_int(aout);
54168    }
54169
54170    private final static int mExportReduceIdx_my_MyStruct_half2_0 = 842;
54171    // ain1 = "/* struct <> */ a"
54172    // ain2 = "half2 b"
54173    public result_int reduce_my_MyStruct_half2_0(Allocation ain1, Allocation ain2) {
54174        return reduce_my_MyStruct_half2_0(ain1, ain2, null);
54175    }
54176
54177    // ain1 = "/* struct <> */ a"
54178    // ain2 = "half2 b"
54179    public result_int reduce_my_MyStruct_half2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54180        Type t0, t1;
54181        // check ain1
54182        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54183            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54184        }
54185        // check ain2
54186        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
54187            throw new RSRuntimeException("Type mismatch with F16_2!");
54188        }
54189        // Verify dimensions
54190        t0 = ain1.getType();
54191        t1 = ain2.getType();
54192        if ((t0.getCount() != t1.getCount()) ||
54193            (t0.getX() != t1.getX()) ||
54194            (t0.getY() != t1.getY()) ||
54195            (t0.getZ() != t1.getZ()) ||
54196            (t0.hasFaces()   != t1.hasFaces()) ||
54197            (t0.hasMipmaps() != t1.hasMipmaps())) {
54198            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54199        }
54200
54201        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54202        aout.setAutoPadding(true);
54203        reduce(mExportReduceIdx_my_MyStruct_half2_0, new Allocation[]{ain1, ain2}, aout, sc);
54204        return new result_int(aout);
54205    }
54206
54207    private final static int mExportReduceIdx_my_MyStruct_half2_1 = 843;
54208    // ain1 = "/* struct <> */ a"
54209    // ain2 = "half2 b"
54210    public result_int reduce_my_MyStruct_half2_1(Allocation ain1, Allocation ain2) {
54211        return reduce_my_MyStruct_half2_1(ain1, ain2, null);
54212    }
54213
54214    // ain1 = "/* struct <> */ a"
54215    // ain2 = "half2 b"
54216    public result_int reduce_my_MyStruct_half2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54217        Type t0, t1;
54218        // check ain1
54219        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54220            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54221        }
54222        // check ain2
54223        if (!ain2.getType().getElement().isCompatible(__F16_2)) {
54224            throw new RSRuntimeException("Type mismatch with F16_2!");
54225        }
54226        // Verify dimensions
54227        t0 = ain1.getType();
54228        t1 = ain2.getType();
54229        if ((t0.getCount() != t1.getCount()) ||
54230            (t0.getX() != t1.getX()) ||
54231            (t0.getY() != t1.getY()) ||
54232            (t0.getZ() != t1.getZ()) ||
54233            (t0.hasFaces()   != t1.hasFaces()) ||
54234            (t0.hasMipmaps() != t1.hasMipmaps())) {
54235            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54236        }
54237
54238        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54239        aout.setAutoPadding(true);
54240        reduce(mExportReduceIdx_my_MyStruct_half2_1, new Allocation[]{ain1, ain2}, aout, sc);
54241        return new result_int(aout);
54242    }
54243
54244    private final static int mExportReduceIdx_my_MyStruct_half4_0 = 844;
54245    // ain1 = "/* struct <> */ a"
54246    // ain2 = "half4 b"
54247    public result_int reduce_my_MyStruct_half4_0(Allocation ain1, Allocation ain2) {
54248        return reduce_my_MyStruct_half4_0(ain1, ain2, null);
54249    }
54250
54251    // ain1 = "/* struct <> */ a"
54252    // ain2 = "half4 b"
54253    public result_int reduce_my_MyStruct_half4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54254        Type t0, t1;
54255        // check ain1
54256        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54257            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54258        }
54259        // check ain2
54260        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
54261            throw new RSRuntimeException("Type mismatch with F16_4!");
54262        }
54263        // Verify dimensions
54264        t0 = ain1.getType();
54265        t1 = ain2.getType();
54266        if ((t0.getCount() != t1.getCount()) ||
54267            (t0.getX() != t1.getX()) ||
54268            (t0.getY() != t1.getY()) ||
54269            (t0.getZ() != t1.getZ()) ||
54270            (t0.hasFaces()   != t1.hasFaces()) ||
54271            (t0.hasMipmaps() != t1.hasMipmaps())) {
54272            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54273        }
54274
54275        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54276        aout.setAutoPadding(true);
54277        reduce(mExportReduceIdx_my_MyStruct_half4_0, new Allocation[]{ain1, ain2}, aout, sc);
54278        return new result_int(aout);
54279    }
54280
54281    private final static int mExportReduceIdx_my_MyStruct_half4_1 = 845;
54282    // ain1 = "/* struct <> */ a"
54283    // ain2 = "half4 b"
54284    public result_int reduce_my_MyStruct_half4_1(Allocation ain1, Allocation ain2) {
54285        return reduce_my_MyStruct_half4_1(ain1, ain2, null);
54286    }
54287
54288    // ain1 = "/* struct <> */ a"
54289    // ain2 = "half4 b"
54290    public result_int reduce_my_MyStruct_half4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54291        Type t0, t1;
54292        // check ain1
54293        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54294            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54295        }
54296        // check ain2
54297        if (!ain2.getType().getElement().isCompatible(__F16_4)) {
54298            throw new RSRuntimeException("Type mismatch with F16_4!");
54299        }
54300        // Verify dimensions
54301        t0 = ain1.getType();
54302        t1 = ain2.getType();
54303        if ((t0.getCount() != t1.getCount()) ||
54304            (t0.getX() != t1.getX()) ||
54305            (t0.getY() != t1.getY()) ||
54306            (t0.getZ() != t1.getZ()) ||
54307            (t0.hasFaces()   != t1.hasFaces()) ||
54308            (t0.hasMipmaps() != t1.hasMipmaps())) {
54309            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54310        }
54311
54312        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54313        aout.setAutoPadding(true);
54314        reduce(mExportReduceIdx_my_MyStruct_half4_1, new Allocation[]{ain1, ain2}, aout, sc);
54315        return new result_int(aout);
54316    }
54317
54318    private final static int mExportReduceIdx_my_MyStruct_float_0 = 846;
54319    // ain1 = "/* struct <> */ a"
54320    // ain2 = "float b"
54321    public result_int reduce_my_MyStruct_float_0(Allocation ain1, Allocation ain2) {
54322        return reduce_my_MyStruct_float_0(ain1, ain2, null);
54323    }
54324
54325    // ain1 = "/* struct <> */ a"
54326    // ain2 = "float b"
54327    public result_int reduce_my_MyStruct_float_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54328        Type t0, t1;
54329        // check ain1
54330        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54331            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54332        }
54333        // check ain2
54334        if (!ain2.getType().getElement().isCompatible(__F32)) {
54335            throw new RSRuntimeException("Type mismatch with F32!");
54336        }
54337        // Verify dimensions
54338        t0 = ain1.getType();
54339        t1 = ain2.getType();
54340        if ((t0.getCount() != t1.getCount()) ||
54341            (t0.getX() != t1.getX()) ||
54342            (t0.getY() != t1.getY()) ||
54343            (t0.getZ() != t1.getZ()) ||
54344            (t0.hasFaces()   != t1.hasFaces()) ||
54345            (t0.hasMipmaps() != t1.hasMipmaps())) {
54346            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54347        }
54348
54349        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54350        aout.setAutoPadding(true);
54351        reduce(mExportReduceIdx_my_MyStruct_float_0, new Allocation[]{ain1, ain2}, aout, sc);
54352        return new result_int(aout);
54353    }
54354
54355    private final static int mExportReduceIdx_my_MyStruct_float_1 = 847;
54356    // ain1 = "/* struct <> */ a"
54357    // ain2 = "float b"
54358    public result_int reduce_my_MyStruct_float_1(Allocation ain1, Allocation ain2) {
54359        return reduce_my_MyStruct_float_1(ain1, ain2, null);
54360    }
54361
54362    // ain1 = "/* struct <> */ a"
54363    // ain2 = "float b"
54364    public result_int reduce_my_MyStruct_float_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54365        Type t0, t1;
54366        // check ain1
54367        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54368            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54369        }
54370        // check ain2
54371        if (!ain2.getType().getElement().isCompatible(__F32)) {
54372            throw new RSRuntimeException("Type mismatch with F32!");
54373        }
54374        // Verify dimensions
54375        t0 = ain1.getType();
54376        t1 = ain2.getType();
54377        if ((t0.getCount() != t1.getCount()) ||
54378            (t0.getX() != t1.getX()) ||
54379            (t0.getY() != t1.getY()) ||
54380            (t0.getZ() != t1.getZ()) ||
54381            (t0.hasFaces()   != t1.hasFaces()) ||
54382            (t0.hasMipmaps() != t1.hasMipmaps())) {
54383            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54384        }
54385
54386        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54387        aout.setAutoPadding(true);
54388        reduce(mExportReduceIdx_my_MyStruct_float_1, new Allocation[]{ain1, ain2}, aout, sc);
54389        return new result_int(aout);
54390    }
54391
54392    private final static int mExportReduceIdx_my_MyStruct_float2_0 = 848;
54393    // ain1 = "/* struct <> */ a"
54394    // ain2 = "float2 b"
54395    public result_int reduce_my_MyStruct_float2_0(Allocation ain1, Allocation ain2) {
54396        return reduce_my_MyStruct_float2_0(ain1, ain2, null);
54397    }
54398
54399    // ain1 = "/* struct <> */ a"
54400    // ain2 = "float2 b"
54401    public result_int reduce_my_MyStruct_float2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54402        Type t0, t1;
54403        // check ain1
54404        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54405            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54406        }
54407        // check ain2
54408        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
54409            throw new RSRuntimeException("Type mismatch with F32_2!");
54410        }
54411        // Verify dimensions
54412        t0 = ain1.getType();
54413        t1 = ain2.getType();
54414        if ((t0.getCount() != t1.getCount()) ||
54415            (t0.getX() != t1.getX()) ||
54416            (t0.getY() != t1.getY()) ||
54417            (t0.getZ() != t1.getZ()) ||
54418            (t0.hasFaces()   != t1.hasFaces()) ||
54419            (t0.hasMipmaps() != t1.hasMipmaps())) {
54420            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54421        }
54422
54423        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54424        aout.setAutoPadding(true);
54425        reduce(mExportReduceIdx_my_MyStruct_float2_0, new Allocation[]{ain1, ain2}, aout, sc);
54426        return new result_int(aout);
54427    }
54428
54429    private final static int mExportReduceIdx_my_MyStruct_float2_1 = 849;
54430    // ain1 = "/* struct <> */ a"
54431    // ain2 = "float2 b"
54432    public result_int reduce_my_MyStruct_float2_1(Allocation ain1, Allocation ain2) {
54433        return reduce_my_MyStruct_float2_1(ain1, ain2, null);
54434    }
54435
54436    // ain1 = "/* struct <> */ a"
54437    // ain2 = "float2 b"
54438    public result_int reduce_my_MyStruct_float2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54439        Type t0, t1;
54440        // check ain1
54441        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54442            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54443        }
54444        // check ain2
54445        if (!ain2.getType().getElement().isCompatible(__F32_2)) {
54446            throw new RSRuntimeException("Type mismatch with F32_2!");
54447        }
54448        // Verify dimensions
54449        t0 = ain1.getType();
54450        t1 = ain2.getType();
54451        if ((t0.getCount() != t1.getCount()) ||
54452            (t0.getX() != t1.getX()) ||
54453            (t0.getY() != t1.getY()) ||
54454            (t0.getZ() != t1.getZ()) ||
54455            (t0.hasFaces()   != t1.hasFaces()) ||
54456            (t0.hasMipmaps() != t1.hasMipmaps())) {
54457            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54458        }
54459
54460        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54461        aout.setAutoPadding(true);
54462        reduce(mExportReduceIdx_my_MyStruct_float2_1, new Allocation[]{ain1, ain2}, aout, sc);
54463        return new result_int(aout);
54464    }
54465
54466    private final static int mExportReduceIdx_my_MyStruct_float4_0 = 850;
54467    // ain1 = "/* struct <> */ a"
54468    // ain2 = "float4 b"
54469    public result_int reduce_my_MyStruct_float4_0(Allocation ain1, Allocation ain2) {
54470        return reduce_my_MyStruct_float4_0(ain1, ain2, null);
54471    }
54472
54473    // ain1 = "/* struct <> */ a"
54474    // ain2 = "float4 b"
54475    public result_int reduce_my_MyStruct_float4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54476        Type t0, t1;
54477        // check ain1
54478        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54479            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54480        }
54481        // check ain2
54482        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
54483            throw new RSRuntimeException("Type mismatch with F32_4!");
54484        }
54485        // Verify dimensions
54486        t0 = ain1.getType();
54487        t1 = ain2.getType();
54488        if ((t0.getCount() != t1.getCount()) ||
54489            (t0.getX() != t1.getX()) ||
54490            (t0.getY() != t1.getY()) ||
54491            (t0.getZ() != t1.getZ()) ||
54492            (t0.hasFaces()   != t1.hasFaces()) ||
54493            (t0.hasMipmaps() != t1.hasMipmaps())) {
54494            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54495        }
54496
54497        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54498        aout.setAutoPadding(true);
54499        reduce(mExportReduceIdx_my_MyStruct_float4_0, new Allocation[]{ain1, ain2}, aout, sc);
54500        return new result_int(aout);
54501    }
54502
54503    private final static int mExportReduceIdx_my_MyStruct_float4_1 = 851;
54504    // ain1 = "/* struct <> */ a"
54505    // ain2 = "float4 b"
54506    public result_int reduce_my_MyStruct_float4_1(Allocation ain1, Allocation ain2) {
54507        return reduce_my_MyStruct_float4_1(ain1, ain2, null);
54508    }
54509
54510    // ain1 = "/* struct <> */ a"
54511    // ain2 = "float4 b"
54512    public result_int reduce_my_MyStruct_float4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54513        Type t0, t1;
54514        // check ain1
54515        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54516            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54517        }
54518        // check ain2
54519        if (!ain2.getType().getElement().isCompatible(__F32_4)) {
54520            throw new RSRuntimeException("Type mismatch with F32_4!");
54521        }
54522        // Verify dimensions
54523        t0 = ain1.getType();
54524        t1 = ain2.getType();
54525        if ((t0.getCount() != t1.getCount()) ||
54526            (t0.getX() != t1.getX()) ||
54527            (t0.getY() != t1.getY()) ||
54528            (t0.getZ() != t1.getZ()) ||
54529            (t0.hasFaces()   != t1.hasFaces()) ||
54530            (t0.hasMipmaps() != t1.hasMipmaps())) {
54531            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54532        }
54533
54534        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54535        aout.setAutoPadding(true);
54536        reduce(mExportReduceIdx_my_MyStruct_float4_1, new Allocation[]{ain1, ain2}, aout, sc);
54537        return new result_int(aout);
54538    }
54539
54540    private final static int mExportReduceIdx_my_MyStruct_char_0 = 852;
54541    // ain1 = "/* struct <> */ a"
54542    // ain2 = "char b"
54543    public result_int reduce_my_MyStruct_char_0(Allocation ain1, Allocation ain2) {
54544        return reduce_my_MyStruct_char_0(ain1, ain2, null);
54545    }
54546
54547    // ain1 = "/* struct <> */ a"
54548    // ain2 = "char b"
54549    public result_int reduce_my_MyStruct_char_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54550        Type t0, t1;
54551        // check ain1
54552        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54553            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54554        }
54555        // check ain2
54556        if (!ain2.getType().getElement().isCompatible(__I8)) {
54557            throw new RSRuntimeException("Type mismatch with I8!");
54558        }
54559        // Verify dimensions
54560        t0 = ain1.getType();
54561        t1 = ain2.getType();
54562        if ((t0.getCount() != t1.getCount()) ||
54563            (t0.getX() != t1.getX()) ||
54564            (t0.getY() != t1.getY()) ||
54565            (t0.getZ() != t1.getZ()) ||
54566            (t0.hasFaces()   != t1.hasFaces()) ||
54567            (t0.hasMipmaps() != t1.hasMipmaps())) {
54568            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54569        }
54570
54571        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54572        aout.setAutoPadding(true);
54573        reduce(mExportReduceIdx_my_MyStruct_char_0, new Allocation[]{ain1, ain2}, aout, sc);
54574        return new result_int(aout);
54575    }
54576
54577    private final static int mExportReduceIdx_my_MyStruct_char_1 = 853;
54578    // ain1 = "/* struct <> */ a"
54579    // ain2 = "char b"
54580    public result_int reduce_my_MyStruct_char_1(Allocation ain1, Allocation ain2) {
54581        return reduce_my_MyStruct_char_1(ain1, ain2, null);
54582    }
54583
54584    // ain1 = "/* struct <> */ a"
54585    // ain2 = "char b"
54586    public result_int reduce_my_MyStruct_char_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54587        Type t0, t1;
54588        // check ain1
54589        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54590            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54591        }
54592        // check ain2
54593        if (!ain2.getType().getElement().isCompatible(__I8)) {
54594            throw new RSRuntimeException("Type mismatch with I8!");
54595        }
54596        // Verify dimensions
54597        t0 = ain1.getType();
54598        t1 = ain2.getType();
54599        if ((t0.getCount() != t1.getCount()) ||
54600            (t0.getX() != t1.getX()) ||
54601            (t0.getY() != t1.getY()) ||
54602            (t0.getZ() != t1.getZ()) ||
54603            (t0.hasFaces()   != t1.hasFaces()) ||
54604            (t0.hasMipmaps() != t1.hasMipmaps())) {
54605            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54606        }
54607
54608        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54609        aout.setAutoPadding(true);
54610        reduce(mExportReduceIdx_my_MyStruct_char_1, new Allocation[]{ain1, ain2}, aout, sc);
54611        return new result_int(aout);
54612    }
54613
54614    private final static int mExportReduceIdx_my_MyStruct_char2_0 = 854;
54615    // ain1 = "/* struct <> */ a"
54616    // ain2 = "char2 b"
54617    public result_int reduce_my_MyStruct_char2_0(Allocation ain1, Allocation ain2) {
54618        return reduce_my_MyStruct_char2_0(ain1, ain2, null);
54619    }
54620
54621    // ain1 = "/* struct <> */ a"
54622    // ain2 = "char2 b"
54623    public result_int reduce_my_MyStruct_char2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54624        Type t0, t1;
54625        // check ain1
54626        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54627            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54628        }
54629        // check ain2
54630        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
54631            throw new RSRuntimeException("Type mismatch with I8_2!");
54632        }
54633        // Verify dimensions
54634        t0 = ain1.getType();
54635        t1 = ain2.getType();
54636        if ((t0.getCount() != t1.getCount()) ||
54637            (t0.getX() != t1.getX()) ||
54638            (t0.getY() != t1.getY()) ||
54639            (t0.getZ() != t1.getZ()) ||
54640            (t0.hasFaces()   != t1.hasFaces()) ||
54641            (t0.hasMipmaps() != t1.hasMipmaps())) {
54642            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54643        }
54644
54645        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54646        aout.setAutoPadding(true);
54647        reduce(mExportReduceIdx_my_MyStruct_char2_0, new Allocation[]{ain1, ain2}, aout, sc);
54648        return new result_int(aout);
54649    }
54650
54651    private final static int mExportReduceIdx_my_MyStruct_char2_1 = 855;
54652    // ain1 = "/* struct <> */ a"
54653    // ain2 = "char2 b"
54654    public result_int reduce_my_MyStruct_char2_1(Allocation ain1, Allocation ain2) {
54655        return reduce_my_MyStruct_char2_1(ain1, ain2, null);
54656    }
54657
54658    // ain1 = "/* struct <> */ a"
54659    // ain2 = "char2 b"
54660    public result_int reduce_my_MyStruct_char2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54661        Type t0, t1;
54662        // check ain1
54663        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54664            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54665        }
54666        // check ain2
54667        if (!ain2.getType().getElement().isCompatible(__I8_2)) {
54668            throw new RSRuntimeException("Type mismatch with I8_2!");
54669        }
54670        // Verify dimensions
54671        t0 = ain1.getType();
54672        t1 = ain2.getType();
54673        if ((t0.getCount() != t1.getCount()) ||
54674            (t0.getX() != t1.getX()) ||
54675            (t0.getY() != t1.getY()) ||
54676            (t0.getZ() != t1.getZ()) ||
54677            (t0.hasFaces()   != t1.hasFaces()) ||
54678            (t0.hasMipmaps() != t1.hasMipmaps())) {
54679            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54680        }
54681
54682        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54683        aout.setAutoPadding(true);
54684        reduce(mExportReduceIdx_my_MyStruct_char2_1, new Allocation[]{ain1, ain2}, aout, sc);
54685        return new result_int(aout);
54686    }
54687
54688    private final static int mExportReduceIdx_my_MyStruct_char4_0 = 856;
54689    // ain1 = "/* struct <> */ a"
54690    // ain2 = "char4 b"
54691    public result_int reduce_my_MyStruct_char4_0(Allocation ain1, Allocation ain2) {
54692        return reduce_my_MyStruct_char4_0(ain1, ain2, null);
54693    }
54694
54695    // ain1 = "/* struct <> */ a"
54696    // ain2 = "char4 b"
54697    public result_int reduce_my_MyStruct_char4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54698        Type t0, t1;
54699        // check ain1
54700        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54701            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54702        }
54703        // check ain2
54704        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
54705            throw new RSRuntimeException("Type mismatch with I8_4!");
54706        }
54707        // Verify dimensions
54708        t0 = ain1.getType();
54709        t1 = ain2.getType();
54710        if ((t0.getCount() != t1.getCount()) ||
54711            (t0.getX() != t1.getX()) ||
54712            (t0.getY() != t1.getY()) ||
54713            (t0.getZ() != t1.getZ()) ||
54714            (t0.hasFaces()   != t1.hasFaces()) ||
54715            (t0.hasMipmaps() != t1.hasMipmaps())) {
54716            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54717        }
54718
54719        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54720        aout.setAutoPadding(true);
54721        reduce(mExportReduceIdx_my_MyStruct_char4_0, new Allocation[]{ain1, ain2}, aout, sc);
54722        return new result_int(aout);
54723    }
54724
54725    private final static int mExportReduceIdx_my_MyStruct_char4_1 = 857;
54726    // ain1 = "/* struct <> */ a"
54727    // ain2 = "char4 b"
54728    public result_int reduce_my_MyStruct_char4_1(Allocation ain1, Allocation ain2) {
54729        return reduce_my_MyStruct_char4_1(ain1, ain2, null);
54730    }
54731
54732    // ain1 = "/* struct <> */ a"
54733    // ain2 = "char4 b"
54734    public result_int reduce_my_MyStruct_char4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54735        Type t0, t1;
54736        // check ain1
54737        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54738            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54739        }
54740        // check ain2
54741        if (!ain2.getType().getElement().isCompatible(__I8_4)) {
54742            throw new RSRuntimeException("Type mismatch with I8_4!");
54743        }
54744        // Verify dimensions
54745        t0 = ain1.getType();
54746        t1 = ain2.getType();
54747        if ((t0.getCount() != t1.getCount()) ||
54748            (t0.getX() != t1.getX()) ||
54749            (t0.getY() != t1.getY()) ||
54750            (t0.getZ() != t1.getZ()) ||
54751            (t0.hasFaces()   != t1.hasFaces()) ||
54752            (t0.hasMipmaps() != t1.hasMipmaps())) {
54753            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54754        }
54755
54756        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54757        aout.setAutoPadding(true);
54758        reduce(mExportReduceIdx_my_MyStruct_char4_1, new Allocation[]{ain1, ain2}, aout, sc);
54759        return new result_int(aout);
54760    }
54761
54762    private final static int mExportReduceIdx_my_MyStruct_short_0 = 858;
54763    // ain1 = "/* struct <> */ a"
54764    // ain2 = "short b"
54765    public result_int reduce_my_MyStruct_short_0(Allocation ain1, Allocation ain2) {
54766        return reduce_my_MyStruct_short_0(ain1, ain2, null);
54767    }
54768
54769    // ain1 = "/* struct <> */ a"
54770    // ain2 = "short b"
54771    public result_int reduce_my_MyStruct_short_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54772        Type t0, t1;
54773        // check ain1
54774        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54775            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54776        }
54777        // check ain2
54778        if (!ain2.getType().getElement().isCompatible(__I16)) {
54779            throw new RSRuntimeException("Type mismatch with I16!");
54780        }
54781        // Verify dimensions
54782        t0 = ain1.getType();
54783        t1 = ain2.getType();
54784        if ((t0.getCount() != t1.getCount()) ||
54785            (t0.getX() != t1.getX()) ||
54786            (t0.getY() != t1.getY()) ||
54787            (t0.getZ() != t1.getZ()) ||
54788            (t0.hasFaces()   != t1.hasFaces()) ||
54789            (t0.hasMipmaps() != t1.hasMipmaps())) {
54790            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54791        }
54792
54793        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54794        aout.setAutoPadding(true);
54795        reduce(mExportReduceIdx_my_MyStruct_short_0, new Allocation[]{ain1, ain2}, aout, sc);
54796        return new result_int(aout);
54797    }
54798
54799    private final static int mExportReduceIdx_my_MyStruct_short_1 = 859;
54800    // ain1 = "/* struct <> */ a"
54801    // ain2 = "short b"
54802    public result_int reduce_my_MyStruct_short_1(Allocation ain1, Allocation ain2) {
54803        return reduce_my_MyStruct_short_1(ain1, ain2, null);
54804    }
54805
54806    // ain1 = "/* struct <> */ a"
54807    // ain2 = "short b"
54808    public result_int reduce_my_MyStruct_short_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54809        Type t0, t1;
54810        // check ain1
54811        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54812            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54813        }
54814        // check ain2
54815        if (!ain2.getType().getElement().isCompatible(__I16)) {
54816            throw new RSRuntimeException("Type mismatch with I16!");
54817        }
54818        // Verify dimensions
54819        t0 = ain1.getType();
54820        t1 = ain2.getType();
54821        if ((t0.getCount() != t1.getCount()) ||
54822            (t0.getX() != t1.getX()) ||
54823            (t0.getY() != t1.getY()) ||
54824            (t0.getZ() != t1.getZ()) ||
54825            (t0.hasFaces()   != t1.hasFaces()) ||
54826            (t0.hasMipmaps() != t1.hasMipmaps())) {
54827            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54828        }
54829
54830        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54831        aout.setAutoPadding(true);
54832        reduce(mExportReduceIdx_my_MyStruct_short_1, new Allocation[]{ain1, ain2}, aout, sc);
54833        return new result_int(aout);
54834    }
54835
54836    private final static int mExportReduceIdx_my_MyStruct_short2_0 = 860;
54837    // ain1 = "/* struct <> */ a"
54838    // ain2 = "short2 b"
54839    public result_int reduce_my_MyStruct_short2_0(Allocation ain1, Allocation ain2) {
54840        return reduce_my_MyStruct_short2_0(ain1, ain2, null);
54841    }
54842
54843    // ain1 = "/* struct <> */ a"
54844    // ain2 = "short2 b"
54845    public result_int reduce_my_MyStruct_short2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54846        Type t0, t1;
54847        // check ain1
54848        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54849            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54850        }
54851        // check ain2
54852        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
54853            throw new RSRuntimeException("Type mismatch with I16_2!");
54854        }
54855        // Verify dimensions
54856        t0 = ain1.getType();
54857        t1 = ain2.getType();
54858        if ((t0.getCount() != t1.getCount()) ||
54859            (t0.getX() != t1.getX()) ||
54860            (t0.getY() != t1.getY()) ||
54861            (t0.getZ() != t1.getZ()) ||
54862            (t0.hasFaces()   != t1.hasFaces()) ||
54863            (t0.hasMipmaps() != t1.hasMipmaps())) {
54864            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54865        }
54866
54867        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54868        aout.setAutoPadding(true);
54869        reduce(mExportReduceIdx_my_MyStruct_short2_0, new Allocation[]{ain1, ain2}, aout, sc);
54870        return new result_int(aout);
54871    }
54872
54873    private final static int mExportReduceIdx_my_MyStruct_short2_1 = 861;
54874    // ain1 = "/* struct <> */ a"
54875    // ain2 = "short2 b"
54876    public result_int reduce_my_MyStruct_short2_1(Allocation ain1, Allocation ain2) {
54877        return reduce_my_MyStruct_short2_1(ain1, ain2, null);
54878    }
54879
54880    // ain1 = "/* struct <> */ a"
54881    // ain2 = "short2 b"
54882    public result_int reduce_my_MyStruct_short2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54883        Type t0, t1;
54884        // check ain1
54885        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54886            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54887        }
54888        // check ain2
54889        if (!ain2.getType().getElement().isCompatible(__I16_2)) {
54890            throw new RSRuntimeException("Type mismatch with I16_2!");
54891        }
54892        // Verify dimensions
54893        t0 = ain1.getType();
54894        t1 = ain2.getType();
54895        if ((t0.getCount() != t1.getCount()) ||
54896            (t0.getX() != t1.getX()) ||
54897            (t0.getY() != t1.getY()) ||
54898            (t0.getZ() != t1.getZ()) ||
54899            (t0.hasFaces()   != t1.hasFaces()) ||
54900            (t0.hasMipmaps() != t1.hasMipmaps())) {
54901            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54902        }
54903
54904        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54905        aout.setAutoPadding(true);
54906        reduce(mExportReduceIdx_my_MyStruct_short2_1, new Allocation[]{ain1, ain2}, aout, sc);
54907        return new result_int(aout);
54908    }
54909
54910    private final static int mExportReduceIdx_my_MyStruct_short4_0 = 862;
54911    // ain1 = "/* struct <> */ a"
54912    // ain2 = "short4 b"
54913    public result_int reduce_my_MyStruct_short4_0(Allocation ain1, Allocation ain2) {
54914        return reduce_my_MyStruct_short4_0(ain1, ain2, null);
54915    }
54916
54917    // ain1 = "/* struct <> */ a"
54918    // ain2 = "short4 b"
54919    public result_int reduce_my_MyStruct_short4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54920        Type t0, t1;
54921        // check ain1
54922        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54923            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54924        }
54925        // check ain2
54926        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
54927            throw new RSRuntimeException("Type mismatch with I16_4!");
54928        }
54929        // Verify dimensions
54930        t0 = ain1.getType();
54931        t1 = ain2.getType();
54932        if ((t0.getCount() != t1.getCount()) ||
54933            (t0.getX() != t1.getX()) ||
54934            (t0.getY() != t1.getY()) ||
54935            (t0.getZ() != t1.getZ()) ||
54936            (t0.hasFaces()   != t1.hasFaces()) ||
54937            (t0.hasMipmaps() != t1.hasMipmaps())) {
54938            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54939        }
54940
54941        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54942        aout.setAutoPadding(true);
54943        reduce(mExportReduceIdx_my_MyStruct_short4_0, new Allocation[]{ain1, ain2}, aout, sc);
54944        return new result_int(aout);
54945    }
54946
54947    private final static int mExportReduceIdx_my_MyStruct_short4_1 = 863;
54948    // ain1 = "/* struct <> */ a"
54949    // ain2 = "short4 b"
54950    public result_int reduce_my_MyStruct_short4_1(Allocation ain1, Allocation ain2) {
54951        return reduce_my_MyStruct_short4_1(ain1, ain2, null);
54952    }
54953
54954    // ain1 = "/* struct <> */ a"
54955    // ain2 = "short4 b"
54956    public result_int reduce_my_MyStruct_short4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54957        Type t0, t1;
54958        // check ain1
54959        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54960            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54961        }
54962        // check ain2
54963        if (!ain2.getType().getElement().isCompatible(__I16_4)) {
54964            throw new RSRuntimeException("Type mismatch with I16_4!");
54965        }
54966        // Verify dimensions
54967        t0 = ain1.getType();
54968        t1 = ain2.getType();
54969        if ((t0.getCount() != t1.getCount()) ||
54970            (t0.getX() != t1.getX()) ||
54971            (t0.getY() != t1.getY()) ||
54972            (t0.getZ() != t1.getZ()) ||
54973            (t0.hasFaces()   != t1.hasFaces()) ||
54974            (t0.hasMipmaps() != t1.hasMipmaps())) {
54975            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
54976        }
54977
54978        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
54979        aout.setAutoPadding(true);
54980        reduce(mExportReduceIdx_my_MyStruct_short4_1, new Allocation[]{ain1, ain2}, aout, sc);
54981        return new result_int(aout);
54982    }
54983
54984    private final static int mExportReduceIdx_my_MyStruct_uchar_0 = 864;
54985    // ain1 = "/* struct <> */ a"
54986    // ain2 = "uchar b"
54987    public result_int reduce_my_MyStruct_uchar_0(Allocation ain1, Allocation ain2) {
54988        return reduce_my_MyStruct_uchar_0(ain1, ain2, null);
54989    }
54990
54991    // ain1 = "/* struct <> */ a"
54992    // ain2 = "uchar b"
54993    public result_int reduce_my_MyStruct_uchar_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
54994        Type t0, t1;
54995        // check ain1
54996        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
54997            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
54998        }
54999        // check ain2
55000        if (!ain2.getType().getElement().isCompatible(__U8)) {
55001            throw new RSRuntimeException("Type mismatch with U8!");
55002        }
55003        // Verify dimensions
55004        t0 = ain1.getType();
55005        t1 = ain2.getType();
55006        if ((t0.getCount() != t1.getCount()) ||
55007            (t0.getX() != t1.getX()) ||
55008            (t0.getY() != t1.getY()) ||
55009            (t0.getZ() != t1.getZ()) ||
55010            (t0.hasFaces()   != t1.hasFaces()) ||
55011            (t0.hasMipmaps() != t1.hasMipmaps())) {
55012            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55013        }
55014
55015        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55016        aout.setAutoPadding(true);
55017        reduce(mExportReduceIdx_my_MyStruct_uchar_0, new Allocation[]{ain1, ain2}, aout, sc);
55018        return new result_int(aout);
55019    }
55020
55021    private final static int mExportReduceIdx_my_MyStruct_uchar_1 = 865;
55022    // ain1 = "/* struct <> */ a"
55023    // ain2 = "uchar b"
55024    public result_int reduce_my_MyStruct_uchar_1(Allocation ain1, Allocation ain2) {
55025        return reduce_my_MyStruct_uchar_1(ain1, ain2, null);
55026    }
55027
55028    // ain1 = "/* struct <> */ a"
55029    // ain2 = "uchar b"
55030    public result_int reduce_my_MyStruct_uchar_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55031        Type t0, t1;
55032        // check ain1
55033        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55034            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55035        }
55036        // check ain2
55037        if (!ain2.getType().getElement().isCompatible(__U8)) {
55038            throw new RSRuntimeException("Type mismatch with U8!");
55039        }
55040        // Verify dimensions
55041        t0 = ain1.getType();
55042        t1 = ain2.getType();
55043        if ((t0.getCount() != t1.getCount()) ||
55044            (t0.getX() != t1.getX()) ||
55045            (t0.getY() != t1.getY()) ||
55046            (t0.getZ() != t1.getZ()) ||
55047            (t0.hasFaces()   != t1.hasFaces()) ||
55048            (t0.hasMipmaps() != t1.hasMipmaps())) {
55049            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55050        }
55051
55052        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55053        aout.setAutoPadding(true);
55054        reduce(mExportReduceIdx_my_MyStruct_uchar_1, new Allocation[]{ain1, ain2}, aout, sc);
55055        return new result_int(aout);
55056    }
55057
55058    private final static int mExportReduceIdx_my_MyStruct_uchar2_0 = 866;
55059    // ain1 = "/* struct <> */ a"
55060    // ain2 = "uchar2 b"
55061    public result_int reduce_my_MyStruct_uchar2_0(Allocation ain1, Allocation ain2) {
55062        return reduce_my_MyStruct_uchar2_0(ain1, ain2, null);
55063    }
55064
55065    // ain1 = "/* struct <> */ a"
55066    // ain2 = "uchar2 b"
55067    public result_int reduce_my_MyStruct_uchar2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55068        Type t0, t1;
55069        // check ain1
55070        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55071            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55072        }
55073        // check ain2
55074        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
55075            throw new RSRuntimeException("Type mismatch with U8_2!");
55076        }
55077        // Verify dimensions
55078        t0 = ain1.getType();
55079        t1 = ain2.getType();
55080        if ((t0.getCount() != t1.getCount()) ||
55081            (t0.getX() != t1.getX()) ||
55082            (t0.getY() != t1.getY()) ||
55083            (t0.getZ() != t1.getZ()) ||
55084            (t0.hasFaces()   != t1.hasFaces()) ||
55085            (t0.hasMipmaps() != t1.hasMipmaps())) {
55086            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55087        }
55088
55089        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55090        aout.setAutoPadding(true);
55091        reduce(mExportReduceIdx_my_MyStruct_uchar2_0, new Allocation[]{ain1, ain2}, aout, sc);
55092        return new result_int(aout);
55093    }
55094
55095    private final static int mExportReduceIdx_my_MyStruct_uchar2_1 = 867;
55096    // ain1 = "/* struct <> */ a"
55097    // ain2 = "uchar2 b"
55098    public result_int reduce_my_MyStruct_uchar2_1(Allocation ain1, Allocation ain2) {
55099        return reduce_my_MyStruct_uchar2_1(ain1, ain2, null);
55100    }
55101
55102    // ain1 = "/* struct <> */ a"
55103    // ain2 = "uchar2 b"
55104    public result_int reduce_my_MyStruct_uchar2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55105        Type t0, t1;
55106        // check ain1
55107        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55108            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55109        }
55110        // check ain2
55111        if (!ain2.getType().getElement().isCompatible(__U8_2)) {
55112            throw new RSRuntimeException("Type mismatch with U8_2!");
55113        }
55114        // Verify dimensions
55115        t0 = ain1.getType();
55116        t1 = ain2.getType();
55117        if ((t0.getCount() != t1.getCount()) ||
55118            (t0.getX() != t1.getX()) ||
55119            (t0.getY() != t1.getY()) ||
55120            (t0.getZ() != t1.getZ()) ||
55121            (t0.hasFaces()   != t1.hasFaces()) ||
55122            (t0.hasMipmaps() != t1.hasMipmaps())) {
55123            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55124        }
55125
55126        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55127        aout.setAutoPadding(true);
55128        reduce(mExportReduceIdx_my_MyStruct_uchar2_1, new Allocation[]{ain1, ain2}, aout, sc);
55129        return new result_int(aout);
55130    }
55131
55132    private final static int mExportReduceIdx_my_MyStruct_uchar4_0 = 868;
55133    // ain1 = "/* struct <> */ a"
55134    // ain2 = "uchar4 b"
55135    public result_int reduce_my_MyStruct_uchar4_0(Allocation ain1, Allocation ain2) {
55136        return reduce_my_MyStruct_uchar4_0(ain1, ain2, null);
55137    }
55138
55139    // ain1 = "/* struct <> */ a"
55140    // ain2 = "uchar4 b"
55141    public result_int reduce_my_MyStruct_uchar4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55142        Type t0, t1;
55143        // check ain1
55144        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55145            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55146        }
55147        // check ain2
55148        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
55149            throw new RSRuntimeException("Type mismatch with U8_4!");
55150        }
55151        // Verify dimensions
55152        t0 = ain1.getType();
55153        t1 = ain2.getType();
55154        if ((t0.getCount() != t1.getCount()) ||
55155            (t0.getX() != t1.getX()) ||
55156            (t0.getY() != t1.getY()) ||
55157            (t0.getZ() != t1.getZ()) ||
55158            (t0.hasFaces()   != t1.hasFaces()) ||
55159            (t0.hasMipmaps() != t1.hasMipmaps())) {
55160            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55161        }
55162
55163        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55164        aout.setAutoPadding(true);
55165        reduce(mExportReduceIdx_my_MyStruct_uchar4_0, new Allocation[]{ain1, ain2}, aout, sc);
55166        return new result_int(aout);
55167    }
55168
55169    private final static int mExportReduceIdx_my_MyStruct_uchar4_1 = 869;
55170    // ain1 = "/* struct <> */ a"
55171    // ain2 = "uchar4 b"
55172    public result_int reduce_my_MyStruct_uchar4_1(Allocation ain1, Allocation ain2) {
55173        return reduce_my_MyStruct_uchar4_1(ain1, ain2, null);
55174    }
55175
55176    // ain1 = "/* struct <> */ a"
55177    // ain2 = "uchar4 b"
55178    public result_int reduce_my_MyStruct_uchar4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55179        Type t0, t1;
55180        // check ain1
55181        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55182            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55183        }
55184        // check ain2
55185        if (!ain2.getType().getElement().isCompatible(__U8_4)) {
55186            throw new RSRuntimeException("Type mismatch with U8_4!");
55187        }
55188        // Verify dimensions
55189        t0 = ain1.getType();
55190        t1 = ain2.getType();
55191        if ((t0.getCount() != t1.getCount()) ||
55192            (t0.getX() != t1.getX()) ||
55193            (t0.getY() != t1.getY()) ||
55194            (t0.getZ() != t1.getZ()) ||
55195            (t0.hasFaces()   != t1.hasFaces()) ||
55196            (t0.hasMipmaps() != t1.hasMipmaps())) {
55197            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55198        }
55199
55200        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55201        aout.setAutoPadding(true);
55202        reduce(mExportReduceIdx_my_MyStruct_uchar4_1, new Allocation[]{ain1, ain2}, aout, sc);
55203        return new result_int(aout);
55204    }
55205
55206    private final static int mExportReduceIdx_my_MyStruct_ushort_0 = 870;
55207    // ain1 = "/* struct <> */ a"
55208    // ain2 = "ushort b"
55209    public result_int reduce_my_MyStruct_ushort_0(Allocation ain1, Allocation ain2) {
55210        return reduce_my_MyStruct_ushort_0(ain1, ain2, null);
55211    }
55212
55213    // ain1 = "/* struct <> */ a"
55214    // ain2 = "ushort b"
55215    public result_int reduce_my_MyStruct_ushort_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55216        Type t0, t1;
55217        // check ain1
55218        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55219            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55220        }
55221        // check ain2
55222        if (!ain2.getType().getElement().isCompatible(__U16)) {
55223            throw new RSRuntimeException("Type mismatch with U16!");
55224        }
55225        // Verify dimensions
55226        t0 = ain1.getType();
55227        t1 = ain2.getType();
55228        if ((t0.getCount() != t1.getCount()) ||
55229            (t0.getX() != t1.getX()) ||
55230            (t0.getY() != t1.getY()) ||
55231            (t0.getZ() != t1.getZ()) ||
55232            (t0.hasFaces()   != t1.hasFaces()) ||
55233            (t0.hasMipmaps() != t1.hasMipmaps())) {
55234            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55235        }
55236
55237        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55238        aout.setAutoPadding(true);
55239        reduce(mExportReduceIdx_my_MyStruct_ushort_0, new Allocation[]{ain1, ain2}, aout, sc);
55240        return new result_int(aout);
55241    }
55242
55243    private final static int mExportReduceIdx_my_MyStruct_ushort_1 = 871;
55244    // ain1 = "/* struct <> */ a"
55245    // ain2 = "ushort b"
55246    public result_int reduce_my_MyStruct_ushort_1(Allocation ain1, Allocation ain2) {
55247        return reduce_my_MyStruct_ushort_1(ain1, ain2, null);
55248    }
55249
55250    // ain1 = "/* struct <> */ a"
55251    // ain2 = "ushort b"
55252    public result_int reduce_my_MyStruct_ushort_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55253        Type t0, t1;
55254        // check ain1
55255        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55256            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55257        }
55258        // check ain2
55259        if (!ain2.getType().getElement().isCompatible(__U16)) {
55260            throw new RSRuntimeException("Type mismatch with U16!");
55261        }
55262        // Verify dimensions
55263        t0 = ain1.getType();
55264        t1 = ain2.getType();
55265        if ((t0.getCount() != t1.getCount()) ||
55266            (t0.getX() != t1.getX()) ||
55267            (t0.getY() != t1.getY()) ||
55268            (t0.getZ() != t1.getZ()) ||
55269            (t0.hasFaces()   != t1.hasFaces()) ||
55270            (t0.hasMipmaps() != t1.hasMipmaps())) {
55271            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55272        }
55273
55274        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55275        aout.setAutoPadding(true);
55276        reduce(mExportReduceIdx_my_MyStruct_ushort_1, new Allocation[]{ain1, ain2}, aout, sc);
55277        return new result_int(aout);
55278    }
55279
55280    private final static int mExportReduceIdx_my_MyStruct_ushort2_0 = 872;
55281    // ain1 = "/* struct <> */ a"
55282    // ain2 = "ushort2 b"
55283    public result_int reduce_my_MyStruct_ushort2_0(Allocation ain1, Allocation ain2) {
55284        return reduce_my_MyStruct_ushort2_0(ain1, ain2, null);
55285    }
55286
55287    // ain1 = "/* struct <> */ a"
55288    // ain2 = "ushort2 b"
55289    public result_int reduce_my_MyStruct_ushort2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55290        Type t0, t1;
55291        // check ain1
55292        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55293            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55294        }
55295        // check ain2
55296        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
55297            throw new RSRuntimeException("Type mismatch with U16_2!");
55298        }
55299        // Verify dimensions
55300        t0 = ain1.getType();
55301        t1 = ain2.getType();
55302        if ((t0.getCount() != t1.getCount()) ||
55303            (t0.getX() != t1.getX()) ||
55304            (t0.getY() != t1.getY()) ||
55305            (t0.getZ() != t1.getZ()) ||
55306            (t0.hasFaces()   != t1.hasFaces()) ||
55307            (t0.hasMipmaps() != t1.hasMipmaps())) {
55308            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55309        }
55310
55311        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55312        aout.setAutoPadding(true);
55313        reduce(mExportReduceIdx_my_MyStruct_ushort2_0, new Allocation[]{ain1, ain2}, aout, sc);
55314        return new result_int(aout);
55315    }
55316
55317    private final static int mExportReduceIdx_my_MyStruct_ushort2_1 = 873;
55318    // ain1 = "/* struct <> */ a"
55319    // ain2 = "ushort2 b"
55320    public result_int reduce_my_MyStruct_ushort2_1(Allocation ain1, Allocation ain2) {
55321        return reduce_my_MyStruct_ushort2_1(ain1, ain2, null);
55322    }
55323
55324    // ain1 = "/* struct <> */ a"
55325    // ain2 = "ushort2 b"
55326    public result_int reduce_my_MyStruct_ushort2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55327        Type t0, t1;
55328        // check ain1
55329        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55330            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55331        }
55332        // check ain2
55333        if (!ain2.getType().getElement().isCompatible(__U16_2)) {
55334            throw new RSRuntimeException("Type mismatch with U16_2!");
55335        }
55336        // Verify dimensions
55337        t0 = ain1.getType();
55338        t1 = ain2.getType();
55339        if ((t0.getCount() != t1.getCount()) ||
55340            (t0.getX() != t1.getX()) ||
55341            (t0.getY() != t1.getY()) ||
55342            (t0.getZ() != t1.getZ()) ||
55343            (t0.hasFaces()   != t1.hasFaces()) ||
55344            (t0.hasMipmaps() != t1.hasMipmaps())) {
55345            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55346        }
55347
55348        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55349        aout.setAutoPadding(true);
55350        reduce(mExportReduceIdx_my_MyStruct_ushort2_1, new Allocation[]{ain1, ain2}, aout, sc);
55351        return new result_int(aout);
55352    }
55353
55354    private final static int mExportReduceIdx_my_MyStruct_ushort4_0 = 874;
55355    // ain1 = "/* struct <> */ a"
55356    // ain2 = "ushort4 b"
55357    public result_int reduce_my_MyStruct_ushort4_0(Allocation ain1, Allocation ain2) {
55358        return reduce_my_MyStruct_ushort4_0(ain1, ain2, null);
55359    }
55360
55361    // ain1 = "/* struct <> */ a"
55362    // ain2 = "ushort4 b"
55363    public result_int reduce_my_MyStruct_ushort4_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55364        Type t0, t1;
55365        // check ain1
55366        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55367            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55368        }
55369        // check ain2
55370        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
55371            throw new RSRuntimeException("Type mismatch with U16_4!");
55372        }
55373        // Verify dimensions
55374        t0 = ain1.getType();
55375        t1 = ain2.getType();
55376        if ((t0.getCount() != t1.getCount()) ||
55377            (t0.getX() != t1.getX()) ||
55378            (t0.getY() != t1.getY()) ||
55379            (t0.getZ() != t1.getZ()) ||
55380            (t0.hasFaces()   != t1.hasFaces()) ||
55381            (t0.hasMipmaps() != t1.hasMipmaps())) {
55382            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55383        }
55384
55385        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55386        aout.setAutoPadding(true);
55387        reduce(mExportReduceIdx_my_MyStruct_ushort4_0, new Allocation[]{ain1, ain2}, aout, sc);
55388        return new result_int(aout);
55389    }
55390
55391    private final static int mExportReduceIdx_my_MyStruct_ushort4_1 = 875;
55392    // ain1 = "/* struct <> */ a"
55393    // ain2 = "ushort4 b"
55394    public result_int reduce_my_MyStruct_ushort4_1(Allocation ain1, Allocation ain2) {
55395        return reduce_my_MyStruct_ushort4_1(ain1, ain2, null);
55396    }
55397
55398    // ain1 = "/* struct <> */ a"
55399    // ain2 = "ushort4 b"
55400    public result_int reduce_my_MyStruct_ushort4_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55401        Type t0, t1;
55402        // check ain1
55403        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55404            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55405        }
55406        // check ain2
55407        if (!ain2.getType().getElement().isCompatible(__U16_4)) {
55408            throw new RSRuntimeException("Type mismatch with U16_4!");
55409        }
55410        // Verify dimensions
55411        t0 = ain1.getType();
55412        t1 = ain2.getType();
55413        if ((t0.getCount() != t1.getCount()) ||
55414            (t0.getX() != t1.getX()) ||
55415            (t0.getY() != t1.getY()) ||
55416            (t0.getZ() != t1.getZ()) ||
55417            (t0.hasFaces()   != t1.hasFaces()) ||
55418            (t0.hasMipmaps() != t1.hasMipmaps())) {
55419            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55420        }
55421
55422        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55423        aout.setAutoPadding(true);
55424        reduce(mExportReduceIdx_my_MyStruct_ushort4_1, new Allocation[]{ain1, ain2}, aout, sc);
55425        return new result_int(aout);
55426    }
55427
55428    private final static int mExportReduceIdx_my_MyStruct_bool_0 = 876;
55429    // ain1 = "/* struct <> */ a"
55430    // ain2 = "bool b"
55431    public result_int reduce_my_MyStruct_bool_0(Allocation ain1, Allocation ain2) {
55432        return reduce_my_MyStruct_bool_0(ain1, ain2, null);
55433    }
55434
55435    // ain1 = "/* struct <> */ a"
55436    // ain2 = "bool b"
55437    public result_int reduce_my_MyStruct_bool_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55438        Type t0, t1;
55439        // check ain1
55440        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55441            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55442        }
55443        // check ain2
55444        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
55445            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
55446        }
55447        // Verify dimensions
55448        t0 = ain1.getType();
55449        t1 = ain2.getType();
55450        if ((t0.getCount() != t1.getCount()) ||
55451            (t0.getX() != t1.getX()) ||
55452            (t0.getY() != t1.getY()) ||
55453            (t0.getZ() != t1.getZ()) ||
55454            (t0.hasFaces()   != t1.hasFaces()) ||
55455            (t0.hasMipmaps() != t1.hasMipmaps())) {
55456            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55457        }
55458
55459        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55460        aout.setAutoPadding(true);
55461        reduce(mExportReduceIdx_my_MyStruct_bool_0, new Allocation[]{ain1, ain2}, aout, sc);
55462        return new result_int(aout);
55463    }
55464
55465    private final static int mExportReduceIdx_my_MyStruct_bool_1 = 877;
55466    // ain1 = "/* struct <> */ a"
55467    // ain2 = "bool b"
55468    public result_int reduce_my_MyStruct_bool_1(Allocation ain1, Allocation ain2) {
55469        return reduce_my_MyStruct_bool_1(ain1, ain2, null);
55470    }
55471
55472    // ain1 = "/* struct <> */ a"
55473    // ain2 = "bool b"
55474    public result_int reduce_my_MyStruct_bool_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55475        Type t0, t1;
55476        // check ain1
55477        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55478            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55479        }
55480        // check ain2
55481        if (!ain2.getType().getElement().isCompatible(__BOOLEAN)) {
55482            throw new RSRuntimeException("Type mismatch with BOOLEAN!");
55483        }
55484        // Verify dimensions
55485        t0 = ain1.getType();
55486        t1 = ain2.getType();
55487        if ((t0.getCount() != t1.getCount()) ||
55488            (t0.getX() != t1.getX()) ||
55489            (t0.getY() != t1.getY()) ||
55490            (t0.getZ() != t1.getZ()) ||
55491            (t0.hasFaces()   != t1.hasFaces()) ||
55492            (t0.hasMipmaps() != t1.hasMipmaps())) {
55493            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55494        }
55495
55496        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55497        aout.setAutoPadding(true);
55498        reduce(mExportReduceIdx_my_MyStruct_bool_1, new Allocation[]{ain1, ain2}, aout, sc);
55499        return new result_int(aout);
55500    }
55501
55502    private final static int mExportReduceIdx_my_MyStruct_rs_matrix2x2_0 = 878;
55503    // ain1 = "/* struct <> */ a"
55504    // ain2 = "rs_matrix2x2 b"
55505    public result_int reduce_my_MyStruct_rs_matrix2x2_0(Allocation ain1, Allocation ain2) {
55506        return reduce_my_MyStruct_rs_matrix2x2_0(ain1, ain2, null);
55507    }
55508
55509    // ain1 = "/* struct <> */ a"
55510    // ain2 = "rs_matrix2x2 b"
55511    public result_int reduce_my_MyStruct_rs_matrix2x2_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55512        Type t0, t1;
55513        // check ain1
55514        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55515            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55516        }
55517        // check ain2
55518        // Verify dimensions
55519        t0 = ain1.getType();
55520        t1 = ain2.getType();
55521        if ((t0.getCount() != t1.getCount()) ||
55522            (t0.getX() != t1.getX()) ||
55523            (t0.getY() != t1.getY()) ||
55524            (t0.getZ() != t1.getZ()) ||
55525            (t0.hasFaces()   != t1.hasFaces()) ||
55526            (t0.hasMipmaps() != t1.hasMipmaps())) {
55527            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55528        }
55529
55530        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55531        aout.setAutoPadding(true);
55532        reduce(mExportReduceIdx_my_MyStruct_rs_matrix2x2_0, new Allocation[]{ain1, ain2}, aout, sc);
55533        return new result_int(aout);
55534    }
55535
55536    private final static int mExportReduceIdx_my_MyStruct_rs_matrix2x2_1 = 879;
55537    // ain1 = "/* struct <> */ a"
55538    // ain2 = "rs_matrix2x2 b"
55539    public result_int reduce_my_MyStruct_rs_matrix2x2_1(Allocation ain1, Allocation ain2) {
55540        return reduce_my_MyStruct_rs_matrix2x2_1(ain1, ain2, null);
55541    }
55542
55543    // ain1 = "/* struct <> */ a"
55544    // ain2 = "rs_matrix2x2 b"
55545    public result_int reduce_my_MyStruct_rs_matrix2x2_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55546        Type t0, t1;
55547        // check ain1
55548        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55549            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55550        }
55551        // check ain2
55552        // Verify dimensions
55553        t0 = ain1.getType();
55554        t1 = ain2.getType();
55555        if ((t0.getCount() != t1.getCount()) ||
55556            (t0.getX() != t1.getX()) ||
55557            (t0.getY() != t1.getY()) ||
55558            (t0.getZ() != t1.getZ()) ||
55559            (t0.hasFaces()   != t1.hasFaces()) ||
55560            (t0.hasMipmaps() != t1.hasMipmaps())) {
55561            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55562        }
55563
55564        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55565        aout.setAutoPadding(true);
55566        reduce(mExportReduceIdx_my_MyStruct_rs_matrix2x2_1, new Allocation[]{ain1, ain2}, aout, sc);
55567        return new result_int(aout);
55568    }
55569
55570    private final static int mExportReduceIdx_my_MyStruct_MyStruct_0 = 880;
55571    // ain1 = "/* struct <> */ a"
55572    // ain2 = "/* struct <> */ b"
55573    public result_int reduce_my_MyStruct_MyStruct_0(Allocation ain1, Allocation ain2) {
55574        return reduce_my_MyStruct_MyStruct_0(ain1, ain2, null);
55575    }
55576
55577    // ain1 = "/* struct <> */ a"
55578    // ain2 = "/* struct <> */ b"
55579    public result_int reduce_my_MyStruct_MyStruct_0(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55580        Type t0, t1;
55581        // check ain1
55582        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55583            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55584        }
55585        // check ain2
55586        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55587            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55588        }
55589        // Verify dimensions
55590        t0 = ain1.getType();
55591        t1 = ain2.getType();
55592        if ((t0.getCount() != t1.getCount()) ||
55593            (t0.getX() != t1.getX()) ||
55594            (t0.getY() != t1.getY()) ||
55595            (t0.getZ() != t1.getZ()) ||
55596            (t0.hasFaces()   != t1.hasFaces()) ||
55597            (t0.hasMipmaps() != t1.hasMipmaps())) {
55598            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55599        }
55600
55601        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55602        aout.setAutoPadding(true);
55603        reduce(mExportReduceIdx_my_MyStruct_MyStruct_0, new Allocation[]{ain1, ain2}, aout, sc);
55604        return new result_int(aout);
55605    }
55606
55607    private final static int mExportReduceIdx_my_MyStruct_MyStruct_1 = 881;
55608    // ain1 = "/* struct <> */ a"
55609    // ain2 = "/* struct <> */ b"
55610    public result_int reduce_my_MyStruct_MyStruct_1(Allocation ain1, Allocation ain2) {
55611        return reduce_my_MyStruct_MyStruct_1(ain1, ain2, null);
55612    }
55613
55614    // ain1 = "/* struct <> */ a"
55615    // ain2 = "/* struct <> */ b"
55616    public result_int reduce_my_MyStruct_MyStruct_1(Allocation ain1, Allocation ain2, Script.LaunchOptions sc) {
55617        Type t0, t1;
55618        // check ain1
55619        if (!ain1.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55620            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55621        }
55622        // check ain2
55623        if (!ain2.getType().getElement().isCompatible(__ScriptField_MyStruct)) {
55624            throw new RSRuntimeException("Type mismatch with ScriptField_MyStruct!");
55625        }
55626        // Verify dimensions
55627        t0 = ain1.getType();
55628        t1 = ain2.getType();
55629        if ((t0.getCount() != t1.getCount()) ||
55630            (t0.getX() != t1.getX()) ||
55631            (t0.getY() != t1.getY()) ||
55632            (t0.getZ() != t1.getZ()) ||
55633            (t0.hasFaces()   != t1.hasFaces()) ||
55634            (t0.hasMipmaps() != t1.hasMipmaps())) {
55635            throw new RSRuntimeException("Dimension mismatch between parameters ain1 and ain2!");
55636        }
55637
55638        Allocation aout = Allocation.createSized(mRSLocal, __I32, 1);
55639        aout.setAutoPadding(true);
55640        reduce(mExportReduceIdx_my_MyStruct_MyStruct_1, new Allocation[]{ain1, ain2}, aout, sc);
55641        return new result_int(aout);
55642    }
55643
55644}
55645
55646