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_result.rs 20 */ 21 22 package result; 23 24 import android.os.Build; 25 import android.os.Process; 26 import java.lang.reflect.Field; 27 import android.renderscript.*; 28 import result.reduce_general_resultBitCode; 29 30 /** 31 * @hide 32 */ 33 public class ScriptC_reduce_general_result extends ScriptC { 34 private static final String __rs_resource_name = "reduce_general_result"; 35 // Constructor 36 public ScriptC_reduce_general_result(RenderScript rs) { 37 super(rs, 38 __rs_resource_name, 39 reduce_general_resultBitCode.getBitCode32(), 40 reduce_general_resultBitCode.getBitCode64()); 41 mRSLocal = rs; 42 __F16 = Element.F16(rs); 43 __F16_2 = Element.F16_2(rs); 44 __F16_4 = Element.F16_4(rs); 45 __F32 = Element.F32(rs); 46 __F32_2 = Element.F32_2(rs); 47 __F32_4 = Element.F32_4(rs); 48 __F64 = Element.F64(rs); 49 __F64_2 = Element.F64_2(rs); 50 __F64_4 = Element.F64_4(rs); 51 __I8 = Element.I8(rs); 52 __I8_2 = Element.I8_2(rs); 53 __I8_4 = Element.I8_4(rs); 54 __I16 = Element.I16(rs); 55 __I16_2 = Element.I16_2(rs); 56 __I16_4 = Element.I16_4(rs); 57 __I32 = Element.I32(rs); 58 __I32_2 = Element.I32_2(rs); 59 __I32_4 = Element.I32_4(rs); 60 __I64 = Element.I64(rs); 61 __I64_2 = Element.I64_2(rs); 62 __I64_4 = Element.I64_4(rs); 63 __U8 = Element.U8(rs); 64 __U8_2 = Element.U8_2(rs); 65 __U8_4 = Element.U8_4(rs); 66 __U16 = Element.U16(rs); 67 __U16_2 = Element.U16_2(rs); 68 __U16_4 = Element.U16_4(rs); 69 __U32 = Element.U32(rs); 70 __U32_2 = Element.U32_2(rs); 71 __U32_4 = Element.U32_4(rs); 72 __U64 = Element.U64(rs); 73 __U64_2 = Element.U64_2(rs); 74 __U64_4 = Element.U64_4(rs); 75 __BOOLEAN = Element.BOOLEAN(rs); 76 } 77 78 private Element __BOOLEAN; 79 private Element __F16; 80 private Element __F16_2; 81 private Element __F16_4; 82 private Element __F32; 83 private Element __F32_2; 84 private Element __F32_4; 85 private Element __F64; 86 private Element __F64_2; 87 private Element __F64_4; 88 private Element __I16; 89 private Element __I16_2; 90 private Element __I16_4; 91 private Element __I32; 92 private Element __I32_2; 93 private Element __I32_4; 94 private Element __I64; 95 private Element __I64_2; 96 private Element __I64_4; 97 private Element __I8; 98 private Element __I8_2; 99 private Element __I8_4; 100 private Element __U16; 101 private Element __U16_2; 102 private Element __U16_4; 103 private Element __U32; 104 private Element __U32_2; 105 private Element __U32_4; 106 private Element __U64; 107 private Element __U64_2; 108 private Element __U64_4; 109 private Element __U8; 110 private Element __U8_2; 111 private Element __U8_4; 112 private RenderScript mRSLocal; 113 // To obtain the result, invoke get(), which blocks 114 // until the asynchronously-launched operation has completed. 115 public static class resultArray7_bool { 116 public boolean[] get() { 117 if (!mGotResult) { 118 byte[] outArray = new byte[7]; 119 mOut.copyTo(outArray); 120 boolean[] result = new boolean[7]; 121 for (int Idx = 0; Idx < 7; ++Idx) { 122 result[Idx] = outArray[Idx] != 0; 123 } 124 125 mResult = result; 126 mOut.destroy(); 127 mOut = null; // make Java object eligible for garbage collection 128 if (mTempIns != null) { 129 for (Allocation tempIn : mTempIns) { 130 tempIn.destroy(); 131 } 132 133 mTempIns = null; // make Java objects eligible for garbage collection 134 } 135 136 mGotResult = true; 137 } 138 139 return mResult; 140 } 141 142 private resultArray7_bool(Allocation out) { 143 mTempIns = null; 144 mOut = out; 145 mGotResult = false; 146 } 147 148 private Allocation[] mTempIns; 149 private Allocation mOut; 150 private boolean mGotResult; 151 private boolean[] mResult; 152 } 153 154 // To obtain the result, invoke get(), which blocks 155 // until the asynchronously-launched operation has completed. 156 public static class resultArray7_char { 157 public byte[] get() { 158 if (!mGotResult) { 159 byte[] outArray = new byte[7]; 160 mOut.copyTo(outArray); 161 mResult = outArray; 162 mOut.destroy(); 163 mOut = null; // make Java object eligible for garbage collection 164 if (mTempIns != null) { 165 for (Allocation tempIn : mTempIns) { 166 tempIn.destroy(); 167 } 168 169 mTempIns = null; // make Java objects eligible for garbage collection 170 } 171 172 mGotResult = true; 173 } 174 175 return mResult; 176 } 177 178 private resultArray7_char(Allocation out) { 179 mTempIns = null; 180 mOut = out; 181 mGotResult = false; 182 } 183 184 private Allocation[] mTempIns; 185 private Allocation mOut; 186 private boolean mGotResult; 187 private byte[] mResult; 188 } 189 190 // To obtain the result, invoke get(), which blocks 191 // until the asynchronously-launched operation has completed. 192 public static class resultArray7_char2 { 193 public Byte2[] get() { 194 if (!mGotResult) { 195 byte[] outArray = new byte[14]; 196 mOut.copyTo(outArray); 197 Byte2[] result = new Byte2[7]; 198 for (int Idx = 0; Idx < 7; ++Idx) { 199 result[Idx] = new Byte2(outArray[2*Idx+0], outArray[2*Idx+1]); 200 } 201 202 mResult = result; 203 mOut.destroy(); 204 mOut = null; // make Java object eligible for garbage collection 205 if (mTempIns != null) { 206 for (Allocation tempIn : mTempIns) { 207 tempIn.destroy(); 208 } 209 210 mTempIns = null; // make Java objects eligible for garbage collection 211 } 212 213 mGotResult = true; 214 } 215 216 return mResult; 217 } 218 219 private resultArray7_char2(Allocation out) { 220 mTempIns = null; 221 mOut = out; 222 mGotResult = false; 223 } 224 225 private Allocation[] mTempIns; 226 private Allocation mOut; 227 private boolean mGotResult; 228 private Byte2[] mResult; 229 } 230 231 // To obtain the result, invoke get(), which blocks 232 // until the asynchronously-launched operation has completed. 233 public static class resultArray7_char4 { 234 public Byte4[] get() { 235 if (!mGotResult) { 236 byte[] outArray = new byte[28]; 237 mOut.copyTo(outArray); 238 Byte4[] result = new Byte4[7]; 239 for (int Idx = 0; Idx < 7; ++Idx) { 240 result[Idx] = new Byte4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); 241 } 242 243 mResult = result; 244 mOut.destroy(); 245 mOut = null; // make Java object eligible for garbage collection 246 if (mTempIns != null) { 247 for (Allocation tempIn : mTempIns) { 248 tempIn.destroy(); 249 } 250 251 mTempIns = null; // make Java objects eligible for garbage collection 252 } 253 254 mGotResult = true; 255 } 256 257 return mResult; 258 } 259 260 private resultArray7_char4(Allocation out) { 261 mTempIns = null; 262 mOut = out; 263 mGotResult = false; 264 } 265 266 private Allocation[] mTempIns; 267 private Allocation mOut; 268 private boolean mGotResult; 269 private Byte4[] mResult; 270 } 271 272 // To obtain the result, invoke get(), which blocks 273 // until the asynchronously-launched operation has completed. 274 public static class resultArray7_double { 275 public double[] get() { 276 if (!mGotResult) { 277 double[] outArray = new double[7]; 278 mOut.copyTo(outArray); 279 mResult = outArray; 280 mOut.destroy(); 281 mOut = null; // make Java object eligible for garbage collection 282 if (mTempIns != null) { 283 for (Allocation tempIn : mTempIns) { 284 tempIn.destroy(); 285 } 286 287 mTempIns = null; // make Java objects eligible for garbage collection 288 } 289 290 mGotResult = true; 291 } 292 293 return mResult; 294 } 295 296 private resultArray7_double(Allocation out) { 297 mTempIns = null; 298 mOut = out; 299 mGotResult = false; 300 } 301 302 private Allocation[] mTempIns; 303 private Allocation mOut; 304 private boolean mGotResult; 305 private double[] mResult; 306 } 307 308 // To obtain the result, invoke get(), which blocks 309 // until the asynchronously-launched operation has completed. 310 public static class resultArray7_double2 { 311 public Double2[] get() { 312 if (!mGotResult) { 313 double[] outArray = new double[14]; 314 mOut.copyTo(outArray); 315 Double2[] result = new Double2[7]; 316 for (int Idx = 0; Idx < 7; ++Idx) { 317 result[Idx] = new Double2(outArray[2*Idx+0], outArray[2*Idx+1]); 318 } 319 320 mResult = result; 321 mOut.destroy(); 322 mOut = null; // make Java object eligible for garbage collection 323 if (mTempIns != null) { 324 for (Allocation tempIn : mTempIns) { 325 tempIn.destroy(); 326 } 327 328 mTempIns = null; // make Java objects eligible for garbage collection 329 } 330 331 mGotResult = true; 332 } 333 334 return mResult; 335 } 336 337 private resultArray7_double2(Allocation out) { 338 mTempIns = null; 339 mOut = out; 340 mGotResult = false; 341 } 342 343 private Allocation[] mTempIns; 344 private Allocation mOut; 345 private boolean mGotResult; 346 private Double2[] mResult; 347 } 348 349 // To obtain the result, invoke get(), which blocks 350 // until the asynchronously-launched operation has completed. 351 public static class resultArray7_double4 { 352 public Double4[] get() { 353 if (!mGotResult) { 354 double[] outArray = new double[28]; 355 mOut.copyTo(outArray); 356 Double4[] result = new Double4[7]; 357 for (int Idx = 0; Idx < 7; ++Idx) { 358 result[Idx] = new Double4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); 359 } 360 361 mResult = result; 362 mOut.destroy(); 363 mOut = null; // make Java object eligible for garbage collection 364 if (mTempIns != null) { 365 for (Allocation tempIn : mTempIns) { 366 tempIn.destroy(); 367 } 368 369 mTempIns = null; // make Java objects eligible for garbage collection 370 } 371 372 mGotResult = true; 373 } 374 375 return mResult; 376 } 377 378 private resultArray7_double4(Allocation out) { 379 mTempIns = null; 380 mOut = out; 381 mGotResult = false; 382 } 383 384 private Allocation[] mTempIns; 385 private Allocation mOut; 386 private boolean mGotResult; 387 private Double4[] mResult; 388 } 389 390 // To obtain the result, invoke get(), which blocks 391 // until the asynchronously-launched operation has completed. 392 public static class resultArray7_float { 393 public float[] get() { 394 if (!mGotResult) { 395 float[] outArray = new float[7]; 396 mOut.copyTo(outArray); 397 mResult = outArray; 398 mOut.destroy(); 399 mOut = null; // make Java object eligible for garbage collection 400 if (mTempIns != null) { 401 for (Allocation tempIn : mTempIns) { 402 tempIn.destroy(); 403 } 404 405 mTempIns = null; // make Java objects eligible for garbage collection 406 } 407 408 mGotResult = true; 409 } 410 411 return mResult; 412 } 413 414 private resultArray7_float(Allocation out) { 415 mTempIns = null; 416 mOut = out; 417 mGotResult = false; 418 } 419 420 private Allocation[] mTempIns; 421 private Allocation mOut; 422 private boolean mGotResult; 423 private float[] mResult; 424 } 425 426 // To obtain the result, invoke get(), which blocks 427 // until the asynchronously-launched operation has completed. 428 public static class resultArray7_float2 { 429 public Float2[] get() { 430 if (!mGotResult) { 431 float[] outArray = new float[14]; 432 mOut.copyTo(outArray); 433 Float2[] result = new Float2[7]; 434 for (int Idx = 0; Idx < 7; ++Idx) { 435 result[Idx] = new Float2(outArray[2*Idx+0], outArray[2*Idx+1]); 436 } 437 438 mResult = result; 439 mOut.destroy(); 440 mOut = null; // make Java object eligible for garbage collection 441 if (mTempIns != null) { 442 for (Allocation tempIn : mTempIns) { 443 tempIn.destroy(); 444 } 445 446 mTempIns = null; // make Java objects eligible for garbage collection 447 } 448 449 mGotResult = true; 450 } 451 452 return mResult; 453 } 454 455 private resultArray7_float2(Allocation out) { 456 mTempIns = null; 457 mOut = out; 458 mGotResult = false; 459 } 460 461 private Allocation[] mTempIns; 462 private Allocation mOut; 463 private boolean mGotResult; 464 private Float2[] mResult; 465 } 466 467 // To obtain the result, invoke get(), which blocks 468 // until the asynchronously-launched operation has completed. 469 public static class resultArray7_float4 { 470 public Float4[] get() { 471 if (!mGotResult) { 472 float[] outArray = new float[28]; 473 mOut.copyTo(outArray); 474 Float4[] result = new Float4[7]; 475 for (int Idx = 0; Idx < 7; ++Idx) { 476 result[Idx] = new Float4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); 477 } 478 479 mResult = result; 480 mOut.destroy(); 481 mOut = null; // make Java object eligible for garbage collection 482 if (mTempIns != null) { 483 for (Allocation tempIn : mTempIns) { 484 tempIn.destroy(); 485 } 486 487 mTempIns = null; // make Java objects eligible for garbage collection 488 } 489 490 mGotResult = true; 491 } 492 493 return mResult; 494 } 495 496 private resultArray7_float4(Allocation out) { 497 mTempIns = null; 498 mOut = out; 499 mGotResult = false; 500 } 501 502 private Allocation[] mTempIns; 503 private Allocation mOut; 504 private boolean mGotResult; 505 private Float4[] mResult; 506 } 507 508 // To obtain the result, invoke get(), which blocks 509 // until the asynchronously-launched operation has completed. 510 public static class resultArray7_half { 511 public short[] get() { 512 if (!mGotResult) { 513 short[] outArray = new short[7]; 514 mOut.copyTo(outArray); 515 mResult = outArray; 516 mOut.destroy(); 517 mOut = null; // make Java object eligible for garbage collection 518 if (mTempIns != null) { 519 for (Allocation tempIn : mTempIns) { 520 tempIn.destroy(); 521 } 522 523 mTempIns = null; // make Java objects eligible for garbage collection 524 } 525 526 mGotResult = true; 527 } 528 529 return mResult; 530 } 531 532 private resultArray7_half(Allocation out) { 533 mTempIns = null; 534 mOut = out; 535 mGotResult = false; 536 } 537 538 private Allocation[] mTempIns; 539 private Allocation mOut; 540 private boolean mGotResult; 541 private short[] mResult; 542 } 543 544 // To obtain the result, invoke get(), which blocks 545 // until the asynchronously-launched operation has completed. 546 public static class resultArray7_half2 { 547 public Short2[] get() { 548 if (!mGotResult) { 549 short[] outArray = new short[14]; 550 mOut.copyTo(outArray); 551 Short2[] result = new Short2[7]; 552 for (int Idx = 0; Idx < 7; ++Idx) { 553 result[Idx] = new Short2(outArray[2*Idx+0], outArray[2*Idx+1]); 554 } 555 556 mResult = result; 557 mOut.destroy(); 558 mOut = null; // make Java object eligible for garbage collection 559 if (mTempIns != null) { 560 for (Allocation tempIn : mTempIns) { 561 tempIn.destroy(); 562 } 563 564 mTempIns = null; // make Java objects eligible for garbage collection 565 } 566 567 mGotResult = true; 568 } 569 570 return mResult; 571 } 572 573 private resultArray7_half2(Allocation out) { 574 mTempIns = null; 575 mOut = out; 576 mGotResult = false; 577 } 578 579 private Allocation[] mTempIns; 580 private Allocation mOut; 581 private boolean mGotResult; 582 private Short2[] mResult; 583 } 584 585 // To obtain the result, invoke get(), which blocks 586 // until the asynchronously-launched operation has completed. 587 public static class resultArray7_half4 { 588 public Short4[] get() { 589 if (!mGotResult) { 590 short[] outArray = new short[28]; 591 mOut.copyTo(outArray); 592 Short4[] result = new Short4[7]; 593 for (int Idx = 0; Idx < 7; ++Idx) { 594 result[Idx] = new Short4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); 595 } 596 597 mResult = result; 598 mOut.destroy(); 599 mOut = null; // make Java object eligible for garbage collection 600 if (mTempIns != null) { 601 for (Allocation tempIn : mTempIns) { 602 tempIn.destroy(); 603 } 604 605 mTempIns = null; // make Java objects eligible for garbage collection 606 } 607 608 mGotResult = true; 609 } 610 611 return mResult; 612 } 613 614 private resultArray7_half4(Allocation out) { 615 mTempIns = null; 616 mOut = out; 617 mGotResult = false; 618 } 619 620 private Allocation[] mTempIns; 621 private Allocation mOut; 622 private boolean mGotResult; 623 private Short4[] mResult; 624 } 625 626 // To obtain the result, invoke get(), which blocks 627 // until the asynchronously-launched operation has completed. 628 public static class resultArray7_int { 629 public int[] get() { 630 if (!mGotResult) { 631 int[] outArray = new int[7]; 632 mOut.copyTo(outArray); 633 mResult = outArray; 634 mOut.destroy(); 635 mOut = null; // make Java object eligible for garbage collection 636 if (mTempIns != null) { 637 for (Allocation tempIn : mTempIns) { 638 tempIn.destroy(); 639 } 640 641 mTempIns = null; // make Java objects eligible for garbage collection 642 } 643 644 mGotResult = true; 645 } 646 647 return mResult; 648 } 649 650 private resultArray7_int(Allocation out) { 651 mTempIns = null; 652 mOut = out; 653 mGotResult = false; 654 } 655 656 private Allocation[] mTempIns; 657 private Allocation mOut; 658 private boolean mGotResult; 659 private int[] mResult; 660 } 661 662 // To obtain the result, invoke get(), which blocks 663 // until the asynchronously-launched operation has completed. 664 public static class resultArray7_int2 { 665 public Int2[] get() { 666 if (!mGotResult) { 667 int[] outArray = new int[14]; 668 mOut.copyTo(outArray); 669 Int2[] result = new Int2[7]; 670 for (int Idx = 0; Idx < 7; ++Idx) { 671 result[Idx] = new Int2(outArray[2*Idx+0], outArray[2*Idx+1]); 672 } 673 674 mResult = result; 675 mOut.destroy(); 676 mOut = null; // make Java object eligible for garbage collection 677 if (mTempIns != null) { 678 for (Allocation tempIn : mTempIns) { 679 tempIn.destroy(); 680 } 681 682 mTempIns = null; // make Java objects eligible for garbage collection 683 } 684 685 mGotResult = true; 686 } 687 688 return mResult; 689 } 690 691 private resultArray7_int2(Allocation out) { 692 mTempIns = null; 693 mOut = out; 694 mGotResult = false; 695 } 696 697 private Allocation[] mTempIns; 698 private Allocation mOut; 699 private boolean mGotResult; 700 private Int2[] mResult; 701 } 702 703 // To obtain the result, invoke get(), which blocks 704 // until the asynchronously-launched operation has completed. 705 public static class resultArray7_int4 { 706 public Int4[] get() { 707 if (!mGotResult) { 708 int[] outArray = new int[28]; 709 mOut.copyTo(outArray); 710 Int4[] result = new Int4[7]; 711 for (int Idx = 0; Idx < 7; ++Idx) { 712 result[Idx] = new Int4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); 713 } 714 715 mResult = result; 716 mOut.destroy(); 717 mOut = null; // make Java object eligible for garbage collection 718 if (mTempIns != null) { 719 for (Allocation tempIn : mTempIns) { 720 tempIn.destroy(); 721 } 722 723 mTempIns = null; // make Java objects eligible for garbage collection 724 } 725 726 mGotResult = true; 727 } 728 729 return mResult; 730 } 731 732 private resultArray7_int4(Allocation out) { 733 mTempIns = null; 734 mOut = out; 735 mGotResult = false; 736 } 737 738 private Allocation[] mTempIns; 739 private Allocation mOut; 740 private boolean mGotResult; 741 private Int4[] mResult; 742 } 743 744 // To obtain the result, invoke get(), which blocks 745 // until the asynchronously-launched operation has completed. 746 public static class resultArray7_long { 747 public long[] get() { 748 if (!mGotResult) { 749 long[] outArray = new long[7]; 750 mOut.copyTo(outArray); 751 mResult = outArray; 752 mOut.destroy(); 753 mOut = null; // make Java object eligible for garbage collection 754 if (mTempIns != null) { 755 for (Allocation tempIn : mTempIns) { 756 tempIn.destroy(); 757 } 758 759 mTempIns = null; // make Java objects eligible for garbage collection 760 } 761 762 mGotResult = true; 763 } 764 765 return mResult; 766 } 767 768 private resultArray7_long(Allocation out) { 769 mTempIns = null; 770 mOut = out; 771 mGotResult = false; 772 } 773 774 private Allocation[] mTempIns; 775 private Allocation mOut; 776 private boolean mGotResult; 777 private long[] mResult; 778 } 779 780 // To obtain the result, invoke get(), which blocks 781 // until the asynchronously-launched operation has completed. 782 public static class resultArray7_long2 { 783 public Long2[] get() { 784 if (!mGotResult) { 785 long[] outArray = new long[14]; 786 mOut.copyTo(outArray); 787 Long2[] result = new Long2[7]; 788 for (int Idx = 0; Idx < 7; ++Idx) { 789 result[Idx] = new Long2(outArray[2*Idx+0], outArray[2*Idx+1]); 790 } 791 792 mResult = result; 793 mOut.destroy(); 794 mOut = null; // make Java object eligible for garbage collection 795 if (mTempIns != null) { 796 for (Allocation tempIn : mTempIns) { 797 tempIn.destroy(); 798 } 799 800 mTempIns = null; // make Java objects eligible for garbage collection 801 } 802 803 mGotResult = true; 804 } 805 806 return mResult; 807 } 808 809 private resultArray7_long2(Allocation out) { 810 mTempIns = null; 811 mOut = out; 812 mGotResult = false; 813 } 814 815 private Allocation[] mTempIns; 816 private Allocation mOut; 817 private boolean mGotResult; 818 private Long2[] mResult; 819 } 820 821 // To obtain the result, invoke get(), which blocks 822 // until the asynchronously-launched operation has completed. 823 public static class resultArray7_long4 { 824 public Long4[] get() { 825 if (!mGotResult) { 826 long[] outArray = new long[28]; 827 mOut.copyTo(outArray); 828 Long4[] result = new Long4[7]; 829 for (int Idx = 0; Idx < 7; ++Idx) { 830 result[Idx] = new Long4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); 831 } 832 833 mResult = result; 834 mOut.destroy(); 835 mOut = null; // make Java object eligible for garbage collection 836 if (mTempIns != null) { 837 for (Allocation tempIn : mTempIns) { 838 tempIn.destroy(); 839 } 840 841 mTempIns = null; // make Java objects eligible for garbage collection 842 } 843 844 mGotResult = true; 845 } 846 847 return mResult; 848 } 849 850 private resultArray7_long4(Allocation out) { 851 mTempIns = null; 852 mOut = out; 853 mGotResult = false; 854 } 855 856 private Allocation[] mTempIns; 857 private Allocation mOut; 858 private boolean mGotResult; 859 private Long4[] mResult; 860 } 861 862 // To obtain the result, invoke get(), which blocks 863 // until the asynchronously-launched operation has completed. 864 public static class resultArray7_short { 865 public short[] get() { 866 if (!mGotResult) { 867 short[] outArray = new short[7]; 868 mOut.copyTo(outArray); 869 mResult = outArray; 870 mOut.destroy(); 871 mOut = null; // make Java object eligible for garbage collection 872 if (mTempIns != null) { 873 for (Allocation tempIn : mTempIns) { 874 tempIn.destroy(); 875 } 876 877 mTempIns = null; // make Java objects eligible for garbage collection 878 } 879 880 mGotResult = true; 881 } 882 883 return mResult; 884 } 885 886 private resultArray7_short(Allocation out) { 887 mTempIns = null; 888 mOut = out; 889 mGotResult = false; 890 } 891 892 private Allocation[] mTempIns; 893 private Allocation mOut; 894 private boolean mGotResult; 895 private short[] mResult; 896 } 897 898 // To obtain the result, invoke get(), which blocks 899 // until the asynchronously-launched operation has completed. 900 public static class resultArray7_short2 { 901 public Short2[] get() { 902 if (!mGotResult) { 903 short[] outArray = new short[14]; 904 mOut.copyTo(outArray); 905 Short2[] result = new Short2[7]; 906 for (int Idx = 0; Idx < 7; ++Idx) { 907 result[Idx] = new Short2(outArray[2*Idx+0], outArray[2*Idx+1]); 908 } 909 910 mResult = result; 911 mOut.destroy(); 912 mOut = null; // make Java object eligible for garbage collection 913 if (mTempIns != null) { 914 for (Allocation tempIn : mTempIns) { 915 tempIn.destroy(); 916 } 917 918 mTempIns = null; // make Java objects eligible for garbage collection 919 } 920 921 mGotResult = true; 922 } 923 924 return mResult; 925 } 926 927 private resultArray7_short2(Allocation out) { 928 mTempIns = null; 929 mOut = out; 930 mGotResult = false; 931 } 932 933 private Allocation[] mTempIns; 934 private Allocation mOut; 935 private boolean mGotResult; 936 private Short2[] mResult; 937 } 938 939 // To obtain the result, invoke get(), which blocks 940 // until the asynchronously-launched operation has completed. 941 public static class resultArray7_short4 { 942 public Short4[] get() { 943 if (!mGotResult) { 944 short[] outArray = new short[28]; 945 mOut.copyTo(outArray); 946 Short4[] result = new Short4[7]; 947 for (int Idx = 0; Idx < 7; ++Idx) { 948 result[Idx] = new Short4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); 949 } 950 951 mResult = result; 952 mOut.destroy(); 953 mOut = null; // make Java object eligible for garbage collection 954 if (mTempIns != null) { 955 for (Allocation tempIn : mTempIns) { 956 tempIn.destroy(); 957 } 958 959 mTempIns = null; // make Java objects eligible for garbage collection 960 } 961 962 mGotResult = true; 963 } 964 965 return mResult; 966 } 967 968 private resultArray7_short4(Allocation out) { 969 mTempIns = null; 970 mOut = out; 971 mGotResult = false; 972 } 973 974 private Allocation[] mTempIns; 975 private Allocation mOut; 976 private boolean mGotResult; 977 private Short4[] mResult; 978 } 979 980 // To obtain the result, invoke get(), which blocks 981 // until the asynchronously-launched operation has completed. 982 public static class resultArray7_uchar { 983 public short[] get() { 984 if (!mGotResult) { 985 byte[] outArray = new byte[7]; 986 mOut.copyTo(outArray); 987 short[] result = new short[7]; 988 for (int Idx = 0; Idx < 7; ++Idx) { 989 result[Idx] = ((short) ((outArray[Idx]) & (short) 0xff)); 990 } 991 992 mResult = result; 993 mOut.destroy(); 994 mOut = null; // make Java object eligible for garbage collection 995 if (mTempIns != null) { 996 for (Allocation tempIn : mTempIns) { 997 tempIn.destroy(); 998 } 999 1000 mTempIns = null; // make Java objects eligible for garbage collection 1001 } 1002 1003 mGotResult = true; 1004 } 1005 1006 return mResult; 1007 } 1008 1009 private resultArray7_uchar(Allocation out) { 1010 mTempIns = null; 1011 mOut = out; 1012 mGotResult = false; 1013 } 1014 1015 private Allocation[] mTempIns; 1016 private Allocation mOut; 1017 private boolean mGotResult; 1018 private short[] mResult; 1019 } 1020 1021 // To obtain the result, invoke get(), which blocks 1022 // until the asynchronously-launched operation has completed. 1023 public static class resultArray7_uchar2 { 1024 public Short2[] get() { 1025 if (!mGotResult) { 1026 byte[] outArray = new byte[14]; 1027 mOut.copyTo(outArray); 1028 Short2[] result = new Short2[7]; 1029 for (int Idx = 0; Idx < 7; ++Idx) { 1030 result[Idx] = new Short2(((short) ((outArray[2*Idx+0]) & (short) 0xff)), ((short) ((outArray[2*Idx+1]) & (short) 0xff))); 1031 } 1032 1033 mResult = result; 1034 mOut.destroy(); 1035 mOut = null; // make Java object eligible for garbage collection 1036 if (mTempIns != null) { 1037 for (Allocation tempIn : mTempIns) { 1038 tempIn.destroy(); 1039 } 1040 1041 mTempIns = null; // make Java objects eligible for garbage collection 1042 } 1043 1044 mGotResult = true; 1045 } 1046 1047 return mResult; 1048 } 1049 1050 private resultArray7_uchar2(Allocation out) { 1051 mTempIns = null; 1052 mOut = out; 1053 mGotResult = false; 1054 } 1055 1056 private Allocation[] mTempIns; 1057 private Allocation mOut; 1058 private boolean mGotResult; 1059 private Short2[] mResult; 1060 } 1061 1062 // To obtain the result, invoke get(), which blocks 1063 // until the asynchronously-launched operation has completed. 1064 public static class resultArray7_uchar4 { 1065 public Short4[] get() { 1066 if (!mGotResult) { 1067 byte[] outArray = new byte[28]; 1068 mOut.copyTo(outArray); 1069 Short4[] result = new Short4[7]; 1070 for (int Idx = 0; Idx < 7; ++Idx) { 1071 result[Idx] = new Short4(((short) ((outArray[4*Idx+0]) & (short) 0xff)), ((short) ((outArray[4*Idx+1]) & (short) 0xff)), ((short) ((outArray[4*Idx+2]) & (short) 0xff)), ((short) ((outArray[4*Idx+3]) & (short) 0xff))); 1072 } 1073 1074 mResult = result; 1075 mOut.destroy(); 1076 mOut = null; // make Java object eligible for garbage collection 1077 if (mTempIns != null) { 1078 for (Allocation tempIn : mTempIns) { 1079 tempIn.destroy(); 1080 } 1081 1082 mTempIns = null; // make Java objects eligible for garbage collection 1083 } 1084 1085 mGotResult = true; 1086 } 1087 1088 return mResult; 1089 } 1090 1091 private resultArray7_uchar4(Allocation out) { 1092 mTempIns = null; 1093 mOut = out; 1094 mGotResult = false; 1095 } 1096 1097 private Allocation[] mTempIns; 1098 private Allocation mOut; 1099 private boolean mGotResult; 1100 private Short4[] mResult; 1101 } 1102 1103 // To obtain the result, invoke get(), which blocks 1104 // until the asynchronously-launched operation has completed. 1105 public static class resultArray7_uint { 1106 public long[] get() { 1107 if (!mGotResult) { 1108 int[] outArray = new int[7]; 1109 mOut.copyTo(outArray); 1110 long[] result = new long[7]; 1111 for (int Idx = 0; Idx < 7; ++Idx) { 1112 result[Idx] = ((long) ((outArray[Idx]) & 0xffffffffL)); 1113 } 1114 1115 mResult = result; 1116 mOut.destroy(); 1117 mOut = null; // make Java object eligible for garbage collection 1118 if (mTempIns != null) { 1119 for (Allocation tempIn : mTempIns) { 1120 tempIn.destroy(); 1121 } 1122 1123 mTempIns = null; // make Java objects eligible for garbage collection 1124 } 1125 1126 mGotResult = true; 1127 } 1128 1129 return mResult; 1130 } 1131 1132 private resultArray7_uint(Allocation out) { 1133 mTempIns = null; 1134 mOut = out; 1135 mGotResult = false; 1136 } 1137 1138 private Allocation[] mTempIns; 1139 private Allocation mOut; 1140 private boolean mGotResult; 1141 private long[] mResult; 1142 } 1143 1144 // To obtain the result, invoke get(), which blocks 1145 // until the asynchronously-launched operation has completed. 1146 public static class resultArray7_uint2 { 1147 public Long2[] get() { 1148 if (!mGotResult) { 1149 int[] outArray = new int[14]; 1150 mOut.copyTo(outArray); 1151 Long2[] result = new Long2[7]; 1152 for (int Idx = 0; Idx < 7; ++Idx) { 1153 result[Idx] = new Long2(((long) ((outArray[2*Idx+0]) & 0xffffffffL)), ((long) ((outArray[2*Idx+1]) & 0xffffffffL))); 1154 } 1155 1156 mResult = result; 1157 mOut.destroy(); 1158 mOut = null; // make Java object eligible for garbage collection 1159 if (mTempIns != null) { 1160 for (Allocation tempIn : mTempIns) { 1161 tempIn.destroy(); 1162 } 1163 1164 mTempIns = null; // make Java objects eligible for garbage collection 1165 } 1166 1167 mGotResult = true; 1168 } 1169 1170 return mResult; 1171 } 1172 1173 private resultArray7_uint2(Allocation out) { 1174 mTempIns = null; 1175 mOut = out; 1176 mGotResult = false; 1177 } 1178 1179 private Allocation[] mTempIns; 1180 private Allocation mOut; 1181 private boolean mGotResult; 1182 private Long2[] mResult; 1183 } 1184 1185 // To obtain the result, invoke get(), which blocks 1186 // until the asynchronously-launched operation has completed. 1187 public static class resultArray7_uint4 { 1188 public Long4[] get() { 1189 if (!mGotResult) { 1190 int[] outArray = new int[28]; 1191 mOut.copyTo(outArray); 1192 Long4[] result = new Long4[7]; 1193 for (int Idx = 0; Idx < 7; ++Idx) { 1194 result[Idx] = new Long4(((long) ((outArray[4*Idx+0]) & 0xffffffffL)), ((long) ((outArray[4*Idx+1]) & 0xffffffffL)), ((long) ((outArray[4*Idx+2]) & 0xffffffffL)), ((long) ((outArray[4*Idx+3]) & 0xffffffffL))); 1195 } 1196 1197 mResult = result; 1198 mOut.destroy(); 1199 mOut = null; // make Java object eligible for garbage collection 1200 if (mTempIns != null) { 1201 for (Allocation tempIn : mTempIns) { 1202 tempIn.destroy(); 1203 } 1204 1205 mTempIns = null; // make Java objects eligible for garbage collection 1206 } 1207 1208 mGotResult = true; 1209 } 1210 1211 return mResult; 1212 } 1213 1214 private resultArray7_uint4(Allocation out) { 1215 mTempIns = null; 1216 mOut = out; 1217 mGotResult = false; 1218 } 1219 1220 private Allocation[] mTempIns; 1221 private Allocation mOut; 1222 private boolean mGotResult; 1223 private Long4[] mResult; 1224 } 1225 1226 // To obtain the result, invoke get(), which blocks 1227 // until the asynchronously-launched operation has completed. 1228 public static class resultArray7_ulong { 1229 public long[] get() { 1230 if (!mGotResult) { 1231 long[] outArray = new long[7]; 1232 mOut.copyTo(outArray); 1233 for (int Idx = 0; Idx < 7; ++Idx) { 1234 if (outArray[Idx] < 0) 1235 throw new RSRuntimeException("Result is not representible in Java"); 1236 } 1237 1238 mResult = outArray; 1239 mOut.destroy(); 1240 mOut = null; // make Java object eligible for garbage collection 1241 if (mTempIns != null) { 1242 for (Allocation tempIn : mTempIns) { 1243 tempIn.destroy(); 1244 } 1245 1246 mTempIns = null; // make Java objects eligible for garbage collection 1247 } 1248 1249 mGotResult = true; 1250 } 1251 1252 return mResult; 1253 } 1254 1255 private resultArray7_ulong(Allocation out) { 1256 mTempIns = null; 1257 mOut = out; 1258 mGotResult = false; 1259 } 1260 1261 private Allocation[] mTempIns; 1262 private Allocation mOut; 1263 private boolean mGotResult; 1264 private long[] mResult; 1265 } 1266 1267 // To obtain the result, invoke get(), which blocks 1268 // until the asynchronously-launched operation has completed. 1269 public static class resultArray7_ulong2 { 1270 public Long2[] get() { 1271 if (!mGotResult) { 1272 long[] outArray = new long[14]; 1273 mOut.copyTo(outArray); 1274 for (int Idx = 0; Idx < 14; ++Idx) { 1275 if (outArray[Idx] < 0) 1276 throw new RSRuntimeException("Result is not representible in Java"); 1277 } 1278 1279 Long2[] result = new Long2[7]; 1280 for (int Idx = 0; Idx < 7; ++Idx) { 1281 result[Idx] = new Long2(outArray[2*Idx+0], outArray[2*Idx+1]); 1282 } 1283 1284 mResult = result; 1285 mOut.destroy(); 1286 mOut = null; // make Java object eligible for garbage collection 1287 if (mTempIns != null) { 1288 for (Allocation tempIn : mTempIns) { 1289 tempIn.destroy(); 1290 } 1291 1292 mTempIns = null; // make Java objects eligible for garbage collection 1293 } 1294 1295 mGotResult = true; 1296 } 1297 1298 return mResult; 1299 } 1300 1301 private resultArray7_ulong2(Allocation out) { 1302 mTempIns = null; 1303 mOut = out; 1304 mGotResult = false; 1305 } 1306 1307 private Allocation[] mTempIns; 1308 private Allocation mOut; 1309 private boolean mGotResult; 1310 private Long2[] mResult; 1311 } 1312 1313 // To obtain the result, invoke get(), which blocks 1314 // until the asynchronously-launched operation has completed. 1315 public static class resultArray7_ulong4 { 1316 public Long4[] get() { 1317 if (!mGotResult) { 1318 long[] outArray = new long[28]; 1319 mOut.copyTo(outArray); 1320 for (int Idx = 0; Idx < 28; ++Idx) { 1321 if (outArray[Idx] < 0) 1322 throw new RSRuntimeException("Result is not representible in Java"); 1323 } 1324 1325 Long4[] result = new Long4[7]; 1326 for (int Idx = 0; Idx < 7; ++Idx) { 1327 result[Idx] = new Long4(outArray[4*Idx+0], outArray[4*Idx+1], outArray[4*Idx+2], outArray[4*Idx+3]); 1328 } 1329 1330 mResult = result; 1331 mOut.destroy(); 1332 mOut = null; // make Java object eligible for garbage collection 1333 if (mTempIns != null) { 1334 for (Allocation tempIn : mTempIns) { 1335 tempIn.destroy(); 1336 } 1337 1338 mTempIns = null; // make Java objects eligible for garbage collection 1339 } 1340 1341 mGotResult = true; 1342 } 1343 1344 return mResult; 1345 } 1346 1347 private resultArray7_ulong4(Allocation out) { 1348 mTempIns = null; 1349 mOut = out; 1350 mGotResult = false; 1351 } 1352 1353 private Allocation[] mTempIns; 1354 private Allocation mOut; 1355 private boolean mGotResult; 1356 private Long4[] mResult; 1357 } 1358 1359 // To obtain the result, invoke get(), which blocks 1360 // until the asynchronously-launched operation has completed. 1361 public static class resultArray7_ushort { 1362 public int[] get() { 1363 if (!mGotResult) { 1364 short[] outArray = new short[7]; 1365 mOut.copyTo(outArray); 1366 int[] result = new int[7]; 1367 for (int Idx = 0; Idx < 7; ++Idx) { 1368 result[Idx] = ((int) ((outArray[Idx]) & 0xffff)); 1369 } 1370 1371 mResult = result; 1372 mOut.destroy(); 1373 mOut = null; // make Java object eligible for garbage collection 1374 if (mTempIns != null) { 1375 for (Allocation tempIn : mTempIns) { 1376 tempIn.destroy(); 1377 } 1378 1379 mTempIns = null; // make Java objects eligible for garbage collection 1380 } 1381 1382 mGotResult = true; 1383 } 1384 1385 return mResult; 1386 } 1387 1388 private resultArray7_ushort(Allocation out) { 1389 mTempIns = null; 1390 mOut = out; 1391 mGotResult = false; 1392 } 1393 1394 private Allocation[] mTempIns; 1395 private Allocation mOut; 1396 private boolean mGotResult; 1397 private int[] mResult; 1398 } 1399 1400 // To obtain the result, invoke get(), which blocks 1401 // until the asynchronously-launched operation has completed. 1402 public static class resultArray7_ushort2 { 1403 public Int2[] get() { 1404 if (!mGotResult) { 1405 short[] outArray = new short[14]; 1406 mOut.copyTo(outArray); 1407 Int2[] result = new Int2[7]; 1408 for (int Idx = 0; Idx < 7; ++Idx) { 1409 result[Idx] = new Int2(((int) ((outArray[2*Idx+0]) & 0xffff)), ((int) ((outArray[2*Idx+1]) & 0xffff))); 1410 } 1411 1412 mResult = result; 1413 mOut.destroy(); 1414 mOut = null; // make Java object eligible for garbage collection 1415 if (mTempIns != null) { 1416 for (Allocation tempIn : mTempIns) { 1417 tempIn.destroy(); 1418 } 1419 1420 mTempIns = null; // make Java objects eligible for garbage collection 1421 } 1422 1423 mGotResult = true; 1424 } 1425 1426 return mResult; 1427 } 1428 1429 private resultArray7_ushort2(Allocation out) { 1430 mTempIns = null; 1431 mOut = out; 1432 mGotResult = false; 1433 } 1434 1435 private Allocation[] mTempIns; 1436 private Allocation mOut; 1437 private boolean mGotResult; 1438 private Int2[] mResult; 1439 } 1440 1441 // To obtain the result, invoke get(), which blocks 1442 // until the asynchronously-launched operation has completed. 1443 public static class resultArray7_ushort4 { 1444 public Int4[] get() { 1445 if (!mGotResult) { 1446 short[] outArray = new short[28]; 1447 mOut.copyTo(outArray); 1448 Int4[] result = new Int4[7]; 1449 for (int Idx = 0; Idx < 7; ++Idx) { 1450 result[Idx] = new Int4(((int) ((outArray[4*Idx+0]) & 0xffff)), ((int) ((outArray[4*Idx+1]) & 0xffff)), ((int) ((outArray[4*Idx+2]) & 0xffff)), ((int) ((outArray[4*Idx+3]) & 0xffff))); 1451 } 1452 1453 mResult = result; 1454 mOut.destroy(); 1455 mOut = null; // make Java object eligible for garbage collection 1456 if (mTempIns != null) { 1457 for (Allocation tempIn : mTempIns) { 1458 tempIn.destroy(); 1459 } 1460 1461 mTempIns = null; // make Java objects eligible for garbage collection 1462 } 1463 1464 mGotResult = true; 1465 } 1466 1467 return mResult; 1468 } 1469 1470 private resultArray7_ushort4(Allocation out) { 1471 mTempIns = null; 1472 mOut = out; 1473 mGotResult = false; 1474 } 1475 1476 private Allocation[] mTempIns; 1477 private Allocation mOut; 1478 private boolean mGotResult; 1479 private Int4[] mResult; 1480 } 1481 1482 // To obtain the result, invoke get(), which blocks 1483 // until the asynchronously-launched operation has completed. 1484 public static class result_bool { 1485 public boolean get() { 1486 if (!mGotResult) { 1487 byte[] outArray = new byte[1]; 1488 mOut.copyTo(outArray); 1489 mResult = outArray[0] != 0; 1490 mOut.destroy(); 1491 mOut = null; // make Java object eligible for garbage collection 1492 if (mTempIns != null) { 1493 for (Allocation tempIn : mTempIns) { 1494 tempIn.destroy(); 1495 } 1496 1497 mTempIns = null; // make Java objects eligible for garbage collection 1498 } 1499 1500 mGotResult = true; 1501 } 1502 1503 return mResult; 1504 } 1505 1506 private result_bool(Allocation out) { 1507 mTempIns = null; 1508 mOut = out; 1509 mGotResult = false; 1510 } 1511 1512 private Allocation[] mTempIns; 1513 private Allocation mOut; 1514 private boolean mGotResult; 1515 private boolean mResult; 1516 } 1517 1518 // To obtain the result, invoke get(), which blocks 1519 // until the asynchronously-launched operation has completed. 1520 public static class result_char { 1521 public byte get() { 1522 if (!mGotResult) { 1523 byte[] outArray = new byte[1]; 1524 mOut.copyTo(outArray); 1525 mResult = outArray[0]; 1526 mOut.destroy(); 1527 mOut = null; // make Java object eligible for garbage collection 1528 if (mTempIns != null) { 1529 for (Allocation tempIn : mTempIns) { 1530 tempIn.destroy(); 1531 } 1532 1533 mTempIns = null; // make Java objects eligible for garbage collection 1534 } 1535 1536 mGotResult = true; 1537 } 1538 1539 return mResult; 1540 } 1541 1542 private result_char(Allocation out) { 1543 mTempIns = null; 1544 mOut = out; 1545 mGotResult = false; 1546 } 1547 1548 private Allocation[] mTempIns; 1549 private Allocation mOut; 1550 private boolean mGotResult; 1551 private byte mResult; 1552 } 1553 1554 // To obtain the result, invoke get(), which blocks 1555 // until the asynchronously-launched operation has completed. 1556 public static class result_char2 { 1557 public Byte2 get() { 1558 if (!mGotResult) { 1559 byte[] outArray = new byte[2]; 1560 mOut.copyTo(outArray); 1561 mResult = new Byte2(outArray[0], outArray[1]); 1562 mOut.destroy(); 1563 mOut = null; // make Java object eligible for garbage collection 1564 if (mTempIns != null) { 1565 for (Allocation tempIn : mTempIns) { 1566 tempIn.destroy(); 1567 } 1568 1569 mTempIns = null; // make Java objects eligible for garbage collection 1570 } 1571 1572 mGotResult = true; 1573 } 1574 1575 return mResult; 1576 } 1577 1578 private result_char2(Allocation out) { 1579 mTempIns = null; 1580 mOut = out; 1581 mGotResult = false; 1582 } 1583 1584 private Allocation[] mTempIns; 1585 private Allocation mOut; 1586 private boolean mGotResult; 1587 private Byte2 mResult; 1588 } 1589 1590 // To obtain the result, invoke get(), which blocks 1591 // until the asynchronously-launched operation has completed. 1592 public static class result_char4 { 1593 public Byte4 get() { 1594 if (!mGotResult) { 1595 byte[] outArray = new byte[4]; 1596 mOut.copyTo(outArray); 1597 mResult = new Byte4(outArray[0], outArray[1], outArray[2], outArray[3]); 1598 mOut.destroy(); 1599 mOut = null; // make Java object eligible for garbage collection 1600 if (mTempIns != null) { 1601 for (Allocation tempIn : mTempIns) { 1602 tempIn.destroy(); 1603 } 1604 1605 mTempIns = null; // make Java objects eligible for garbage collection 1606 } 1607 1608 mGotResult = true; 1609 } 1610 1611 return mResult; 1612 } 1613 1614 private result_char4(Allocation out) { 1615 mTempIns = null; 1616 mOut = out; 1617 mGotResult = false; 1618 } 1619 1620 private Allocation[] mTempIns; 1621 private Allocation mOut; 1622 private boolean mGotResult; 1623 private Byte4 mResult; 1624 } 1625 1626 // To obtain the result, invoke get(), which blocks 1627 // until the asynchronously-launched operation has completed. 1628 public static class result_double { 1629 public double get() { 1630 if (!mGotResult) { 1631 double[] outArray = new double[1]; 1632 mOut.copyTo(outArray); 1633 mResult = outArray[0]; 1634 mOut.destroy(); 1635 mOut = null; // make Java object eligible for garbage collection 1636 if (mTempIns != null) { 1637 for (Allocation tempIn : mTempIns) { 1638 tempIn.destroy(); 1639 } 1640 1641 mTempIns = null; // make Java objects eligible for garbage collection 1642 } 1643 1644 mGotResult = true; 1645 } 1646 1647 return mResult; 1648 } 1649 1650 private result_double(Allocation out) { 1651 mTempIns = null; 1652 mOut = out; 1653 mGotResult = false; 1654 } 1655 1656 private Allocation[] mTempIns; 1657 private Allocation mOut; 1658 private boolean mGotResult; 1659 private double mResult; 1660 } 1661 1662 // To obtain the result, invoke get(), which blocks 1663 // until the asynchronously-launched operation has completed. 1664 public static class result_double2 { 1665 public Double2 get() { 1666 if (!mGotResult) { 1667 double[] outArray = new double[2]; 1668 mOut.copyTo(outArray); 1669 mResult = new Double2(outArray[0], outArray[1]); 1670 mOut.destroy(); 1671 mOut = null; // make Java object eligible for garbage collection 1672 if (mTempIns != null) { 1673 for (Allocation tempIn : mTempIns) { 1674 tempIn.destroy(); 1675 } 1676 1677 mTempIns = null; // make Java objects eligible for garbage collection 1678 } 1679 1680 mGotResult = true; 1681 } 1682 1683 return mResult; 1684 } 1685 1686 private result_double2(Allocation out) { 1687 mTempIns = null; 1688 mOut = out; 1689 mGotResult = false; 1690 } 1691 1692 private Allocation[] mTempIns; 1693 private Allocation mOut; 1694 private boolean mGotResult; 1695 private Double2 mResult; 1696 } 1697 1698 // To obtain the result, invoke get(), which blocks 1699 // until the asynchronously-launched operation has completed. 1700 public static class result_double4 { 1701 public Double4 get() { 1702 if (!mGotResult) { 1703 double[] outArray = new double[4]; 1704 mOut.copyTo(outArray); 1705 mResult = new Double4(outArray[0], outArray[1], outArray[2], outArray[3]); 1706 mOut.destroy(); 1707 mOut = null; // make Java object eligible for garbage collection 1708 if (mTempIns != null) { 1709 for (Allocation tempIn : mTempIns) { 1710 tempIn.destroy(); 1711 } 1712 1713 mTempIns = null; // make Java objects eligible for garbage collection 1714 } 1715 1716 mGotResult = true; 1717 } 1718 1719 return mResult; 1720 } 1721 1722 private result_double4(Allocation out) { 1723 mTempIns = null; 1724 mOut = out; 1725 mGotResult = false; 1726 } 1727 1728 private Allocation[] mTempIns; 1729 private Allocation mOut; 1730 private boolean mGotResult; 1731 private Double4 mResult; 1732 } 1733 1734 // To obtain the result, invoke get(), which blocks 1735 // until the asynchronously-launched operation has completed. 1736 public static class result_float { 1737 public float get() { 1738 if (!mGotResult) { 1739 float[] outArray = new float[1]; 1740 mOut.copyTo(outArray); 1741 mResult = outArray[0]; 1742 mOut.destroy(); 1743 mOut = null; // make Java object eligible for garbage collection 1744 if (mTempIns != null) { 1745 for (Allocation tempIn : mTempIns) { 1746 tempIn.destroy(); 1747 } 1748 1749 mTempIns = null; // make Java objects eligible for garbage collection 1750 } 1751 1752 mGotResult = true; 1753 } 1754 1755 return mResult; 1756 } 1757 1758 private result_float(Allocation out) { 1759 mTempIns = null; 1760 mOut = out; 1761 mGotResult = false; 1762 } 1763 1764 private Allocation[] mTempIns; 1765 private Allocation mOut; 1766 private boolean mGotResult; 1767 private float mResult; 1768 } 1769 1770 // To obtain the result, invoke get(), which blocks 1771 // until the asynchronously-launched operation has completed. 1772 public static class result_float2 { 1773 public Float2 get() { 1774 if (!mGotResult) { 1775 float[] outArray = new float[2]; 1776 mOut.copyTo(outArray); 1777 mResult = new Float2(outArray[0], outArray[1]); 1778 mOut.destroy(); 1779 mOut = null; // make Java object eligible for garbage collection 1780 if (mTempIns != null) { 1781 for (Allocation tempIn : mTempIns) { 1782 tempIn.destroy(); 1783 } 1784 1785 mTempIns = null; // make Java objects eligible for garbage collection 1786 } 1787 1788 mGotResult = true; 1789 } 1790 1791 return mResult; 1792 } 1793 1794 private result_float2(Allocation out) { 1795 mTempIns = null; 1796 mOut = out; 1797 mGotResult = false; 1798 } 1799 1800 private Allocation[] mTempIns; 1801 private Allocation mOut; 1802 private boolean mGotResult; 1803 private Float2 mResult; 1804 } 1805 1806 // To obtain the result, invoke get(), which blocks 1807 // until the asynchronously-launched operation has completed. 1808 public static class result_float4 { 1809 public Float4 get() { 1810 if (!mGotResult) { 1811 float[] outArray = new float[4]; 1812 mOut.copyTo(outArray); 1813 mResult = new Float4(outArray[0], outArray[1], outArray[2], outArray[3]); 1814 mOut.destroy(); 1815 mOut = null; // make Java object eligible for garbage collection 1816 if (mTempIns != null) { 1817 for (Allocation tempIn : mTempIns) { 1818 tempIn.destroy(); 1819 } 1820 1821 mTempIns = null; // make Java objects eligible for garbage collection 1822 } 1823 1824 mGotResult = true; 1825 } 1826 1827 return mResult; 1828 } 1829 1830 private result_float4(Allocation out) { 1831 mTempIns = null; 1832 mOut = out; 1833 mGotResult = false; 1834 } 1835 1836 private Allocation[] mTempIns; 1837 private Allocation mOut; 1838 private boolean mGotResult; 1839 private Float4 mResult; 1840 } 1841 1842 // To obtain the result, invoke get(), which blocks 1843 // until the asynchronously-launched operation has completed. 1844 public static class result_half { 1845 public short get() { 1846 if (!mGotResult) { 1847 short[] outArray = new short[1]; 1848 mOut.copyTo(outArray); 1849 mResult = outArray[0]; 1850 mOut.destroy(); 1851 mOut = null; // make Java object eligible for garbage collection 1852 if (mTempIns != null) { 1853 for (Allocation tempIn : mTempIns) { 1854 tempIn.destroy(); 1855 } 1856 1857 mTempIns = null; // make Java objects eligible for garbage collection 1858 } 1859 1860 mGotResult = true; 1861 } 1862 1863 return mResult; 1864 } 1865 1866 private result_half(Allocation out) { 1867 mTempIns = null; 1868 mOut = out; 1869 mGotResult = false; 1870 } 1871 1872 private Allocation[] mTempIns; 1873 private Allocation mOut; 1874 private boolean mGotResult; 1875 private short mResult; 1876 } 1877 1878 // To obtain the result, invoke get(), which blocks 1879 // until the asynchronously-launched operation has completed. 1880 public static class result_half2 { 1881 public Short2 get() { 1882 if (!mGotResult) { 1883 short[] outArray = new short[2]; 1884 mOut.copyTo(outArray); 1885 mResult = new Short2(outArray[0], outArray[1]); 1886 mOut.destroy(); 1887 mOut = null; // make Java object eligible for garbage collection 1888 if (mTempIns != null) { 1889 for (Allocation tempIn : mTempIns) { 1890 tempIn.destroy(); 1891 } 1892 1893 mTempIns = null; // make Java objects eligible for garbage collection 1894 } 1895 1896 mGotResult = true; 1897 } 1898 1899 return mResult; 1900 } 1901 1902 private result_half2(Allocation out) { 1903 mTempIns = null; 1904 mOut = out; 1905 mGotResult = false; 1906 } 1907 1908 private Allocation[] mTempIns; 1909 private Allocation mOut; 1910 private boolean mGotResult; 1911 private Short2 mResult; 1912 } 1913 1914 // To obtain the result, invoke get(), which blocks 1915 // until the asynchronously-launched operation has completed. 1916 public static class result_half4 { 1917 public Short4 get() { 1918 if (!mGotResult) { 1919 short[] outArray = new short[4]; 1920 mOut.copyTo(outArray); 1921 mResult = new Short4(outArray[0], outArray[1], outArray[2], outArray[3]); 1922 mOut.destroy(); 1923 mOut = null; // make Java object eligible for garbage collection 1924 if (mTempIns != null) { 1925 for (Allocation tempIn : mTempIns) { 1926 tempIn.destroy(); 1927 } 1928 1929 mTempIns = null; // make Java objects eligible for garbage collection 1930 } 1931 1932 mGotResult = true; 1933 } 1934 1935 return mResult; 1936 } 1937 1938 private result_half4(Allocation out) { 1939 mTempIns = null; 1940 mOut = out; 1941 mGotResult = false; 1942 } 1943 1944 private Allocation[] mTempIns; 1945 private Allocation mOut; 1946 private boolean mGotResult; 1947 private Short4 mResult; 1948 } 1949 1950 // To obtain the result, invoke get(), which blocks 1951 // until the asynchronously-launched operation has completed. 1952 public static class result_int { 1953 public int get() { 1954 if (!mGotResult) { 1955 int[] outArray = new int[1]; 1956 mOut.copyTo(outArray); 1957 mResult = outArray[0]; 1958 mOut.destroy(); 1959 mOut = null; // make Java object eligible for garbage collection 1960 if (mTempIns != null) { 1961 for (Allocation tempIn : mTempIns) { 1962 tempIn.destroy(); 1963 } 1964 1965 mTempIns = null; // make Java objects eligible for garbage collection 1966 } 1967 1968 mGotResult = true; 1969 } 1970 1971 return mResult; 1972 } 1973 1974 private result_int(Allocation out) { 1975 mTempIns = null; 1976 mOut = out; 1977 mGotResult = false; 1978 } 1979 1980 private Allocation[] mTempIns; 1981 private Allocation mOut; 1982 private boolean mGotResult; 1983 private int mResult; 1984 } 1985 1986 // To obtain the result, invoke get(), which blocks 1987 // until the asynchronously-launched operation has completed. 1988 public static class result_int2 { 1989 public Int2 get() { 1990 if (!mGotResult) { 1991 int[] outArray = new int[2]; 1992 mOut.copyTo(outArray); 1993 mResult = new Int2(outArray[0], outArray[1]); 1994 mOut.destroy(); 1995 mOut = null; // make Java object eligible for garbage collection 1996 if (mTempIns != null) { 1997 for (Allocation tempIn : mTempIns) { 1998 tempIn.destroy(); 1999 } 2000 2001 mTempIns = null; // make Java objects eligible for garbage collection 2002 } 2003 2004 mGotResult = true; 2005 } 2006 2007 return mResult; 2008 } 2009 2010 private result_int2(Allocation out) { 2011 mTempIns = null; 2012 mOut = out; 2013 mGotResult = false; 2014 } 2015 2016 private Allocation[] mTempIns; 2017 private Allocation mOut; 2018 private boolean mGotResult; 2019 private Int2 mResult; 2020 } 2021 2022 // To obtain the result, invoke get(), which blocks 2023 // until the asynchronously-launched operation has completed. 2024 public static class result_int4 { 2025 public Int4 get() { 2026 if (!mGotResult) { 2027 int[] outArray = new int[4]; 2028 mOut.copyTo(outArray); 2029 mResult = new Int4(outArray[0], outArray[1], outArray[2], outArray[3]); 2030 mOut.destroy(); 2031 mOut = null; // make Java object eligible for garbage collection 2032 if (mTempIns != null) { 2033 for (Allocation tempIn : mTempIns) { 2034 tempIn.destroy(); 2035 } 2036 2037 mTempIns = null; // make Java objects eligible for garbage collection 2038 } 2039 2040 mGotResult = true; 2041 } 2042 2043 return mResult; 2044 } 2045 2046 private result_int4(Allocation out) { 2047 mTempIns = null; 2048 mOut = out; 2049 mGotResult = false; 2050 } 2051 2052 private Allocation[] mTempIns; 2053 private Allocation mOut; 2054 private boolean mGotResult; 2055 private Int4 mResult; 2056 } 2057 2058 // To obtain the result, invoke get(), which blocks 2059 // until the asynchronously-launched operation has completed. 2060 public static class result_long { 2061 public long get() { 2062 if (!mGotResult) { 2063 long[] outArray = new long[1]; 2064 mOut.copyTo(outArray); 2065 mResult = outArray[0]; 2066 mOut.destroy(); 2067 mOut = null; // make Java object eligible for garbage collection 2068 if (mTempIns != null) { 2069 for (Allocation tempIn : mTempIns) { 2070 tempIn.destroy(); 2071 } 2072 2073 mTempIns = null; // make Java objects eligible for garbage collection 2074 } 2075 2076 mGotResult = true; 2077 } 2078 2079 return mResult; 2080 } 2081 2082 private result_long(Allocation out) { 2083 mTempIns = null; 2084 mOut = out; 2085 mGotResult = false; 2086 } 2087 2088 private Allocation[] mTempIns; 2089 private Allocation mOut; 2090 private boolean mGotResult; 2091 private long mResult; 2092 } 2093 2094 // To obtain the result, invoke get(), which blocks 2095 // until the asynchronously-launched operation has completed. 2096 public static class result_long2 { 2097 public Long2 get() { 2098 if (!mGotResult) { 2099 long[] outArray = new long[2]; 2100 mOut.copyTo(outArray); 2101 mResult = new Long2(outArray[0], outArray[1]); 2102 mOut.destroy(); 2103 mOut = null; // make Java object eligible for garbage collection 2104 if (mTempIns != null) { 2105 for (Allocation tempIn : mTempIns) { 2106 tempIn.destroy(); 2107 } 2108 2109 mTempIns = null; // make Java objects eligible for garbage collection 2110 } 2111 2112 mGotResult = true; 2113 } 2114 2115 return mResult; 2116 } 2117 2118 private result_long2(Allocation out) { 2119 mTempIns = null; 2120 mOut = out; 2121 mGotResult = false; 2122 } 2123 2124 private Allocation[] mTempIns; 2125 private Allocation mOut; 2126 private boolean mGotResult; 2127 private Long2 mResult; 2128 } 2129 2130 // To obtain the result, invoke get(), which blocks 2131 // until the asynchronously-launched operation has completed. 2132 public static class result_long4 { 2133 public Long4 get() { 2134 if (!mGotResult) { 2135 long[] outArray = new long[4]; 2136 mOut.copyTo(outArray); 2137 mResult = new Long4(outArray[0], outArray[1], outArray[2], outArray[3]); 2138 mOut.destroy(); 2139 mOut = null; // make Java object eligible for garbage collection 2140 if (mTempIns != null) { 2141 for (Allocation tempIn : mTempIns) { 2142 tempIn.destroy(); 2143 } 2144 2145 mTempIns = null; // make Java objects eligible for garbage collection 2146 } 2147 2148 mGotResult = true; 2149 } 2150 2151 return mResult; 2152 } 2153 2154 private result_long4(Allocation out) { 2155 mTempIns = null; 2156 mOut = out; 2157 mGotResult = false; 2158 } 2159 2160 private Allocation[] mTempIns; 2161 private Allocation mOut; 2162 private boolean mGotResult; 2163 private Long4 mResult; 2164 } 2165 2166 // To obtain the result, invoke get(), which blocks 2167 // until the asynchronously-launched operation has completed. 2168 public static class result_short { 2169 public short get() { 2170 if (!mGotResult) { 2171 short[] outArray = new short[1]; 2172 mOut.copyTo(outArray); 2173 mResult = outArray[0]; 2174 mOut.destroy(); 2175 mOut = null; // make Java object eligible for garbage collection 2176 if (mTempIns != null) { 2177 for (Allocation tempIn : mTempIns) { 2178 tempIn.destroy(); 2179 } 2180 2181 mTempIns = null; // make Java objects eligible for garbage collection 2182 } 2183 2184 mGotResult = true; 2185 } 2186 2187 return mResult; 2188 } 2189 2190 private result_short(Allocation out) { 2191 mTempIns = null; 2192 mOut = out; 2193 mGotResult = false; 2194 } 2195 2196 private Allocation[] mTempIns; 2197 private Allocation mOut; 2198 private boolean mGotResult; 2199 private short mResult; 2200 } 2201 2202 // To obtain the result, invoke get(), which blocks 2203 // until the asynchronously-launched operation has completed. 2204 public static class result_short2 { 2205 public Short2 get() { 2206 if (!mGotResult) { 2207 short[] outArray = new short[2]; 2208 mOut.copyTo(outArray); 2209 mResult = new Short2(outArray[0], outArray[1]); 2210 mOut.destroy(); 2211 mOut = null; // make Java object eligible for garbage collection 2212 if (mTempIns != null) { 2213 for (Allocation tempIn : mTempIns) { 2214 tempIn.destroy(); 2215 } 2216 2217 mTempIns = null; // make Java objects eligible for garbage collection 2218 } 2219 2220 mGotResult = true; 2221 } 2222 2223 return mResult; 2224 } 2225 2226 private result_short2(Allocation out) { 2227 mTempIns = null; 2228 mOut = out; 2229 mGotResult = false; 2230 } 2231 2232 private Allocation[] mTempIns; 2233 private Allocation mOut; 2234 private boolean mGotResult; 2235 private Short2 mResult; 2236 } 2237 2238 // To obtain the result, invoke get(), which blocks 2239 // until the asynchronously-launched operation has completed. 2240 public static class result_short4 { 2241 public Short4 get() { 2242 if (!mGotResult) { 2243 short[] outArray = new short[4]; 2244 mOut.copyTo(outArray); 2245 mResult = new Short4(outArray[0], outArray[1], outArray[2], outArray[3]); 2246 mOut.destroy(); 2247 mOut = null; // make Java object eligible for garbage collection 2248 if (mTempIns != null) { 2249 for (Allocation tempIn : mTempIns) { 2250 tempIn.destroy(); 2251 } 2252 2253 mTempIns = null; // make Java objects eligible for garbage collection 2254 } 2255 2256 mGotResult = true; 2257 } 2258 2259 return mResult; 2260 } 2261 2262 private result_short4(Allocation out) { 2263 mTempIns = null; 2264 mOut = out; 2265 mGotResult = false; 2266 } 2267 2268 private Allocation[] mTempIns; 2269 private Allocation mOut; 2270 private boolean mGotResult; 2271 private Short4 mResult; 2272 } 2273 2274 // To obtain the result, invoke get(), which blocks 2275 // until the asynchronously-launched operation has completed. 2276 public static class result_uchar { 2277 public short get() { 2278 if (!mGotResult) { 2279 byte[] outArray = new byte[1]; 2280 mOut.copyTo(outArray); 2281 mResult = ((short) ((outArray[0]) & (short) 0xff)); 2282 mOut.destroy(); 2283 mOut = null; // make Java object eligible for garbage collection 2284 if (mTempIns != null) { 2285 for (Allocation tempIn : mTempIns) { 2286 tempIn.destroy(); 2287 } 2288 2289 mTempIns = null; // make Java objects eligible for garbage collection 2290 } 2291 2292 mGotResult = true; 2293 } 2294 2295 return mResult; 2296 } 2297 2298 private result_uchar(Allocation out) { 2299 mTempIns = null; 2300 mOut = out; 2301 mGotResult = false; 2302 } 2303 2304 private Allocation[] mTempIns; 2305 private Allocation mOut; 2306 private boolean mGotResult; 2307 private short mResult; 2308 } 2309 2310 // To obtain the result, invoke get(), which blocks 2311 // until the asynchronously-launched operation has completed. 2312 public static class result_uchar2 { 2313 public Short2 get() { 2314 if (!mGotResult) { 2315 byte[] outArray = new byte[2]; 2316 mOut.copyTo(outArray); 2317 mResult = new Short2(((short) ((outArray[0]) & (short) 0xff)), ((short) ((outArray[1]) & (short) 0xff))); 2318 mOut.destroy(); 2319 mOut = null; // make Java object eligible for garbage collection 2320 if (mTempIns != null) { 2321 for (Allocation tempIn : mTempIns) { 2322 tempIn.destroy(); 2323 } 2324 2325 mTempIns = null; // make Java objects eligible for garbage collection 2326 } 2327 2328 mGotResult = true; 2329 } 2330 2331 return mResult; 2332 } 2333 2334 private result_uchar2(Allocation out) { 2335 mTempIns = null; 2336 mOut = out; 2337 mGotResult = false; 2338 } 2339 2340 private Allocation[] mTempIns; 2341 private Allocation mOut; 2342 private boolean mGotResult; 2343 private Short2 mResult; 2344 } 2345 2346 // To obtain the result, invoke get(), which blocks 2347 // until the asynchronously-launched operation has completed. 2348 public static class result_uchar4 { 2349 public Short4 get() { 2350 if (!mGotResult) { 2351 byte[] outArray = new byte[4]; 2352 mOut.copyTo(outArray); 2353 mResult = new Short4(((short) ((outArray[0]) & (short) 0xff)), ((short) ((outArray[1]) & (short) 0xff)), ((short) ((outArray[2]) & (short) 0xff)), ((short) ((outArray[3]) & (short) 0xff))); 2354 mOut.destroy(); 2355 mOut = null; // make Java object eligible for garbage collection 2356 if (mTempIns != null) { 2357 for (Allocation tempIn : mTempIns) { 2358 tempIn.destroy(); 2359 } 2360 2361 mTempIns = null; // make Java objects eligible for garbage collection 2362 } 2363 2364 mGotResult = true; 2365 } 2366 2367 return mResult; 2368 } 2369 2370 private result_uchar4(Allocation out) { 2371 mTempIns = null; 2372 mOut = out; 2373 mGotResult = false; 2374 } 2375 2376 private Allocation[] mTempIns; 2377 private Allocation mOut; 2378 private boolean mGotResult; 2379 private Short4 mResult; 2380 } 2381 2382 // To obtain the result, invoke get(), which blocks 2383 // until the asynchronously-launched operation has completed. 2384 public static class result_uint { 2385 public long get() { 2386 if (!mGotResult) { 2387 int[] outArray = new int[1]; 2388 mOut.copyTo(outArray); 2389 mResult = ((long) ((outArray[0]) & 0xffffffffL)); 2390 mOut.destroy(); 2391 mOut = null; // make Java object eligible for garbage collection 2392 if (mTempIns != null) { 2393 for (Allocation tempIn : mTempIns) { 2394 tempIn.destroy(); 2395 } 2396 2397 mTempIns = null; // make Java objects eligible for garbage collection 2398 } 2399 2400 mGotResult = true; 2401 } 2402 2403 return mResult; 2404 } 2405 2406 private result_uint(Allocation out) { 2407 mTempIns = null; 2408 mOut = out; 2409 mGotResult = false; 2410 } 2411 2412 private Allocation[] mTempIns; 2413 private Allocation mOut; 2414 private boolean mGotResult; 2415 private long mResult; 2416 } 2417 2418 // To obtain the result, invoke get(), which blocks 2419 // until the asynchronously-launched operation has completed. 2420 public static class result_uint2 { 2421 public Long2 get() { 2422 if (!mGotResult) { 2423 int[] outArray = new int[2]; 2424 mOut.copyTo(outArray); 2425 mResult = new Long2(((long) ((outArray[0]) & 0xffffffffL)), ((long) ((outArray[1]) & 0xffffffffL))); 2426 mOut.destroy(); 2427 mOut = null; // make Java object eligible for garbage collection 2428 if (mTempIns != null) { 2429 for (Allocation tempIn : mTempIns) { 2430 tempIn.destroy(); 2431 } 2432 2433 mTempIns = null; // make Java objects eligible for garbage collection 2434 } 2435 2436 mGotResult = true; 2437 } 2438 2439 return mResult; 2440 } 2441 2442 private result_uint2(Allocation out) { 2443 mTempIns = null; 2444 mOut = out; 2445 mGotResult = false; 2446 } 2447 2448 private Allocation[] mTempIns; 2449 private Allocation mOut; 2450 private boolean mGotResult; 2451 private Long2 mResult; 2452 } 2453 2454 // To obtain the result, invoke get(), which blocks 2455 // until the asynchronously-launched operation has completed. 2456 public static class result_uint4 { 2457 public Long4 get() { 2458 if (!mGotResult) { 2459 int[] outArray = new int[4]; 2460 mOut.copyTo(outArray); 2461 mResult = new Long4(((long) ((outArray[0]) & 0xffffffffL)), ((long) ((outArray[1]) & 0xffffffffL)), ((long) ((outArray[2]) & 0xffffffffL)), ((long) ((outArray[3]) & 0xffffffffL))); 2462 mOut.destroy(); 2463 mOut = null; // make Java object eligible for garbage collection 2464 if (mTempIns != null) { 2465 for (Allocation tempIn : mTempIns) { 2466 tempIn.destroy(); 2467 } 2468 2469 mTempIns = null; // make Java objects eligible for garbage collection 2470 } 2471 2472 mGotResult = true; 2473 } 2474 2475 return mResult; 2476 } 2477 2478 private result_uint4(Allocation out) { 2479 mTempIns = null; 2480 mOut = out; 2481 mGotResult = false; 2482 } 2483 2484 private Allocation[] mTempIns; 2485 private Allocation mOut; 2486 private boolean mGotResult; 2487 private Long4 mResult; 2488 } 2489 2490 // To obtain the result, invoke get(), which blocks 2491 // until the asynchronously-launched operation has completed. 2492 public static class result_ulong { 2493 public long get() { 2494 if (!mGotResult) { 2495 long[] outArray = new long[1]; 2496 mOut.copyTo(outArray); 2497 if (outArray[0] < 0) 2498 throw new RSRuntimeException("Result is not representible in Java"); 2499 mResult = outArray[0]; 2500 mOut.destroy(); 2501 mOut = null; // make Java object eligible for garbage collection 2502 if (mTempIns != null) { 2503 for (Allocation tempIn : mTempIns) { 2504 tempIn.destroy(); 2505 } 2506 2507 mTempIns = null; // make Java objects eligible for garbage collection 2508 } 2509 2510 mGotResult = true; 2511 } 2512 2513 return mResult; 2514 } 2515 2516 private result_ulong(Allocation out) { 2517 mTempIns = null; 2518 mOut = out; 2519 mGotResult = false; 2520 } 2521 2522 private Allocation[] mTempIns; 2523 private Allocation mOut; 2524 private boolean mGotResult; 2525 private long mResult; 2526 } 2527 2528 // To obtain the result, invoke get(), which blocks 2529 // until the asynchronously-launched operation has completed. 2530 public static class result_ulong2 { 2531 public Long2 get() { 2532 if (!mGotResult) { 2533 long[] outArray = new long[2]; 2534 mOut.copyTo(outArray); 2535 for (int Idx = 0; Idx < 2; ++Idx) { 2536 if (outArray[Idx] < 0) 2537 throw new RSRuntimeException("Result is not representible in Java"); 2538 } 2539 2540 mResult = new Long2(outArray[0], outArray[1]); 2541 mOut.destroy(); 2542 mOut = null; // make Java object eligible for garbage collection 2543 if (mTempIns != null) { 2544 for (Allocation tempIn : mTempIns) { 2545 tempIn.destroy(); 2546 } 2547 2548 mTempIns = null; // make Java objects eligible for garbage collection 2549 } 2550 2551 mGotResult = true; 2552 } 2553 2554 return mResult; 2555 } 2556 2557 private result_ulong2(Allocation out) { 2558 mTempIns = null; 2559 mOut = out; 2560 mGotResult = false; 2561 } 2562 2563 private Allocation[] mTempIns; 2564 private Allocation mOut; 2565 private boolean mGotResult; 2566 private Long2 mResult; 2567 } 2568 2569 // To obtain the result, invoke get(), which blocks 2570 // until the asynchronously-launched operation has completed. 2571 public static class result_ulong4 { 2572 public Long4 get() { 2573 if (!mGotResult) { 2574 long[] outArray = new long[4]; 2575 mOut.copyTo(outArray); 2576 for (int Idx = 0; Idx < 4; ++Idx) { 2577 if (outArray[Idx] < 0) 2578 throw new RSRuntimeException("Result is not representible in Java"); 2579 } 2580 2581 mResult = new Long4(outArray[0], outArray[1], outArray[2], outArray[3]); 2582 mOut.destroy(); 2583 mOut = null; // make Java object eligible for garbage collection 2584 if (mTempIns != null) { 2585 for (Allocation tempIn : mTempIns) { 2586 tempIn.destroy(); 2587 } 2588 2589 mTempIns = null; // make Java objects eligible for garbage collection 2590 } 2591 2592 mGotResult = true; 2593 } 2594 2595 return mResult; 2596 } 2597 2598 private result_ulong4(Allocation out) { 2599 mTempIns = null; 2600 mOut = out; 2601 mGotResult = false; 2602 } 2603 2604 private Allocation[] mTempIns; 2605 private Allocation mOut; 2606 private boolean mGotResult; 2607 private Long4 mResult; 2608 } 2609 2610 // To obtain the result, invoke get(), which blocks 2611 // until the asynchronously-launched operation has completed. 2612 public static class result_ushort { 2613 public int get() { 2614 if (!mGotResult) { 2615 short[] outArray = new short[1]; 2616 mOut.copyTo(outArray); 2617 mResult = ((int) ((outArray[0]) & 0xffff)); 2618 mOut.destroy(); 2619 mOut = null; // make Java object eligible for garbage collection 2620 if (mTempIns != null) { 2621 for (Allocation tempIn : mTempIns) { 2622 tempIn.destroy(); 2623 } 2624 2625 mTempIns = null; // make Java objects eligible for garbage collection 2626 } 2627 2628 mGotResult = true; 2629 } 2630 2631 return mResult; 2632 } 2633 2634 private result_ushort(Allocation out) { 2635 mTempIns = null; 2636 mOut = out; 2637 mGotResult = false; 2638 } 2639 2640 private Allocation[] mTempIns; 2641 private Allocation mOut; 2642 private boolean mGotResult; 2643 private int mResult; 2644 } 2645 2646 // To obtain the result, invoke get(), which blocks 2647 // until the asynchronously-launched operation has completed. 2648 public static class result_ushort2 { 2649 public Int2 get() { 2650 if (!mGotResult) { 2651 short[] outArray = new short[2]; 2652 mOut.copyTo(outArray); 2653 mResult = new Int2(((int) ((outArray[0]) & 0xffff)), ((int) ((outArray[1]) & 0xffff))); 2654 mOut.destroy(); 2655 mOut = null; // make Java object eligible for garbage collection 2656 if (mTempIns != null) { 2657 for (Allocation tempIn : mTempIns) { 2658 tempIn.destroy(); 2659 } 2660 2661 mTempIns = null; // make Java objects eligible for garbage collection 2662 } 2663 2664 mGotResult = true; 2665 } 2666 2667 return mResult; 2668 } 2669 2670 private result_ushort2(Allocation out) { 2671 mTempIns = null; 2672 mOut = out; 2673 mGotResult = false; 2674 } 2675 2676 private Allocation[] mTempIns; 2677 private Allocation mOut; 2678 private boolean mGotResult; 2679 private Int2 mResult; 2680 } 2681 2682 // To obtain the result, invoke get(), which blocks 2683 // until the asynchronously-launched operation has completed. 2684 public static class result_ushort4 { 2685 public Int4 get() { 2686 if (!mGotResult) { 2687 short[] outArray = new short[4]; 2688 mOut.copyTo(outArray); 2689 mResult = new Int4(((int) ((outArray[0]) & 0xffff)), ((int) ((outArray[1]) & 0xffff)), ((int) ((outArray[2]) & 0xffff)), ((int) ((outArray[3]) & 0xffff))); 2690 mOut.destroy(); 2691 mOut = null; // make Java object eligible for garbage collection 2692 if (mTempIns != null) { 2693 for (Allocation tempIn : mTempIns) { 2694 tempIn.destroy(); 2695 } 2696 2697 mTempIns = null; // make Java objects eligible for garbage collection 2698 } 2699 2700 mGotResult = true; 2701 } 2702 2703 return mResult; 2704 } 2705 2706 private result_ushort4(Allocation out) { 2707 mTempIns = null; 2708 mOut = out; 2709 mGotResult = false; 2710 } 2711 2712 private Allocation[] mTempIns; 2713 private Allocation mOut; 2714 private boolean mGotResult; 2715 private Int4 mResult; 2716 } 2717 2718 private final static int mExportReduceIdx_my_half = 0; 2719 // in1 = "val" 2720 public result_half reduce_my_half(short[] in1) { 2721 // Verify that "in1" is non-null. 2722 if (in1 == null) { 2723 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 2724 } 2725 Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); 2726 ain1.setAutoPadding(true); 2727 ain1.copyFrom(in1); 2728 2729 result_half result = reduce_my_half(ain1, null); 2730 result.mTempIns = new Allocation[]{ain1}; 2731 return result; 2732 } 2733 2734 // ain1 = "half val" 2735 public result_half reduce_my_half(Allocation ain1) { 2736 return reduce_my_half(ain1, null); 2737 } 2738 2739 // ain1 = "half val" 2740 public result_half reduce_my_half(Allocation ain1, Script.LaunchOptions sc) { 2741 // check ain1 2742 if (!ain1.getType().getElement().isCompatible(__F16)) { 2743 throw new RSRuntimeException("Type mismatch with F16!"); 2744 } 2745 Allocation aout = Allocation.createSized(mRSLocal, __F16, 1); 2746 aout.setAutoPadding(true); 2747 reduce(mExportReduceIdx_my_half, new Allocation[]{ain1}, aout, sc); 2748 return new result_half(aout); 2749 } 2750 2751 private final static int mExportReduceIdx_my_half2 = 1; 2752 // in1 = "val", flattened 2-vectors 2753 public result_half2 reduce_my_half2(short[] in1) { 2754 // Verify that "in1" is non-null. 2755 if (in1 == null) { 2756 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 2757 } 2758 // Verify that the array length is a multiple of the vector size. 2759 if (in1.length % 2 != 0) { 2760 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 2761 } 2762 Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); 2763 ain1.setAutoPadding(true); 2764 ain1.copyFrom(in1); 2765 2766 result_half2 result = reduce_my_half2(ain1, null); 2767 result.mTempIns = new Allocation[]{ain1}; 2768 return result; 2769 } 2770 2771 // ain1 = "half2 val" 2772 public result_half2 reduce_my_half2(Allocation ain1) { 2773 return reduce_my_half2(ain1, null); 2774 } 2775 2776 // ain1 = "half2 val" 2777 public result_half2 reduce_my_half2(Allocation ain1, Script.LaunchOptions sc) { 2778 // check ain1 2779 if (!ain1.getType().getElement().isCompatible(__F16_2)) { 2780 throw new RSRuntimeException("Type mismatch with F16_2!"); 2781 } 2782 Allocation aout = Allocation.createSized(mRSLocal, __F16_2, 1); 2783 aout.setAutoPadding(true); 2784 reduce(mExportReduceIdx_my_half2, new Allocation[]{ain1}, aout, sc); 2785 return new result_half2(aout); 2786 } 2787 2788 private final static int mExportReduceIdx_my_half4 = 2; 2789 // in1 = "val", flattened 4-vectors 2790 public result_half4 reduce_my_half4(short[] in1) { 2791 // Verify that "in1" is non-null. 2792 if (in1 == null) { 2793 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 2794 } 2795 // Verify that the array length is a multiple of the vector size. 2796 if (in1.length % 4 != 0) { 2797 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 2798 } 2799 Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); 2800 ain1.setAutoPadding(true); 2801 ain1.copyFrom(in1); 2802 2803 result_half4 result = reduce_my_half4(ain1, null); 2804 result.mTempIns = new Allocation[]{ain1}; 2805 return result; 2806 } 2807 2808 // ain1 = "half4 val" 2809 public result_half4 reduce_my_half4(Allocation ain1) { 2810 return reduce_my_half4(ain1, null); 2811 } 2812 2813 // ain1 = "half4 val" 2814 public result_half4 reduce_my_half4(Allocation ain1, Script.LaunchOptions sc) { 2815 // check ain1 2816 if (!ain1.getType().getElement().isCompatible(__F16_4)) { 2817 throw new RSRuntimeException("Type mismatch with F16_4!"); 2818 } 2819 Allocation aout = Allocation.createSized(mRSLocal, __F16_4, 1); 2820 aout.setAutoPadding(true); 2821 reduce(mExportReduceIdx_my_half4, new Allocation[]{ain1}, aout, sc); 2822 return new result_half4(aout); 2823 } 2824 2825 private final static int mExportReduceIdx_my_array_half = 3; 2826 // in1 = "val" 2827 public resultArray7_half reduce_my_array_half(short[] in1) { 2828 // Verify that "in1" is non-null. 2829 if (in1 == null) { 2830 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 2831 } 2832 Allocation ain1 = Allocation.createSized(mRSLocal, __F16, in1.length); 2833 ain1.setAutoPadding(true); 2834 ain1.copyFrom(in1); 2835 2836 resultArray7_half result = reduce_my_array_half(ain1, null); 2837 result.mTempIns = new Allocation[]{ain1}; 2838 return result; 2839 } 2840 2841 // ain1 = "half val" 2842 public resultArray7_half reduce_my_array_half(Allocation ain1) { 2843 return reduce_my_array_half(ain1, null); 2844 } 2845 2846 // ain1 = "half val" 2847 public resultArray7_half reduce_my_array_half(Allocation ain1, Script.LaunchOptions sc) { 2848 // check ain1 2849 if (!ain1.getType().getElement().isCompatible(__F16)) { 2850 throw new RSRuntimeException("Type mismatch with F16!"); 2851 } 2852 Allocation aout = Allocation.createSized(mRSLocal, __F16, 7); 2853 aout.setAutoPadding(true); 2854 reduce(mExportReduceIdx_my_array_half, new Allocation[]{ain1}, aout, sc); 2855 return new resultArray7_half(aout); 2856 } 2857 2858 private final static int mExportReduceIdx_my_array_half2 = 4; 2859 // in1 = "val", flattened 2-vectors 2860 public resultArray7_half2 reduce_my_array_half2(short[] in1) { 2861 // Verify that "in1" is non-null. 2862 if (in1 == null) { 2863 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 2864 } 2865 // Verify that the array length is a multiple of the vector size. 2866 if (in1.length % 2 != 0) { 2867 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 2868 } 2869 Allocation ain1 = Allocation.createSized(mRSLocal, __F16_2, in1.length / 2); 2870 ain1.setAutoPadding(true); 2871 ain1.copyFrom(in1); 2872 2873 resultArray7_half2 result = reduce_my_array_half2(ain1, null); 2874 result.mTempIns = new Allocation[]{ain1}; 2875 return result; 2876 } 2877 2878 // ain1 = "half2 val" 2879 public resultArray7_half2 reduce_my_array_half2(Allocation ain1) { 2880 return reduce_my_array_half2(ain1, null); 2881 } 2882 2883 // ain1 = "half2 val" 2884 public resultArray7_half2 reduce_my_array_half2(Allocation ain1, Script.LaunchOptions sc) { 2885 // check ain1 2886 if (!ain1.getType().getElement().isCompatible(__F16_2)) { 2887 throw new RSRuntimeException("Type mismatch with F16_2!"); 2888 } 2889 Allocation aout = Allocation.createSized(mRSLocal, __F16_2, 7); 2890 aout.setAutoPadding(true); 2891 reduce(mExportReduceIdx_my_array_half2, new Allocation[]{ain1}, aout, sc); 2892 return new resultArray7_half2(aout); 2893 } 2894 2895 private final static int mExportReduceIdx_my_array_half4 = 5; 2896 // in1 = "val", flattened 4-vectors 2897 public resultArray7_half4 reduce_my_array_half4(short[] in1) { 2898 // Verify that "in1" is non-null. 2899 if (in1 == null) { 2900 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 2901 } 2902 // Verify that the array length is a multiple of the vector size. 2903 if (in1.length % 4 != 0) { 2904 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 2905 } 2906 Allocation ain1 = Allocation.createSized(mRSLocal, __F16_4, in1.length / 4); 2907 ain1.setAutoPadding(true); 2908 ain1.copyFrom(in1); 2909 2910 resultArray7_half4 result = reduce_my_array_half4(ain1, null); 2911 result.mTempIns = new Allocation[]{ain1}; 2912 return result; 2913 } 2914 2915 // ain1 = "half4 val" 2916 public resultArray7_half4 reduce_my_array_half4(Allocation ain1) { 2917 return reduce_my_array_half4(ain1, null); 2918 } 2919 2920 // ain1 = "half4 val" 2921 public resultArray7_half4 reduce_my_array_half4(Allocation ain1, Script.LaunchOptions sc) { 2922 // check ain1 2923 if (!ain1.getType().getElement().isCompatible(__F16_4)) { 2924 throw new RSRuntimeException("Type mismatch with F16_4!"); 2925 } 2926 Allocation aout = Allocation.createSized(mRSLocal, __F16_4, 7); 2927 aout.setAutoPadding(true); 2928 reduce(mExportReduceIdx_my_array_half4, new Allocation[]{ain1}, aout, sc); 2929 return new resultArray7_half4(aout); 2930 } 2931 2932 private final static int mExportReduceIdx_my_float = 6; 2933 // in1 = "val" 2934 public result_float reduce_my_float(float[] in1) { 2935 // Verify that "in1" is non-null. 2936 if (in1 == null) { 2937 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 2938 } 2939 Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); 2940 ain1.setAutoPadding(true); 2941 ain1.copyFrom(in1); 2942 2943 result_float result = reduce_my_float(ain1, null); 2944 result.mTempIns = new Allocation[]{ain1}; 2945 return result; 2946 } 2947 2948 // ain1 = "float val" 2949 public result_float reduce_my_float(Allocation ain1) { 2950 return reduce_my_float(ain1, null); 2951 } 2952 2953 // ain1 = "float val" 2954 public result_float reduce_my_float(Allocation ain1, Script.LaunchOptions sc) { 2955 // check ain1 2956 if (!ain1.getType().getElement().isCompatible(__F32)) { 2957 throw new RSRuntimeException("Type mismatch with F32!"); 2958 } 2959 Allocation aout = Allocation.createSized(mRSLocal, __F32, 1); 2960 aout.setAutoPadding(true); 2961 reduce(mExportReduceIdx_my_float, new Allocation[]{ain1}, aout, sc); 2962 return new result_float(aout); 2963 } 2964 2965 private final static int mExportReduceIdx_my_float2 = 7; 2966 // in1 = "val", flattened 2-vectors 2967 public result_float2 reduce_my_float2(float[] in1) { 2968 // Verify that "in1" is non-null. 2969 if (in1 == null) { 2970 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 2971 } 2972 // Verify that the array length is a multiple of the vector size. 2973 if (in1.length % 2 != 0) { 2974 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 2975 } 2976 Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); 2977 ain1.setAutoPadding(true); 2978 ain1.copyFrom(in1); 2979 2980 result_float2 result = reduce_my_float2(ain1, null); 2981 result.mTempIns = new Allocation[]{ain1}; 2982 return result; 2983 } 2984 2985 // ain1 = "float2 val" 2986 public result_float2 reduce_my_float2(Allocation ain1) { 2987 return reduce_my_float2(ain1, null); 2988 } 2989 2990 // ain1 = "float2 val" 2991 public result_float2 reduce_my_float2(Allocation ain1, Script.LaunchOptions sc) { 2992 // check ain1 2993 if (!ain1.getType().getElement().isCompatible(__F32_2)) { 2994 throw new RSRuntimeException("Type mismatch with F32_2!"); 2995 } 2996 Allocation aout = Allocation.createSized(mRSLocal, __F32_2, 1); 2997 aout.setAutoPadding(true); 2998 reduce(mExportReduceIdx_my_float2, new Allocation[]{ain1}, aout, sc); 2999 return new result_float2(aout); 3000 } 3001 3002 private final static int mExportReduceIdx_my_float4 = 8; 3003 // in1 = "val", flattened 4-vectors 3004 public result_float4 reduce_my_float4(float[] in1) { 3005 // Verify that "in1" is non-null. 3006 if (in1 == null) { 3007 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3008 } 3009 // Verify that the array length is a multiple of the vector size. 3010 if (in1.length % 4 != 0) { 3011 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3012 } 3013 Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); 3014 ain1.setAutoPadding(true); 3015 ain1.copyFrom(in1); 3016 3017 result_float4 result = reduce_my_float4(ain1, null); 3018 result.mTempIns = new Allocation[]{ain1}; 3019 return result; 3020 } 3021 3022 // ain1 = "float4 val" 3023 public result_float4 reduce_my_float4(Allocation ain1) { 3024 return reduce_my_float4(ain1, null); 3025 } 3026 3027 // ain1 = "float4 val" 3028 public result_float4 reduce_my_float4(Allocation ain1, Script.LaunchOptions sc) { 3029 // check ain1 3030 if (!ain1.getType().getElement().isCompatible(__F32_4)) { 3031 throw new RSRuntimeException("Type mismatch with F32_4!"); 3032 } 3033 Allocation aout = Allocation.createSized(mRSLocal, __F32_4, 1); 3034 aout.setAutoPadding(true); 3035 reduce(mExportReduceIdx_my_float4, new Allocation[]{ain1}, aout, sc); 3036 return new result_float4(aout); 3037 } 3038 3039 private final static int mExportReduceIdx_my_array_float = 9; 3040 // in1 = "val" 3041 public resultArray7_float reduce_my_array_float(float[] in1) { 3042 // Verify that "in1" is non-null. 3043 if (in1 == null) { 3044 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3045 } 3046 Allocation ain1 = Allocation.createSized(mRSLocal, __F32, in1.length); 3047 ain1.setAutoPadding(true); 3048 ain1.copyFrom(in1); 3049 3050 resultArray7_float result = reduce_my_array_float(ain1, null); 3051 result.mTempIns = new Allocation[]{ain1}; 3052 return result; 3053 } 3054 3055 // ain1 = "float val" 3056 public resultArray7_float reduce_my_array_float(Allocation ain1) { 3057 return reduce_my_array_float(ain1, null); 3058 } 3059 3060 // ain1 = "float val" 3061 public resultArray7_float reduce_my_array_float(Allocation ain1, Script.LaunchOptions sc) { 3062 // check ain1 3063 if (!ain1.getType().getElement().isCompatible(__F32)) { 3064 throw new RSRuntimeException("Type mismatch with F32!"); 3065 } 3066 Allocation aout = Allocation.createSized(mRSLocal, __F32, 7); 3067 aout.setAutoPadding(true); 3068 reduce(mExportReduceIdx_my_array_float, new Allocation[]{ain1}, aout, sc); 3069 return new resultArray7_float(aout); 3070 } 3071 3072 private final static int mExportReduceIdx_my_array_float2 = 10; 3073 // in1 = "val", flattened 2-vectors 3074 public resultArray7_float2 reduce_my_array_float2(float[] in1) { 3075 // Verify that "in1" is non-null. 3076 if (in1 == null) { 3077 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3078 } 3079 // Verify that the array length is a multiple of the vector size. 3080 if (in1.length % 2 != 0) { 3081 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3082 } 3083 Allocation ain1 = Allocation.createSized(mRSLocal, __F32_2, in1.length / 2); 3084 ain1.setAutoPadding(true); 3085 ain1.copyFrom(in1); 3086 3087 resultArray7_float2 result = reduce_my_array_float2(ain1, null); 3088 result.mTempIns = new Allocation[]{ain1}; 3089 return result; 3090 } 3091 3092 // ain1 = "float2 val" 3093 public resultArray7_float2 reduce_my_array_float2(Allocation ain1) { 3094 return reduce_my_array_float2(ain1, null); 3095 } 3096 3097 // ain1 = "float2 val" 3098 public resultArray7_float2 reduce_my_array_float2(Allocation ain1, Script.LaunchOptions sc) { 3099 // check ain1 3100 if (!ain1.getType().getElement().isCompatible(__F32_2)) { 3101 throw new RSRuntimeException("Type mismatch with F32_2!"); 3102 } 3103 Allocation aout = Allocation.createSized(mRSLocal, __F32_2, 7); 3104 aout.setAutoPadding(true); 3105 reduce(mExportReduceIdx_my_array_float2, new Allocation[]{ain1}, aout, sc); 3106 return new resultArray7_float2(aout); 3107 } 3108 3109 private final static int mExportReduceIdx_my_array_float4 = 11; 3110 // in1 = "val", flattened 4-vectors 3111 public resultArray7_float4 reduce_my_array_float4(float[] in1) { 3112 // Verify that "in1" is non-null. 3113 if (in1 == null) { 3114 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3115 } 3116 // Verify that the array length is a multiple of the vector size. 3117 if (in1.length % 4 != 0) { 3118 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3119 } 3120 Allocation ain1 = Allocation.createSized(mRSLocal, __F32_4, in1.length / 4); 3121 ain1.setAutoPadding(true); 3122 ain1.copyFrom(in1); 3123 3124 resultArray7_float4 result = reduce_my_array_float4(ain1, null); 3125 result.mTempIns = new Allocation[]{ain1}; 3126 return result; 3127 } 3128 3129 // ain1 = "float4 val" 3130 public resultArray7_float4 reduce_my_array_float4(Allocation ain1) { 3131 return reduce_my_array_float4(ain1, null); 3132 } 3133 3134 // ain1 = "float4 val" 3135 public resultArray7_float4 reduce_my_array_float4(Allocation ain1, Script.LaunchOptions sc) { 3136 // check ain1 3137 if (!ain1.getType().getElement().isCompatible(__F32_4)) { 3138 throw new RSRuntimeException("Type mismatch with F32_4!"); 3139 } 3140 Allocation aout = Allocation.createSized(mRSLocal, __F32_4, 7); 3141 aout.setAutoPadding(true); 3142 reduce(mExportReduceIdx_my_array_float4, new Allocation[]{ain1}, aout, sc); 3143 return new resultArray7_float4(aout); 3144 } 3145 3146 private final static int mExportReduceIdx_my_double = 12; 3147 // in1 = "val" 3148 public result_double reduce_my_double(double[] in1) { 3149 // Verify that "in1" is non-null. 3150 if (in1 == null) { 3151 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3152 } 3153 Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); 3154 ain1.setAutoPadding(true); 3155 ain1.copyFrom(in1); 3156 3157 result_double result = reduce_my_double(ain1, null); 3158 result.mTempIns = new Allocation[]{ain1}; 3159 return result; 3160 } 3161 3162 // ain1 = "double val" 3163 public result_double reduce_my_double(Allocation ain1) { 3164 return reduce_my_double(ain1, null); 3165 } 3166 3167 // ain1 = "double val" 3168 public result_double reduce_my_double(Allocation ain1, Script.LaunchOptions sc) { 3169 // check ain1 3170 if (!ain1.getType().getElement().isCompatible(__F64)) { 3171 throw new RSRuntimeException("Type mismatch with F64!"); 3172 } 3173 Allocation aout = Allocation.createSized(mRSLocal, __F64, 1); 3174 aout.setAutoPadding(true); 3175 reduce(mExportReduceIdx_my_double, new Allocation[]{ain1}, aout, sc); 3176 return new result_double(aout); 3177 } 3178 3179 private final static int mExportReduceIdx_my_double2 = 13; 3180 // in1 = "val", flattened 2-vectors 3181 public result_double2 reduce_my_double2(double[] in1) { 3182 // Verify that "in1" is non-null. 3183 if (in1 == null) { 3184 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3185 } 3186 // Verify that the array length is a multiple of the vector size. 3187 if (in1.length % 2 != 0) { 3188 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3189 } 3190 Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); 3191 ain1.setAutoPadding(true); 3192 ain1.copyFrom(in1); 3193 3194 result_double2 result = reduce_my_double2(ain1, null); 3195 result.mTempIns = new Allocation[]{ain1}; 3196 return result; 3197 } 3198 3199 // ain1 = "double2 val" 3200 public result_double2 reduce_my_double2(Allocation ain1) { 3201 return reduce_my_double2(ain1, null); 3202 } 3203 3204 // ain1 = "double2 val" 3205 public result_double2 reduce_my_double2(Allocation ain1, Script.LaunchOptions sc) { 3206 // check ain1 3207 if (!ain1.getType().getElement().isCompatible(__F64_2)) { 3208 throw new RSRuntimeException("Type mismatch with F64_2!"); 3209 } 3210 Allocation aout = Allocation.createSized(mRSLocal, __F64_2, 1); 3211 aout.setAutoPadding(true); 3212 reduce(mExportReduceIdx_my_double2, new Allocation[]{ain1}, aout, sc); 3213 return new result_double2(aout); 3214 } 3215 3216 private final static int mExportReduceIdx_my_double4 = 14; 3217 // in1 = "val", flattened 4-vectors 3218 public result_double4 reduce_my_double4(double[] in1) { 3219 // Verify that "in1" is non-null. 3220 if (in1 == null) { 3221 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3222 } 3223 // Verify that the array length is a multiple of the vector size. 3224 if (in1.length % 4 != 0) { 3225 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3226 } 3227 Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); 3228 ain1.setAutoPadding(true); 3229 ain1.copyFrom(in1); 3230 3231 result_double4 result = reduce_my_double4(ain1, null); 3232 result.mTempIns = new Allocation[]{ain1}; 3233 return result; 3234 } 3235 3236 // ain1 = "double4 val" 3237 public result_double4 reduce_my_double4(Allocation ain1) { 3238 return reduce_my_double4(ain1, null); 3239 } 3240 3241 // ain1 = "double4 val" 3242 public result_double4 reduce_my_double4(Allocation ain1, Script.LaunchOptions sc) { 3243 // check ain1 3244 if (!ain1.getType().getElement().isCompatible(__F64_4)) { 3245 throw new RSRuntimeException("Type mismatch with F64_4!"); 3246 } 3247 Allocation aout = Allocation.createSized(mRSLocal, __F64_4, 1); 3248 aout.setAutoPadding(true); 3249 reduce(mExportReduceIdx_my_double4, new Allocation[]{ain1}, aout, sc); 3250 return new result_double4(aout); 3251 } 3252 3253 private final static int mExportReduceIdx_my_array_double = 15; 3254 // in1 = "val" 3255 public resultArray7_double reduce_my_array_double(double[] in1) { 3256 // Verify that "in1" is non-null. 3257 if (in1 == null) { 3258 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3259 } 3260 Allocation ain1 = Allocation.createSized(mRSLocal, __F64, in1.length); 3261 ain1.setAutoPadding(true); 3262 ain1.copyFrom(in1); 3263 3264 resultArray7_double result = reduce_my_array_double(ain1, null); 3265 result.mTempIns = new Allocation[]{ain1}; 3266 return result; 3267 } 3268 3269 // ain1 = "double val" 3270 public resultArray7_double reduce_my_array_double(Allocation ain1) { 3271 return reduce_my_array_double(ain1, null); 3272 } 3273 3274 // ain1 = "double val" 3275 public resultArray7_double reduce_my_array_double(Allocation ain1, Script.LaunchOptions sc) { 3276 // check ain1 3277 if (!ain1.getType().getElement().isCompatible(__F64)) { 3278 throw new RSRuntimeException("Type mismatch with F64!"); 3279 } 3280 Allocation aout = Allocation.createSized(mRSLocal, __F64, 7); 3281 aout.setAutoPadding(true); 3282 reduce(mExportReduceIdx_my_array_double, new Allocation[]{ain1}, aout, sc); 3283 return new resultArray7_double(aout); 3284 } 3285 3286 private final static int mExportReduceIdx_my_array_double2 = 16; 3287 // in1 = "val", flattened 2-vectors 3288 public resultArray7_double2 reduce_my_array_double2(double[] in1) { 3289 // Verify that "in1" is non-null. 3290 if (in1 == null) { 3291 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3292 } 3293 // Verify that the array length is a multiple of the vector size. 3294 if (in1.length % 2 != 0) { 3295 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3296 } 3297 Allocation ain1 = Allocation.createSized(mRSLocal, __F64_2, in1.length / 2); 3298 ain1.setAutoPadding(true); 3299 ain1.copyFrom(in1); 3300 3301 resultArray7_double2 result = reduce_my_array_double2(ain1, null); 3302 result.mTempIns = new Allocation[]{ain1}; 3303 return result; 3304 } 3305 3306 // ain1 = "double2 val" 3307 public resultArray7_double2 reduce_my_array_double2(Allocation ain1) { 3308 return reduce_my_array_double2(ain1, null); 3309 } 3310 3311 // ain1 = "double2 val" 3312 public resultArray7_double2 reduce_my_array_double2(Allocation ain1, Script.LaunchOptions sc) { 3313 // check ain1 3314 if (!ain1.getType().getElement().isCompatible(__F64_2)) { 3315 throw new RSRuntimeException("Type mismatch with F64_2!"); 3316 } 3317 Allocation aout = Allocation.createSized(mRSLocal, __F64_2, 7); 3318 aout.setAutoPadding(true); 3319 reduce(mExportReduceIdx_my_array_double2, new Allocation[]{ain1}, aout, sc); 3320 return new resultArray7_double2(aout); 3321 } 3322 3323 private final static int mExportReduceIdx_my_array_double4 = 17; 3324 // in1 = "val", flattened 4-vectors 3325 public resultArray7_double4 reduce_my_array_double4(double[] in1) { 3326 // Verify that "in1" is non-null. 3327 if (in1 == null) { 3328 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3329 } 3330 // Verify that the array length is a multiple of the vector size. 3331 if (in1.length % 4 != 0) { 3332 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3333 } 3334 Allocation ain1 = Allocation.createSized(mRSLocal, __F64_4, in1.length / 4); 3335 ain1.setAutoPadding(true); 3336 ain1.copyFrom(in1); 3337 3338 resultArray7_double4 result = reduce_my_array_double4(ain1, null); 3339 result.mTempIns = new Allocation[]{ain1}; 3340 return result; 3341 } 3342 3343 // ain1 = "double4 val" 3344 public resultArray7_double4 reduce_my_array_double4(Allocation ain1) { 3345 return reduce_my_array_double4(ain1, null); 3346 } 3347 3348 // ain1 = "double4 val" 3349 public resultArray7_double4 reduce_my_array_double4(Allocation ain1, Script.LaunchOptions sc) { 3350 // check ain1 3351 if (!ain1.getType().getElement().isCompatible(__F64_4)) { 3352 throw new RSRuntimeException("Type mismatch with F64_4!"); 3353 } 3354 Allocation aout = Allocation.createSized(mRSLocal, __F64_4, 7); 3355 aout.setAutoPadding(true); 3356 reduce(mExportReduceIdx_my_array_double4, new Allocation[]{ain1}, aout, sc); 3357 return new resultArray7_double4(aout); 3358 } 3359 3360 private final static int mExportReduceIdx_my_char = 18; 3361 // in1 = "val" 3362 public result_char reduce_my_char(byte[] in1) { 3363 // Verify that "in1" is non-null. 3364 if (in1 == null) { 3365 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3366 } 3367 Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); 3368 ain1.setAutoPadding(true); 3369 ain1.copyFrom(in1); 3370 3371 result_char result = reduce_my_char(ain1, null); 3372 result.mTempIns = new Allocation[]{ain1}; 3373 return result; 3374 } 3375 3376 // ain1 = "char val" 3377 public result_char reduce_my_char(Allocation ain1) { 3378 return reduce_my_char(ain1, null); 3379 } 3380 3381 // ain1 = "char val" 3382 public result_char reduce_my_char(Allocation ain1, Script.LaunchOptions sc) { 3383 // check ain1 3384 if (!ain1.getType().getElement().isCompatible(__I8)) { 3385 throw new RSRuntimeException("Type mismatch with I8!"); 3386 } 3387 Allocation aout = Allocation.createSized(mRSLocal, __I8, 1); 3388 aout.setAutoPadding(true); 3389 reduce(mExportReduceIdx_my_char, new Allocation[]{ain1}, aout, sc); 3390 return new result_char(aout); 3391 } 3392 3393 private final static int mExportReduceIdx_my_char2 = 19; 3394 // in1 = "val", flattened 2-vectors 3395 public result_char2 reduce_my_char2(byte[] in1) { 3396 // Verify that "in1" is non-null. 3397 if (in1 == null) { 3398 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3399 } 3400 // Verify that the array length is a multiple of the vector size. 3401 if (in1.length % 2 != 0) { 3402 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3403 } 3404 Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); 3405 ain1.setAutoPadding(true); 3406 ain1.copyFrom(in1); 3407 3408 result_char2 result = reduce_my_char2(ain1, null); 3409 result.mTempIns = new Allocation[]{ain1}; 3410 return result; 3411 } 3412 3413 // ain1 = "char2 val" 3414 public result_char2 reduce_my_char2(Allocation ain1) { 3415 return reduce_my_char2(ain1, null); 3416 } 3417 3418 // ain1 = "char2 val" 3419 public result_char2 reduce_my_char2(Allocation ain1, Script.LaunchOptions sc) { 3420 // check ain1 3421 if (!ain1.getType().getElement().isCompatible(__I8_2)) { 3422 throw new RSRuntimeException("Type mismatch with I8_2!"); 3423 } 3424 Allocation aout = Allocation.createSized(mRSLocal, __I8_2, 1); 3425 aout.setAutoPadding(true); 3426 reduce(mExportReduceIdx_my_char2, new Allocation[]{ain1}, aout, sc); 3427 return new result_char2(aout); 3428 } 3429 3430 private final static int mExportReduceIdx_my_char4 = 20; 3431 // in1 = "val", flattened 4-vectors 3432 public result_char4 reduce_my_char4(byte[] in1) { 3433 // Verify that "in1" is non-null. 3434 if (in1 == null) { 3435 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3436 } 3437 // Verify that the array length is a multiple of the vector size. 3438 if (in1.length % 4 != 0) { 3439 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3440 } 3441 Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); 3442 ain1.setAutoPadding(true); 3443 ain1.copyFrom(in1); 3444 3445 result_char4 result = reduce_my_char4(ain1, null); 3446 result.mTempIns = new Allocation[]{ain1}; 3447 return result; 3448 } 3449 3450 // ain1 = "char4 val" 3451 public result_char4 reduce_my_char4(Allocation ain1) { 3452 return reduce_my_char4(ain1, null); 3453 } 3454 3455 // ain1 = "char4 val" 3456 public result_char4 reduce_my_char4(Allocation ain1, Script.LaunchOptions sc) { 3457 // check ain1 3458 if (!ain1.getType().getElement().isCompatible(__I8_4)) { 3459 throw new RSRuntimeException("Type mismatch with I8_4!"); 3460 } 3461 Allocation aout = Allocation.createSized(mRSLocal, __I8_4, 1); 3462 aout.setAutoPadding(true); 3463 reduce(mExportReduceIdx_my_char4, new Allocation[]{ain1}, aout, sc); 3464 return new result_char4(aout); 3465 } 3466 3467 private final static int mExportReduceIdx_my_array_char = 21; 3468 // in1 = "val" 3469 public resultArray7_char reduce_my_array_char(byte[] in1) { 3470 // Verify that "in1" is non-null. 3471 if (in1 == null) { 3472 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3473 } 3474 Allocation ain1 = Allocation.createSized(mRSLocal, __I8, in1.length); 3475 ain1.setAutoPadding(true); 3476 ain1.copyFrom(in1); 3477 3478 resultArray7_char result = reduce_my_array_char(ain1, null); 3479 result.mTempIns = new Allocation[]{ain1}; 3480 return result; 3481 } 3482 3483 // ain1 = "char val" 3484 public resultArray7_char reduce_my_array_char(Allocation ain1) { 3485 return reduce_my_array_char(ain1, null); 3486 } 3487 3488 // ain1 = "char val" 3489 public resultArray7_char reduce_my_array_char(Allocation ain1, Script.LaunchOptions sc) { 3490 // check ain1 3491 if (!ain1.getType().getElement().isCompatible(__I8)) { 3492 throw new RSRuntimeException("Type mismatch with I8!"); 3493 } 3494 Allocation aout = Allocation.createSized(mRSLocal, __I8, 7); 3495 aout.setAutoPadding(true); 3496 reduce(mExportReduceIdx_my_array_char, new Allocation[]{ain1}, aout, sc); 3497 return new resultArray7_char(aout); 3498 } 3499 3500 private final static int mExportReduceIdx_my_array_char2 = 22; 3501 // in1 = "val", flattened 2-vectors 3502 public resultArray7_char2 reduce_my_array_char2(byte[] in1) { 3503 // Verify that "in1" is non-null. 3504 if (in1 == null) { 3505 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3506 } 3507 // Verify that the array length is a multiple of the vector size. 3508 if (in1.length % 2 != 0) { 3509 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3510 } 3511 Allocation ain1 = Allocation.createSized(mRSLocal, __I8_2, in1.length / 2); 3512 ain1.setAutoPadding(true); 3513 ain1.copyFrom(in1); 3514 3515 resultArray7_char2 result = reduce_my_array_char2(ain1, null); 3516 result.mTempIns = new Allocation[]{ain1}; 3517 return result; 3518 } 3519 3520 // ain1 = "char2 val" 3521 public resultArray7_char2 reduce_my_array_char2(Allocation ain1) { 3522 return reduce_my_array_char2(ain1, null); 3523 } 3524 3525 // ain1 = "char2 val" 3526 public resultArray7_char2 reduce_my_array_char2(Allocation ain1, Script.LaunchOptions sc) { 3527 // check ain1 3528 if (!ain1.getType().getElement().isCompatible(__I8_2)) { 3529 throw new RSRuntimeException("Type mismatch with I8_2!"); 3530 } 3531 Allocation aout = Allocation.createSized(mRSLocal, __I8_2, 7); 3532 aout.setAutoPadding(true); 3533 reduce(mExportReduceIdx_my_array_char2, new Allocation[]{ain1}, aout, sc); 3534 return new resultArray7_char2(aout); 3535 } 3536 3537 private final static int mExportReduceIdx_my_array_char4 = 23; 3538 // in1 = "val", flattened 4-vectors 3539 public resultArray7_char4 reduce_my_array_char4(byte[] in1) { 3540 // Verify that "in1" is non-null. 3541 if (in1 == null) { 3542 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3543 } 3544 // Verify that the array length is a multiple of the vector size. 3545 if (in1.length % 4 != 0) { 3546 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3547 } 3548 Allocation ain1 = Allocation.createSized(mRSLocal, __I8_4, in1.length / 4); 3549 ain1.setAutoPadding(true); 3550 ain1.copyFrom(in1); 3551 3552 resultArray7_char4 result = reduce_my_array_char4(ain1, null); 3553 result.mTempIns = new Allocation[]{ain1}; 3554 return result; 3555 } 3556 3557 // ain1 = "char4 val" 3558 public resultArray7_char4 reduce_my_array_char4(Allocation ain1) { 3559 return reduce_my_array_char4(ain1, null); 3560 } 3561 3562 // ain1 = "char4 val" 3563 public resultArray7_char4 reduce_my_array_char4(Allocation ain1, Script.LaunchOptions sc) { 3564 // check ain1 3565 if (!ain1.getType().getElement().isCompatible(__I8_4)) { 3566 throw new RSRuntimeException("Type mismatch with I8_4!"); 3567 } 3568 Allocation aout = Allocation.createSized(mRSLocal, __I8_4, 7); 3569 aout.setAutoPadding(true); 3570 reduce(mExportReduceIdx_my_array_char4, new Allocation[]{ain1}, aout, sc); 3571 return new resultArray7_char4(aout); 3572 } 3573 3574 private final static int mExportReduceIdx_my_short = 24; 3575 // in1 = "val" 3576 public result_short reduce_my_short(short[] in1) { 3577 // Verify that "in1" is non-null. 3578 if (in1 == null) { 3579 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3580 } 3581 Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); 3582 ain1.setAutoPadding(true); 3583 ain1.copyFrom(in1); 3584 3585 result_short result = reduce_my_short(ain1, null); 3586 result.mTempIns = new Allocation[]{ain1}; 3587 return result; 3588 } 3589 3590 // ain1 = "short val" 3591 public result_short reduce_my_short(Allocation ain1) { 3592 return reduce_my_short(ain1, null); 3593 } 3594 3595 // ain1 = "short val" 3596 public result_short reduce_my_short(Allocation ain1, Script.LaunchOptions sc) { 3597 // check ain1 3598 if (!ain1.getType().getElement().isCompatible(__I16)) { 3599 throw new RSRuntimeException("Type mismatch with I16!"); 3600 } 3601 Allocation aout = Allocation.createSized(mRSLocal, __I16, 1); 3602 aout.setAutoPadding(true); 3603 reduce(mExportReduceIdx_my_short, new Allocation[]{ain1}, aout, sc); 3604 return new result_short(aout); 3605 } 3606 3607 private final static int mExportReduceIdx_my_short2 = 25; 3608 // in1 = "val", flattened 2-vectors 3609 public result_short2 reduce_my_short2(short[] in1) { 3610 // Verify that "in1" is non-null. 3611 if (in1 == null) { 3612 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3613 } 3614 // Verify that the array length is a multiple of the vector size. 3615 if (in1.length % 2 != 0) { 3616 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3617 } 3618 Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); 3619 ain1.setAutoPadding(true); 3620 ain1.copyFrom(in1); 3621 3622 result_short2 result = reduce_my_short2(ain1, null); 3623 result.mTempIns = new Allocation[]{ain1}; 3624 return result; 3625 } 3626 3627 // ain1 = "short2 val" 3628 public result_short2 reduce_my_short2(Allocation ain1) { 3629 return reduce_my_short2(ain1, null); 3630 } 3631 3632 // ain1 = "short2 val" 3633 public result_short2 reduce_my_short2(Allocation ain1, Script.LaunchOptions sc) { 3634 // check ain1 3635 if (!ain1.getType().getElement().isCompatible(__I16_2)) { 3636 throw new RSRuntimeException("Type mismatch with I16_2!"); 3637 } 3638 Allocation aout = Allocation.createSized(mRSLocal, __I16_2, 1); 3639 aout.setAutoPadding(true); 3640 reduce(mExportReduceIdx_my_short2, new Allocation[]{ain1}, aout, sc); 3641 return new result_short2(aout); 3642 } 3643 3644 private final static int mExportReduceIdx_my_short4 = 26; 3645 // in1 = "val", flattened 4-vectors 3646 public result_short4 reduce_my_short4(short[] in1) { 3647 // Verify that "in1" is non-null. 3648 if (in1 == null) { 3649 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3650 } 3651 // Verify that the array length is a multiple of the vector size. 3652 if (in1.length % 4 != 0) { 3653 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3654 } 3655 Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); 3656 ain1.setAutoPadding(true); 3657 ain1.copyFrom(in1); 3658 3659 result_short4 result = reduce_my_short4(ain1, null); 3660 result.mTempIns = new Allocation[]{ain1}; 3661 return result; 3662 } 3663 3664 // ain1 = "short4 val" 3665 public result_short4 reduce_my_short4(Allocation ain1) { 3666 return reduce_my_short4(ain1, null); 3667 } 3668 3669 // ain1 = "short4 val" 3670 public result_short4 reduce_my_short4(Allocation ain1, Script.LaunchOptions sc) { 3671 // check ain1 3672 if (!ain1.getType().getElement().isCompatible(__I16_4)) { 3673 throw new RSRuntimeException("Type mismatch with I16_4!"); 3674 } 3675 Allocation aout = Allocation.createSized(mRSLocal, __I16_4, 1); 3676 aout.setAutoPadding(true); 3677 reduce(mExportReduceIdx_my_short4, new Allocation[]{ain1}, aout, sc); 3678 return new result_short4(aout); 3679 } 3680 3681 private final static int mExportReduceIdx_my_array_short = 27; 3682 // in1 = "val" 3683 public resultArray7_short reduce_my_array_short(short[] in1) { 3684 // Verify that "in1" is non-null. 3685 if (in1 == null) { 3686 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3687 } 3688 Allocation ain1 = Allocation.createSized(mRSLocal, __I16, in1.length); 3689 ain1.setAutoPadding(true); 3690 ain1.copyFrom(in1); 3691 3692 resultArray7_short result = reduce_my_array_short(ain1, null); 3693 result.mTempIns = new Allocation[]{ain1}; 3694 return result; 3695 } 3696 3697 // ain1 = "short val" 3698 public resultArray7_short reduce_my_array_short(Allocation ain1) { 3699 return reduce_my_array_short(ain1, null); 3700 } 3701 3702 // ain1 = "short val" 3703 public resultArray7_short reduce_my_array_short(Allocation ain1, Script.LaunchOptions sc) { 3704 // check ain1 3705 if (!ain1.getType().getElement().isCompatible(__I16)) { 3706 throw new RSRuntimeException("Type mismatch with I16!"); 3707 } 3708 Allocation aout = Allocation.createSized(mRSLocal, __I16, 7); 3709 aout.setAutoPadding(true); 3710 reduce(mExportReduceIdx_my_array_short, new Allocation[]{ain1}, aout, sc); 3711 return new resultArray7_short(aout); 3712 } 3713 3714 private final static int mExportReduceIdx_my_array_short2 = 28; 3715 // in1 = "val", flattened 2-vectors 3716 public resultArray7_short2 reduce_my_array_short2(short[] in1) { 3717 // Verify that "in1" is non-null. 3718 if (in1 == null) { 3719 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3720 } 3721 // Verify that the array length is a multiple of the vector size. 3722 if (in1.length % 2 != 0) { 3723 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3724 } 3725 Allocation ain1 = Allocation.createSized(mRSLocal, __I16_2, in1.length / 2); 3726 ain1.setAutoPadding(true); 3727 ain1.copyFrom(in1); 3728 3729 resultArray7_short2 result = reduce_my_array_short2(ain1, null); 3730 result.mTempIns = new Allocation[]{ain1}; 3731 return result; 3732 } 3733 3734 // ain1 = "short2 val" 3735 public resultArray7_short2 reduce_my_array_short2(Allocation ain1) { 3736 return reduce_my_array_short2(ain1, null); 3737 } 3738 3739 // ain1 = "short2 val" 3740 public resultArray7_short2 reduce_my_array_short2(Allocation ain1, Script.LaunchOptions sc) { 3741 // check ain1 3742 if (!ain1.getType().getElement().isCompatible(__I16_2)) { 3743 throw new RSRuntimeException("Type mismatch with I16_2!"); 3744 } 3745 Allocation aout = Allocation.createSized(mRSLocal, __I16_2, 7); 3746 aout.setAutoPadding(true); 3747 reduce(mExportReduceIdx_my_array_short2, new Allocation[]{ain1}, aout, sc); 3748 return new resultArray7_short2(aout); 3749 } 3750 3751 private final static int mExportReduceIdx_my_array_short4 = 29; 3752 // in1 = "val", flattened 4-vectors 3753 public resultArray7_short4 reduce_my_array_short4(short[] in1) { 3754 // Verify that "in1" is non-null. 3755 if (in1 == null) { 3756 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3757 } 3758 // Verify that the array length is a multiple of the vector size. 3759 if (in1.length % 4 != 0) { 3760 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3761 } 3762 Allocation ain1 = Allocation.createSized(mRSLocal, __I16_4, in1.length / 4); 3763 ain1.setAutoPadding(true); 3764 ain1.copyFrom(in1); 3765 3766 resultArray7_short4 result = reduce_my_array_short4(ain1, null); 3767 result.mTempIns = new Allocation[]{ain1}; 3768 return result; 3769 } 3770 3771 // ain1 = "short4 val" 3772 public resultArray7_short4 reduce_my_array_short4(Allocation ain1) { 3773 return reduce_my_array_short4(ain1, null); 3774 } 3775 3776 // ain1 = "short4 val" 3777 public resultArray7_short4 reduce_my_array_short4(Allocation ain1, Script.LaunchOptions sc) { 3778 // check ain1 3779 if (!ain1.getType().getElement().isCompatible(__I16_4)) { 3780 throw new RSRuntimeException("Type mismatch with I16_4!"); 3781 } 3782 Allocation aout = Allocation.createSized(mRSLocal, __I16_4, 7); 3783 aout.setAutoPadding(true); 3784 reduce(mExportReduceIdx_my_array_short4, new Allocation[]{ain1}, aout, sc); 3785 return new resultArray7_short4(aout); 3786 } 3787 3788 private final static int mExportReduceIdx_my_int = 30; 3789 // in1 = "val" 3790 public result_int reduce_my_int(int[] in1) { 3791 // Verify that "in1" is non-null. 3792 if (in1 == null) { 3793 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3794 } 3795 Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); 3796 ain1.setAutoPadding(true); 3797 ain1.copyFrom(in1); 3798 3799 result_int result = reduce_my_int(ain1, null); 3800 result.mTempIns = new Allocation[]{ain1}; 3801 return result; 3802 } 3803 3804 // ain1 = "int val" 3805 public result_int reduce_my_int(Allocation ain1) { 3806 return reduce_my_int(ain1, null); 3807 } 3808 3809 // ain1 = "int val" 3810 public result_int reduce_my_int(Allocation ain1, Script.LaunchOptions sc) { 3811 // check ain1 3812 if (!ain1.getType().getElement().isCompatible(__I32)) { 3813 throw new RSRuntimeException("Type mismatch with I32!"); 3814 } 3815 Allocation aout = Allocation.createSized(mRSLocal, __I32, 1); 3816 aout.setAutoPadding(true); 3817 reduce(mExportReduceIdx_my_int, new Allocation[]{ain1}, aout, sc); 3818 return new result_int(aout); 3819 } 3820 3821 private final static int mExportReduceIdx_my_int2 = 31; 3822 // in1 = "val", flattened 2-vectors 3823 public result_int2 reduce_my_int2(int[] in1) { 3824 // Verify that "in1" is non-null. 3825 if (in1 == null) { 3826 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3827 } 3828 // Verify that the array length is a multiple of the vector size. 3829 if (in1.length % 2 != 0) { 3830 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3831 } 3832 Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); 3833 ain1.setAutoPadding(true); 3834 ain1.copyFrom(in1); 3835 3836 result_int2 result = reduce_my_int2(ain1, null); 3837 result.mTempIns = new Allocation[]{ain1}; 3838 return result; 3839 } 3840 3841 // ain1 = "int2 val" 3842 public result_int2 reduce_my_int2(Allocation ain1) { 3843 return reduce_my_int2(ain1, null); 3844 } 3845 3846 // ain1 = "int2 val" 3847 public result_int2 reduce_my_int2(Allocation ain1, Script.LaunchOptions sc) { 3848 // check ain1 3849 if (!ain1.getType().getElement().isCompatible(__I32_2)) { 3850 throw new RSRuntimeException("Type mismatch with I32_2!"); 3851 } 3852 Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 1); 3853 aout.setAutoPadding(true); 3854 reduce(mExportReduceIdx_my_int2, new Allocation[]{ain1}, aout, sc); 3855 return new result_int2(aout); 3856 } 3857 3858 private final static int mExportReduceIdx_my_int4 = 32; 3859 // in1 = "val", flattened 4-vectors 3860 public result_int4 reduce_my_int4(int[] in1) { 3861 // Verify that "in1" is non-null. 3862 if (in1 == null) { 3863 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3864 } 3865 // Verify that the array length is a multiple of the vector size. 3866 if (in1.length % 4 != 0) { 3867 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3868 } 3869 Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); 3870 ain1.setAutoPadding(true); 3871 ain1.copyFrom(in1); 3872 3873 result_int4 result = reduce_my_int4(ain1, null); 3874 result.mTempIns = new Allocation[]{ain1}; 3875 return result; 3876 } 3877 3878 // ain1 = "int4 val" 3879 public result_int4 reduce_my_int4(Allocation ain1) { 3880 return reduce_my_int4(ain1, null); 3881 } 3882 3883 // ain1 = "int4 val" 3884 public result_int4 reduce_my_int4(Allocation ain1, Script.LaunchOptions sc) { 3885 // check ain1 3886 if (!ain1.getType().getElement().isCompatible(__I32_4)) { 3887 throw new RSRuntimeException("Type mismatch with I32_4!"); 3888 } 3889 Allocation aout = Allocation.createSized(mRSLocal, __I32_4, 1); 3890 aout.setAutoPadding(true); 3891 reduce(mExportReduceIdx_my_int4, new Allocation[]{ain1}, aout, sc); 3892 return new result_int4(aout); 3893 } 3894 3895 private final static int mExportReduceIdx_my_array_int = 33; 3896 // in1 = "val" 3897 public resultArray7_int reduce_my_array_int(int[] in1) { 3898 // Verify that "in1" is non-null. 3899 if (in1 == null) { 3900 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3901 } 3902 Allocation ain1 = Allocation.createSized(mRSLocal, __I32, in1.length); 3903 ain1.setAutoPadding(true); 3904 ain1.copyFrom(in1); 3905 3906 resultArray7_int result = reduce_my_array_int(ain1, null); 3907 result.mTempIns = new Allocation[]{ain1}; 3908 return result; 3909 } 3910 3911 // ain1 = "int val" 3912 public resultArray7_int reduce_my_array_int(Allocation ain1) { 3913 return reduce_my_array_int(ain1, null); 3914 } 3915 3916 // ain1 = "int val" 3917 public resultArray7_int reduce_my_array_int(Allocation ain1, Script.LaunchOptions sc) { 3918 // check ain1 3919 if (!ain1.getType().getElement().isCompatible(__I32)) { 3920 throw new RSRuntimeException("Type mismatch with I32!"); 3921 } 3922 Allocation aout = Allocation.createSized(mRSLocal, __I32, 7); 3923 aout.setAutoPadding(true); 3924 reduce(mExportReduceIdx_my_array_int, new Allocation[]{ain1}, aout, sc); 3925 return new resultArray7_int(aout); 3926 } 3927 3928 private final static int mExportReduceIdx_my_array_int2 = 34; 3929 // in1 = "val", flattened 2-vectors 3930 public resultArray7_int2 reduce_my_array_int2(int[] in1) { 3931 // Verify that "in1" is non-null. 3932 if (in1 == null) { 3933 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3934 } 3935 // Verify that the array length is a multiple of the vector size. 3936 if (in1.length % 2 != 0) { 3937 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 3938 } 3939 Allocation ain1 = Allocation.createSized(mRSLocal, __I32_2, in1.length / 2); 3940 ain1.setAutoPadding(true); 3941 ain1.copyFrom(in1); 3942 3943 resultArray7_int2 result = reduce_my_array_int2(ain1, null); 3944 result.mTempIns = new Allocation[]{ain1}; 3945 return result; 3946 } 3947 3948 // ain1 = "int2 val" 3949 public resultArray7_int2 reduce_my_array_int2(Allocation ain1) { 3950 return reduce_my_array_int2(ain1, null); 3951 } 3952 3953 // ain1 = "int2 val" 3954 public resultArray7_int2 reduce_my_array_int2(Allocation ain1, Script.LaunchOptions sc) { 3955 // check ain1 3956 if (!ain1.getType().getElement().isCompatible(__I32_2)) { 3957 throw new RSRuntimeException("Type mismatch with I32_2!"); 3958 } 3959 Allocation aout = Allocation.createSized(mRSLocal, __I32_2, 7); 3960 aout.setAutoPadding(true); 3961 reduce(mExportReduceIdx_my_array_int2, new Allocation[]{ain1}, aout, sc); 3962 return new resultArray7_int2(aout); 3963 } 3964 3965 private final static int mExportReduceIdx_my_array_int4 = 35; 3966 // in1 = "val", flattened 4-vectors 3967 public resultArray7_int4 reduce_my_array_int4(int[] in1) { 3968 // Verify that "in1" is non-null. 3969 if (in1 == null) { 3970 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 3971 } 3972 // Verify that the array length is a multiple of the vector size. 3973 if (in1.length % 4 != 0) { 3974 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 3975 } 3976 Allocation ain1 = Allocation.createSized(mRSLocal, __I32_4, in1.length / 4); 3977 ain1.setAutoPadding(true); 3978 ain1.copyFrom(in1); 3979 3980 resultArray7_int4 result = reduce_my_array_int4(ain1, null); 3981 result.mTempIns = new Allocation[]{ain1}; 3982 return result; 3983 } 3984 3985 // ain1 = "int4 val" 3986 public resultArray7_int4 reduce_my_array_int4(Allocation ain1) { 3987 return reduce_my_array_int4(ain1, null); 3988 } 3989 3990 // ain1 = "int4 val" 3991 public resultArray7_int4 reduce_my_array_int4(Allocation ain1, Script.LaunchOptions sc) { 3992 // check ain1 3993 if (!ain1.getType().getElement().isCompatible(__I32_4)) { 3994 throw new RSRuntimeException("Type mismatch with I32_4!"); 3995 } 3996 Allocation aout = Allocation.createSized(mRSLocal, __I32_4, 7); 3997 aout.setAutoPadding(true); 3998 reduce(mExportReduceIdx_my_array_int4, new Allocation[]{ain1}, aout, sc); 3999 return new resultArray7_int4(aout); 4000 } 4001 4002 private final static int mExportReduceIdx_my_long = 36; 4003 // in1 = "val" 4004 public result_long reduce_my_long(long[] in1) { 4005 // Verify that "in1" is non-null. 4006 if (in1 == null) { 4007 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4008 } 4009 Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); 4010 ain1.setAutoPadding(true); 4011 ain1.copyFrom(in1); 4012 4013 result_long result = reduce_my_long(ain1, null); 4014 result.mTempIns = new Allocation[]{ain1}; 4015 return result; 4016 } 4017 4018 // ain1 = "long val" 4019 public result_long reduce_my_long(Allocation ain1) { 4020 return reduce_my_long(ain1, null); 4021 } 4022 4023 // ain1 = "long val" 4024 public result_long reduce_my_long(Allocation ain1, Script.LaunchOptions sc) { 4025 // check ain1 4026 if (!ain1.getType().getElement().isCompatible(__I64)) { 4027 throw new RSRuntimeException("Type mismatch with I64!"); 4028 } 4029 Allocation aout = Allocation.createSized(mRSLocal, __I64, 1); 4030 aout.setAutoPadding(true); 4031 reduce(mExportReduceIdx_my_long, new Allocation[]{ain1}, aout, sc); 4032 return new result_long(aout); 4033 } 4034 4035 private final static int mExportReduceIdx_my_long2 = 37; 4036 // in1 = "val", flattened 2-vectors 4037 public result_long2 reduce_my_long2(long[] in1) { 4038 // Verify that "in1" is non-null. 4039 if (in1 == null) { 4040 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4041 } 4042 // Verify that the array length is a multiple of the vector size. 4043 if (in1.length % 2 != 0) { 4044 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4045 } 4046 Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); 4047 ain1.setAutoPadding(true); 4048 ain1.copyFrom(in1); 4049 4050 result_long2 result = reduce_my_long2(ain1, null); 4051 result.mTempIns = new Allocation[]{ain1}; 4052 return result; 4053 } 4054 4055 // ain1 = "long2 val" 4056 public result_long2 reduce_my_long2(Allocation ain1) { 4057 return reduce_my_long2(ain1, null); 4058 } 4059 4060 // ain1 = "long2 val" 4061 public result_long2 reduce_my_long2(Allocation ain1, Script.LaunchOptions sc) { 4062 // check ain1 4063 if (!ain1.getType().getElement().isCompatible(__I64_2)) { 4064 throw new RSRuntimeException("Type mismatch with I64_2!"); 4065 } 4066 Allocation aout = Allocation.createSized(mRSLocal, __I64_2, 1); 4067 aout.setAutoPadding(true); 4068 reduce(mExportReduceIdx_my_long2, new Allocation[]{ain1}, aout, sc); 4069 return new result_long2(aout); 4070 } 4071 4072 private final static int mExportReduceIdx_my_long4 = 38; 4073 // in1 = "val", flattened 4-vectors 4074 public result_long4 reduce_my_long4(long[] in1) { 4075 // Verify that "in1" is non-null. 4076 if (in1 == null) { 4077 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4078 } 4079 // Verify that the array length is a multiple of the vector size. 4080 if (in1.length % 4 != 0) { 4081 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4082 } 4083 Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); 4084 ain1.setAutoPadding(true); 4085 ain1.copyFrom(in1); 4086 4087 result_long4 result = reduce_my_long4(ain1, null); 4088 result.mTempIns = new Allocation[]{ain1}; 4089 return result; 4090 } 4091 4092 // ain1 = "long4 val" 4093 public result_long4 reduce_my_long4(Allocation ain1) { 4094 return reduce_my_long4(ain1, null); 4095 } 4096 4097 // ain1 = "long4 val" 4098 public result_long4 reduce_my_long4(Allocation ain1, Script.LaunchOptions sc) { 4099 // check ain1 4100 if (!ain1.getType().getElement().isCompatible(__I64_4)) { 4101 throw new RSRuntimeException("Type mismatch with I64_4!"); 4102 } 4103 Allocation aout = Allocation.createSized(mRSLocal, __I64_4, 1); 4104 aout.setAutoPadding(true); 4105 reduce(mExportReduceIdx_my_long4, new Allocation[]{ain1}, aout, sc); 4106 return new result_long4(aout); 4107 } 4108 4109 private final static int mExportReduceIdx_my_array_long = 39; 4110 // in1 = "val" 4111 public resultArray7_long reduce_my_array_long(long[] in1) { 4112 // Verify that "in1" is non-null. 4113 if (in1 == null) { 4114 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4115 } 4116 Allocation ain1 = Allocation.createSized(mRSLocal, __I64, in1.length); 4117 ain1.setAutoPadding(true); 4118 ain1.copyFrom(in1); 4119 4120 resultArray7_long result = reduce_my_array_long(ain1, null); 4121 result.mTempIns = new Allocation[]{ain1}; 4122 return result; 4123 } 4124 4125 // ain1 = "long val" 4126 public resultArray7_long reduce_my_array_long(Allocation ain1) { 4127 return reduce_my_array_long(ain1, null); 4128 } 4129 4130 // ain1 = "long val" 4131 public resultArray7_long reduce_my_array_long(Allocation ain1, Script.LaunchOptions sc) { 4132 // check ain1 4133 if (!ain1.getType().getElement().isCompatible(__I64)) { 4134 throw new RSRuntimeException("Type mismatch with I64!"); 4135 } 4136 Allocation aout = Allocation.createSized(mRSLocal, __I64, 7); 4137 aout.setAutoPadding(true); 4138 reduce(mExportReduceIdx_my_array_long, new Allocation[]{ain1}, aout, sc); 4139 return new resultArray7_long(aout); 4140 } 4141 4142 private final static int mExportReduceIdx_my_array_long2 = 40; 4143 // in1 = "val", flattened 2-vectors 4144 public resultArray7_long2 reduce_my_array_long2(long[] in1) { 4145 // Verify that "in1" is non-null. 4146 if (in1 == null) { 4147 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4148 } 4149 // Verify that the array length is a multiple of the vector size. 4150 if (in1.length % 2 != 0) { 4151 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4152 } 4153 Allocation ain1 = Allocation.createSized(mRSLocal, __I64_2, in1.length / 2); 4154 ain1.setAutoPadding(true); 4155 ain1.copyFrom(in1); 4156 4157 resultArray7_long2 result = reduce_my_array_long2(ain1, null); 4158 result.mTempIns = new Allocation[]{ain1}; 4159 return result; 4160 } 4161 4162 // ain1 = "long2 val" 4163 public resultArray7_long2 reduce_my_array_long2(Allocation ain1) { 4164 return reduce_my_array_long2(ain1, null); 4165 } 4166 4167 // ain1 = "long2 val" 4168 public resultArray7_long2 reduce_my_array_long2(Allocation ain1, Script.LaunchOptions sc) { 4169 // check ain1 4170 if (!ain1.getType().getElement().isCompatible(__I64_2)) { 4171 throw new RSRuntimeException("Type mismatch with I64_2!"); 4172 } 4173 Allocation aout = Allocation.createSized(mRSLocal, __I64_2, 7); 4174 aout.setAutoPadding(true); 4175 reduce(mExportReduceIdx_my_array_long2, new Allocation[]{ain1}, aout, sc); 4176 return new resultArray7_long2(aout); 4177 } 4178 4179 private final static int mExportReduceIdx_my_array_long4 = 41; 4180 // in1 = "val", flattened 4-vectors 4181 public resultArray7_long4 reduce_my_array_long4(long[] in1) { 4182 // Verify that "in1" is non-null. 4183 if (in1 == null) { 4184 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4185 } 4186 // Verify that the array length is a multiple of the vector size. 4187 if (in1.length % 4 != 0) { 4188 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4189 } 4190 Allocation ain1 = Allocation.createSized(mRSLocal, __I64_4, in1.length / 4); 4191 ain1.setAutoPadding(true); 4192 ain1.copyFrom(in1); 4193 4194 resultArray7_long4 result = reduce_my_array_long4(ain1, null); 4195 result.mTempIns = new Allocation[]{ain1}; 4196 return result; 4197 } 4198 4199 // ain1 = "long4 val" 4200 public resultArray7_long4 reduce_my_array_long4(Allocation ain1) { 4201 return reduce_my_array_long4(ain1, null); 4202 } 4203 4204 // ain1 = "long4 val" 4205 public resultArray7_long4 reduce_my_array_long4(Allocation ain1, Script.LaunchOptions sc) { 4206 // check ain1 4207 if (!ain1.getType().getElement().isCompatible(__I64_4)) { 4208 throw new RSRuntimeException("Type mismatch with I64_4!"); 4209 } 4210 Allocation aout = Allocation.createSized(mRSLocal, __I64_4, 7); 4211 aout.setAutoPadding(true); 4212 reduce(mExportReduceIdx_my_array_long4, new Allocation[]{ain1}, aout, sc); 4213 return new resultArray7_long4(aout); 4214 } 4215 4216 private final static int mExportReduceIdx_my_uchar = 42; 4217 // in1 = "val" 4218 public result_uchar reduce_my_uchar(byte[] in1) { 4219 // Verify that "in1" is non-null. 4220 if (in1 == null) { 4221 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4222 } 4223 Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); 4224 ain1.setAutoPadding(true); 4225 ain1.copyFrom(in1); 4226 4227 result_uchar result = reduce_my_uchar(ain1, null); 4228 result.mTempIns = new Allocation[]{ain1}; 4229 return result; 4230 } 4231 4232 // ain1 = "uchar val" 4233 public result_uchar reduce_my_uchar(Allocation ain1) { 4234 return reduce_my_uchar(ain1, null); 4235 } 4236 4237 // ain1 = "uchar val" 4238 public result_uchar reduce_my_uchar(Allocation ain1, Script.LaunchOptions sc) { 4239 // check ain1 4240 if (!ain1.getType().getElement().isCompatible(__U8)) { 4241 throw new RSRuntimeException("Type mismatch with U8!"); 4242 } 4243 Allocation aout = Allocation.createSized(mRSLocal, __U8, 1); 4244 aout.setAutoPadding(true); 4245 reduce(mExportReduceIdx_my_uchar, new Allocation[]{ain1}, aout, sc); 4246 return new result_uchar(aout); 4247 } 4248 4249 private final static int mExportReduceIdx_my_uchar2 = 43; 4250 // in1 = "val", flattened 2-vectors 4251 public result_uchar2 reduce_my_uchar2(byte[] in1) { 4252 // Verify that "in1" is non-null. 4253 if (in1 == null) { 4254 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4255 } 4256 // Verify that the array length is a multiple of the vector size. 4257 if (in1.length % 2 != 0) { 4258 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4259 } 4260 Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); 4261 ain1.setAutoPadding(true); 4262 ain1.copyFrom(in1); 4263 4264 result_uchar2 result = reduce_my_uchar2(ain1, null); 4265 result.mTempIns = new Allocation[]{ain1}; 4266 return result; 4267 } 4268 4269 // ain1 = "uchar2 val" 4270 public result_uchar2 reduce_my_uchar2(Allocation ain1) { 4271 return reduce_my_uchar2(ain1, null); 4272 } 4273 4274 // ain1 = "uchar2 val" 4275 public result_uchar2 reduce_my_uchar2(Allocation ain1, Script.LaunchOptions sc) { 4276 // check ain1 4277 if (!ain1.getType().getElement().isCompatible(__U8_2)) { 4278 throw new RSRuntimeException("Type mismatch with U8_2!"); 4279 } 4280 Allocation aout = Allocation.createSized(mRSLocal, __U8_2, 1); 4281 aout.setAutoPadding(true); 4282 reduce(mExportReduceIdx_my_uchar2, new Allocation[]{ain1}, aout, sc); 4283 return new result_uchar2(aout); 4284 } 4285 4286 private final static int mExportReduceIdx_my_uchar4 = 44; 4287 // in1 = "val", flattened 4-vectors 4288 public result_uchar4 reduce_my_uchar4(byte[] in1) { 4289 // Verify that "in1" is non-null. 4290 if (in1 == null) { 4291 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4292 } 4293 // Verify that the array length is a multiple of the vector size. 4294 if (in1.length % 4 != 0) { 4295 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4296 } 4297 Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); 4298 ain1.setAutoPadding(true); 4299 ain1.copyFrom(in1); 4300 4301 result_uchar4 result = reduce_my_uchar4(ain1, null); 4302 result.mTempIns = new Allocation[]{ain1}; 4303 return result; 4304 } 4305 4306 // ain1 = "uchar4 val" 4307 public result_uchar4 reduce_my_uchar4(Allocation ain1) { 4308 return reduce_my_uchar4(ain1, null); 4309 } 4310 4311 // ain1 = "uchar4 val" 4312 public result_uchar4 reduce_my_uchar4(Allocation ain1, Script.LaunchOptions sc) { 4313 // check ain1 4314 if (!ain1.getType().getElement().isCompatible(__U8_4)) { 4315 throw new RSRuntimeException("Type mismatch with U8_4!"); 4316 } 4317 Allocation aout = Allocation.createSized(mRSLocal, __U8_4, 1); 4318 aout.setAutoPadding(true); 4319 reduce(mExportReduceIdx_my_uchar4, new Allocation[]{ain1}, aout, sc); 4320 return new result_uchar4(aout); 4321 } 4322 4323 private final static int mExportReduceIdx_my_array_uchar = 45; 4324 // in1 = "val" 4325 public resultArray7_uchar reduce_my_array_uchar(byte[] in1) { 4326 // Verify that "in1" is non-null. 4327 if (in1 == null) { 4328 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4329 } 4330 Allocation ain1 = Allocation.createSized(mRSLocal, __U8, in1.length); 4331 ain1.setAutoPadding(true); 4332 ain1.copyFrom(in1); 4333 4334 resultArray7_uchar result = reduce_my_array_uchar(ain1, null); 4335 result.mTempIns = new Allocation[]{ain1}; 4336 return result; 4337 } 4338 4339 // ain1 = "uchar val" 4340 public resultArray7_uchar reduce_my_array_uchar(Allocation ain1) { 4341 return reduce_my_array_uchar(ain1, null); 4342 } 4343 4344 // ain1 = "uchar val" 4345 public resultArray7_uchar reduce_my_array_uchar(Allocation ain1, Script.LaunchOptions sc) { 4346 // check ain1 4347 if (!ain1.getType().getElement().isCompatible(__U8)) { 4348 throw new RSRuntimeException("Type mismatch with U8!"); 4349 } 4350 Allocation aout = Allocation.createSized(mRSLocal, __U8, 7); 4351 aout.setAutoPadding(true); 4352 reduce(mExportReduceIdx_my_array_uchar, new Allocation[]{ain1}, aout, sc); 4353 return new resultArray7_uchar(aout); 4354 } 4355 4356 private final static int mExportReduceIdx_my_array_uchar2 = 46; 4357 // in1 = "val", flattened 2-vectors 4358 public resultArray7_uchar2 reduce_my_array_uchar2(byte[] in1) { 4359 // Verify that "in1" is non-null. 4360 if (in1 == null) { 4361 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4362 } 4363 // Verify that the array length is a multiple of the vector size. 4364 if (in1.length % 2 != 0) { 4365 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4366 } 4367 Allocation ain1 = Allocation.createSized(mRSLocal, __U8_2, in1.length / 2); 4368 ain1.setAutoPadding(true); 4369 ain1.copyFrom(in1); 4370 4371 resultArray7_uchar2 result = reduce_my_array_uchar2(ain1, null); 4372 result.mTempIns = new Allocation[]{ain1}; 4373 return result; 4374 } 4375 4376 // ain1 = "uchar2 val" 4377 public resultArray7_uchar2 reduce_my_array_uchar2(Allocation ain1) { 4378 return reduce_my_array_uchar2(ain1, null); 4379 } 4380 4381 // ain1 = "uchar2 val" 4382 public resultArray7_uchar2 reduce_my_array_uchar2(Allocation ain1, Script.LaunchOptions sc) { 4383 // check ain1 4384 if (!ain1.getType().getElement().isCompatible(__U8_2)) { 4385 throw new RSRuntimeException("Type mismatch with U8_2!"); 4386 } 4387 Allocation aout = Allocation.createSized(mRSLocal, __U8_2, 7); 4388 aout.setAutoPadding(true); 4389 reduce(mExportReduceIdx_my_array_uchar2, new Allocation[]{ain1}, aout, sc); 4390 return new resultArray7_uchar2(aout); 4391 } 4392 4393 private final static int mExportReduceIdx_my_array_uchar4 = 47; 4394 // in1 = "val", flattened 4-vectors 4395 public resultArray7_uchar4 reduce_my_array_uchar4(byte[] in1) { 4396 // Verify that "in1" is non-null. 4397 if (in1 == null) { 4398 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4399 } 4400 // Verify that the array length is a multiple of the vector size. 4401 if (in1.length % 4 != 0) { 4402 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4403 } 4404 Allocation ain1 = Allocation.createSized(mRSLocal, __U8_4, in1.length / 4); 4405 ain1.setAutoPadding(true); 4406 ain1.copyFrom(in1); 4407 4408 resultArray7_uchar4 result = reduce_my_array_uchar4(ain1, null); 4409 result.mTempIns = new Allocation[]{ain1}; 4410 return result; 4411 } 4412 4413 // ain1 = "uchar4 val" 4414 public resultArray7_uchar4 reduce_my_array_uchar4(Allocation ain1) { 4415 return reduce_my_array_uchar4(ain1, null); 4416 } 4417 4418 // ain1 = "uchar4 val" 4419 public resultArray7_uchar4 reduce_my_array_uchar4(Allocation ain1, Script.LaunchOptions sc) { 4420 // check ain1 4421 if (!ain1.getType().getElement().isCompatible(__U8_4)) { 4422 throw new RSRuntimeException("Type mismatch with U8_4!"); 4423 } 4424 Allocation aout = Allocation.createSized(mRSLocal, __U8_4, 7); 4425 aout.setAutoPadding(true); 4426 reduce(mExportReduceIdx_my_array_uchar4, new Allocation[]{ain1}, aout, sc); 4427 return new resultArray7_uchar4(aout); 4428 } 4429 4430 private final static int mExportReduceIdx_my_ushort = 48; 4431 // in1 = "val" 4432 public result_ushort reduce_my_ushort(short[] in1) { 4433 // Verify that "in1" is non-null. 4434 if (in1 == null) { 4435 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4436 } 4437 Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); 4438 ain1.setAutoPadding(true); 4439 ain1.copyFrom(in1); 4440 4441 result_ushort result = reduce_my_ushort(ain1, null); 4442 result.mTempIns = new Allocation[]{ain1}; 4443 return result; 4444 } 4445 4446 // ain1 = "ushort val" 4447 public result_ushort reduce_my_ushort(Allocation ain1) { 4448 return reduce_my_ushort(ain1, null); 4449 } 4450 4451 // ain1 = "ushort val" 4452 public result_ushort reduce_my_ushort(Allocation ain1, Script.LaunchOptions sc) { 4453 // check ain1 4454 if (!ain1.getType().getElement().isCompatible(__U16)) { 4455 throw new RSRuntimeException("Type mismatch with U16!"); 4456 } 4457 Allocation aout = Allocation.createSized(mRSLocal, __U16, 1); 4458 aout.setAutoPadding(true); 4459 reduce(mExportReduceIdx_my_ushort, new Allocation[]{ain1}, aout, sc); 4460 return new result_ushort(aout); 4461 } 4462 4463 private final static int mExportReduceIdx_my_ushort2 = 49; 4464 // in1 = "val", flattened 2-vectors 4465 public result_ushort2 reduce_my_ushort2(short[] in1) { 4466 // Verify that "in1" is non-null. 4467 if (in1 == null) { 4468 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4469 } 4470 // Verify that the array length is a multiple of the vector size. 4471 if (in1.length % 2 != 0) { 4472 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4473 } 4474 Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); 4475 ain1.setAutoPadding(true); 4476 ain1.copyFrom(in1); 4477 4478 result_ushort2 result = reduce_my_ushort2(ain1, null); 4479 result.mTempIns = new Allocation[]{ain1}; 4480 return result; 4481 } 4482 4483 // ain1 = "ushort2 val" 4484 public result_ushort2 reduce_my_ushort2(Allocation ain1) { 4485 return reduce_my_ushort2(ain1, null); 4486 } 4487 4488 // ain1 = "ushort2 val" 4489 public result_ushort2 reduce_my_ushort2(Allocation ain1, Script.LaunchOptions sc) { 4490 // check ain1 4491 if (!ain1.getType().getElement().isCompatible(__U16_2)) { 4492 throw new RSRuntimeException("Type mismatch with U16_2!"); 4493 } 4494 Allocation aout = Allocation.createSized(mRSLocal, __U16_2, 1); 4495 aout.setAutoPadding(true); 4496 reduce(mExportReduceIdx_my_ushort2, new Allocation[]{ain1}, aout, sc); 4497 return new result_ushort2(aout); 4498 } 4499 4500 private final static int mExportReduceIdx_my_ushort4 = 50; 4501 // in1 = "val", flattened 4-vectors 4502 public result_ushort4 reduce_my_ushort4(short[] in1) { 4503 // Verify that "in1" is non-null. 4504 if (in1 == null) { 4505 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4506 } 4507 // Verify that the array length is a multiple of the vector size. 4508 if (in1.length % 4 != 0) { 4509 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4510 } 4511 Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); 4512 ain1.setAutoPadding(true); 4513 ain1.copyFrom(in1); 4514 4515 result_ushort4 result = reduce_my_ushort4(ain1, null); 4516 result.mTempIns = new Allocation[]{ain1}; 4517 return result; 4518 } 4519 4520 // ain1 = "ushort4 val" 4521 public result_ushort4 reduce_my_ushort4(Allocation ain1) { 4522 return reduce_my_ushort4(ain1, null); 4523 } 4524 4525 // ain1 = "ushort4 val" 4526 public result_ushort4 reduce_my_ushort4(Allocation ain1, Script.LaunchOptions sc) { 4527 // check ain1 4528 if (!ain1.getType().getElement().isCompatible(__U16_4)) { 4529 throw new RSRuntimeException("Type mismatch with U16_4!"); 4530 } 4531 Allocation aout = Allocation.createSized(mRSLocal, __U16_4, 1); 4532 aout.setAutoPadding(true); 4533 reduce(mExportReduceIdx_my_ushort4, new Allocation[]{ain1}, aout, sc); 4534 return new result_ushort4(aout); 4535 } 4536 4537 private final static int mExportReduceIdx_my_array_ushort = 51; 4538 // in1 = "val" 4539 public resultArray7_ushort reduce_my_array_ushort(short[] in1) { 4540 // Verify that "in1" is non-null. 4541 if (in1 == null) { 4542 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4543 } 4544 Allocation ain1 = Allocation.createSized(mRSLocal, __U16, in1.length); 4545 ain1.setAutoPadding(true); 4546 ain1.copyFrom(in1); 4547 4548 resultArray7_ushort result = reduce_my_array_ushort(ain1, null); 4549 result.mTempIns = new Allocation[]{ain1}; 4550 return result; 4551 } 4552 4553 // ain1 = "ushort val" 4554 public resultArray7_ushort reduce_my_array_ushort(Allocation ain1) { 4555 return reduce_my_array_ushort(ain1, null); 4556 } 4557 4558 // ain1 = "ushort val" 4559 public resultArray7_ushort reduce_my_array_ushort(Allocation ain1, Script.LaunchOptions sc) { 4560 // check ain1 4561 if (!ain1.getType().getElement().isCompatible(__U16)) { 4562 throw new RSRuntimeException("Type mismatch with U16!"); 4563 } 4564 Allocation aout = Allocation.createSized(mRSLocal, __U16, 7); 4565 aout.setAutoPadding(true); 4566 reduce(mExportReduceIdx_my_array_ushort, new Allocation[]{ain1}, aout, sc); 4567 return new resultArray7_ushort(aout); 4568 } 4569 4570 private final static int mExportReduceIdx_my_array_ushort2 = 52; 4571 // in1 = "val", flattened 2-vectors 4572 public resultArray7_ushort2 reduce_my_array_ushort2(short[] in1) { 4573 // Verify that "in1" is non-null. 4574 if (in1 == null) { 4575 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4576 } 4577 // Verify that the array length is a multiple of the vector size. 4578 if (in1.length % 2 != 0) { 4579 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4580 } 4581 Allocation ain1 = Allocation.createSized(mRSLocal, __U16_2, in1.length / 2); 4582 ain1.setAutoPadding(true); 4583 ain1.copyFrom(in1); 4584 4585 resultArray7_ushort2 result = reduce_my_array_ushort2(ain1, null); 4586 result.mTempIns = new Allocation[]{ain1}; 4587 return result; 4588 } 4589 4590 // ain1 = "ushort2 val" 4591 public resultArray7_ushort2 reduce_my_array_ushort2(Allocation ain1) { 4592 return reduce_my_array_ushort2(ain1, null); 4593 } 4594 4595 // ain1 = "ushort2 val" 4596 public resultArray7_ushort2 reduce_my_array_ushort2(Allocation ain1, Script.LaunchOptions sc) { 4597 // check ain1 4598 if (!ain1.getType().getElement().isCompatible(__U16_2)) { 4599 throw new RSRuntimeException("Type mismatch with U16_2!"); 4600 } 4601 Allocation aout = Allocation.createSized(mRSLocal, __U16_2, 7); 4602 aout.setAutoPadding(true); 4603 reduce(mExportReduceIdx_my_array_ushort2, new Allocation[]{ain1}, aout, sc); 4604 return new resultArray7_ushort2(aout); 4605 } 4606 4607 private final static int mExportReduceIdx_my_array_ushort4 = 53; 4608 // in1 = "val", flattened 4-vectors 4609 public resultArray7_ushort4 reduce_my_array_ushort4(short[] in1) { 4610 // Verify that "in1" is non-null. 4611 if (in1 == null) { 4612 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4613 } 4614 // Verify that the array length is a multiple of the vector size. 4615 if (in1.length % 4 != 0) { 4616 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4617 } 4618 Allocation ain1 = Allocation.createSized(mRSLocal, __U16_4, in1.length / 4); 4619 ain1.setAutoPadding(true); 4620 ain1.copyFrom(in1); 4621 4622 resultArray7_ushort4 result = reduce_my_array_ushort4(ain1, null); 4623 result.mTempIns = new Allocation[]{ain1}; 4624 return result; 4625 } 4626 4627 // ain1 = "ushort4 val" 4628 public resultArray7_ushort4 reduce_my_array_ushort4(Allocation ain1) { 4629 return reduce_my_array_ushort4(ain1, null); 4630 } 4631 4632 // ain1 = "ushort4 val" 4633 public resultArray7_ushort4 reduce_my_array_ushort4(Allocation ain1, Script.LaunchOptions sc) { 4634 // check ain1 4635 if (!ain1.getType().getElement().isCompatible(__U16_4)) { 4636 throw new RSRuntimeException("Type mismatch with U16_4!"); 4637 } 4638 Allocation aout = Allocation.createSized(mRSLocal, __U16_4, 7); 4639 aout.setAutoPadding(true); 4640 reduce(mExportReduceIdx_my_array_ushort4, new Allocation[]{ain1}, aout, sc); 4641 return new resultArray7_ushort4(aout); 4642 } 4643 4644 private final static int mExportReduceIdx_my_uint = 54; 4645 // in1 = "val" 4646 public result_uint reduce_my_uint(int[] in1) { 4647 // Verify that "in1" is non-null. 4648 if (in1 == null) { 4649 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4650 } 4651 Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); 4652 ain1.setAutoPadding(true); 4653 ain1.copyFrom(in1); 4654 4655 result_uint result = reduce_my_uint(ain1, null); 4656 result.mTempIns = new Allocation[]{ain1}; 4657 return result; 4658 } 4659 4660 // ain1 = "uint val" 4661 public result_uint reduce_my_uint(Allocation ain1) { 4662 return reduce_my_uint(ain1, null); 4663 } 4664 4665 // ain1 = "uint val" 4666 public result_uint reduce_my_uint(Allocation ain1, Script.LaunchOptions sc) { 4667 // check ain1 4668 if (!ain1.getType().getElement().isCompatible(__U32)) { 4669 throw new RSRuntimeException("Type mismatch with U32!"); 4670 } 4671 Allocation aout = Allocation.createSized(mRSLocal, __U32, 1); 4672 aout.setAutoPadding(true); 4673 reduce(mExportReduceIdx_my_uint, new Allocation[]{ain1}, aout, sc); 4674 return new result_uint(aout); 4675 } 4676 4677 private final static int mExportReduceIdx_my_uint2 = 55; 4678 // in1 = "val", flattened 2-vectors 4679 public result_uint2 reduce_my_uint2(int[] in1) { 4680 // Verify that "in1" is non-null. 4681 if (in1 == null) { 4682 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4683 } 4684 // Verify that the array length is a multiple of the vector size. 4685 if (in1.length % 2 != 0) { 4686 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4687 } 4688 Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); 4689 ain1.setAutoPadding(true); 4690 ain1.copyFrom(in1); 4691 4692 result_uint2 result = reduce_my_uint2(ain1, null); 4693 result.mTempIns = new Allocation[]{ain1}; 4694 return result; 4695 } 4696 4697 // ain1 = "uint2 val" 4698 public result_uint2 reduce_my_uint2(Allocation ain1) { 4699 return reduce_my_uint2(ain1, null); 4700 } 4701 4702 // ain1 = "uint2 val" 4703 public result_uint2 reduce_my_uint2(Allocation ain1, Script.LaunchOptions sc) { 4704 // check ain1 4705 if (!ain1.getType().getElement().isCompatible(__U32_2)) { 4706 throw new RSRuntimeException("Type mismatch with U32_2!"); 4707 } 4708 Allocation aout = Allocation.createSized(mRSLocal, __U32_2, 1); 4709 aout.setAutoPadding(true); 4710 reduce(mExportReduceIdx_my_uint2, new Allocation[]{ain1}, aout, sc); 4711 return new result_uint2(aout); 4712 } 4713 4714 private final static int mExportReduceIdx_my_uint4 = 56; 4715 // in1 = "val", flattened 4-vectors 4716 public result_uint4 reduce_my_uint4(int[] in1) { 4717 // Verify that "in1" is non-null. 4718 if (in1 == null) { 4719 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4720 } 4721 // Verify that the array length is a multiple of the vector size. 4722 if (in1.length % 4 != 0) { 4723 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4724 } 4725 Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); 4726 ain1.setAutoPadding(true); 4727 ain1.copyFrom(in1); 4728 4729 result_uint4 result = reduce_my_uint4(ain1, null); 4730 result.mTempIns = new Allocation[]{ain1}; 4731 return result; 4732 } 4733 4734 // ain1 = "uint4 val" 4735 public result_uint4 reduce_my_uint4(Allocation ain1) { 4736 return reduce_my_uint4(ain1, null); 4737 } 4738 4739 // ain1 = "uint4 val" 4740 public result_uint4 reduce_my_uint4(Allocation ain1, Script.LaunchOptions sc) { 4741 // check ain1 4742 if (!ain1.getType().getElement().isCompatible(__U32_4)) { 4743 throw new RSRuntimeException("Type mismatch with U32_4!"); 4744 } 4745 Allocation aout = Allocation.createSized(mRSLocal, __U32_4, 1); 4746 aout.setAutoPadding(true); 4747 reduce(mExportReduceIdx_my_uint4, new Allocation[]{ain1}, aout, sc); 4748 return new result_uint4(aout); 4749 } 4750 4751 private final static int mExportReduceIdx_my_array_uint = 57; 4752 // in1 = "val" 4753 public resultArray7_uint reduce_my_array_uint(int[] in1) { 4754 // Verify that "in1" is non-null. 4755 if (in1 == null) { 4756 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4757 } 4758 Allocation ain1 = Allocation.createSized(mRSLocal, __U32, in1.length); 4759 ain1.setAutoPadding(true); 4760 ain1.copyFrom(in1); 4761 4762 resultArray7_uint result = reduce_my_array_uint(ain1, null); 4763 result.mTempIns = new Allocation[]{ain1}; 4764 return result; 4765 } 4766 4767 // ain1 = "uint val" 4768 public resultArray7_uint reduce_my_array_uint(Allocation ain1) { 4769 return reduce_my_array_uint(ain1, null); 4770 } 4771 4772 // ain1 = "uint val" 4773 public resultArray7_uint reduce_my_array_uint(Allocation ain1, Script.LaunchOptions sc) { 4774 // check ain1 4775 if (!ain1.getType().getElement().isCompatible(__U32)) { 4776 throw new RSRuntimeException("Type mismatch with U32!"); 4777 } 4778 Allocation aout = Allocation.createSized(mRSLocal, __U32, 7); 4779 aout.setAutoPadding(true); 4780 reduce(mExportReduceIdx_my_array_uint, new Allocation[]{ain1}, aout, sc); 4781 return new resultArray7_uint(aout); 4782 } 4783 4784 private final static int mExportReduceIdx_my_array_uint2 = 58; 4785 // in1 = "val", flattened 2-vectors 4786 public resultArray7_uint2 reduce_my_array_uint2(int[] in1) { 4787 // Verify that "in1" is non-null. 4788 if (in1 == null) { 4789 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4790 } 4791 // Verify that the array length is a multiple of the vector size. 4792 if (in1.length % 2 != 0) { 4793 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4794 } 4795 Allocation ain1 = Allocation.createSized(mRSLocal, __U32_2, in1.length / 2); 4796 ain1.setAutoPadding(true); 4797 ain1.copyFrom(in1); 4798 4799 resultArray7_uint2 result = reduce_my_array_uint2(ain1, null); 4800 result.mTempIns = new Allocation[]{ain1}; 4801 return result; 4802 } 4803 4804 // ain1 = "uint2 val" 4805 public resultArray7_uint2 reduce_my_array_uint2(Allocation ain1) { 4806 return reduce_my_array_uint2(ain1, null); 4807 } 4808 4809 // ain1 = "uint2 val" 4810 public resultArray7_uint2 reduce_my_array_uint2(Allocation ain1, Script.LaunchOptions sc) { 4811 // check ain1 4812 if (!ain1.getType().getElement().isCompatible(__U32_2)) { 4813 throw new RSRuntimeException("Type mismatch with U32_2!"); 4814 } 4815 Allocation aout = Allocation.createSized(mRSLocal, __U32_2, 7); 4816 aout.setAutoPadding(true); 4817 reduce(mExportReduceIdx_my_array_uint2, new Allocation[]{ain1}, aout, sc); 4818 return new resultArray7_uint2(aout); 4819 } 4820 4821 private final static int mExportReduceIdx_my_array_uint4 = 59; 4822 // in1 = "val", flattened 4-vectors 4823 public resultArray7_uint4 reduce_my_array_uint4(int[] in1) { 4824 // Verify that "in1" is non-null. 4825 if (in1 == null) { 4826 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4827 } 4828 // Verify that the array length is a multiple of the vector size. 4829 if (in1.length % 4 != 0) { 4830 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4831 } 4832 Allocation ain1 = Allocation.createSized(mRSLocal, __U32_4, in1.length / 4); 4833 ain1.setAutoPadding(true); 4834 ain1.copyFrom(in1); 4835 4836 resultArray7_uint4 result = reduce_my_array_uint4(ain1, null); 4837 result.mTempIns = new Allocation[]{ain1}; 4838 return result; 4839 } 4840 4841 // ain1 = "uint4 val" 4842 public resultArray7_uint4 reduce_my_array_uint4(Allocation ain1) { 4843 return reduce_my_array_uint4(ain1, null); 4844 } 4845 4846 // ain1 = "uint4 val" 4847 public resultArray7_uint4 reduce_my_array_uint4(Allocation ain1, Script.LaunchOptions sc) { 4848 // check ain1 4849 if (!ain1.getType().getElement().isCompatible(__U32_4)) { 4850 throw new RSRuntimeException("Type mismatch with U32_4!"); 4851 } 4852 Allocation aout = Allocation.createSized(mRSLocal, __U32_4, 7); 4853 aout.setAutoPadding(true); 4854 reduce(mExportReduceIdx_my_array_uint4, new Allocation[]{ain1}, aout, sc); 4855 return new resultArray7_uint4(aout); 4856 } 4857 4858 private final static int mExportReduceIdx_my_ulong = 60; 4859 // in1 = "val" 4860 public result_ulong reduce_my_ulong(long[] in1) { 4861 // Verify that "in1" is non-null. 4862 if (in1 == null) { 4863 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4864 } 4865 Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); 4866 ain1.setAutoPadding(true); 4867 ain1.copyFrom(in1); 4868 4869 result_ulong result = reduce_my_ulong(ain1, null); 4870 result.mTempIns = new Allocation[]{ain1}; 4871 return result; 4872 } 4873 4874 // ain1 = "ulong val" 4875 public result_ulong reduce_my_ulong(Allocation ain1) { 4876 return reduce_my_ulong(ain1, null); 4877 } 4878 4879 // ain1 = "ulong val" 4880 public result_ulong reduce_my_ulong(Allocation ain1, Script.LaunchOptions sc) { 4881 // check ain1 4882 if (!ain1.getType().getElement().isCompatible(__U64)) { 4883 throw new RSRuntimeException("Type mismatch with U64!"); 4884 } 4885 Allocation aout = Allocation.createSized(mRSLocal, __U64, 1); 4886 aout.setAutoPadding(true); 4887 reduce(mExportReduceIdx_my_ulong, new Allocation[]{ain1}, aout, sc); 4888 return new result_ulong(aout); 4889 } 4890 4891 private final static int mExportReduceIdx_my_ulong2 = 61; 4892 // in1 = "val", flattened 2-vectors 4893 public result_ulong2 reduce_my_ulong2(long[] in1) { 4894 // Verify that "in1" is non-null. 4895 if (in1 == null) { 4896 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4897 } 4898 // Verify that the array length is a multiple of the vector size. 4899 if (in1.length % 2 != 0) { 4900 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 4901 } 4902 Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); 4903 ain1.setAutoPadding(true); 4904 ain1.copyFrom(in1); 4905 4906 result_ulong2 result = reduce_my_ulong2(ain1, null); 4907 result.mTempIns = new Allocation[]{ain1}; 4908 return result; 4909 } 4910 4911 // ain1 = "ulong2 val" 4912 public result_ulong2 reduce_my_ulong2(Allocation ain1) { 4913 return reduce_my_ulong2(ain1, null); 4914 } 4915 4916 // ain1 = "ulong2 val" 4917 public result_ulong2 reduce_my_ulong2(Allocation ain1, Script.LaunchOptions sc) { 4918 // check ain1 4919 if (!ain1.getType().getElement().isCompatible(__U64_2)) { 4920 throw new RSRuntimeException("Type mismatch with U64_2!"); 4921 } 4922 Allocation aout = Allocation.createSized(mRSLocal, __U64_2, 1); 4923 aout.setAutoPadding(true); 4924 reduce(mExportReduceIdx_my_ulong2, new Allocation[]{ain1}, aout, sc); 4925 return new result_ulong2(aout); 4926 } 4927 4928 private final static int mExportReduceIdx_my_ulong4 = 62; 4929 // in1 = "val", flattened 4-vectors 4930 public result_ulong4 reduce_my_ulong4(long[] in1) { 4931 // Verify that "in1" is non-null. 4932 if (in1 == null) { 4933 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4934 } 4935 // Verify that the array length is a multiple of the vector size. 4936 if (in1.length % 4 != 0) { 4937 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 4938 } 4939 Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); 4940 ain1.setAutoPadding(true); 4941 ain1.copyFrom(in1); 4942 4943 result_ulong4 result = reduce_my_ulong4(ain1, null); 4944 result.mTempIns = new Allocation[]{ain1}; 4945 return result; 4946 } 4947 4948 // ain1 = "ulong4 val" 4949 public result_ulong4 reduce_my_ulong4(Allocation ain1) { 4950 return reduce_my_ulong4(ain1, null); 4951 } 4952 4953 // ain1 = "ulong4 val" 4954 public result_ulong4 reduce_my_ulong4(Allocation ain1, Script.LaunchOptions sc) { 4955 // check ain1 4956 if (!ain1.getType().getElement().isCompatible(__U64_4)) { 4957 throw new RSRuntimeException("Type mismatch with U64_4!"); 4958 } 4959 Allocation aout = Allocation.createSized(mRSLocal, __U64_4, 1); 4960 aout.setAutoPadding(true); 4961 reduce(mExportReduceIdx_my_ulong4, new Allocation[]{ain1}, aout, sc); 4962 return new result_ulong4(aout); 4963 } 4964 4965 private final static int mExportReduceIdx_my_array_ulong = 63; 4966 // in1 = "val" 4967 public resultArray7_ulong reduce_my_array_ulong(long[] in1) { 4968 // Verify that "in1" is non-null. 4969 if (in1 == null) { 4970 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 4971 } 4972 Allocation ain1 = Allocation.createSized(mRSLocal, __U64, in1.length); 4973 ain1.setAutoPadding(true); 4974 ain1.copyFrom(in1); 4975 4976 resultArray7_ulong result = reduce_my_array_ulong(ain1, null); 4977 result.mTempIns = new Allocation[]{ain1}; 4978 return result; 4979 } 4980 4981 // ain1 = "ulong val" 4982 public resultArray7_ulong reduce_my_array_ulong(Allocation ain1) { 4983 return reduce_my_array_ulong(ain1, null); 4984 } 4985 4986 // ain1 = "ulong val" 4987 public resultArray7_ulong reduce_my_array_ulong(Allocation ain1, Script.LaunchOptions sc) { 4988 // check ain1 4989 if (!ain1.getType().getElement().isCompatible(__U64)) { 4990 throw new RSRuntimeException("Type mismatch with U64!"); 4991 } 4992 Allocation aout = Allocation.createSized(mRSLocal, __U64, 7); 4993 aout.setAutoPadding(true); 4994 reduce(mExportReduceIdx_my_array_ulong, new Allocation[]{ain1}, aout, sc); 4995 return new resultArray7_ulong(aout); 4996 } 4997 4998 private final static int mExportReduceIdx_my_array_ulong2 = 64; 4999 // in1 = "val", flattened 2-vectors 5000 public resultArray7_ulong2 reduce_my_array_ulong2(long[] in1) { 5001 // Verify that "in1" is non-null. 5002 if (in1 == null) { 5003 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 5004 } 5005 // Verify that the array length is a multiple of the vector size. 5006 if (in1.length % 2 != 0) { 5007 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 2 in length!"); 5008 } 5009 Allocation ain1 = Allocation.createSized(mRSLocal, __U64_2, in1.length / 2); 5010 ain1.setAutoPadding(true); 5011 ain1.copyFrom(in1); 5012 5013 resultArray7_ulong2 result = reduce_my_array_ulong2(ain1, null); 5014 result.mTempIns = new Allocation[]{ain1}; 5015 return result; 5016 } 5017 5018 // ain1 = "ulong2 val" 5019 public resultArray7_ulong2 reduce_my_array_ulong2(Allocation ain1) { 5020 return reduce_my_array_ulong2(ain1, null); 5021 } 5022 5023 // ain1 = "ulong2 val" 5024 public resultArray7_ulong2 reduce_my_array_ulong2(Allocation ain1, Script.LaunchOptions sc) { 5025 // check ain1 5026 if (!ain1.getType().getElement().isCompatible(__U64_2)) { 5027 throw new RSRuntimeException("Type mismatch with U64_2!"); 5028 } 5029 Allocation aout = Allocation.createSized(mRSLocal, __U64_2, 7); 5030 aout.setAutoPadding(true); 5031 reduce(mExportReduceIdx_my_array_ulong2, new Allocation[]{ain1}, aout, sc); 5032 return new resultArray7_ulong2(aout); 5033 } 5034 5035 private final static int mExportReduceIdx_my_array_ulong4 = 65; 5036 // in1 = "val", flattened 4-vectors 5037 public resultArray7_ulong4 reduce_my_array_ulong4(long[] in1) { 5038 // Verify that "in1" is non-null. 5039 if (in1 == null) { 5040 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 5041 } 5042 // Verify that the array length is a multiple of the vector size. 5043 if (in1.length % 4 != 0) { 5044 throw new RSIllegalArgumentException("Array \"in1\" is not a multiple of 4 in length!"); 5045 } 5046 Allocation ain1 = Allocation.createSized(mRSLocal, __U64_4, in1.length / 4); 5047 ain1.setAutoPadding(true); 5048 ain1.copyFrom(in1); 5049 5050 resultArray7_ulong4 result = reduce_my_array_ulong4(ain1, null); 5051 result.mTempIns = new Allocation[]{ain1}; 5052 return result; 5053 } 5054 5055 // ain1 = "ulong4 val" 5056 public resultArray7_ulong4 reduce_my_array_ulong4(Allocation ain1) { 5057 return reduce_my_array_ulong4(ain1, null); 5058 } 5059 5060 // ain1 = "ulong4 val" 5061 public resultArray7_ulong4 reduce_my_array_ulong4(Allocation ain1, Script.LaunchOptions sc) { 5062 // check ain1 5063 if (!ain1.getType().getElement().isCompatible(__U64_4)) { 5064 throw new RSRuntimeException("Type mismatch with U64_4!"); 5065 } 5066 Allocation aout = Allocation.createSized(mRSLocal, __U64_4, 7); 5067 aout.setAutoPadding(true); 5068 reduce(mExportReduceIdx_my_array_ulong4, new Allocation[]{ain1}, aout, sc); 5069 return new resultArray7_ulong4(aout); 5070 } 5071 5072 private final static int mExportReduceIdx_my_bool = 66; 5073 // in1 = "val" 5074 public result_bool reduce_my_bool(byte[] in1) { 5075 // Verify that "in1" is non-null. 5076 if (in1 == null) { 5077 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 5078 } 5079 Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); 5080 ain1.setAutoPadding(true); 5081 ain1.copyFrom(in1); 5082 5083 result_bool result = reduce_my_bool(ain1, null); 5084 result.mTempIns = new Allocation[]{ain1}; 5085 return result; 5086 } 5087 5088 // ain1 = "bool val" 5089 public result_bool reduce_my_bool(Allocation ain1) { 5090 return reduce_my_bool(ain1, null); 5091 } 5092 5093 // ain1 = "bool val" 5094 public result_bool reduce_my_bool(Allocation ain1, Script.LaunchOptions sc) { 5095 // check ain1 5096 if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { 5097 throw new RSRuntimeException("Type mismatch with BOOLEAN!"); 5098 } 5099 Allocation aout = Allocation.createSized(mRSLocal, __BOOLEAN, 1); 5100 aout.setAutoPadding(true); 5101 reduce(mExportReduceIdx_my_bool, new Allocation[]{ain1}, aout, sc); 5102 return new result_bool(aout); 5103 } 5104 5105 private final static int mExportReduceIdx_my_array_bool = 67; 5106 // in1 = "val" 5107 public resultArray7_bool reduce_my_array_bool(byte[] in1) { 5108 // Verify that "in1" is non-null. 5109 if (in1 == null) { 5110 throw new RSIllegalArgumentException("Array \"in1\" is null!"); 5111 } 5112 Allocation ain1 = Allocation.createSized(mRSLocal, __BOOLEAN, in1.length); 5113 ain1.setAutoPadding(true); 5114 ain1.copyFrom(in1); 5115 5116 resultArray7_bool result = reduce_my_array_bool(ain1, null); 5117 result.mTempIns = new Allocation[]{ain1}; 5118 return result; 5119 } 5120 5121 // ain1 = "bool val" 5122 public resultArray7_bool reduce_my_array_bool(Allocation ain1) { 5123 return reduce_my_array_bool(ain1, null); 5124 } 5125 5126 // ain1 = "bool val" 5127 public resultArray7_bool reduce_my_array_bool(Allocation ain1, Script.LaunchOptions sc) { 5128 // check ain1 5129 if (!ain1.getType().getElement().isCompatible(__BOOLEAN)) { 5130 throw new RSRuntimeException("Type mismatch with BOOLEAN!"); 5131 } 5132 Allocation aout = Allocation.createSized(mRSLocal, __BOOLEAN, 7); 5133 aout.setAutoPadding(true); 5134 reduce(mExportReduceIdx_my_array_bool, new Allocation[]{ain1}, aout, sc); 5135 return new resultArray7_bool(aout); 5136 } 5137 5138 } 5139 5140